bexio Document Positions
bexio_document_positionsCreate, read, update, and delete line-item positions on quotes, orders, and invoices. Supports custom items, articles, text blocks, subtotals, discounts, page breaks, and subpositions.
Instructions
Manage line-item positions on sales documents (quotes/kb_offer, orders/kb_order, invoices/kb_invoice). position_type selects the kind of position: "custom" (free position: amount, unit_id, account_id, tax_id, text, unit_price, discount_in_percent), "article" (item position: same fields plus article_id referencing an item), "text" (text block: text, show_pos_nr), "subtotal" (text), "discount" (text, is_percentual, value), "pagebreak" (pagebreak flag) and "subposition" (grouping position: text, show_pos_nr). Actions: "list" (all positions of that kind on the document; optional limit/offset), "get" (single position, requires position_id), "create" (payload with the fields of the chosen position_type), "update" (requires position_id + payload; partial updates allowed), "delete" (requires position_id — permanently removes the position, cannot be undone). All actions require document_type, document_id and position_type. is_optional is writable only on custom/article positions and only honored on quotes and orders. Amounts/prices are strings with max. 6 decimals.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results for "list" (max 2000) | |
| action | Yes | Operation to perform | |
| offset | No | Results to skip for "list" | |
| payload | No | Position fields (all optional; only the fields of the selected position_type apply). custom: amount, unit_id, account_id, tax_id, text, unit_price, discount_in_percent, is_optional. article: same as custom plus article_id. text: text, show_pos_nr. subtotal: text. discount: text, is_percentual, value. pagebreak: pagebreak. subposition: text, show_pos_nr. | |
| document_id | Yes | Id of the parent document (quote, order or invoice) | |
| position_id | No | Position id (required for get/update/delete) | |
| document_type | Yes | Type of the parent document: kb_offer (quote), kb_order (order) or kb_invoice (invoice) | |
| position_type | Yes | Kind of position; maps to the kb_position_custom/kb_position_article/kb_position_text/kb_position_subtotal/kb_position_discount/kb_position_pagebreak/kb_position_subposition endpoints |