Booking Query

The BookingQuery operation allows retrieval of a list of bookings that can be filtered with the use of any combination of the accepted query parameters. Suggested timeout for this operation is 60 seconds.

BookingQuery 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

<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).

<Version>

String

The current interface version is 1.28.

<DetailLevel>

Enum

Two-valued text enumeration selecting the level of detail to return.

summary – return all Ids, the arrival date and number of nights stayed and the first guest name.

full – return all booking information.

<QueryParams>

Complex

Contains many optional elements which form the query filter parameters.

<BookingId>

(optional)

Integer

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

<BookingCreatedDate>

(optional)

Date

If present, return only bookings that were created on the given date, ignoring the time component.

<GuestName>

(optional)

String

This is a lead guest name fragment. If present, returns only bookings with a lead guest name that   contains this string.

Response Body Schema Type Description

<Booking>

(0 or more)

Complex

A booking structure, which matches the specified filter parameters.

This is returned to the level of detail specified in the

<DetailLevel> element in the query.

<Id>

Integer

Numeric Id for the booking and your BookingId for post booking operations.

<CreationDate>

Date

Date of booking creation

<AgentReference>

String

A custom reference provided for booking with <Id> specified

<HotelBooking>

(1 or more)

Complex

A booking structure for each item associated with the booking

<Id>

Integer

Numeric Id for the item

<HotelId>

Integer

Numeric Id for the hotel.

<HotelName>

String

The name of the hotel.

<CreationDate>

Date

Date of booking creation

<ArrivalDate>

Date

The date of the first night of the stay.

<Nights>

Integer

The duration of the stay as a number of nights.

<TotalSellingPrice>

Complex

The total price for HotelBooking with <Id> specified

<Status>

Enum

Current status of the HotelBooking with <Id> specified.

<Room>

(1 or More)

Complex

Structure containing room requirement and occupant details.

<RoomType>

Complex

A text enumeration (as a <code>,

<text> pair) identifying a specific room type. These codes are obtained dynamically from the hotel and are obtained individually per hotel.

<MealType>

Enum

A text enumeration identifying the meal type for the room.

<Guests>

Array

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

<Messages>

Complex

Special notes provided by the hotel are provided here.

<Status>

Enum

Current status of the HotelBooking with <Id> specified.

<CanxFees>

Complex

A structure containing each of the cancellation <Fee> that apply to the rate booked.

<Charge>

Complex

A structure containing each of the cancellation charges applicable to this reservation

XML Response Samples

Samples

Copy
<BookingQuery> <Authority> <Org>{{Org}}</Org> <User>{{User}}</User> <Password>{{Password}}</Password> <Currency>{{DefaultCurrency}}</Currency> <Version>1.28</Version> </Authority> <DetailLevel>full</DetailLevel> <QueryParams> <BookingId>{{BookingId}}</BookingId> </QueryParams> </BookingQuery>
<?xml version="1.0" encoding="utf-8"?> <BookingQueryResult 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>720166905</Id> <CreationDate>2024-07-26</CreationDate> <AgentReference>123455666</AgentReference> <HotelBooking> <Id>8709494</Id> <HotelId>55492</HotelId> <HotelName>Hilton London Metropole</HotelName> <CreationDate>2024-07-26</CreationDate> <ArrivalDate>2024-08-15</ArrivalDate> <Nights>1</Nights> <TotalSellingPrice amt="0" /> <Status>cancelled</Status> <Room> <TotalSellingPrice amt="0" /> <NightCost> <Night>0</Night> <SellingPrice amt="0.00" /> </NightCost> <RoomType code="1260100" text="Standard - Double" /> <MealType code="1000013" text="English Breakfast" /> <Guests> <Adult id="5864252" title="Mr" first="A" last="Test"> <Price amt="0" /> </Adult> <Adult id="5864253" title="Ms" first="B" last="Test"> <Price amt="0" /> </Adult> </Guests> <Messages /> <Status>cancelled</Status> <CanxFees> <Fee> <Amount amt="382.8000" /> </Fee> <Fee from="2024-08-13T00:00:00"> <Amount amt="382.8000" /> </Fee> </CanxFees> </Room> <VoucherInfo> <PayableBy>roomsXML</PayableBy> <VoucherRef>720166905</VoucherRef> </VoucherInfo> </HotelBooking> <Charge> <Id>8709501</Id> <CreationDate>2024-07-26</CreationDate> <TotalSellingPrice amt="382.8000" /> <AssociatedItemId>8709494</AssociatedItemId> </Charge> </Booking> </BookingQueryResult>
Copy
<BookingQuery> <Authority> <Org>{{Org}}</Org> <User>{{User}}</User> <Password>{{Password}}</Password> <Currency>{{DefaultCurrency}}</Currency> <Version>1.28</Version> </Authority> <DetailLevel>full</DetailLevel> <QueryParams> <BookingCreatedDate>{{BookingDate}}</BookingCreatedDate> <GuestName>{{GuestName}}</GuestName> </QueryParams> </BookingQuery>
<?xml version="1.0" encoding="utf-8"?> <BookingQueryResult 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>720166905</Id> <CreationDate>2024-07-26</CreationDate> <AgentReference>123455666</AgentReference> <HotelBooking> <Id>8709494</Id> <HotelId>55492</HotelId> <HotelName>Hilton London Metropole</HotelName> <CreationDate>2024-07-26</CreationDate> <ArrivalDate>2024-08-15</ArrivalDate> <Nights>1</Nights> <TotalSellingPrice amt="0" /> <Status>cancelled</Status> <Room> <TotalSellingPrice amt="0" /> <NightCost> <Night>0</Night> <SellingPrice amt="0.00" /> </NightCost> <RoomType code="1260100" text="Standard - Double" /> <MealType code="1000013" text="English Breakfast" /> <Guests> <Adult id="5864252" title="Mr" first="A" last="Test"> <Price amt="0" /> </Adult> <Adult id="5864253" title="Ms" first="B" last="Test"> <Price amt="0" /> </Adult> </Guests> <Messages /> <Status>cancelled</Status> <CanxFees> <Fee> <Amount amt="382.8000" /> </Fee> <Fee from="2024-08-13T00:00:00"> <Amount amt="382.8000" /> </Fee> </CanxFees> </Room> <VoucherInfo> <PayableBy>roomsXML</PayableBy> <VoucherRef>720166905</VoucherRef> </VoucherInfo> </HotelBooking> <Charge> <Id>8709501</Id> <CreationDate>2024-07-26</CreationDate> <TotalSellingPrice amt="382.8000" /> <AssociatedItemId>8709494</AssociatedItemId> </Charge> </Booking> </BookingQueryResult>