Cancel Order
Flow
Description: If you no longer want to continue paying for an order, use this API to set the order status on Baokim to cancelled.
API Information
Method: POST
URL: /b2b/core/api/ext/order/cancel
Request
Main Parameters Table
| Field Name | Data Type | Required | Description |
|---|---|---|---|
| request_id | String | ✅ | Request ID |
| request_time | Datetime | ✅ | Request time. Format: YYYY-MM-DD H:m:s |
| merchant_code | String | ✅ | Merchant code provided by Baokim |
| mrc_order_id | String | ✅ | Merchant's order ID |
Request Example
{
"request_id": "RQID0001",
"request_time": "2023-08-18T10:00:00.000Z",
"merchant_code": "MERCHANTCODE",
"mrc_order_id": null
}
Response
note
HTTP 200 - Success
Main Parameters Table
| Field Name | Data Type | Required | Description |
|---|---|---|---|
| code | Integer | ✅ | Result code |
| message | String | ✅ | Message |
| data.mrc_order_id | String | ❌ | Merchant's order ID (required if order_id null) |
| data.order_id | String | ❌ | Baokim order ID (required if mrc_order_id null) |
Response Example
{
"code": 0,
"message": null,
"data": {
"mrc_order_id": null,
"order_id": null
}
}
Error Codes
| Error Code | Description |
|---|---|
| 104 | Authentication error |
| 105 | Invalid digital signature |
| 108 | Order cannot be cancelled |
| 109 | Order not found |