Generate Voucher for a Booking

You can use this method to generate voucher for a booking using booking reference. - PS: As of now, the voucher is automatically generated immediately after the booking is made.

Method Endpoint
POST /api/v3/hotels/bookings/<bref>/voucher
  • <bref> refers to the ‘booking_reference’ returned in the booking response.

View Voucher for a Booking

You can use this method to view voucher if it has been already generated for a booking using booking reference.

Method Endpoint
GET /api/v3/hotels/bookings/<bref>/voucher
  • <bref> refers to the ‘booking_reference’ returned in the booking response.
  • The response fields are same in view-booking response and generate voucher

Sample Response

{
  "voucher_issue_date": "2017-03-06T05:41:50",
  "supports_cancellation": true,
  "supports_amendment": false,
  "supplier_reference": "10780155",
  "supplier_code": "vacation_travels",
  "payment_type": "AT_WEB",
  "nationality": "fr",
  "hotel": {
    "paxes": [
      {
        "type": "AD",
        "surname": "Test",
        "pax_id": 2,
        "name": "James"
      },
      {
        "type": "AD",
        "surname": "Test",
        "pax_id": 1,
        "name": "Jack"
      }
    ],
    "name": "Holiday Inn Express New York City Times Square",
    "image": "03/2c/032c552f6bcf5a3a7af255bfccd5c53b02c0f743a5e69f83434c4046aa5e7a97.jpg",
    "hotel_code": "H!0171775",
    "geolocation": {
      "longitude": "-73.99314",
      "latitude": "40.75632"
    },
    "description": "This new, New York City hotel boasts a great location close to Times Square. Located minutes from Times Square attractions, the Holiday Inn Express Times Square offers comfortable accommodations near New York's biggest attractions. With Times Square and Broadway outside the door, you'll find it easy getting to and from your New York City destinations. Other well known New York attractions such as the Empire State Building, Broadway and Central Park are within a few blocks of the hotel in Manhattan. For the business traveler, there are many major New York business attractions located near the hotel in New York City. Major headquarters including Merrill Lynch, Legg Mason and Ernst and Young are all within walking distance of the New York City accommodations. With the hotel's convenient Manhattan location, you can make it on time to all your New York City meetings.",
    "city_code": "C!000961",
    "category": 3,
    "booking_items": [
      {
        "rooms": [
          {
            "room_type": "Standard King",
            "room_reference": "4dhf3nj64qxc5wa",
            "pax_ids": [
              1
            ],
            "no_of_children": 0,
            "no_of_adults": 2
          }
        ],
        "includes_boarding": false
      },
      {
        "rooms": [
          {
            "room_type": "Standard King",
            "room_reference": "4dhf3nj64qxc5wi",
            "pax_ids": [
              2
            ],
            "no_of_children": 0,
            "no_of_adults": 2
          }
        ],
        "includes_boarding": false
      }
    ],
    "address": "343 West 39th Street New York City New York 10018  West 39th Street"
  },
  "holder": {
    "title": "Mr.",
    "surname": "Test",
    "phone_number": "6614565589",
    "name": "Test",
    "email": "james@pat.com"
  },
  "checkout": "2017-05-27",
  "checkin": "2017-05-26",
  "booking_type": "B",
  "booking_status": "confirmed",
  "booking_reference": "orlepce7o4q4itdtzuhvf5rwva",
  "booking_id": "GRN-201703-001864",
  "booking_date": "2017-03-06T05:41:50"
}
  • Note:
    • Voucher will not have price related fields and cancellation policies.
    • It will have the following additional fields:

Response

Attribute Type Description
supplier_reference string supplier booking reference
supplier_code string supplier name
voucher_issue_date datetime Voucher generated date and time
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”
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
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
additional_info object Additional information if any. Object of dynamic key value pairs.
Eg:
{
“comments”: “comments come here”,
“checkin-Instruction”: “Checking details come here”
}

Hotel

Attribute Type Description
hotel_code string GRN hotel code
name string Name of the hotel
description string Description of the hotel
category float The star category of the hotel
address string Address of the hotel
geolocation object Geolocation
paxes array List of the pax in the booking
booking_items array List of booking items
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

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_infants integer Number of infants 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 2002 Invalid Booking Reference
200 5101 Field[name] value/type is required
200 5102 Field[name] value/type is invalid
404 5121 Booking not found