Update invoice
update_invoiceReplace an existing invoice's full contents, including all line items, to correct amounts, dates, or the billed customer. Requires a fresh SyncToken; linked payments remain unchanged.
Instructions
Replace the contents of an existing invoice. Use it to correct amounts, dates, or the billing customer. Write operation that overwrites the live record: the line array is replaced wholesale, so send every line the invoice should end with or the omitted ones are dropped and the total changes. Not idempotent, and it requires the Id plus the SyncToken from a fresh get_invoice; a stale token fails with error 5010. Payments already linked to the invoice are not adjusted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoice | Yes | Full replacement contents for the invoice, including every line it should end with, not only the changed ones. | |
| invoice_id | Yes | QuickBooks Invoice Id, as returned by search_invoices, list_invoices, or create_invoice. This is the internal Id, not the DocNumber printed on the invoice. | |
| sync_token | Yes | SyncToken from a fresh get_invoice call for this Id. QuickBooks rejects a stale token with error 5010, so re-read the invoice instead of reusing an older token. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | No | ||
| invoice | No |