Create invoice
create_invoiceIssues an invoice for an order at its full total, enforcing one invoice per order and rejecting cancelled, refunded, or already-invoiced orders.
Instructions
Issue the invoice for an order (amount = order total). Each order can have only one invoice: a second request is refused with the existing invoice number (CONFLICT). Cancelled and refunded orders cannot be invoiced.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | No | Optional note printed on the invoice. | |
| order_id | Yes | Numeric order ID, e.g. 1042. | |
| due_in_days | No | Payment terms for unpaid orders (default 14). Paid orders are invoiced as due today. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoice | Yes |