Hotel availability
- 1 Hotel availability request
- 1.1.1 Request
- 1.2 Request members detail
- 2 Hotel availability response
- 2.1.1 Response
- 2.2 Response members detail
- 2.3 Important note
- 3 Use cases
- 3.1 Use case #1: a request for availability in multiple properties
- 3.2 Use case #2: a request with a promotion code
- 3.3 Use case #3: a request for discounted availabilities only
- 3.4 Use case #4: a request for Packages only
- 3.5 Use case #5: a request with a minimum of disponibility required
- 3.6 Use case #6: a response without any availability
- 3.7 Use case #7: a non refundable room stay
- 3.8 Use case #8: a refundable room stay with free text cancellation penalty definition
- 3.9 Use case #9: making an availability request for more than one room
Endpoints
HTTP RAW POST
Hotel availability request
XSD File : OTA_HotelAvailRQ.xsd
Request
<?xml version="1.0" encoding="utf-8"?>
<OTA_HotelAvailRQ xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" EchoToken="ECHOTOKEN"
TimeStamp="2015-09-08T13:06:46.0743525+00:00" Target="Test" Version="2.0" TransactionIdentifier="TRANSACTIONIDENTIFIER" PrimaryLangID="en" AltLangID="en" xmlns="http://www.opentravel.org/OTA/2003/05">
<POS>
<Source>
<RequestorID ID="YOURUSERNAME" MessagePassword="YOURPASSWORD" Type="13"/>
</Source>
</POS>
<AvailRequestSegments>
<AvailRequestSegment AvailReqType="Both">
<HotelSearchCriteria BestOnlyIndicator="false">
<Criterion>
<HotelRef HotelCode="YOURHOTELCODE" HotelCodeContext="HotelSpider" />
<StayDateRange Start="ARRIVALDATE" End="DEPARTUREDATE" />
<RatePlanCandidates>
<RatePlanCandidate RPH="1" PromotionCode="YOURPROMOCODE" RatePlanType="RATEPLANTYPE"/>
</RatePlanCandidates>
<RoomStayCandidates>
<RoomStayCandidate RPH="1" RatePlanCandidateRPH="1" Quantity="QUANTITY">
<GuestCounts>
<GuestCount Count="GUESTCOUNT" AgeQualifyingCode="10" />
</GuestCounts>
</RoomStayCandidate>
</RoomStayCandidates>
</Criterion>
</HotelSearchCriteria>
</AvailRequestSegment>
</AvailRequestSegments>
</OTA_HotelAvailRQ>
Please note that for this specific request, the Whitelabel ID has to be specified in the TPA_Extensions element inside BookingChannel.
Request members detail
Element | Attribute | Description | Value type | Required | Repetitive |
|---|---|---|---|---|---|
| TransactionIdentifier | This attribute is mandatory and should have the same value in both the HotelAvailRQ and HotelResRQ requests for a given transaction |
| yes |
|
AvailRequestSegments |
|
|
| yes | no |
AvailRequestSegment |
|
|
| yes | yes |
| AvailReqType | The type of the request, Room to only get RoomStays or Both to get Services too. Default: Room. | no |
| |
HotelSearchCriteria |
|
|
| yes | no |
| BestOnlyIndicator | If the value is true, only the best rate for each hotel is returned. Default value is false. | no |
| |
Criterion |
|
|
| yes |
|
HotelRef |
| Can be defined several times to request availability in several properties at once. |
| yes | yes |
| HotelCode | The hotel code identifier |
| yes |
|
| HotelCodeContext | The hotel code context (must be "HotelSpider") |
| yes |
|
StayDateRange |
|
|
|
|
|
| Start | The arrival date (YYYY-MM-DD format) | yes |
| |
| End | The departure date (YYYY-MM-DD format), must greater than the Start value. | yes |
| |
RatePlanCandidates |
|
|
| no | no |
RatePlanCandidate |
|
|
| no | yes |
| RPH | Used to be referenced in RoomStayCandidate (won't apply if missing) |
|
|
|
| RatePlanID | Used to filter by RatePlanID |
| no |
|
| PromotionCode | The promotion code (to receive discounts if the promotion applies) |
| no |
|
| RatePlanType | The rate plan type. To retrieve packages only set it to 11, to get discounted availabilities only set it to 12 |
| no |
|
RoomStayCandidates |
|
|
|
|
|
RoomStayCandidate |
|
|
|
|
|
| RPH | Used to identify which response correspond to which RoomStayCandidate, useful when multiple RoomStayCandidates are given (present as RoomStayCandidateRPH attribute of RoomStay in response) |
| no |
|
| RatePlanCandidateRPH | If you added some RatePlanCandidates, you need to map them to a RoomStayCandidate using RPH otherwise related filters won't apply |
| no |
|
| RoomID | Used to filter by RoomID |
| no |
|
| Quantity | The minimum quantity an availability should have to be returned |
| no |
|
GuestCounts |
|
|
|
|
|
GuestCount |
|
|
|
|
|
| Count | The number of adult guests | yes |
| |
| AgeQualifyingCode | For which age category are the prices requested. Adults (10), Children (8), Infants (7). Can alternatively be replaced by the Age attribute | OTA Code Type AQC | no |
|
| Age | The age of the guest. Can alternatively be replaced by the AgeQualifyingCode attribute | no |
|
Hotel availability response
XSD File : OTA_HotelAvailRS.xsd
Response
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelAvailRS xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="12189eaf1ae2420bba0b269579583e3e" TimeStamp="2015-08-18T12:48:41+02:00" Target="Test" Version="2.0" TransactionIdentifier="7cfd96af0a9e4885bd59617a3e3bd122" PrimaryLangID="en" AltLangID="fr" CorrelationID="1">
<Success></Success>
<RoomStays>
<RoomStay>
<RoomTypes>
<RoomType RoomID="GUESTROOMID">
<RoomDescription Name="Double Room"/>
</RoomType>
</RoomTypes>
<RatePlans>
<RatePlan RatePlanID="RATEPLANID" RatePlanType="0" PriceViewableInd="1" RatePlanName="Rate plan name">
<RatePlanDescription>
<Image>http://image1URL.com</Image>
<Image>http://image2URL.com</Image>
<Text>Rate plan description</Text>
</RatePlanDescription>
</RatePlan>
</RatePlans>
<RoomRates>
<RoomRate AvailabilityStatus="AvailableForSale" RoomID="GUESTROOMID" RatePlanID="RATEPLANID">
<Rates>
<Rate NumberOfUnits="2" EffectiveDate="2015-09-15" ExpireDate="2015-09-15">
<Base AmountAfterTax="110.00" CurrencyCode="EUR"/>
<Total AmountAfterTax="100.00" CurrencyCode="EUR"/>
<Discount AmountAfterTax="10.00" CurrencyCode="EUR">
<DiscountReason Name="SUMMER2020"/>
<Discount/>
</Rate>
</Rates>
<ServiceRPHs>
<ServiceRPH>1</ServiceRPH>
</ServiceRPHs>
</RoomRate>
</RoomRates>
<CancelPenalties>
<CancelPenalty Start="2015-09-15" End="2015-09-16" NonRefundable="0">
<PenaltyDescription Language="en" Name="Cancellation penalty name">
<Text>Cancellation penalty description</Text>
<AmountPercent Amount="10.00" CurrencyCode="EUR" DecimalPlaces="2" />
<Deadline AbsoluteDeadline="2015-09-15T18:00:00+02:00" OffsetDropTime="BeforeArrival" OffsetTimeUnit="hours" OffsetUnitMultiplier="48" />
</PenaltyDescription>
</CancelPenalty>
</CancelPenalties>
<Total AmountAfterTax="100.00" CurrencyCode="EUR">
<Taxes>
<Tax Code="3" Amount="7.77" CurrencyCode="EUR" Type="Exclusive"/>
</Taxes>
</Total>
<Discount AmountAfterTax="10.00" CurrencyCode="EUR"/>
<BasicPropertyInfo HotelCode="YOURHOTELCODE"/>
</RoomStay>
<RoomStay>
...
</RoomStay>
</RoomStays>
<Services>
<Service ID="00L55e463ceb9e82" ServiceRPH="1" Inclusive="0" ServicePricingType="Per night" Type="10">
<!-- Please note the ServiceRPH value that refers to the RoomStay above -->
<Price>
<Base AmountAfterTax="3.00" CurrencyCode="CHF" />
</Price>
</Service>
</Services>
</OTA_HotelAvailRS>Response members detail
Element | Attribute | Description | Value type | Always present | Repetitive |
|---|---|---|---|---|---|
RoomStays |
| A collection of the available room stays for the requested hotel(s) |
| yes | no |
RoomStay |
| A room stay corresponds to a stay in a certain room |
| no | yes |
RatePlans |
| A collection of Rate Plans associated with a particular Room Stay. |
| yes | no |
RatePlan |
| Defines the details of the rate plan as used in the booking process. |
| yes | yes |
| RatePlanID | The ID of the rate plan (used as reference in the RoomStay element) | yes | no | |
| RatePlanType | An enumerated type that allows the query to specify a rate category type, and provides major categories for comparison across brands. Refer to OpenTravel Code List Rate Plan Type (RPT). | yes | no | |
| PriceViewableInd | Indicates wheter or not the rate can be displayed to client | yes | no | |
| RatePlanName | The name of the rate plan (in the requested language) | yes | no | |
RatePlanDescription |
| Describes the rate plan. |
| no | yes |
Text |
| Formatted text content. Description of the rate plan. |
| no | no |
Image |
| A URL of an image |
| no | yes |
RoomTypes |
| A collection of Room Types associated with a particular Room Stay. |
| yes | no |
RoomType |
| Provides details regarding rooms, usually guest rooms. |
| yes | yes |
| RoomID | The ID of the guestroom (used as reference in the RoomStay element) | yes | no | |
RoomDescription |
| Textual information regarding the room.An indication of a new paragraph for a sub-section of a formatted text message. |
| yes | no |
| Name | The guestroom name (in the requested language) | yes | no | |
RoomRates |
| A collection of Room Rates associated with a particular Room Stay. Each Room Rate combination can have multiple rates. Example King room, Rack rate plan, Monday through Thursday, weekday amount, Friday and Saturday, weekend amount. |
| yes | no |
RoomRate |
| Provides details regarding the room rate. |
| yes | yes |
| AvailabilityStatus | The availability status of the RoomRate. Refer to Availability Status Type (AvailabilityStatus_Type). | yes | no | |
| RoomID | Specifies which guest room is concerned by this room rate | yes | no | |
| RatePlanID | Specifies which rateplans is used for this room rate | yes | no | |
Rates |
| Individual rate amount. This rate is valid for a range of number of occupants and an occupant type.Individual rate amount. This rate is valid for a range of number of occupants and an occupant type. |
| Individual rate amount. This rate is valid for a range of number of occupants and an occupant type.Individual rate amount. This rate is valid for a range of number of occupants and an occupant type. | no |
Rate |
| Important note: One separate Rate element is present for each day of the stay |
| yes | yes |
| NumberOfUnits |