Booking HCN Query With Booking ID

The BookingHCNQuery operation allows customers to retrieve the Hotel Confirmation Number for their bookings, which is a booking confirmation number directly from the hotel’s reservation system. The HCN is not available immediately and will be available only for bookings with an arrival date within the next 7 days.

BookingHCNQuery accepts any of the optional parameters outlined below and returns an array of booking hotel confirmation numbers that are due to arrive within the next 7 days.

BookingHCNQuery Request Syntax

Request Header

Content-Type:       “text/xml; charset=utf-8”
Content-Length:     [Length of the content]
Host:               [Web service hostname]
Accept-Encoding     “gzip”

Name Type Description

<Authority>

Complex

Authentication information, as
described in the ‘Getting Started’ section

<Org>

String

The organisation short code identifying the agent responsible for the request (Agency ID)

<User>

String

The user’s logon, unique within the given  organisation (User Name)

<Password>

String

The given user’s password

<Currency>

String

Choose the currency used to return selling prices; accepts an ISO-4217 / SWIFT three character currency code (e.g. USD, GBP, EUR).

Your account has a configured billing currency. Only the configured currency can be specified here

<Version>

String

The current interface version is 1.28

<QueryParams>

Complex

Contains any optional elements which form the query filter parameters

<BookingId>

(optional)

Integer

If included in the request with a Booking Id matching an existing booking, only the matching booking is returned regardless of other parameters

Response Body Schema

Name Type Description

<Booking>

(0 or more)

Complex

A booking structure, which matches the specified filter parameters.

<Id>

Integer

If the booking Id is matched, then just the matching booking is returned regardless of other parameters

<HotelBooking>

(0 or more)

Complex

A booking structure which matches the specified filter parameters

<ArrivalDate>

Date

The date of the first night of the stay

<Nights>

Integer

The duration of the stay as a number of nights

<Status>

Enum

Current status of the booking with <Id> specified

<Room>

(one or more)

Complex

Structure containing room requirement and occupant details

<Guests>

Array

An array of either <Adult> or <Child> elements representing the guests who will stay in this room

<Adult>

Complex

A structure representing one adult guest

title,first,last

(Attributes)

(may be optional)

String

The name of this guest

<HCN>

String

The Hotel Confirmation number as provided by the property booked

XML Response Samples

Copy
<BookingHCNQuery> <Authority> <Org>{{Org}}</Org> <User>{{User}}</User> <Password>{{Password}}</Password> <Currency>{{DefaultCurrency}}</Currency> <Version>1.28</Version> </Authority> <QueryParams> <BookingId>{{BookingId}}</BookingId> </QueryParams> </BookingHCNQuery>
<?xml version="1.0" encoding="utf-8"?> <BookingHCNResult xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Currency>USD</Currency> <Warning /> <TestMode>true</TestMode> <Booking> <Id>720167774</Id> <HotelBooking> <ArrivalDate>2024-08-29</ArrivalDate> <Nights>1</Nights> <Status>confirmed</Status> <Room> <Guests> <Adult id="5868537" title="Mr" first="A" last="Test" /> </Guests> </Room> <HCN>3281659A</HCN> </HotelBooking> </Booking> </BookingHCNResult>