Skip to content
v0.3

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 tool order.cancel · SDK client.call('order.cancel', …)
  • Events: order.cancelled, inventory.released
{
"properties": {
"order_id": {
"minLength": 1,
"type": "string"
},
"reason": {
"type": "string"
}
},
"required": [
"order_id"
],
"type": "object"
}
{
"additionalProperties": false,
"properties": {
"order_id": {
"type": "string"
},
"status": {
"type": "string"
}
},
"required": [
"order_id",
"status"
],
"type": "object"
}

validation_failed (400) · unauthorized (401) · forbidden (403) · conflict (409) · internal (500)