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>?rates=<rates>
  • <rates>
    • Allowed values: “comprehensive” or “concise
    • Recommanded 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.
  • 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>
    • <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.
    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.

    For rate type ReCheck cancellation policies can be retrived using ReCheck endpoint as well as Cancellation Policy endpoint. Please do not use fetch cancellation policy endpoint for each rate for a hotel if the user do not proceed for booking i.e., fetch cancellation policy endpoint should not be called while displaying the rates on the UI and should be called only once the user has selected a rate and proceeded for booking.

    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
    200 6000 When non-identified

    Rate Re-check using rate_key

    You shall use this method to fetch the updated rate and cancellation policies. It is mandatory to perform this check before booking if “rate_type” is “recheck” in search response. Please do not use recheck endpoint for each rate for a hotel if the user do not proceed for booking i.e., recheck endpoint should not be called while displaying rates on the UI and should be called only once the user has selected a rate and proceeded for booking.

    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.

    Sample Rate-Recheck Payload

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

    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",
            "hotel_code": "H!0049396",
            "geolocation": {
                "longitude": -9.138914,
                "latitude": 38.746067
            },
            "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