Hotel Availability (Optional)
This method is used for getting information of a hotel availability via GET from /hotel-availability
endpoint. Check Hotel Availability can be used multiple times to check the availability of the hotel in time range. It is advised to post the request in every display of hotel - detail or hotel - list functionalities in order to avoid availability or price changes and keeping pricing information up-to-date.
This endpoint returns a list of availability endpoint response. /availability
endpoint returns up-to-date availability information for a single room; /hotel-availability
endpoint returns up-to-date availability information for all rooms of a single hotel.
! If you want to get all up-to-date availability information for a single hotel's rooms then you should use this endpoint instead of /availability
request for each room.
Note that: Hotel availability response is valid for 45 minutes. When you get an hotel availability response you have 45 minutes to go to book step. If you have missed this time and you have to get hotel-availability response again for that hotel.
Timeout duration: Hotel availability request may take 90 seconds, so client should wait for response.
Request Base Parameters
Name | Value | Required | Description |
---|---|---|---|
search_code | string | yes | This is the code from the response of the search request. (code) |
hotel_code | string | yes | This is the code from the response of the search request. (hotel_code) |
max_product | integer | optional | Indicates maximum amount of products per hotel returned from the API. If not set, no limit set to product count. default is no limit. |
Example(1):
GET /api/v2/hotel-availability/?<search_code>&<hotel_code>
Example Response
GET /api/v2/hotel-availability/?search_code=20170120_5_1_1_76_9fc721a769b9430a8ed6855740d25234_&hotel_code=135f3a
{
"code": "20170120_5_1_1_76_9fc721a769b9430a8ed6855740d25234_",
"count": 25,
"results": [
{
"code": "135f3a_55186709030717_1_2_2_2_0_1_438178821_23_0-1-0.20170120_5_1_1_76_9fc721a769b9430a8ed6855740d25234_",
"destination_code": "206ec",
"hotel_code": "135f3a",
"additional_info": "",
"checkin": "2017-01-20",
"checkout": "2017-01-25",
"price": "212.38",
"currency": "EUR",
"pay_at_hotel": false,
"hotel_price": null,
"hotel_currency": null,
"meal_type": "RO",
"nonrefundable": true,
"view": false,
"rooms": [
{
"pax": {
"children_ages": [],
"adult_quantity": 1
},
"room_category": "Shared Facility",
"room_description": "TWIN WITH SHARED BATHROOM",
"nightly_prices": {
"2017-01-20": "42.47",
"2017-01-21": "42.47",
"2017-01-22": "42.47",
"2017-01-23": "42.47",
"2017-01-24": "42.47"
},
"room_type": "SB"
}
],
"supports_cancellation": true,
"minimum_selling_price": null,
"offer": false,
"policies": [
{
"ratio": "1.00",
"days_remaining": 44
}
]
}
]
}
Example(2):
GET /api/v2/hotel-availability/?<search_code>&<hotel_code>/max_product=1
{
"code": "20180617_1_1_0_109_5c177913af964c92b591dab74d580209_",
"count": 1,
"results": [
{
"code": "112dfb_604661331_0_0_2_2_0_0_604661347_0_0-0-0.20180617_1_1_0_109_5c177913af964c92b591dab74d580209_",
"destination_code": "206ec",
"hotel_code": "135f3a",
"additional_info": "",
"checkin": "2017-01-20",
"checkout": "2017-01-25",
"price": "212.38",
"currency": "EUR",
"pay_at_hotel": false,
"hotel_price": null,
"hotel_currency": null,
"meal_type": "RO",
"nonrefundable": true,
"view": false,
"rooms": [
{
"pax": {
"children_ages": [],
"adult_quantity": 1
},
"room_category": "Shared Facility",
"room_description": "TWIN WITH SHARED BATHROOM",
"nightly_prices": {
"2017-01-20": "42.47",
"2017-01-21": "42.47",
"2017-01-22": "42.47",
"2017-01-23": "42.47",
"2017-01-24": "42.47"
},
"room_type": "SB"
}
],
"supports_cancellation": true,
"minimum_selling_price": null,
"offer": false,
"policies": [
{
"ratio": "1.00",
"days_remaining": 44
}
]
}
]
}
Response Object Parameters
Name | Value | Description |
---|---|---|
product_code | string | Product code of returned product. |
destination_code | string | The unique code for the destination. |
hotel_code | string | The unique code for the hotel. |
additional_info | string | Additional information about the room including specific information about product restrictions, rules, warnings etc. |
checkin | string | Check-in date. Format : YYYY-MM-DD |
checkout | string | Check-out date. Format : YYYY-MM-DD |
price | decimal | The amount that will be charged for this booking (*) |
currency | string | Indicates currency of the price. It is optional to send a specific currency option to receive the response price in specific currency. (EUR , USD , GBP etc.). The currency must refer to a valid currency_code within currencies table. |
pay_at_hotel | boolean | Information of the payment either the customer can pay at the time of arrival to the hotel itself or not |
hotel_price | decimal | The local price value. |
hotel_currency | string | Indicates the currency of hotel_price. It’s similar type of currency variable. |
meal_type | string | Meal type code of returned product. |
supports_cancellation | boolean | Indicates the product whether can cancel or not over api. |
nonrefundable | boolean | Flag that determines whether the product can be refunded when cancelled. Some providers are returning us NULL for nonrefundable flag. You may receive NULL for some products. |
view | boolean | Information about if the room has a view. |
rooms | list | List of returned rooms. For detailed information and example about room(s) list of the product please see section "Contents of Rooms List" |
pax | dict | A dict consists of adult quantity, children ages keys. |
adult_quantity | int | Total number of adults |
children_ages | list | A list consisting of integers which represent children guest ages |
room_category | string | Represents the category of the room referring to room categories table. |
room_description | string | Description of the room |
room_type | string | Represents the type of the room |
supports_cancellation | boolean | Indicates the product whether can cancel or not over api. |
minimum_selling_price | decimal | It is the minimum selling price to the end |
offer | boolean | |
policies | list | List of cancellation policies. For detailed information and example about policies list of the product, please see section “Contents of Policies List” |
days_remaining | int | Number(s) of remaining days to check-in date. days_remaining = today – checkin_date(GMT+3) |
ratio | decimal | The multiplier that will be applied to price to calculate cancellation charge. |
list_price | decimal |
- And also you will see product and room details just like in search response.