Skip to content

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

NameValueRequiredDescription
search_codestringyesThis is the code from the response of the search request. (code)
hotel_codestringyesThis is the code from the response of the search request. (hotel_code)
max_productintegeroptionalIndicates 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
json
{
  "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
json
{
  "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

NameValueDescription
product_codestringProduct code of returned product.
destination_codestringThe unique code for the destination.
hotel_codestringThe unique code for the hotel.
additional_infostringAdditional information about the room including specific information about product restrictions, rules, warnings etc.
checkinstringCheck-in date. Format : YYYY-MM-DD
checkoutstringCheck-out date. Format : YYYY-MM-DD
pricedecimalThe amount that will be charged for this booking (*)
currencystringIndicates 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_hotelbooleanInformation of the payment either the customer can pay at the time of arrival to the hotel itself or not
hotel_pricedecimalThe local price value.
hotel_currencystringIndicates the currency of hotel_price. It’s similar type of currency variable.
meal_typestringMeal type code of returned product.
supports_cancellationbooleanIndicates the product whether can cancel or not over api.
nonrefundablebooleanFlag 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.
viewbooleanInformation about if the room has a view.
roomslistList of returned rooms. For detailed information and example about room(s) list of the product please see section "Contents of Rooms List"
paxdictA dict consists of adult quantity, children ages keys.
adult_quantityintTotal number of adults
children_ageslistA list consisting of integers which represent children guest ages
room_categorystringRepresents the category of the room referring to room categories table.
room_descriptionstringDescription of the room
room_typestringRepresents the type of the room
supports_cancellationbooleanIndicates the product whether can cancel or not over api.
minimum_selling_pricedecimalIt is the minimum selling price to the end
offerboolean
policieslistList of cancellation policies. For detailed information and example about policies list of the product, please see section “Contents of Policies List”
days_remainingintNumber(s) of remaining days to check-in date. days_remaining = today – checkin_date(GMT+3)
ratiodecimalThe multiplier that will be applied to price to calculate cancellation charge.
list_pricedecimal
  • And also you will see product and room details just like in search response.

Released under the MIT License.