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: 100
For destinations having more than the above given limit of hotel ids, send all the codes in the batches of 100 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.
Max Days Before Checkin - This varies from supplier to supplier. by default it will be 0 days.
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
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.
Max Search Rooms - 20 (it usually varies from supplier to supplier max is 20 & minimum is 1).
Max Adults Per Room - 9 (it usually varies from supplier to supplier max is 9 & minimum is 1).
Max Children Per Room - 8 (it usually varies from supplier to supplier max is 8 & minimum is 1)
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 2000 for 1 hotel.
Minimum allowed value is 3000 for multi hotels.
Maximum allowed value is 50000.

Default will be 10000 milliseconds. See sample search payload 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.
purpose_of_travel integer OPTIONAL In caes of leisure - 1, in case of Business - 2. Default - 1
options object OPTIONAL Options to retrieve rates. Please refer to options sections.

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 17.
E.g. 2 children aged 7 and 17 years [7, 17]

Options

Attribute Type Required Description
rate_comments boolean OPTIONAL Display rate comments at search, default is false.

Sample Search and Availability Payloads

Sample Request using GRN hotel codes

{
    "rooms": [
        {  "adults": 2 }
    ],
    "rates": "comprehensive",
    "hotel_codes": ["1848138"],
    "currency": "INR",
    "client_nationality": "IN",
    "checkout": "2022-11-16",
    "checkin": "2022-11-15",
    "purpose_of_travel": 1
}

Sample Request using cutoff_time

{
  "rooms": [
        {
            "adults": 1,
            "children_ages": [ "3" ]
        }
    ],
    "rates": "comprehensive",
    "hotel_codes": ["1848138"],
    "cutoff_time": 10000,
    "currency": "INR",
    "client_nationality": "IN",
    "checkout": "2022-11-16",
    "checkin": "2022-11-15",
    "purpose_of_travel": 1,
    "options": { "rate_comments": true }
}

Sample Request using multiple child.

 {

    "rooms": [
       { "adults": "1", "children_ages": ["4" "9"] },
       { "adults": "2", "children_ages": ["3" "11"]}
    ],
    "rates": "comprehensive",
    "hotel_codes": ["1848138"],
    "cutoff_time": 10000,
    "currency": "INR",
    "client_nationality": "IN",
    "checkout": "2022-11-16",
    "checkin": "2022-11-15",
    "purpose_of_travel": 1,
    "options": {"rate_comments": true}
}

Sample Request using Options.

 {

    "rooms": [
      { "adults": "1" },
      {  "adults": "2", "children_ages": ["3" "11"] }
    ],
    "rates": "comprehensive",
    "hotel_codes": ["1848138"],
    "cutoff_time": 10000,
    "currency": "INR",
    "client_nationality": "IN",
    "checkout": "2022-11-16",
    "checkin": "2022-11-15",
    "purpose_of_travel": 1,
    "options": {"rate_comments": true }
}