AvailabilitySearch

The AvailabilitySearch is used to retrieve the available room options for a given combination of date, duration, occupancy & passenger nationality. It is possible to identify a region, individual hotel or list of hotels for your query. A small number of filters are also available to return only room options that match the criteria specified.

In response you will receive a list of rooms and meal types that are available across the hotels in our inventory that match your requirements and their Result id, with the total price that is inclusive of any discounts. The Result id for each option will subsequently be used as Quote id in BookingCreate stage of the booking process to proceed in the booking flow.

Availability response times can vary between 3 – 20 seconds depending on the search criteria you have selected. Please discuss with our integrations team if you have any specific requirements for availability response time that are not being met.

Specifying search Target

You can target your search at either:

– One Region Id

– One Hotel Id

– Multiple Hotel Ids (it is important that all hotels must be within the same city)

You must specify a target – one of the above three options must be selected.

The following rules apply when specifying the search target:

  1. If you wish to specify a single Region, then you must include the RegionId tag and you must omit the HotelId tag and the Hotels Tag.
  2. If you wish to specify a single Hotel, then you must include the HotelId tag and you must omit the RegionId tag and the Hotels Tag.
  3. If you wish to specify multiple Hotels, then you must include Hotels tag which will include the list of Hotel Ids, and omit the singular HotelId tag.

Availability Request Syntax

Request Headers

Content-Type:                   “text/xml; charset=utf-8”

Content-Length:               [Length of the content]

Host:                                   [Web service hostname]

Accept-Encoding                “gzip”

Request Body Schema

Name Type Description

<Authority>

Complex

Complex

<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

<RegionId>

(optional)

Integer

The Id number of the region   to search for availability.

This should not be used with a <HotelId> element. 

A list of Region Ids can be obtained  from the static data downloads on the Stuba Integration      Portal

<Hotels>

Containing multiple <Id> elements (optional)

Array of integers

<Hotels>

<Id>hotelid1</Id>

<Id>hotelid2</Id>

<Id>hotelid3</Id>

</Hotels>

This can be used in combination with a <RegionId> to select specific properties

within a destination, or without <RegionId> if hotels are across multiple destinations and should not be used with <HotelId> element.

See specifying search Target notes above.

<HotelId>

(optional)

Integer

The Id of an individual hotel to search for availability. This should not be used with a <RegionId> element

<HotelStayDetails>

Complex

Structured information the rooms, passengers, dates, duration & passenger nationality to request availability

<ArrivalDate>

Date

The date of the first night of the stay

<Nights>

Integer

The duration of the stay as a number of nights

<Nationality>

String

The country code of the guests’ nationality. This is required to ensure that the prices and availability returned are valid for the guests who are travelling. A list of Nationality codes can be obtained  from the static data downloads on the Stuba Integration Portal.

<Room>

(1 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.

<HotelSearchCriteria>

(optional)

Complex

Structured extra requirements to filter the list of hotels returned

You cannot use HotelSearchCriteria filter when also specifying a HotelId.

<HotelName>

(optional)

String

Match a text fragment within the hotel name

<MinStars>

(optional)

Integer

Return only hotels with at least this star rating

<MinPrice>

(optional)

Decimal

Return only hotels whose total cost (I.e. cost for the whole stay, not cost per night) is at least this value.

<MaxPrice>

(optional)

Decimal

Return only hotels whose total cost (I.e. cost for the whole stay, not cost per night) is at most this value.

Response Body Schema

Name Type Description

<Currency>

String

The currency used to return selling prices.

Your account has a configured billing currency.

<Warning>

String

Details of any non-fatal issues with the request, including any Hotel Id’s rejected.

<TestMode>

Boolean

If ‘true’ the response is from test environment. If ‘false’ the response is from live environment

<HotelAvailability>

(zero or more)

Complex

<Hotel>

Complex

Contains hotel details

<Result>

(1 or more)

Complex

Contains details of a single search result matching the given search criteria

Id

(Attribute)

String

QuoteId for this search result to be passed in a booking operation.

<Room>

(one or more)

Complex

Contains details of an individual room type included in this search result. A single result may contain multiple rooms if the search merits it.

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

If not returned the MealType is ‘room only’.

<MealTypeCode>

String

Code representing the above MealType. These codes are obtained dynamically from the hotel.

<Price>

Complex

The total selling price for this search result, including any discounts and commission.

<Messages>

Complex

Special notes provided by the hotel are provided here. These must be displayed to the guests. Not all messages are available at this stage in the booking process. (Only included if AvailabilitySearch included single HotelId

<CancellationPolicyStatus>

Enum

A three-value text enumeration for the indicative cancellation policy status of the  room.

Samples

Copy
<AvailabilitySearch xmlns="http <Authority xmlns="http://www. <Org>•••••••</Org> <User>•••••••</User> <Password>•••••••</Password <Currency>USD</Currency> <Language>en</Language> <Version>1.28</Version> </Authority> <RegionId>52612</RegionId> <HotelStayDetails> <ArrivalDate>2024-02-20</Ar <Nights>1</Nights> <Nationality>GB</Nationali <Room> <Guests> <Adult /> <Adult /> </Guests> </Room> </HotelStayDetails> <HotelSearchCriteria> <AvailabilityStatus>allocat </AvailabilitySearch>
Response
Copy
<?xml version="1.0" encoding=" <AvailabilitySearchResult xml <Currency>USD</Currency> <Warning> </Warning> <TestMode>true</TestMode> <HotelAvailability hotelQuo <Hotel id="53815" name="Metro <Result id="23194195-17"> <Room> <RoomType code="123196 <MealType code="100002 <Price amt="415.60" /> <CancellationPolicyStat </Room> </Result> <Result id="23194195-1 <Room> <RoomType code="1252049 <MealType code="1000028 <Price amt="578.00" /> <CancellationPolicyStat </Room> </Result> ?>