Skip to content
SIBISIBI Developers
Esc
↑↓navigate↵open⌘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
Authorization
AuthorizationBearer token · headerrequired

API token from the SIBI developer dashboard (developer.sibipro.com), sent as Authorization: Bearer <token>.

Scopes:cancel:orders
Path parameters
idstringrequired

The ID of the order to cancel

Request body
application/json
reasonstringrequired

Reason for the cancellation

Responses
201

Cancellation 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

400

Bad 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
401

Unauthorized - 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
403

Forbidden - the token was minted for the other environment, is not a Public REST API token, or does not carry the scope this operation requires

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
500

Internal 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 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -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"
}

Was this page helpful?