Search
About 546 wordsAbout 2 min
POST Hotel Search API
POST /v1.0/search
Request Parameters
{
"hotels": ["5931939"],
"checkIn": "2023-07-04",
"checkOut": "2023-07-05",
"occupancy": {
"rooms": 1,
"adults": 1,
"childrenAges": []
},
"currency": "",
"hotelPackage": "",
"language": "zh-cn",
"countryCodes": ["CN"]
}| Field | Type | Required | Description |
|---|---|---|---|
| hotels | List | Yes | List of hotel IDs |
| checkIn | string | Yes | Check-in date |
| checkOut | string | Yes | Check-out date |
| occupancy | object | Yes | Occupancy information |
| rooms | int | Yes | Number of rooms |
| adults | int | Yes | Number of adults |
| childrenAges | List | No | List of children ages |
| countryCodes | List | No | Nationality codes |
| currency | string | No | Currency |
| language | string | No | Language |
| hotelPackage | string | No | Package type (hotel_only / package) |
Request Example
curl --location --request POST '{{domain}}/v1.0/search' \
--header 'Authorization: PHT apikey={{api_key}},signature={{signature}},timestamp={{timestamp}}' \
--header 'api_key: {{api_key}}' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--header 'Connection: keep-alive' \
--data-raw '{
"hotels": [
"5931939"
],
"checkIn": "2023-07-04",
"checkOut": "2023-07-05",
"occupancy": {
"rooms": config.js,
"adults": config.js,
"childrenAges": []
},
"currency": "",
"hotelPackage": "",
"language": "zh-cn",
"countryCodes": [
"CN"
]
}'Response Example
{
"responseStatus": "SUCCESS",
"version": "v1.0",
"checkIn": "2023-07-04",
"checkOut": "2023-07-05",
"hotels": [
{
"code": "5931939",
"name": "Beston Pattaya",
"rooms": [
{
"code": "25238354",
"name": "Deluxe Triple Room",
"rates": [
{
"id": "201654214",
"name": "Deluxe Triple room",
"boardCode": "RO",
"ratePlanCode": "DBDAEE3618140F99B14A0103EE9B7EFDC55D75B3AE7D4356F273519600205CB662FEC17BB258EEBF3A20457A03E17F2B",
"channel": 1,
"allotment": 5,
"currency": "USD",
"price": 33.8,
"priceRSP": 33.8,
"dailyPrices": [
{
"date": "2023-07-04",
"price": 33.8,
"priceRSP": 33.8,
"currency": "USD",
"taxes": [
{
"type": "tax_and_service_fee",
"value": 5.54,
"currency": "USD"
},
{
"type": "base_rate",
"value": 28.26,
"currency": "USD"
}
]
}
],
"taxes": [],
"adult": 1,
"childAges": [],
"bedtypeName": "37326",
"cancellationPolicy": null,
"cancel_penalties": [
{
"start": "2023-05-24T03:00:00.000+07:00",
"end": "2023-07-04T18:00:00.000+07:00",
"amount": null,
"nights": null,
"percent": "100%",
"currency": "USD"
}
],
"extendProperty": "{\"fees\":\"null\",\"bed_groups\":\"[{\\\"id\\\":\\\"37326\\\",\\\"description\\\":\\\"3 张单人床\\\"}]\",\"hotelPackage\":\"hotel_only\",\"mealList\":\"[]\"}"
}
]
}
]
}
],
"remark": null
}| Field | Type | Description |
|---|---|---|
| responseStatus | string | Response status |
| version | string | API version |
| remark | string | Additional remarks |
| checkIn | string | Check-in date |
| checkOut | string | Check-out date |
| hotels | List | Hotel price results |
| code | string | Hotel ID |
| name | string | Hotel name |
| rooms | list | Room list |
| code | string | Room ID |
| name | string | Room name |
| rates | List | Rate list |
| id | string | Rate ID |
| name | string | Rate name |
| boardCode | string | Meal plan code |
| ratePlanCode | string | Rate plan code |
| channel | string | Channel (1=Direct, 23=Opaque) |
| allotment | int | Available room count |
| currency | string | Currency |
| price | decimal | Total price |
| priceRSP | decimal | Total RSP price |
| dailyPrices | List | Daily price list |
| date | string | Date |
| price | decimal | Daily price |
| priceRSP | decimal | Daily RSP price |
| currency | string | Currency |
| taxes | List | Tax details |
| type | string | Tax type |
| value | decimal | Tax amount |
| currency | string | Currency |
| taxes | List | Total tax list |
| type | string | Tax type |
| value | decimal | Tax amount |
| currency | string | Currency |
| adult | int | Number of adults |
| childAges | List | Children ages |
| bedtypeName | string | Bed type ID |
| cancellationPolicy | object | Cancellation policy |
| policies | List | Cancellation policy list |
| amount | decimal | Penalty amount |
| daysBeforeCheckIn | int | Days before check-in |
| cancel_penalties | List | Original cancellation policy |
| start | string | Start time |
| end | string | End time |
| amount | decimal | Penalty amount |
| nights | string | Number of nights |
| percent | string | Penalty percentage |
| currency | string | Currency |
| extendProperty | string | Extended fields (fees, bed_groups, mealList, etc.) |
Status Codes
| Code | Description |
|---|---|
| SUCCESS | Request successful |
| NO_AVAILABILITY | No availability |
| UNAUTHORIZED | Authentication failed |
| SUPPLIER_SERVER_ERROR | Server or upstream API error |