Pre-check
About 633 wordsAbout 2 min
POST Pre-booking Price Check API
POST /v1.0/precheck
Request Parameters
{
"hotel": "25605276",
"roomId": "E218127878",
"name": "华丽双人房(2 张单人床), 无烟房",
"checkIn": "2023-07-04",
"checkOut": "2023-07-05",
"occupancy": {
"rooms": 1,
"adults": 1,
"childrenAges": []
},
"ratePlanCode": "14C5E538AB655473F7CCF6A70B634D83E26022C93095B0DC86CA952CC182FE2DF93DFA5BFE5E62527143669BAD3BE345",
"totalPrice": 483.93,
"language": "zh-cn",
"countryCodes": ["CN"],
"bedGroupId": "",
"hotelPackage": "",
"currency": ""
}| Field | Type | Required | Description |
|---|---|---|---|
| hotel | string | Yes | Hotel ID |
| roomId | string | Yes | Room ID |
| name | string | Yes | Room name |
| 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 | Children ages |
| ratePlanCode | string | Yes | Rate plan code |
| totalPrice | decimal | Yes | Total price |
| language | string | No | Language |
| countryCodes | List | No | Nationality codes (currently supports one) |
| bedGroupId | string | No | Bed group ID |
| hotelPackage | string | No | Package type (hotel_only / hotel_package) |
| currency | string | No | Currency |
Request Example
curl --location --request POST '{{domain}}/v1.0/precheck' \
--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 '{
"hotel": "25605276",
"roomId": "E218127878",
"name": "华丽双人房(2 张单人床), 无烟房",
"checkIn": "2023-07-04",
"checkOut": "2023-07-05",
"occupancy": {
"rooms": config.js,
"adults": config.js,
"childrenAges": [
]
},
"ratePlanCode": "14C5E538AB655473F7CCF6A70B634D83E26022C93095B0DC86CA952CC182FE2DF93DFA5BFE5E62527143669BAD3BE345",
"totalPrice": 483.93,
"language": "zh-cn",
"countryCodes": [
"CN"
],
"bedGroupId": "",
"hotelPackage": "",
"currency": ""
}'Response Example
{
"responseStatus": "SUCCESS",
"version": "v1.0",
"checkIn": "2023-07-04",
"checkOut": "2023-07-05",
"currency": "",
"hotel": {
"code": "25605276",
"name": "IP City Hotel Osaka",
"rooms": [
{
"code": "E218127878",
"name": "Deluxe Twin Room, Non Smoking",
"rates": [
{
"roomId": "E218127878",
"name": "华丽双人房(2 张单人床), 无烟房",
"boardCode": "RO",
"ratePlanCode": "14C5E538AB655473F7CCF6A70B634D83E26022C93095B0DC86CA952CC182FE2DF93DFA5BFE5E62527143669BAD3BE345",
"channel": 1,
"allotment": 5,
"price": 483.93,
"taxes": [],
"dailyPrices": [
{
"date": "2023-07-04",
"price": 67.31,
"priceRSP": 67.31,
"currency": "USD",
"taxes": [
{
"type": "base_rate",
"value": 60.51,
"currency": "USD"
},
{
"type": "tax_and_service_fee",
"value": 6.8,
"currency": "USD"
}
]
}
],
"cancellationPolicy": null,
"cancel_penalties": [
{
"start": "2023-07-03T23:59:00.000+09:00",
"end": "2023-07-04T23:59:00.000+09:00",
"amount": null,
"nights": null,
"percent": "100%",
"currency": "USD"
}
],
"adult": 1,
"childAges": [],
"bedtypeName": "",
"extendProperty": "{\"fees\":\"null\",\"bed_groups\":\"[{\\\"id\\\":\\\"37431\\\",\\\"description\\\":\\\"2 张大号单人床\\\"}]\",\"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 |
| currency | string | Currency |
| hotel | object | Hotel price information |
| code | string | Hotel ID |
| name | string | Hotel name |
| rooms | list | Room list |
| code | string | Room ID |
| name | string | Room name |
| rates | List | Rate list |
| roomId | string | Room 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 | Daily 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_ALLOTMENT | No availability |
| UNAUTHORIZED | Authentication failed |
| SUPPLIER_SERVER_ERROR | Server or upstream API error |