Cancel an order and release its reserved stock. A partly shipped order keeps what shipped and cancels the remainder. Returns 409 `APPROVAL_REQUIRED` with an `approvalId` when an approval policy wants a decision first.
Supabase browser session cookie. Supabase may split larger session values into chunked cookies like sb-auth-token.0.
In: cookie
uuiduuidapplication/json
An optional reason.
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/v1/organizations/123/orders/123e4567-e89b-12d3-a456-426614174000/cancel" \ -H "Content-Type: application/json" \ -d '{ "reason": "string" }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "number": 0, "formattedNumber": "string", "customer": { "id": 0, "name": "string" }, "status": "draft", "channel": "manual", "invoicingPolicy": "before_fulfillment", "deliveryMethod": "pickup", "currency": "string", "subtotalExcl": 0, "vatTotal": 0, "totalIncl": 0, "requestedDeliveryDate": "2019-08-24", "quoteId": "826e5192-f8c6-4e24-aab3-3910e46c52b7", "confirmedAt": "string", "completedAt": "string", "cancelledAt": "string", "createdAt": "string", "updatedAt": "string", "customerContactId": "94bcd060-4a66-4a44-96c9-7a2da2955e96", "source": "string", "externalId": "string", "vatInclusive": true, "vatRegime": "standard", "discountKind": "none", "discountValue": 0, "discountDescription": "string", "promotionId": "3eaf888b-516c-4eac-ac00-1312640986a2", "templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d", "paymentRequired": true, "shippingAddress": { "name": "string", "line1": "string", "line2": "string", "postalCode": "string", "city": "string", "country": "string", "phone": "string" }, "buyerName": "string", "buyerEmail": "string", "buyerPhone": "string", "notes": "string", "customerNote": "string", "cancelReason": "string", "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e", "lines": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "lineType": "product", "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113", "variantId": "d53feca7-c65b-4741-aca7-827a42d686bf", "productType": "string", "sku": "string", "trackInventory": true, "title": "string", "description": "string", "quantity": 0, "quantityCancelled": 0, "unit": "string", "unitPrice": 0, "vatRate": 0, "discountKind": "none", "discountValue": 0, "promotionId": "3eaf888b-516c-4eac-ac00-1312640986a2", "position": 0, "allocated": 0, "backordered": 0, "fulfilled": 0, "invoiced": 0, "returned": 0 } ], "invoices": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "displayNumber": "string", "kind": "string", "status": "string", "totalIncl": 0, "amountPaidCents": 0, "amountDueCents": 0, "createdAt": "string" } ], "fulfillmentStatus": "unfulfilled", "paymentStatus": "none"}length <= 1000