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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | No | Items to add (only for unvalidated orders or new orders) | |
| client | No | Inline customer details | |
| idUser | No | Staff member ID | |
| idtable | No | Table ID | |
| orderID | Yes | ID of the order to modify | |
| payment | Yes | -2 = not paid, not validated | -1 = not paid, validated (invoice) | payment method ID = record a payment | |
| idClient | No | Customer ID | |
| idcaisse | No | Cash register ID | |
| pagerNum | No | Pager/buzzer number | |
| numcouverts | No | Number of covers/guests | |
| paymentAmount | No | Amount paid (partial payment support) | |
| 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 | |
| privateComment | No | Internal staff-only comment |