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
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 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 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.
version string This should not be sent while using old hotel/city/destination/area codes.
Possible value"2.0", Required only when using new hotel/city codes.
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 11 (Less than 12).

E.g. 2 children aged 7 and 11 years [7, 11]
no_of_infants integer OPTIONAL Number of infants in the room. Children with ages below 1 can be given as infants.

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
{
    "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"]
      }
    ]
  }
Sample Request using new hotel codes.
  {
    "hotel_codes": ["1063672", "1063675"],
    "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"]
      }
    ],
    "version": "2.0"
  }
Sample Request using Options.
  {
    "hotel_codes": ["1063672", "1063675"],
    "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"]
      }
    ],
    "version": "2.0",
	"options": {"rate_comments": true}
  }