invoice_item_create
Adds one line item to an invoice. unit_price_cents is integer CENTS, 0 or more ($15.00 → 1500); quantity is 0.001 to 1,000,000 with up to 3 decimals (1.5 hours → 1.5); unit is an optional label (hr, kg); discount_bps is an optional line discount (10% → 1000). quantity × unit_price_cents is at most 10,000,000,000. Refuses a negative price (send discount_bps instead), a 'paid' parent (retire the payment first) and a 'cancelled' parent (issue a new invoice). Re-derives the invoice's paid/sent status. tax_code is the line's code under the document's tax_scheme, refused on a document without a scheme. NEXT: invoice_read to see the updated total.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | ||
| position | No | ||
| quantity | No | How many, up to 3 decimals (1.5 hours → 1.5). A new line defaults to 1. | |
| tax_code | No | ||
| invoice_id | No | ||
| description | No | ||
| discount_bps | No | Optional line discount in basis points: 10% → 1000, none → 0. A discount is never a lower or negative price. | |
| unit_price_cents | No |