Change an order that needs attention
update_orderChange an order that needs attention. Replaces the whole order with the given fields, like saving the portal's order form: every field and every line is needed, and fields left out are cleared. Only orders with status NEEDS_ATTENTION can be changed; any other order returns 409 order_not_editable. Orders from a connected store keep the store's order number. Changing an order doesn't charge the wallet. When the order has no problems after the change, its stock is reserved and the estimated shipping and handling fee is held from the available balance. It takes an optional idempotencyKey. A retry with the same idempotencyKey returns the first result instead of applying the change twice. Needs the orders:write permission.
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": {
"id": "<id>"
},
"name": "update_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The record's id | |
| city | No | ||
| lines | No | The items in the order | |
| address1 | No | ||
| address2 | No | ||
| province | No | ||
| buyerNote | No | ||
| channelId | No | A shipping option from an order preview (shippingOptions[].channelId). Leave empty to use your shipping preference for the country. | |
| postalCode | No | ||
| countryCode | No | Two-letter country code, for example US | |
| storeOrderNo | No | Your store's order number, unique among your orders. Leave empty to use our order number. | |
| recipientName | No | ||
| idempotencyKey | No | Make up a new unique value for each new action; reuse the same value only when retrying the same action. | |
| recipientEmail | No | ||
| recipientPhone | No | ||
| recipientCompany | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| replayed | No | true when this is the saved result of an earlier call with the same idempotencyKey |