5. GetHotels
Method Overview
Description
The GetHotels API method is designed for fetching a curated list of hotels based on the specified country code. It enables developers to extract comprehensive hotel-related information essential for building travel, booking, or accommodation recommendation features within applications.
Use Case
To query hotels located in the United Arab Emirates, for instance, the country code "AE" must be supplied as a query parameter. This approach ensures targeted data retrieval, streamlining the process of gathering hotel information for specific locations.
Data Fields
Upon successful request, the response includes an array of hotels, each containing the following data fields:
- Hotel ID: A unique identifier assigned to each hotel.
- Hotel Name: The official name of the hotel.
- Hotel Classification: A rating that categorizes the hotel, typically denoted by stars (e.g., "4" for 4-star hotels).
- City ID: A unique code representing the city where the hotel is situated.
- Country Code: The ISO 3166-1 alpha-2 code indicating the country of the hotel's location.
- District ID: A unique identifier for the district encompassing the hotel.
- City Name: The name of the city where the hotel is located.
- District Name: The name of the district where the hotel is situated.
- Hotel Type: Describes the hotel's category (e.g., "CityHotel", "BeachHotel").
- Latitude and Longitude: Geographical coordinates pinpointing the hotel's location.
- Alcohol Availability: Specifies whether the hotel serves alcohol.
- Wi-Fi Availability: Indicates if complimentary Wi-Fi service is provided.
- Metro/Subway Proximity: Describes the hotel's closeness to metro or subway stations.
- Swimming Pool Availability: Identifies if there's a swimming pool available for guests.
- Shopping Mall Proximity: Indicates the distance to the nearest shopping mall from the hotel.
Endpoint URL - [GET]
Request Parameters
To request hotel data for a specific country, the following parameter should be included in the request:
- Key: CountryCode
- Value: The ISO 3166-1 alpha-2 country code (e.g., "AE" for the United Arab Emirates)
Request Body
Response Body
{
"hotelCode": "string",
"hotelName": "string",
"hotelClass": "string",
"cityUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"countryCode": "string",
"countryName": "string",
"districtUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cityName": "string",
"districtName": "string",
"hotelType": "CityHotel",
"latitude": "string",
"longitude": "string",
"hasAlcohol": true,
"hasFreeWifi": true,
"hasMetro": true,
"hasPool": true,
"hasMall": true
}
]
example
"hotelCode": "cfbca5b5-4090-4bcd-805a-463d83423b86",
"hotelName": "Ramada Abu Dhabi Corniche",
"hotelClass": "4",
"cityUID": "28c794fe-3c7e-4da2-ba93-f24bd3d4730d",
"countryCode": "AE",
"districtUID": "ee402984-6d1d-4fcf-915d-f31b14fa8b0f",
"cityName": "Abu Dhabi",
"districtName": "Abu Dhabi",
"hotelType": "CityHotel",
"latitude": "24.503759",
"longitude": "54.374577",
"hasAlcohol": false,
"hasFreeWifi": true,
"hasMetro": false,
"hasPool": true,
"hasMall": false
},
{
"hotelCode": "c64b6082-2337-4519-8c33-4bcdef76b16b",
"hotelName": "Emirates Palace Mandarin Oriental, Abu Dhabi",
"hotelClass": "5",
"cityUID": "28c794fe-3c7e-4da2-ba93-f24bd3d4730d",
"countryCode": "AE",
"districtUID": "ee402984-6d1d-4fcf-915d-f31b14fa8b0f",
"cityName": "Abu Dhabi",
"districtName": "Abu Dhabi",
"hotelType": "BeachHotel",
"latitude": "24.461556",
"longitude": "54.317404",
"hasAlcohol": false,
"hasFreeWifi": true,
"hasMetro": false,
"hasPool": true,
"hasMall": false
},
Schema
Definitions
Field Name | Data Type | Description |
---|---|---|
hotelCode | String | Unique identifier for the hotel. |
hotelName | String | The name of the hotel. |
hotelClass | String | Classification of the hotel on a scale (e.g., "4" for 4-star). |
cityUID | String | Unique identifier for the city where the hotel is located. |
countryCode | String | The ISO 3166-1 alpha-2 country code for the hotel's location. |
districtUID | String | Unique identifier for the district where the hotel is located. |
cityName | String | Name of the city where the hotel is located. |
districtName | String | Name of the district where the hotel is situated. |
hotelType | String | Type of hotel (e.g., CityHotel, BeachHotel, SecondLineBeach). |
latitude | String | Geographic latitude of the hotel. |
longitude | String | Geographic longitude of the hotel. |
hasAlcohol | Boolean | Indicates whether alcohol is served at the hotel. |
hasFreeWifi | Boolean | Indicates whether free Wi-Fi is available. |
hasMetro | Boolean | Indicates the proximity of a metro/subway station to the hotel. |
hasPool | Boolean | Indicates whether the hotel has a swimming pool. |
hasMall | Boolean | Indicates the proximity of a shopping mall to the hotel. |