invoice_update
Edits an invoice's header fields and status. status 'paid' cannot be set here — it derives from the payment ledger, so call invoice_payment_record instead. Status moves are machine-checked (draft to sent/cancelled, sent to cancelled); cancelled is terminal and a paid invoice never reopens by hand. A move to 'sent' stamps sent_at automatically when omitted, and currency is ledger-locked once any live payment exists. An agent's change to notes or payment_terms on an issued invoice waits for the owner's approval; on a draft it does not. tax_scheme and prices_include_tax are fixed at creation, as is the tax rate. NEXT: invoice_payment_record to settle money, invoice_read to verify.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The invoice id (invoice_list shows them). | |
| notes | No | ||
| status | No | ||
| paid_at | No | ||
| sent_at | No | ||
| currency | No | ||
| due_date | No | ||
| cash_sale | No | ||
| client_id | No | ||
| source_id | No | ||
| issue_date | No | ||
| tax_scheme | No | ||
| source_type | No | ||
| fx_rate_date | No | The date the fx rate is for, YYYY-MM-DD. Send with fx_rate_to_sgd. | |
| tax_rate_bps | No | ||
| payment_terms | No | ||
| fx_rate_to_sgd | No | sg_gst invoices in a currency other than SGD: Singapore dollars per 1 unit of the invoice currency as a decimal string, up to 6 decimals ("1.3502"), from a source IRAS accepts (MAS, a local bank, Bloomberg, Reuters, Oanda) for the date of supply. Send with fx_rate_date. Or send fx_rate_to_sgd_ppm (1.3502 → 1350200). | |
| invoice_number | No | ||
| payment_method | No | ||
| fx_rate_to_sgd_ppm | No | ||
| prices_include_tax | No | ||
| expected_updated_at | No | Optional compare-and-set guard: the updated_at you last read. Mismatch returns CONFLICT with the current value. |