Booking HCN Query Without 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

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 /> </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>EUR</Currency> <Warning /> <TestMode>true</TestMode> <Booking> <Id>720167893</Id> <HotelBooking> <ArrivalDate>2024-09-24</ArrivalDate> <Nights>3</Nights> <Status>confirmed</Status> <Room> <Guests> <Adult id="5870404" title="Mr" first="A" last="Test" /> </Guests> </Room> <HCN>AX3-4258</HCN> </HotelBooking> <HotelBooking> <ArrivalDate>2024-09-24</ArrivalDate> <Nights>3</Nights> <Status>confirmed</Status> <Room> <Guests> <Adult id="5870405" title="Mr" first="B" last="Test" /> </Guests> </Room> <HCN>AX3-1560</HCN> </HotelBooking> <HotelBooking> <ArrivalDate>2024-09-24</ArrivalDate> <Nights>3</Nights> <Status>confirmed</Status> <Room> <Guests> <Adult id="5870406" title="Mr" first="C" last="Test" /> </Guests> </Room> <HCN>AX3-5487</HCN> </HotelBooking> <HotelBooking> <ArrivalDate>2024-09-24</ArrivalDate> <Nights>3</Nights> <Status>confirmed</Status> <Room> <Guests> <Adult id="5870407" title="Mr" first="D" last="Test" /> </Guests> </Room> <HCN>AX3-7684</HCN> </HotelBooking> </Booking> <Booking> <Id>720167894</Id> <HotelBooking> <ArrivalDate>2024-09-24</ArrivalDate> <Nights>1</Nights> <Status>confirmed</Status> <Room> <Guests> <Adult id="5870408" title="Mr" first="A" last="Test" /> </Guests> </Room> <HCN>B2E1YII530</HCN> </HotelBooking> </Booking> <Booking> <Id>720167895</Id> <HotelBooking> <ArrivalDate>2024-09-24</ArrivalDate> <Nights>1</Nights> <Status>confirmed</Status> <Room> <Guests> <Adult id="5870409" title="Mr" first="A" last="Test" /> </Guests> </Room> <HCN>78471179</HCN> </HotelBooking> <HotelBooking> <ArrivalDate>2024-09-24</ArrivalDate> <Nights>1</Nights> <Status>confirmed</Status> <Room> <Guests> <Adult id="5870410" title="Mr" first="B" last="Test" /> </Guests> </Room> <HCN>78477867</HCN> </HotelBooking> <HotelBooking> <ArrivalDate>2024-09-24</ArrivalDate> <Nights>1</Nights> <Status>confirmed</Status> <Room> <Guests> <Adult id="5870411" title="Mr" first="C" last="Test" /> </Guests> </Room> <HCN>78491872</HCN> </HotelBooking> <HotelBooking> <ArrivalDate>2024-09-24</ArrivalDate> <Nights>1</Nights> <Status>confirmed</Status> <Room> <Guests> <Adult id="5870412" title="Mr" first="D" last="Test" /> </Guests> </Room> <HCN>78575187</HCN> </HotelBooking> </Booking> </BookingHCNResult>