2.2.2.4 Order Query
About 713 wordsAbout 2 min
2025-11-04
Warning
- Mandatory.
- The following scenarios will trigger an order details query:
- Booking interface timeout.
- Booking interface returns
bookPendingstatus. Klook will query order details 30 times over the next 30 minutes to get the latest order status.
- Must support querying orders using only the Klook order number, as the supplier order number may not exist if the booking interface times out.
- The order query status always returns the latest status of the order. For example, if an order is created and then cancelled, the query status will return
cancelSuccess.
URL
Integrator to define and provide to Klook
Input Parameters
| Field | Type | Mandatory | Description |
|---|---|---|---|
klookOrderCode | String | true | Klook Order Number |
supplierOrderCode | String | false | Supplier Order NumberThis field may be absent when querying order details after a booking interface timeout |
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": {
"klookOrderCode": "KLOOKORDER12345",
"supplierOrderCode": "SUPPLIERORDER987"
}
}Output Parameters
| Field | Type | Mandatory | Description |
|---|---|---|---|
supplierOrderCode | String | true | Supplier Order Number |
supplierConfirmCode | String | false | Supplier Confirmation Code |
hotelConfirmCode | String | false | Hotel Confirmation Code: separate multiple entries with commas |
status | String | true | Order Status Please refer to 3.1 Order Status Description |
hotelId | String | true | Integrator Hotel ID |
roomId | String | true | Integrator Room Type ID |
ratePlanId | String | true | Integrator Rate Plan ID |
checkIn | String | true | Check-in Time, format: yyyy-MM-dd |
checkOut | String | true | Check-out Time, format: yyyy-MM-dd |
currency | String | true | Standard three-letter currency code |
contact | Contact | true | Contact person information default language is en_US |
specialRequest | String | false | Special requests default language is en_US |
rooms | List<Room> | true | Occupancy information. List size = number of rooms |
cancelPolicyList | List<CancelPolicy> | false | Cancellation Policy List1: Must be ordered by starting time 'start' from smallest to largest 2: Empty means non-cancellable 3: For time periods before 'start', Klook will treat all as free cancellation |
mealInfo | MealInfo | false | Meal information. If no meal info is provided, it is uniformly treated as no meal |
totalPrice | TotalPrice | true | Total room price |
Contact
| Field | Type | Mandatory | Description |
|---|---|---|---|
firstName | String | true | First Name |
lastName | String | true | Last Name |
email | String | true | |
phone | String | true | Phone |
Room
| Field | Type | Mandatory | Description |
|---|---|---|---|
guests | List<Guest> | true | Guest information |
Guest
| Field | Type | Mandatory | Description |
|---|---|---|---|
firstName | String | true | First Name |
lastName | String | true | Last Name |
CancelPolicy
| Field | Type | Mandatory | Description |
|---|---|---|---|
start | String | true | Start Time Must include timezone, format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX |
end | String | true | End Time Must include timezone, format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX |
amount | String | true | Amount (Penalty) |
MealInfo
| Field | Type | Mandatory | Description |
|---|---|---|---|
mealCode | String | true | Integrator's Meal TypeKlook will convert based on the dictionary (dataType = 8) |
mealCount | integer | false | Number of mealsIf empty, -1, or -100, Klook currently treats the number of meals = number of guests |
TotalPrice
| Field | Type | Mandatory | Description |
|---|---|---|---|
amountBeforeTax | String | false | Price before tax. Unit: currency unit |
amountAfterTax | String | true | Price after tax. Unit: currency unit |
commission | String | false | CommissionIf the integrator can provide it, Klook will use the integrator's commission; otherwise, Klook calculates it based on the merchant cooperation settings |
Output Parameter Example
Example
{
"success": true,
"error": {
"code": "",
"message": ""
},
"result": {
"supplierOrderCode": "SUPPLIERORDER987",
"supplierConfirmCode": "CONFIRM12345",
"hotelConfirmCode": "HOTELCFM6789",
"status": "bookSuccess",
"hotelId": "26546159",
"roomId": "room1",
"ratePlanId": "AABBCC",
"checkIn": "2025-05-26",
"checkOut": "2025-05-28",
"currency": "CNY",
"contact": {
"firstName": " ",
"lastName": " ",
"email": " ",
"phone": " "
},
"specialRequest": " ",
"rooms": [
{
"guests": [
{
"firstName": " ",
"lastName": " "
}
]
}
],
"cancelPolicyList": [
{
"amount": "449.10",
"start": "2022-11-25T12:00:00.000+08:00",
"end": "2025-08-20T00:00:00.000+08:00"
}
],
"mealInfo": {
"mealCode": "breakfast",
"mealCount": 1
},
"totalPrice": {
"amountBeforeTax": "45",
"amountAfterTax": "50",
"commission": "0.55"
}
}
}