Cancel Order Request¶
Note
This request is only used in full integration mode.
BRIJ sends this request to cancel an existing order.
Endpoint¶
POST https://api.yourplatform.com/cancel-order
Content-Type: application/json
Request Body¶
{
"orderId": "order_abc123",
"externalOrderId": "partner_order_12345"
}
Request Parameters¶
| Field | Type | Required | Description |
|---|---|---|---|
orderId |
string | Yes | BRIJ's unique identifier for this order |
externalOrderId |
string | Yes | Your platform's unique identifier for this order |
Response Body¶
Success Response¶
Return an empty JSON object on success:
{}
Error Response¶
Return an error response when the order cannot be canceled:
{
"error": {
"reason": "order_already_processed",
"customerFacingReason": "This order has already been completed and cannot be canceled."
}
}
Error Fields¶
| Field | Type | Description |
|---|---|---|
reason |
string | Internal error reason (for logging and debugging) |
customerFacingReason |
string | User-friendly message that can be shown to the customer |
HTTP Status Codes¶
| Status Code | Description |
|---|---|
400 |
Invalid request parameters |
404 |
Order not found |
422 |
Order cannot be canceled (e.g., already processed) |
503 |
Service temporarily unavailable |