01.software Docs

cancelOrder

Use the SDK for application integration. This read-only reference covers Commerce, Customer Auth, Membership and Events.

All HTTP operations
POST
/api/orders/cancel

Requires tenant-admin policy: sk01_/pat01_ with write scope. Captured-payment cancellation and cancellation of a placed zero-total order without any payment record require sk01_ on this HTTP path (or the internal Admin Panel action). PAT admission alone does not authorize either cancellation and returns 403 role_denied. Customer JWT is denied.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Public integration credentials: verified opaque sk01_ secret key or pat01_ personal access token; operation policy and read/write scopes still apply. These credentials are not Customer JWTs.

Header Parameters

X-Idempotency-Key?string

Reuse the same identity and request body after an uncertain result.

Length1 <= length

Request Body

application/json
  1. body
orderNumber*string

Order number to cancel

Length1 <= length
reasonCode?string

Operator-selected cancel reason code

Default"other"
Value in"customer""inventory""fraud""declined""staff""other"
reasonDetail?string

Internal cancellation detail stored on the order

Lengthlength <= 2000

Response Body

Successful operation

application/json
  1. response
orderId*string
Length1 <= length
transactionId*string
Length1 <= length
refundedAmount*0
Value in0
providerRefunded*false
Value infalse
refundPending*true
Value intrue
status*"canceled"
Value in"canceled"
cancelCommitted*true
Value intrue

Examples may be generated from schemas; they are illustrative, not recorded successful API calls. Example snippets may omit required authentication headers.

Example Request
curl -X POST 'https://api.01.software/api/orders/cancel' \  -H 'Content-Type: application/json' \  -d '{  "orderNumber": "string"}'
Example Response
{  "orderId": "string",  "transactionId": "string",  "refundedAmount": 0,  "providerRefunded": false,  "refundPending": true,  "status": "canceled",  "cancelCommitted": true}