Booking Response

Response

Attribute Type Description
booking_id string Unique booking ID
booking_reference string Unique booking code. REQUIRED for all future transactions through api
booking_name string Booking name provided while booking
checkin date Check-in date, Format: “YYYY-MM-DD”
checkout date Check-out date, Format: “YYYY-MM-DD”
price object Price details of the booking (refer below for more info)
payment_type string Payment type used for the booking
non_refundable boolean true if the rate is Non-refundable. Otherwise, cancellation policies applicable.
payment_status string Status of the payment.
currency string Three-letter ISO currency code of the price
booking_date datetime The date when booking was made
status string Booking status will be one of the following:
1. confirmed
2. failed
3. rejected
4. pending (agent must perform fetch booking endpoint)
holder object Lead passenger details. Defined in the Holder section in Booking Request
hotel object Hotel element
supports_amendment boolean true if amendments are allowed
supports_cancellation boolean true if cancellations are allowed
booking_comment string Optional booking comments passed along to the hotel.
agent_reference string Optional. Returned If passed in booking request.
additional_info object Additional information if any. Object of dynamic key value pairs.
Ex:
{ “booking_note”: “If holder is not one of the paxes, one of the adult paxes will be considered as holder”, “comments”: “For this booking, children with age above or equal to 12 are considered as adults and less than 2 are considered as infants. Children will be considered as adults, if room has no support for extra beds” }

Price

Attribute Type Description
total float Booking amount
breakdown object Dynamic key value pairs with values being an array of charge details
Refer below for charge details and sample response.

Charge Details

Attribute Type Description
name string Name of the charge.
included boolean true if the charge is already included in the price.
amount_type string Defines the type of amount: ‘value’ represents flat_fee ‘percent’ represents percentage
amount float flat_fee or percentage value.
mandatory boolean true if this must be paid either at booking or at hotel.
Otherwise, this has to be paid(at hotel) only if you
need the supplement/facility.
currency string Three-letter ISO currency code
comments string Description or any notes for the charge if available.

Sample response for ‘price’ element:

{
  "total": 159828,
  "breakdown": {
    "surcharge_or_tax": [
      {
        "name": "TaxAndServiceFee",
        "included": true,
        "currency": "INR",
        "amount_type": "value",
        "amount": 14529.14
      }
    ],
    "hotel_charges": [
      {
        "name": "MandatoryTax",
        "mandatory": true,
        "included": false,
        "currency": "INR",
        "amount_type": "value",
        "amount": 8854.72
      }
    ]
  }
}

Hotel

Attribute Type Description
hotel_code string GRN hotel code
hotel_confirmatio[n_number string If the check-in is in next 3 days: Call the view booking details api on every 6-hour basis and stop once you receive the value.
If the check-in is more than 3 days: Call the view booking details api on every 6-hour basis from 3 days prior to check-in date and stop once you receive the value.
name string Name of the hotel
category float The star category of the hotel
address string Address of the
geolocation object Geolocation
paxes array List of the pax in the booking
booking_items array List of booking items
safe2stay object COVID-19 - Safe to Stay details for the hotel which help to understand kind
of safety standards followed by property to ensure to safe stay at the property
If object is null/empty – means we have no information about property related to Covid safety

Pax

Attribute Type Description
title string Title of the passenger
name string Name of the person staying in the room.
surname string Surname/patronymic of the person staying in the room.
type string Either “AD” or “CH”
age integer Age of the children
id integer Pax Id

Geolocation

Attribute Type Description
latitude float Latitude of the hotel
longitude float Longitude of the hotel

Booking Item:

Attribute Type Description
room_code string Unique key representing the rooms in the booking item.
rooms array List of Room elements. Rooms that are part of the booking item.
non_refundable boolean true if the rate is Non-refundable. Otherwise, cancellation policies applicable.
rate_comments object “Additional rate information, if any Object of dynamic key value pairs. Eg:
{
“comments”: “comments come here”,
“additional rate info”: “additional details come here”
}
includes_boarding boolean true if boarding is included in this rate
boarding_details array List of boarding details, if applicable
other_inclusions array List of additional inclusions (strings), if available
cancellation_policy object Cancellation policy details
price float Price of the booking item
currency string Currency of the price.
vendor_hotel_name string The name of the hotel used by the vendor.Only a few vendors support this. If any vendor doesnot support then this key will not be coming in the response.

Covid Safe - Safe to Stay

Attribute Type Description
essential_workers_only string "Y" - means only bookable for essential workers. If tag not coming means property is open to all types of travellers
covid_19_safe_to_stay string "Y" - property is safe to stay. This tag will come only for properties that claims itself to be a safe to travel property & have implemented some safety norms.
covid_19_safety_protocol string Description of the safety standards followed by the property

Room

Attribute Type Description
description string Room description
room_reference string Unique key referencing the room
pax_ids array List of pax identification details. Represents pax allocation to the rooms.
no_of_adults integer Number of adults in the room
no_of_children integer Number of children in the room
bed_type object bed type details with the following structure
{
“id”: 69,
“type”: “One double and two single beds”
}

Error Codes

HTTP Status Code Error Code Description
401 1102 Invalid API key
200 1504 Invalid search ID or it may have expired
200 1505 Insufficient credit to create the booking
200 1511 Payment Type is Invalid for the rate_key ‘Field[value]’
200 2001 Booking failed [with reason for failure]
200 2004 The booking item is not available/sold out
200 2005 The price is no longer available or increased
200 2006 Need confirmation from supplier
200 2010 Rooms in the booking request doesn’t match with the rooms in the search request
200 2012 room_code is Invalid for the rate_key ‘Field[value]’
200 2013 room_reference is Invalid for the rate_key ‘Field[value]’
404 5002 Hotel not found
403 5003 Not authorised
200 5101 Field[name] value/type is required
200 5102 Field[name] value/type is invalid
200 5106 Children ages should be between 0 and 18
200 5108 Check-in and check-out dates must be valid, and in ISO8601 format (YYYY-MM-DD)
200 5109 Check-in date cannot be older than today
200 5110 Stay cannot exceed 30 days
200 5111 Check-out date must be greater than check-in date
200 5112 group_code Does Not Match With The hotel_code or city_code
200 5113 No of booking_items per request cannot exceed 10
200 5114 Paxes data does not match with the given room
200 5115 hotel_code Does Not Match With The city_code
200 5120 Request timed out at supplier’s end
200 5122 Only One Rate_Key Per Booking For Bundled Rates
200 5123 Credit Card Is Required For Booking
200 5124 Existing Itinerary
200 5126 Rate key and the rooms specified do not match
200 5126 Rate key ‘Field[value]’ and the rooms specified do not match
200 5127 Only One Room For The Given Rate Can Be Booked
200 5134 Age is required for type Children
200 5139 Atleast one adult required in a room
200 5140 Unknown Error at Supplier’s end
200 5144 Exceeded request limit
200 5149 Search and Booking mismatch
200 6000 Supplier error: Error[message]

Sample Booking Response

For Bundled Rates

{
    "supports_cancellation": true,
    "supports_amendment": false,
    "status": "confirmed",
    "price": {
        "total": 18805.01,
        "breakdown": {
            "surcharge_or_tax": [
                {
                    "name": "TaxAndServiceFee",
                    "included": true,
                    "currency": "INR",
                    "amount_type": "value",
                    "amount": 1064.42
                }
            ],
            "hotel_charges": [
                {
                    "name": "MandatoryTax",
                    "included": false,
                    "currency": "INR",
                    "amount_type": "value",
                    "amount": 290.03
                }
            ],
            "net": [
                {
                    "name": "Net",
                    "included": true,
                    "currency": "INR",
                    "amount_type": "value",
                    "amount": 18805.01
                }
            ]
        }
    },
    "payment_type": "AT_WEB",
    "payment_status": "paid",
    "non_refundable": true,
    "hotel": {
        "paxes": [
            {
                "type": "CH",
                "surname": "Patrick",
                "pax_id": 1,
                "name": "Luke"
            },
            {
                "type": "AD",
                "surname": "Patrick",
                "pax_id": 2,
                "name": "Harry"
            },
            {
                "type": "AD",
                "surname": "Patrick",
                "pax_id": 3,
                "name": "Henry"
            },
            {
                "type": "AD",
                "surname": "Patrick",
                "pax_id": 4,
                "name": "Sam"
            }
        ],
        "name": "Signature Inn Hotel Deira",
        "hotel_code": "1848138",
        "geolocation": {
            "longitude": "-9.138914",
            "latitude": "38.746067"
        },
        "country_code": "PT",
        "city_code": "121449",
        "category": 4,
        "booking_items": [
            {
                "rooms": [
                    {
                        "room_reference": "1234",
                        "pax_ids": [
                            4
                        ],
                        "no_of_children": 0,
                        "no_of_adults": 1,
                        "bed_type": {
                            "type": "2 twin beds",
                            "id": 25
                        }
                    },
                    {
                        "room_reference": "1235",
                        "pax_ids": [
                            1,
                            2,
                            3
                        ],
                        "no_of_children": 1,
                        "no_of_adults": 2
                    }
                ],
                "room_code": "4ddfznbt7quczuc33xsqkf644ljk5rvm6s6ovvts2fdbr7hochiq",
                "price": 18805.01,
                "other_inclusions": [
                    "Breakfast Buffet",
                    "Free Wireless Internet"
                ],
                "non_refundable": true,
                "includes_boarding": true,
                "currency": "INR",
                "cancellation_policy": {
                    "under_cancellation": true,
                    "details": [
                        {
                            "percent": 100,
                            "from": "2022-11-13T08:44:05.447386Z",
                            "currency": "INR"
                        }
                    ],
                    "amount_type": "percent"
                },
                "boarding_details": [
                    "Breakfast Buffet"
                ]
            }
        ],
        "address": "Av. Frei Miguel Contreiras 52 1749-086 Lisboa",
        "safe2stay": {
            "essential_workers_only": "Y"
        }
    },
    "holder": {
        "title": "Mr.",
        "surname": "Patrick",
        "phone_number": "6614565589",
        "name": "James",
        "email": "james@pat.com",
        "client_nationality": "fr"
    },
    "currency": "INR",
    "checkout": "2022-12-15",
    "checkin": "2022-12-16",
    "booking_reference": "5hngtnl3xl5uga",
    "booking_id": "GRN-201611-000568",
    "booking_date": "2022-11-11T08:44:06",
    "booking_comment": "Testing",
    "additional_info": {
        "tax_information": "SalesTax and HotelOccupancyTax(if charged) are included in TaxAndServiceFee",
        "spl_checkin_instructions": "Extra-person charges may apply and vary depending on property policy. <br />Government-issued photo identification and a credit card or cash deposit are required at check-in for incidental charges. <br />Special requests are subject to availability upon check-in and may incur additional charges. Special requests cannot be guaranteed.  <ul><li>No onsite parking is available. </li></ul>",
        "checkin_instructions": "Extra-person charges may apply and vary depending on property policy. <br />Government-issued photo identification and a credit card or cash deposit are required at check-in for incidental charges. <br />Special requests are subject to availability upon check-in and may incur additional charges. Special requests cannot be guaranteed.  <ul><li>No onsite parking is available. </li></ul>"
    }
}

For Non Bundled Rates

{
    "supports_cancellation": true,
    "supports_amendment": false,
    "status": "confirmed",
    "price": {
        "total": 16966.59,
        "breakdown": {
            "net": [
                {
                    "name": "Net",
                    "included": true,
                    "currency": "INR",
                    "amount_type": "value",
                    "amount": 16966.59
                }
            ]
        }
    },
    "payment_type": "AT_WEB",
    "payment_status": "pending",
    "hotel": {
        "paxes": [
            {
                "type": "CH",
                "surname": "Patrick",
                "pax_id": 1,
                "name": "Luke"
            },
            {
                "type": "AD",
                "surname": "Patrick",
                "pax_id": 2,
                "name": "Harry"
            },
            {
                "type": "AD",
                "surname": "Patrick",
                "pax_id": 3,
                "name": "Henry"
            },
            {
                "type": "AD",
                "surname": "Patrick",
                "pax_id": 4,
                "name": "Sam"
            }
        ],
        "name": "Signature Inn Hotel Deira",
        "hotel_code": "1848138",
        "geolocation": {
            "longitude": "-9.138914",
            "latitude": "38.746067"
        },
        "city_code": "121449",
        "category": "4",
        "booking_items": [
            {
                "rooms": [
                    {
                        "room_type": "28076",
                        "room_reference": "BB",
                        "pax_ids": [
                            1,
                            2,
                            3
                        ],
                        "no_of_children": 1,
                        "no_of_adults": 2,
                        "description": "City Room"
                    }
                ],
                "price": 12182.37,
                "non_refundable": false,
                "includes_boarding": true,
                "currency": "INR",
                "cancellation_policy": {
                    "under_cancellation": false,
                    "details": [
                        {
                            "from": "2022-12-28T00:00:00",
                            "flat_fee": 12182.37,
                            "currency": "INR"
                        }
                    ],
                    "cancel_by_date": "2022-12-27T00:00:00",
                    "amount_type": "value"
                },
                "boarding_details": [
                    "Bed & Breakfast"
                ]
            },
            {
                "rooms": [
                    {
                        "room_type": "28076",
                        "room_reference": "BB",
                        "pax_ids": [
                            4
                        ],
                        "no_of_children": 0,
                        "no_of_adults": 1,
                        "description": "City Room"
                    }
                ],
                "price": 11602.47,
                "non_refundable": false,
                "includes_boarding": true,
                "currency": "INR",
                "cancellation_policy": {
                    "under_cancellation": false,
                    "details": [
                        {
                            "from": "2022-12-28T00:00:00",
                            "flat_fee": 11602.47,
                            "currency": "INR"
                        }
                    ],
                    "cancel_by_date": "2022-12-27T00:00:00",
                    "amount_type": "value"
                },
                "boarding_details": [
                    "Bed & Breakfast"
                ]
            }
        ],
        "address": "Av. Frei Miguel Contreiras 52 1749-086 Lisboa",
        "safe2stay": {
            "essential_workers_only": "Y"
        }
    },
    "holder": {
        "title": "Mr.",
        "surname": "Patrick",
        "phone_number": "6614565589",
        "name": "James",
        "email": "james@pat.com",
        "client_nationality": "fr"
    },
    "currency": "INR",
    "checkout": "2022-12-30",
    "checkin": "2022-12-29",
    "booking_reference": "ftjtcfl67mmlgii",
    "booking_id": "GRN-201611-000566",
    "booking_date": "2022-11-11T08:11:51",
    "booking_comment": "Testing",
    "additional_info": {
        "Msg": "Global Warnings for HOTELS"
    }
}