Update document item
update_document_itemUpdate a line item on a document (invoice, quote, bill, etc.). To change several lines on one document, prefer update_document_items_bulk — one call instead of many. To create the document or change its header/dates/totals, use save_document.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Line item id. Required on update_document_item; omit on add_document_line. | |
| cost | No | Unit cost (for margin / cost-of-sales), in :costcurrency. | |
| name | No | Line item name / title. | |
| sort | No | Display order of the line within the document (ascending). | |
| unit | No | Unit label for the quantity (e.g. "hours", "kg"). | |
| price | No | Unit price (per-unit selling price) in the document currency. | |
| amount | No | Line total (unit price × quantity), usually derived from :price × :quantity. Accepts a number or a numeric string. | |
| product | No | Id of a catalog product to link this line to. | |
| variant | No | Id of a catalog product variant to link this line to. | |
| quantity | No | Number of units. Accepts a number or a numeric string. | |
| accountid | No | Per-line chart-of-accounts / expense-category id; bills split cost by category at accrual (see list_accounts). | |
| quinvoice | No | Id of the parent document (invoice, quote, bill, etc.) this line belongs to. | |
| responseid | No | Internal: correlation id used to return the updated entity to the frontend; omit. | |
| description | No | Line item description. | |
| costcurrency | No | ISO 4217 currency of :cost, when it differs from the document currency. | |
| baseupdatedat | No | Optimistic-concurrency token: the line's last-known updatedat (epoch number or ISO string). A stale value is rejected; omit to skip the check. |