Update invoice draft
update_invoice_draftChanges the header fields (dates, language, VAT, references, notes, colour theme) of an invoice draft or an open proforma. Only the given fields change; the draft stays without a number and nothing is issued. Issued documents can't be changed. The bank account of the document is not changed by this tool; set_invoice_bank_account changes it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"company_id": "<company_id>",
"invoice_id": "<invoice_id>"
},
"name": "update_invoice_draft"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vat | No | The default VAT rate of the document in percent, e.g. 22; new items get it. null: no rate. | |
| date | No | The date of the document, YYYY-MM-DD. | |
| notes | No | The notes printed on the document; null clears them. | |
| place | No | The place of issue printed on the document (one line); null clears it. | |
| theme | No | The colour theme of this document, a DOCUMENT_THEME value of get_reference_data (a new document takes the theme of the company). A theme other than SLATE needs the theme feature of the plan of the company owner. | |
| due_date | No | The due date, YYYY-MM-DD, not before the date; null clears it. | |
| language | No | The language of the printed document. | |
| vat_note | No | The VAT note printed on the document; null clears it. | |
| company_id | Yes | The id of the company, from list_companies. | |
| invoice_id | Yes | The id of the document, from list_invoices. | |
| supply_date | No | The date of supply of the goods or services, YYYY-MM-DD; null clears it. | |
| valid_until | No | Proformas only: the last day the proforma is valid, YYYY-MM-DD; null clears it. | |
| vat_category | No | The default VAT category of the document. | |
| exchange_rate | No | A manual exchange rate of the currency of the document to the national currency of the company, as text with up to 6 decimals, e.g. "4.2512"; only for a document in a foreign currency where a rate is required; null clears it. | |
| payment_terms | No | The payment terms printed on the document; null clears them. | |
| split_payment | No | Whether the document is marked for the split payment mechanism (Poland). | |
| buyer_reference | No | The buyer reference required by the customer on e-invoices (one line); null clears it. | |
| order_reference | No | The order (purchase order) reference of the customer (one line); null clears it. | |
| payment_reference | No | The payment reference printed on the document (one line); null clears it. | |
| vat_exemption_reason | No | The VAT exemption reason for an exempt category; null clears it. |