2.2.2.6 Order Cancellation
About 342 wordsAbout 1 min
2025-11-04
Warning
- Mandatory.
- If the cancellation order returns
cancelPendingstatus, the integrator needs to support multiple cancellation attempts. - If the booking timed out, there is no supplier order number at that time. If a subsequent order details query also fails to retrieve the final order status, forced cancellation should be performed (in this case, only the Klook order number exists).
URL
Integrator to define and provide to Klook
Input Parameters
| Field | Type | Mandatory | Description |
|---|---|---|---|
klookOrderCode | String | true | Klook Order Number. In case of timeout, this field is used for forced cancellation. |
supplierOrderCode | String | false | Supplier Order Number |
configData | String | false | Custom data returned by the integrator's pre-cancellation, Maximum length 64. If present, Klook will include this parameter in the cancellation request input. |
Base Input Parameter Extension Fields
| Field | Type | Mandatory | Description |
|---|---|---|---|
supplierAccount | String | false | openApi supplier account data Integrator defines the account data1: The account is used for different product types for specific use cases. For example, a Member account returns rates for Members only, non-Members will not see the rate. It supports multiple accounts2: If the integrator does not have multiple accounts, the value passed is null3: Length does not exceed 128 characters |
Input Parameter Example
Example
{
"base": {
"requestId": "xxxx",
"requestTime": "xxx",
"requestAgent": "xxx",
"openApiSign": "xx",
"supplierAccount": "account1",
"version": "xxx"
},
"requestData": {
"supplierOrderCode": "SUPPLIERORDER987",
"klookOrderCode": "KLOOKORDER12345",
"configData": "AAAABBBDDDBBDDDDDDD"
}
}Output Parameters
| Field | Type | Mandatory | Description |
|---|---|---|---|
supplierOrderCode | String | true | Supplier Order Number |
hotelCancelCode | String | false | Hotel Cancellation Order Number |
status | String | true | Cancellation Status. Please refer to 3.1 Order Status Description |
Output Parameter Example
Example of successful cancellation
{
"success": true,
"error": {
"code": "",
"message": ""
},
"result": {
"supplierOrderCode": "XYZ123456",
"hotelCancelCode": "h-XYZ123456-cancel",
"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
}