Edit an order
order_editModify an existing order by its ID. Use the payment field to control the order state: -2 = keep as unvalidated quote (not paid); -1 = validate as invoice without payment; a payment method ID (from data_list_payments_modes) = record an actual payment and validate the order. Use paymentAmount to specify a partial payment amount (omit for full payment). Items can only be added or changed on unvalidated orders. Once validated, only payments can be recorded. Returns the orderID, a payment link, and a PDF invoice or quote URL.
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": {
"idempotencyKey": "<idempotencyKey>",
"orderID": "<orderID>",
"payment": "<payment>"
},
"name": "order_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | No | ||
| client | No | New customer details, used when idClient is omitted. Requires customers.write in addition to sales.write. | |
| idtable | No | Table ID | |
| orderID | Yes | ID of the order to modify | |
| payment | Yes | -2 for a pending quote, -1 for an unpaid invoice, 0 for no collection, or a positive Kash payment method ID to record payment. | |
| idClient | No | Customer ID | |
| idcaisse | No | Cash register ID | |
| pagerNum | No | Pager/buzzer number | |
| numcouverts | No | Number of covers/guests | |
| paymentAmount | No | Amount collected, including for a partial payment (for example 12.50). With a positive payment method, supply an amount greater than zero or omit it to use the worker default. | |
| publicComment | No | Comment visible on the receipt | |
| deliveryMethod | No | Delivery method: 0=takeaway, 1=delivery, 2=on-site, 3=drive, 4=relay, 5=table service, 6=room service | |
| idempotencyKey | Yes | Unique ID for this operation, such as a UUID. After a timeout, retry with the same key and arguments. Use a new key for each distinct operation. | |
| privateComment | No | Internal staff-only comment |