Update order status
update_order_statusUpdate order status to reflect its progress through the sales lifecycle. Transition an order between permitted states, such as pending to paid or shipped to delivered, ensuring proper flow.
Instructions
Move an order through its lifecycle: pending->paid|cancelled, paid->shipped, shipped->delivered. Any other transition is rejected (CONFLICT) with the allowed next statuses. 'refunded' is never set directly (use issue_refund). Setting the current status again is a no-op. Changes are audit-logged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Optional context stored in the audit log (e.g. tracking number). | |
| status | Yes | Target status. Allowed moves: pending->paid|cancelled, paid->shipped, shipped->delivered. | |
| order_id | Yes | Numeric order ID, e.g. 1042. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | ||
| changed | Yes | False when the order was already in the requested status (no-op). | |
| order_id | Yes | ||
| updated_at | Yes | ||
| previous_status | Yes | ||
| allowed_next_statuses | Yes |