إنتقل إلى المحتوى الرئيسي

Cancel Order

This endpoint allows you to cancel an existing order. Cancellation is typically allowed only if the order is still in a pending state and has not yet been processed for shipping.

Path Parameters​

ParameterTypeDescription
idstringThe unique system ID of the order you wish to cancel.
PUThttps://api-fulfillment.bosta.co/api/v1/orders/:id/cancel

Cancel an order by its ID. Check the warnings array for any non-blocking issues.

Responses

200Order cancelled successfully
 {
"success": "true",
"data": {
"status": "CANCELLED",
"message": "Order cancelled successfully",
"warnings": []
},
"meta": {
"timestamp": "2026-01-15T10:33:30.474Z"
}
}
400Cancellation Failed
 {
"success": "false",
"message": "Cannot cancel order in current status",
"meta": {
"timestamp": "2026-01-15T10:35:00.000Z"
}
}

Response Breakdown​

  • success: Boolean string indicating the overall result.
  • data.status: Confirms the new status of the order (CANCELLED).
  • data.warnings: An array of strings containing non-critical information or edge cases encountered during cancellation.