order.cancel
Cancel an order that has NOT been paid yet (pending_payment -> cancelled), releasing its reservation. Idempotent by state; cancelling a paid order is a conflict. When money has already been taken, give it back FIRST with order.refund — never cancel before refunding, because a cancelled order still holding the customer’s money is a broken obligation to them.
- Scope:
order.write - System: no
- Reachable from:
POST /v1/commands/order.cancel(tenant credential) · MCP toolorder.cancel· SDKclient.call('order.cancel', …) - Events:
order.cancelled,inventory.released
Input (JSON Schema)
Section titled “Input (JSON Schema)”{ "properties": { "order_id": { "minLength": 1, "type": "string" }, "reason": { "type": "string" } }, "required": [ "order_id" ], "type": "object"}Result (200)
Section titled “Result (200)”{ "additionalProperties": false, "properties": { "order_id": { "type": "string" }, "status": { "type": "string" } }, "required": [ "order_id", "status" ], "type": "object"}Errors
Section titled “Errors”validation_failed (400) · unauthorized (401) · forbidden (403) · conflict (409) · internal (500)