Create a draft invoice
create_draft_invoiceUse this when a connected user asks to create, make or draft an invoice for one of their clients. Saves a new draft sales invoice for a client of the business. 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"). due_date defaults to the client's or business's payment terms. Not for converting a quote: that is done in Fatura Go (Convert to invoice), which links the two. Do not use it to change an existing draft (update_draft_invoice), for a quote (create_draft_quote), or to issue or send an invoice: that happens 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": {
"items": "<items>"
},
"name": "create_draft_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | YYYY-MM-DD. Default today (UAE). | |
| items | Yes | 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. USD defaults to the 3.6725 peg. | |
| 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. | |
| 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. |