Update sales order
update_sales_orderUpdate a sales order. Pass lines to replace the entire line list. Lines that are not sent are deleted. If that call would delete existing lines, the first call does not write. It returns confirmation_required, confirm_token, and a summary with delete_count plus each line name and sku. Show that summary to the user and wait for an explicit yes, then call again with the same arguments plus confirm_token. A call that only changes or adds lines does not need confirm_token. A confirm boolean is ignored. The token is bound to this key, this organization, this order, and the id, sku, name, and quantity of each line that would be deleted. It expires in 5 minutes and works once. If that delete list changes, the token is rejected. If a line is added or changed after the token is accepted, nothing is written and the call returns a new confirmation_required. A line_id that is not on this order is rejected and nothing is changed. A line with quantity_shipped greater than 0 cannot be removed. New lines (no line_id) need item_id or a non-empty description. Each line uses quantity and unit_price. Include line_id to keep an existing line. Fields omitted on a kept line stay as stored. An empty string or null clears that field. Changing item_id on a kept line loads description, SKU, and barcode from the new item in this organization, or clears them when that item has none.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"order_id": "<order_id>"
},
"name": "update_sales_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| memo | No | ||
| lines | No | ||
| currency | No | ||
| order_id | Yes | ||
| tax_rate | No | ||
| order_date | No | ||
| customer_id | No | ||
| sheet_number | No | ||
| confirm_token | No | ||
| expected_date | No | ||
| discount_amount | No |