2.3.5 Cancel Order
About 296 wordsLess than 1 minute
2025-04-25
Tips
- Required.
- If a cancellation request returns a cancelPending status, the integrating party needs to support multiple cancellation attempts.
- If an order times out and there's no supplier order number, and subsequent queries for order details also fail to retrieve the final order status, a forced cancellation will be initiated (at this point, only the Klook order number will be available).
URL
The access party defines it by itself and provides it to klook
Input Parameters
Cancel Order Interface Response Parameters
| Field | Type | Required | Description |
|---|---|---|---|
hotelId | String | true | Supplier hotel ID. 1: For partially managed suppliers using Klook hotels as primary, use Klook hotel ID here. Refer to idType. |
klookOrderCode | String | true | Klook order number. |
supplierOrderCode | String | false | Supplier order number.If the order placement times out and there's no supplier order number, a forced cancellation will be initiated. |
Input Example
Example
{
"base": {
"requestAgent": "KLOOK",
"openApiSign": "301e4cfefbc376c4f4c4dac8b096efcdee47810c2a3627b29b2d3a66b8ae04af27f4ff38c4a8d40dff48f6729fe0d7959fdd90f1848f25c595b574872b8ec69a",
"requestId": "xxxxx111bbbbbcccc",
"requestTime": "2025-11-28T12:06:15.890+08:00"
},
"requestData": {
"hotelId":"",
"supplierOrderCode":"",
"klookOrderCode":"" //Force cancellation in case of timeout
}
}Curl Example illustration
curl --location 'https://api.klookxxxxxxx.com.tw/xxxx/klook/cancelOrder' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic T3BlbkFwaUtsb29rOxxxkQxxxxxx==' \
--data '{
"base": {
"openApiSign": "ed55b368d26a9c2be0f7bcfda2e174e31e7d31f59a48685e6f8a7ecbddd63bd05bf61292b19297caa30280bc900a66259829f17a",
"requestAgent": "KLOOK",
"requestId": "BB1CEDE37C214219BE7C32468173D4B1",
"requestTime": "2025-06-18T11:59:59.045Z"
},
"requestData": {
"hotelId": "4054",
"klookOrderCode": "GFE439622",
"supplierOrderCode": "m20250618xxxsP"
}
}'Output Parameters
| Field | Type | Required | Description |
|---|---|---|---|
status | String | true | Cancellation status - service_error, system_maintenance, cancelSuccess, cancelPending, cancelFailed |
Output Example
Example of successful cancellation
{
"success": true,
"error": {
"code": "",
"message": ""
},
"result": {
"status": "cancelSuccess"
}
}Example of cancellation failure
{
"success": true,
"error": {
"code": "",
"message": ""
},
"result": {
"status": "cancelFailed"
}
}Example of canceling an exception
{
"success": false,
"error": {
"code": "Exception codes",
"message": "Abnormal information"
},
"result": null
}