Re-Fetch Availability with search ID

You can use this method to fetch complete availability of a previous search.

Method URL
GET api/v3/hotels/availability/<sid>?hotel_info=<boolean>&rates=<rates>
  • <sid> refers to the ‘search_id’ returned in the search response.
  • The response structure for this request will be same as the search response.
  • <hotel_info>
    • Allowed values are true or false.
    • true will return the description, facilities and address for all the hotels in response, which may result in delay of response due to the size of response.
    • false will not return the description, facilities and address for all the hotels in response.
    • Recommended is false. Default is true.
  • <rates>
    • Allowed values: “comprehensive” or “concise
    • Default is “comprehensive”.
    • 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.
Error Codes
HTTP Status Code Error Code Description
401 1102 Invalid API key
200 1501 No availability for the requested search criteria
200 1504 Invalid search ID or it might have expired
403 5003 Not authorised

Re-fetch Availability for a Single Hotel

You can use this method to re-fetch availability of a single hotel from a previous search.

Method URL
GET api/v3/hotels/availability/<sid>?hcode=<hcode>&hotel_info=<boolean>
  • <hcode> refers to the ‘hotel_code’ returned in the search response.
  • <sid>
    • refers to the ‘search_id’ returned in the search response.
    • Response to this will be similar to the search response with results for just one hotel.
  • <hotel_info>
    • Allowed values are true or false.
    • true will return the description, facilities and address for all the hotels in response, which may result in delay of response due to the size of response.
    • false will not return the description, facilities and address for all the hotels in response.
    • Recommended is false. Default is true.
Bundled Rates:

You can use this method to fetch rates which are custom bundled by GRNconnect. This is applicable only when you are searching for multiple rooms.

Request
Method URL
GET api/v3/hotels/availability/<sid>?hcode=<hcode>&bundled=true
  • Response will be similar to the re-fetch with hotel-code method with all rates bundled.
Error Codes
HTTP Status Code Error Code Description
401 1102 Invalid API key
200 1501 No availability for the requested search criteria
200 1504 Invalid search ID or it might have expired
200 1507 Invalid hotel code
404 5002 Hotel not found

Fetch Cancellation Policies for the rate using rate-key

You can use this method to fetch the cancellation policies for the selected rate from the previous search if cancellation policy code is returned instead of cancellation policy.

Request
Method URL
POST api/v3/hotels/availability/<sid>/rates/cancellation_policies/
Payload
Attribute Type Required Description
rate_key string REQUIRED Refers to rate key returned in search response for the selected rate.
cp_code string REQUIRED Refers to cancellation policy code returned in search response.
Sample Cancellation Policies Payload
  {
    "rate_key": "szgueavmvt6db4xhrhdqtf3wdwr3eau3vs",
    "cp_code":"wcobnyltrv3xhbqi7lhg2f6q4hj2ns5c6g663vl6"
  }
Sample Cancellation Policy Response

The response will be similar to the cancellation policies which are returned in the search response. Refer Cancellation Policy in search response for more info.

{
  "under_cancellation": true,
  "no_show_fee": {
    "flat_fee": 7153.14,
    "currency": "INR",
    "amount_type": "value"
  },
  "details": [
    {
      "from": "2016-11-22T08:35:19",
      "flat_fee": 7153.14,
      "currency": "INR"
    }
  ],
  "cancellation_policy_code": "uwird5tpwf3spucqu2nwigox4xmklqfm62zorvl63i",
  "amount_type": "value"
}

Error Codes

HTTP Status Code Error Code Description
200 1504 Invalid search ID or it may have expired
200 2004 The booking item is not available/sold out
200 2008 The rate_key is invalid/expired
200 5101 Field[name] is required
200 5102 Field[name] value/type is invalid

Ex:
cancellation_policies_code value/type is invalid
rate_key value/type is invalid
200 5140 Unknown Error at Supplier’s end
200 5146 No permissions / Not Authorised at supplier’s end
200 5147 Supplier API is currently unavailable

Rate Re-check using rate_key

You shall use this method to fetch the updated rate. It is mandatory to perform this check before booking if “rate_type” is “recheck” in search response.

Request

Method URL
POST api/v3/hotels/availability/<sid>/rates/?action=recheck

Payload

Attribute Type Required Description
rate_key string REQUIRED Refers to rate key returned in search response for the selected rate.
group_code string REQUIRED Refers to group code returned in search response for the selected rate.
hotel_info boolean OPTIONAL Allowed values are true or false

true will enable the description, facilities and address for the hotel returned in 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 hotel returned in response.

Default is true. Recommended option is false.

Sample Rate-Recheck Payload

{
   "rate_key": "sska3qk44rpexiqu4tnriz3eau3vs",
   "group_code": "wcobnyltrv3xhbqi7lhg2f6q4hj2m",
   "hotel_info": true
}

Response

The response will be similar to that of search response. Find the sample response below.

Sample Rate-Recheck Response:

{
    "search_id": "d3kmmkyqvuhyi7pnrkcm5szkvu",
    "hotel": {
        "rate": {
            "supports_cancellation": true,
            "supports_amendment": false,
            "rooms": [
                {
                    "room_type": "28076",
                    "no_of_rooms": 1,
                    "no_of_children": 1,
                    "no_of_adults": 2,
                    "description": "City Room",
                    "children_ages": [
                        3
                    ]
                }
            ],
            "room_code": "43fevnb45bouroa",
            "rate_type": "bookable",
            "rate_key": "nhzihyw3fvlaj5xq5ua2dcgfb6oxye4wktlutu3vs",
            "price_details": {
                "net": [
                    {
                        "name": "Net",
                        "included": true,
                        "currency": "INR",
                        "amount_type": "value",
                        "amount": 8773.25
                    }
                ]
            },
            "price": 8773.25,
            "payment_type": [
                "AT_WEB"
            ],
            "non_refundable": false,
            "no_of_rooms": 1,
            "includes_wifi": null,
            "includes_boarding": true,
            "has_promotions": false,
            "group_code": "wcobnyltrv3xhbq",
            "currency": "INR",
            "cancellation_policy_code": "wcobnyltrv3xhbqi7lhg2f6q4hj2ns5c6g663vl6",
            "cancellation_policy": {
                "under_cancellation": false,
                "details": [
                    {
                        "from": "2016-12-28T00:00:00",
                        "flat_fee": 8773.25,
                        "currency": "INR"
                    }
                ],
                "cancel_by_date": "2016-12-27T00:00:00",
                "amount_type": "value"
            },
            "boarding_details": [
                "Bed & Breakfast"
            ]
        },
        "name": "Lutecia Smart Design Hotel",
        "images": {
            "main_image": "hotels/images/51/7b/517bf51a2c54e013cedba6d26687355d0ce11f81.jpg"
        },
        "hotel_code": "H!0049396",
        "geolocation": {
            "longitude": -9.138914,
            "latitude": 38.746067
        },
        "facilities": "porter/bellhop; security safe (room); designer toiletries; year built 1969; desk; free toiletries; restaurant(s); check-out time is noon; total number of rooms -  175; bathtub only; dry cleaning/laundry service; 24-hour business center; visa; cable tv service; television in common areas; babysitting or childcare (surcharge); safe-deposit box at front desk; air conditioning (room); satellite/cable tv; flat-screen tv; conference space size (meters) -  110; restaurant; diners club; free wi-fi (public areas); luggage storage; airport transportation (surcharge); meeting rooms 5; blackout drapes/curtains; number of floors -  11; check-in time starts at 2 pm; private bathroom; 24-hour front desk; conference space size (feet) -  1184; breakfast available (surcharge); parking - nearby; air conditioned (public areas); concierge services; bidet; mini bar; room service (limited hours); air conditioning; bar/lounge; mastercard; free cribs/infant beds; laundry service; free wi-fi; connecting/adjoining rooms available; designated smoking areas; led tv; tours/ticket assistance; coffee shop or café; daily housekeeping; espresso maker; free wifi; premium bedding; business centre; babysitting available; direct-dial telephone; free newspapers in lobby; gym; hair dryer; pets not allowed; jcb international; number of buildings/towers -  1; spa services on site; bar(s); minibar; 24-hour fitness facilities; room service; minimum check-in age is 18; american express; concierge; rollaway/extra beds available; number of meeting rooms -  5; multilingual staff; babysitting or childcare; conference facilities; elevator/lift; in-room safe (laptop compatible); laundry facilities; phone",
        "description": "This smart design hotel is located in a prime residential area in Lisbon, close to the popular Avenida de Roma. Guests will find Rossio square and the city centre just a short metro ride away, making this establishment an ideal base for those travellers wishing to explore this vibrant city. Spread over 9 themed floors, the tastefully decorated guest rooms boast panoramic views over the city and offer an array of modern conveniences to guarantee a truly memorable stay, such as air conditioning and satellite television. Guests will appreciate the fusion restaurant serving a wide choice of Portuguese dishes as well as Indian specialities. Five meeting rooms are available to meet all business travellers' needs.",
        "country": "PT",
        "city_code": "C!000555",
        "category": 4,
        "address": "Av. Frei Miguel Contreiras 52 1749-086 Lisboa"
    }
}

Error Codes

HTTP Status Code Error Code Description
404 1504 Invalid search Id or it may have expired
200 2001 Invalid group code
200 2004 The booking item is not available/sold out
200 2008 The rate_key is invalid or expired
200 5101 Field[name] is required
200 5102 group_code value/type is invalid
200 5102 rate_key value/type is invalid
200 5140 Unknown Error at Supplier’s end
200 5146 Not Authorised at supplier’s end
200 5147 Supplier API is currently unavailable