Skip to content
SIBISIBI Developers
Esc
navigateopen⌘Jpreview

Cancel order

Requests cancellation of an order. A 201 response means the cancellation request was received — not necessarily that the order is cancelled yet.

Check the cancellationStatus in the response:

  • orders that can be cancelled immediately (for example, those not yet dispatched) come back canceled right away
  • others come back pending and are reviewed asynchronously before being approved or denied

For requests that return pending, listen for the order.cancellationrequest.created and order.cancellationrequest.updated events to learn the outcome — see Order Cancellation Requests events.

POST/{id}/cancel
Path parameters
idstringrequired
The ID of the order to cancel
Request body
application/json
reasonstringrequired
Reason for the cancellation
Responses
201Cancellation requested. The response reflects the current `cancellationStatus`: usually `pending` (queued for asynchronous review), but already `canceled` for orders that are cancelled immediately.
cancellationStatusstring
Status of the cancellation request. `pending`: the request is awaiting review. `approved` or `canceled`: the order has been cancelled. `denied`: the request was rejected and the order continues processing.
Allowed:approveddeniedpendingcanceled
cancellationReasonstring
Reason for the cancellation request
requestedAtstring<date-time>required
Timestamp when the cancellation was requested
400Bad request - Invalid input data
codestringrequired
Error code indicating the type of error
messagestringrequired
Human-readable error message explaining what went wrong
detailsobject[]
Detailed validation errors when applicable
Show properties
Array of object
fieldstringrequired
errorstringrequired
401Unauthorized - Missing or invalid authentication
codestringrequired
Error code indicating the type of error
messagestringrequired
Human-readable error message explaining what went wrong
detailsobject[]
Detailed validation errors when applicable
Show properties
Array of object
fieldstringrequired
errorstringrequired
500Internal server error
codestringrequired
Error code indicating the type of error
messagestringrequired
Human-readable error message explaining what went wrong
detailsobject[]
Detailed validation errors when applicable
Show properties
Array of object
fieldstringrequired
errorstringrequired
Request
curl -X POST "https://api.sibipro.com/orders/string/cancel" \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "Customer requested a cancellation"
}'
Response
{
  "cancellationStatus": "pending",
  "cancellationReason": "Customer requested a cancellation",
  "requestedAt": "2024-01-20T12:00:00Z"
}