Update document item salestax
update_document_item_salestaxUpdate the sales-tax (VAT) on a single line item of a document (invoice, quote, credit note, debit note) — change the rate or amount. Identify the item by its id. To add a new sales-tax line use add_document_item_salestax.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Sales-tax line id. On update, identifies which sales-tax to change (or pass :salestaxid); omit on add. | |
| name | No | Sales-tax name (e.g. "VAT"). | |
| rate | No | Sales tax rate as a DECIMAL FRACTION, e.g. 0.15 = 15% (NOT 15). A rate of 1.0 (100%) or higher is rejected. | |
| amount | No | Fixed sales-tax amount, used instead of :rate when :useamount is true. | |
| itemid | No | Id of the document line item this sales-tax attaches to. On update, if :id/:salestaxid are omitted and the item has exactly one sales-tax, it is resolved from here. | |
| invoice | No | Alias for the parent document id (see :quinvoice). | |
| parentid | No | Id of the business's own sales-tax definition this line applies (see get_business_profile salestaxes). On add, when omitted, the definition is matched by name, then by rate when exactly one definition has that rate. If several match, the call is refused and lists their ids; pass one as parentid. A 0 rate with no name match stays unlinked. | |
| exclusive | No | Whether the tax is exclusive (added on top of the line amount) rather than inclusive (already contained in it). | |
| invoiceid | No | Alias for the parent document id (see :quinvoice); takes precedence when several are supplied. | |
| quinvoice | No | Id of the parent document (invoice, quote, credit/debit note). Used to reindex the correct document; aliased by :invoice / :invoiceid. | |
| useamount | No | Use the fixed :amount instead of computing tax from :rate. | |
| responseid | No | Internal: correlation id used to return the updated entity to the frontend; omit. | |
| salestaxid | No | Id of the sales-tax to update (alternative to :id). | |
| recoverable | No | Whether this input sales tax / VAT is recoverable. | |
| referencenumber | No | Sales-tax registration / reference number. |