Skip to main content

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/mm/order/cancel

Request​

Main Parameters Table​

Field NameData TypeRequiredDescription
request_idString✅Request ID
request_timeDatetime✅Request time. Format: YYYY-MM-DD H:m:s
master_merchant_codeString(50)✅Master merchant code provided by Baokim
sub_merchant_codeString(50)✅Sub merchant code provided by Baokim
mrc_order_idString✅Merchant's order ID

Request Example​

{
"request_id": "RQID0001",
"request_time": "2023-08-18T10:00:00.000Z",
"master_merchant_code": "BAOKIMMASTERMERCHANT",
"sub_merchant_code": "BAOKIMSUBMERCHANT",
"mrc_order_id": null
}

Response​

note

HTTP 200 - Success

Main Parameters Table​

Field NameData TypeRequiredDescription
codeInteger✅Result code
messageString✅Message
datanull✅Returned data

Response Example​

{
"code": 0,
"message": "Successfully",
"data": null
}

Error Codes​

Error CodeDescription
104Authentication error
105Invalid digital signature
108Order cannot be cancelled
109Order not found
710Sub Merchant not found
711Master Merchant not found
712Sub Merchant inactive
713Master Merchant inactive
714Sub Merchant does not belong to Master Merchant