Record an order
order_createRecord a new order in the connected shop. Input includes paymentMode, and items[]. Each item can be of type 'catalog' (with productId), 'department' (with price and deptId) or 'free' (with title and price). Check if the client already exists using data_list_clients and if the client exists, only specify idClient. If provided, paymentMode should correspond to a payment ID from data_list_payments_modes tool. Returns a sale confirmation JSON including: a link to the PDF invoice, and a link to a private order page showing full order details which can also be used by the client to pay online. IMPORTANT: before creating a validated invoice (payment ≠ -2), call account_show_infos to verify that shopName, adressline1, and companyRegistrationNum are all set. If any of these fields are empty, warn the user and suggest using account_edit to fill them in before issuing invoices.
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>",
"items": "<items>"
},
"name": "order_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| client | No | New customer details, used when idClient is omitted. Requires customers.write in addition to sales.write. | |
| idtable | No | Table ID for table-service orders | |
| payment | No | Kash payment method ID. Omit or use 0 to save an unpaid quote. | |
| idClient | No | Existing customer ID (alternative to inline client object) | |
| idcaisse | No | Cash register ID | |
| pagerNum | No | Pager/buzzer number for the customer | |
| 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 |