order.cancel
Cancel an unpaid order (pending_cod/awaiting_transfer) — restocks lines.
- scope:
orders:write - storefront-visible (bumps the catalog generation): no
- destructive: yes — supports dryRun preview
Payload
| field | type | required | notes |
|---|---|---|---|
orderId | string (/^ord_[a-zA-Z0-9]{1,32}$/) | yes | |
reason | "merchant" | "expired" | yes |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"orderId": {
"type": "string",
"pattern": "^ord_[a-zA-Z0-9]{1,32}$"
},
"reason": {
"type": "string",
"enum": [
"merchant",
"expired"
]
}
},
"required": [
"orderId",
"reason"
],
"additionalProperties": false
}Generated from the live platform registries at build time — reference pages cannot go stale. Markdown variant: /reference/commands/order.cancel.md