2.3.3 Query Order
About 306 wordsAbout 1 min
2025-04-25
Tips
- Mandatory:
- The following scenarios will trigger an order details query:
- The order placement API times out.
- The order placement API returns a
bookPendingstatus. Klook will query order details 30 times within the next 30 minutes to get the latest order status.
- The ability to query orders using only the Klook order number must be supported, as there are cases where the order placement API times out and no supplier order number is available.
- Query Order Details
- Order query status always returns the latest status of the order. For example, if an order is placed first and then cancelled, checking the order status will return the
cancelSuccessstatus
URL
The access party defines it by itself and provides it to klook
Input Parameters
| Field | Type | Required | Description |
|---|---|---|---|
klookOrderCode | String | true | Klook order number. |
supplierOrderCode | String | false | Supplier order number. Used to query order detail |
Input Example
Example
{
"base": {
"requestAgent": "KLOOK",
"openApiSign": "301e4cfefbc376c4f4c4dac8b096efcdee47810c2a3627b29b2d3a66b8ae04af27f4ff38c4a8d40dff48f6729fe0d7959fdd90f1848f25c595b574872b8ec69a",
"requestId": "xxxxx111bbbbbcccc",
"requestTime": "2025-11-28T12:06:15.890+08:00"
},
"requestData": {
"klookOrderCode": "",
"supplierOrderCode": ""
}
}Curl Example illustration
curl --location 'https://api.klookxxxxxxx.com.tw/xxxx/klook/queryOrder' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic T3BlbkFwaUtsb29rOxxxkQxxxxxx==' \
--data '{
"base": {
"openApiSign": "ed55b368d26a9c2be0f7bcfda2e174e31e7d31f59a48685ef4c6097eb7277a792d01d7766f8a7ecbddd63bd05bf61292b19297caa30280bc900a66259829f17a",
"requestAgent": "KLOOK",
"requestId": "BB1CEDE37C214219BE7C32468173D4B1",
"requestTime": "2025-06-18T11:59:59.045Z"
},
"requestData": {
"klookOrderCode": "GFE439622",
"supplierOrderCode": "m2025061sdsdlOSEasP"
}
}'Output Parameters
| Field | Type | Required | Description |
|---|---|---|---|
supplierOrderCode | String | true | Supplier order number. |
supplierConfirmCode | String | false | Supplier confirmation number. |
hotelConfirmCode | String | false | Hotel confirmation number, comma-separated if multiple. |
status | String | true | Order status, see dictionary orderStatus.The order status can be found in the order and cancellation in the dictionary order statusorderStatus, such asbookPendingandcancelSuccess |
Output Example
{
"success": true, // When false, error needs to return error information.
"error": {
"code": "",
"message": ""
},
"result": {
"supplierOrderCode": "",
"supplierConfirmCode": "",
"hotelConfirmCode": "",
"status": ""
}
}