Search and Availability Request
Request
| Method | URL |
|---|---|
| POST | api/v3/hotels/availability |
Payload
| Attribute | Type | Required | Description |
|---|---|---|---|
| destination_code | string | REQUIRED if hotel_codes or geolocation is not specified |
City, State(area or destination) or Airport(IATA) code from the provided master data |
| hotel_codes | array | REQUIRED if destination_code or geolocation is not specified |
List of GRN hotel codes. When hotel codes are given, destination, category and hotel name are not required and ignored. Max no. of hotel codes allowed is 3000 |
| geo_location | object | REQUIRED if hotel_codes or destination_code is not specified |
Object containing geo-location filters. geo_location element is described later in the document. |
| checkin | date | REQUIRED | ISO8601 format (YYYY-MM-DD). Date of Check-in |
| checkout | date | REQUIRED | ISO8601 format (YYYY-MM-DD). Date of Check-out |
| client_nationality | string | REQUIRED | Nationality of the guest Format: Two-letter ISO Country code |
| hotel_name | string | OPTIONAL | Prefix of any word in the name of the hotel |
| hotel_category | array | OPTIONAL | The category(star rating) of the hotel. An array with minimum and maximum values. Minimum allowed value is 2. Maximum allowed value is 7. When [a,b] is given, the array is closed, i.e. it includes a and b. E.g. 1: [2,5] will fetch hotels with categories between 2 and 5. This will be inclusive of 2 and 5. E.g. 2: [3] will fetch only 3 star hotels. |
| currency | string | OPTIONAL | Preferred currency for the prices in the results. Default is the agent’s base currency. Format: Three letter ISO Currency code. In case a supplier supports the requested currency, answered prices from that supplier will be in the requested currency. |
| rooms | array | REQUIRED | An array of room elements. room element is described later in the document. |
| rates | string | OPTIONAL | Allowed values: “comprehensive” or “concise” Default is “concise”. Concise will return only the rate with lowest price for all qualifying hotels. Comprehensive will return a full set of room rates for all qualifying hotels. |
| response | string | OPTIONAL | Deprecated (use cutoff_time). Allowed values: “fast” or “full“ Default is “fast”. “fast” will return a response within an internally-defined cut-off time. Therefore, it includes only a subset of the results. “fast” is recommended for fetching “Starts from” prices, and for mobile applications. “full” will return the complete result set. More properties and prices are returned, but response time may be longer. See sample search payloads for more info. |
| cutoff_time | integer | OPTIONAL | Cut off time in milliseconds. Cut off time is the time we will wait for the provider’s response. Minimum allowed value is 5000 Maximum allowed value is 50000 The response attribute will be ignored if this is given. Default will be 5000 milliseconds with more_results true. See sample search payloads for more info. |
| more_results | boolean | OPTIONAL | true, to collect results (from providers) even after the cutoff_time. false, to stop collecting results after the cutoff_time. Default will be false if cutoff_time is provided. |
| hotel_info | boolean | OPTIONAL | Allowed values are true or false true will return the description, facilities and address for the hotels in search response, which may result in delay of response due to the size of response. false will not return the description, facilities and address for the hotels in search response. Recommended is false Default is true |
Room
| Attribute | Type | Required | Description |
|---|---|---|---|
| adults | integer | REQUIRED | The number of adults in the room |
| children_ages | array | OPTIONAL | An array with the ages of children in the room. Minimum age allowed is 1 and maximum age allowed is 18. E.g. 2 children aged 10 and 15 years [10, 15] |
| no_of_extra_beds | integer | OPTIONAL | The number of extra beds required in the room (for children) |
| no_of_infants | integer | OPTIONAL | Number of infants in the room. Children with ages below 1 can be given as infants. |
Geo location
| Attribute | Type | Required | Description |
|---|---|---|---|
| latitude | float | REQUIRED | Latitude of the location |
| longitude | float | REQUIRED | Longitude of the location |
| radius | float | OPTIONAL | Represents the radius of a circle around the given geolocation. |
| unit | string | OPTIONAL | Unit type of the radius. Supported values are m for Meters, km for Kilometers, mi for Miles, ft for Feet Default value is “km“ |
Sample Search and Availability Payloads
Sample request using GRN city code
{
"destination_code": "C!000555",
"checkin": "2016-12-29",
"checkout": "2016-12-30",
"client_nationality": "IN",
"cutoff_time": 5000,
"currency": "INR",
"more_results": true,
"hotel_info": false,
"rates": "comprehensive",
"hotel_category": [2, 6],
"rooms": [
{
"adults": "1"
},
{
"adults": "2",
"children_ages": ["3"]
}
]
}
Sample Request using GRN hotel codes
{
"hotel_codes": ["H!0049396", "H!0018105"],
"checkin": "2016-12-29",
"checkout": "2016-12-30",
"client_nationality": "IN",
"cutoff_time": 20000,
"currency": "INR",
"hotel_info": false,
"rates": "concise",
"hotel_category": [2, 6],
"rooms": [
{
"adults": "1"
},
{
"adults": "2",
"children_ages": ["3"]
}
]
}
Sample Request using Geolocation
{
"geo_location":{
"longitude": 72.569926666667,
"latitude": 23.044181333333,
"radius": 10,
"unit": "km"
},
"checkin": "2017-12-19",
"checkout": "2017-12-20",
"client_nationality": "AE",
"rates":"comprehensive",
"rooms": [
{
"adults": 2
}
]
}
Sample Request using cutoff_time & more_results
{
"destination_code": "C!000555",
"checkin": "2016-12-29",
"checkout": "2016-12-30",
"client_nationality": "IN",
"cutoff_time": 10000,
"more_results": true,
"currency": "INR",
"hotel_info": false,
"rates": "comprehensive",
"hotel_category": [2, 6],
"rooms": [
{
"adults": "1"
},
{
"adults": "2",
"children_ages": ["3"]
}
]
}
Sample request using GRN area code
{
"destination_code": "G!007351",
"checkin": "2016-12-29",
"checkout": "2016-12-30",
"client_nationality": "IN",
"cutoff_time": 5000,
"currency": "INR",
"more_results": true,
"hotel_info": false,
"rates": "comprehensive",
"hotel_category": [2, 6],
"rooms": [
{
"adults": "1"
},
{
"adults": "2",
"children_ages": ["3"]
}
]
}
Sample Request using cutoff_time & more_results
{
"destination_code": "C!000555",
"checkin": "2016-12-29",
"checkout": "2016-12-30",
"client_nationality": "IN",
"cutoff_time": 10000,
"currency": "INR",
"hotel_info": false,
"rates": "comprehensive",
"hotel_category": [2, 6],
"rooms": [
{
"adults": "1"
},
{
"adults": "2",
"children_ages": ["3"]
}
]
}