Updating invoice lines using API

When you POST an invoice, the invoice object including invoice lines are posted into the database. However, when you PUT an invoice, and perhaps add a few lines, only the invoice object is updated, the lines are not added/updated. Which api should one call so as to update both invoice object as well as invoice lines?