Search and Availability Request
Request
| Method | URL |
|---|---|
| POST | api/v3/hotels/availability |
Payload
| Attribute | Type | Required | Description |
|---|---|---|---|
| hotel_codes | array | REQUIRED | List of GRN hotel codes. Max no. of hotel codes allowed is: 250 if rate type is Concise 150 if rate type is Comprehensive For destinations having more than the above given limit of hotel ids, send all the codes in the batches of 100-150 / 200-250 codes per request and send in parallel in order to get the availability of all the hotels available code. Hotels ID can be downloaded using Static Endpoint |
| 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 3. Maximum allowed value is 7. When [a,b] is given, the array is closed, i.e. it includes a and b. E.g. 1: [3,7] will fetch hotels with categories between 3 and 7. This will be inclusive of 3 and 7. 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. |
| 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 8000 Maximum allowed value is 50000 Default will be 10000 milliseconds. 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. |
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 11 (Less than 12). E.g. 2 children aged 7 and 11 years [7, 11] |
| 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. |
Sample Search and Availability Payloads
Sample Request using GRN hotel codes
{
"hotel_codes": ["H!0049396", "H!0018105"],
"checkin": "2019-04-29",
"checkout": "2019-04-30",
"client_nationality": "IN",
"cutoff_time": 8000,
"currency": "INR",
"rates": "concise",
"hotel_category": [3, 7],
"rooms": [
{
"adults": "1"
},
{
"adults": "2",
"children_ages": ["3", "11"]
}
]
}
Sample Request using cutoff_time & more_results
{
"hotel_codes": ["H!0049396", "H!0018105"],
"checkin": "2019-04-29",
"checkout": "2019-04-30",
"client_nationality": "IN",
"cutoff_time": 10000,
"more_results": true,
"currency": "INR",
"rates": "comprehensive",
"hotel_category": [3, 7],
"rooms": [
{
"adults": "1"
},
{
"adults": "2",
"children_ages": ["3"]
}
]
}
Sample Request using cutoff_time & more_results
{
"hotel_codes": ["H!0049396", "H!0018105"],
"checkin": "2019-04-29",
"checkout": "2019-04-30",
"client_nationality": "IN",
"cutoff_time": 8000,
"currency": "INR",
"rates": "concise",
"hotel_category": [3, 6],
"rooms": [
{
"adults": "1"
},
{
"adults": "2",
"children_ages": ["3"]
}
]
}
Sample Request using multiple child.
{
"hotel_codes": ["H!0049396", "H!0018105"],
"checkin": "2019-04-29",
"checkout": "2019-04-30",
"client_nationality": "IN",
"cutoff_time": 8000,
"currency": "INR",
"rates": "concise",
"hotel_category": [3, 6],
"rooms": [
{
"adults": "1"
},
{
"adults": "2",
"children_ages": ["3" "11"]
}
]
}