Create invoice
create_invoiceDraft invoice with its own line items, on a job or a customer. Nothing is sent until send_invoice. Creates a draft miscellaneous invoice, as New Invoice > Miscellaneous does, for a customer and optionally one of their jobs (job_id); no quote needed (for that, create_invoice_from_quote). Each line is misc (description, quantity, unit_price), time (hours at a billing rate) or price_list (item_code of a price list item); time and price list lines take the customer's price group price unless unit_price is given. Tax uses the default rate (a price list item's own rate), or tax_rate by name; tax_inclusive says whether prices include tax (default exclusive, or the job's setting). Reference and description default to the job's. theme picks a theme by name; terms sets the invoice terms (default the theme's). The due date follows the payment terms unless due_date is given. Kits are not supported. The invoice stays a draft until send_invoice.
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": {
"customer_id": "<customer_id>",
"line_items": "<line_items>"
},
"name": "create_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| terms | No | Invoice terms. Default: the theme's invoice terms. | |
| theme | No | Theme name (Settings > Themes). Default: the customer's. | |
| job_id | No | Invoice this customer's job (list_jobs). | |
| due_date | No | Default: the payment terms. | |
| reference | No | Customer reference. Default: the job's. | |
| line_items | Yes | ||
| customer_id | Yes | From list_customers or get_job. | |
| description | No | Shown on the invoice. Default: the job's. | |
| invoice_date | No | Default: today. | |
| tax_inclusive | No | Prices include tax. Default: the job's or customer's setting (tax exclusive). |