Change a draft invoice
update_draft_invoiceUse this when the user asks to change a draft invoice: its lines, prices, date, currency or notes. Changes a draft invoice: only the fields passed change; items replaces all lines. Issued invoices, drafts made by the Shopify app, and supplementary or advance invoice drafts cannot be changed here. Line descriptions are printed on the tax invoice: write them in English, translating when the user writes in another language (for example "Консультация" becomes "Consultation"). Keep names, brands and model numbers exactly as written. Use another language only when the user explicitly asks for it or quotes the exact text. Lines are priced by Fatura Go as in the app (each line rounded, header = sum of lines; with prices_include_vat the entered price includes VAT, e.g. 26.95 = 25.67 + 1.28 VAT). Returns the stored lines and totals and app_url. Nothing is issued, numbered as a tax invoice or sent: the user reviews and issues it in Fatura Go ("Review and issue in Fatura Go"). Do not use it for a new invoice (create_draft_invoice) or for an issued invoice, which is changed with a credit note in Fatura Go.
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": {
"invoice_id": "<invoice_id>"
},
"name": "update_draft_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | YYYY-MM-DD. Default today (UAE). | |
| items | No | The lines, 1 to 100. On an update they replace every line. | |
| notes | No | ||
| fx_rate | No | AED per 1 unit of a foreign currency. | |
| currency | No | One of AED, SAR, USD, EUR, GBP, KWD, QAR, BHD, OMR, INR. Default the client's preferred currency, else the business currency. | |
| due_date | No | YYYY-MM-DD, on or after date. | |
| client_id | No | From list_clients or create_client. | |
| invoice_id | Yes | From create_draft_invoice or list_invoices (status draft). | |
| business_id | No | From list_businesses. May be left out when the connection shares exactly one business. | |
| client_name | No | Only when the client_id is not known: nothing is written, and the matching clients are returned to pick from. | |
| idempotency_key | No | Optional. A unique string (for example a UUID) for this request: a retry with the same key returns the first result instead of writing again. | |
| prices_include_vat | No | Whether unit_price includes the 5% VAT. Default the business setting. | |
| document_language_override | No | Language this document prints in: en, ar or bilingual. Left out: a new draft follows the business setting and an update keeps the current choice; null goes back to the business setting. Only for a document the user asked to print in another language. |