Hotel availability
Endpoints
- HTTP RAW POST
Hotel availability request
XSD File : OTA_HotelAvailRQ.xsd
<?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. | sequence_AvailReqType | no | ||
HotelSearchCriteria | yes | no | |||
BestOnlyIndicator | If the value is true, only the best rate for each hotel is returned. Default value is false. | Boolean | 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) | Date | yes | ||
End | The departure date (YYYY-MM-DD format), must greater than the Start value. | Date | 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 | PositiveInteger | 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 | PositiveInteger | no |
Hotel availability response
XSD File : OTA_HotelAvailRS.xsd
<?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) | StringLength1to64 | 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). | OTA_CodeType | yes | no | |
PriceViewableInd | Indicates wheter or not the rate can be displayed to client | Boolean | yes | no | |
RatePlanName | The name of the rate plan (in the requested language) | StringLength1to64 | 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) | StringLength1to16 | 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) | StringLength1to64 | 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). | AvailabilityStatus_Type | yes | no | |
RoomID | Specifies which guest room is concerned by this room rate | StringLength1to16 | yes | no | |
RatePlanID | Specifies which rateplans is used for this room rate | StringLength1to64 | 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 | The quantity of remaining sellable rooms at this rate | NonNegativeInteger | yes | no | |
EffectiveDate | The start date for the rate | Date | yes | no | |
ExpireDate | The end date for the rate | Date | yes | no | |
Base | The total amount charged for the service including additional amounts and fees. | yes | no | ||
AmountAfterTax | The rate amount | Money | yes | no | |
CurrencyCode | The rate currency code | CurrencyCode_Type | yes | no | |
Total | The total amount to pay for the current day, discounted if an applicable promotion code was provided | ||||
AmountAfterTax | The rate amount | Money | yes | no | |
CurrencyCode | The rate currency code | CurrencyCode_Type | yes | no | |
Discount | |||||
AmountAfterTax | The discount amount | Money | yes | no | |
CurrencyCode | The currency code | CurrencyCode_Type | yes | no | |
DiscountReason | yes | no | |||
Name | The promotion codes applied | yes | no | ||
ServiceRPHs | A container for the unique references to the services for the room stay.A collection of unsigned integers that reference the RPH (Reference Place holder) attribute in the Service object. The ServiceRPH attribute in the Service object is an indexing attribute that identifies the services attached to a specific guest or to the reservation. | no | |||
ServiceRPH | This is a reference placeholder used as an index for a service to be associated with this stay | yes | yes | ||
CancelPenalties | Indicates the starting date. | yes | no | ||
CancelPenalty | Defines the cancellation penalty of the hotel facility. | yes | yes | ||
NonRefundable | Specifies whether or not the reservation of this room stay will be refundable | Boolean | yes | no | |
NoCancelInd | Specifies whether or not the reservation of this room stay will be cancellable at all | Boolean | yes | no | |
PenaltyDescription | Text description of the Penalty in a given language. | no | no | ||
Language | The description's language | Language | no | no | |
Name | The name of the penalty | StringLength1to64 | no | no | |
Text | The text element contains the penalty description | no | no | ||
AmountPercent | Cancellation fee expressed as a fixed amount, or percentage of/or room nights. | no | no | ||
Amount | The penalty absolute amounte | Money | yes | no | |
CurrencyCode | The penalty amount currency code | CurrencyCode_Type | yes | no | |
DecimalPlaces | The penalty amount decimal places | NonNegativeInteger | yes | no | |
Percent | The percentage used to calculate the amount. | no | |||
NmbrOfNights | The number of nights of the hotel stay that are used to calculate the fee amount. | no | |||
Deadline | Cancellation deadline, absolute or relative. | no | no | ||
AbsoluteDeadline | The deadline date is given in | TimeOrDateTimeType | yes | no | |
OffsetDropTime | An enumerated type indicating when the deadline drop time goes into effect. | OffsetDropTime_Type | no | ||
OffsetTimeUnit | The units of time, e.g.: days, hours, etc., that apply to the deadline. | no | |||
OffsetUnitMultiplier | The number of units of DeadlineTimeUnit. | no | |||
Total | yes | no | |||
AmountAfterTax | The total amount to be paid for the Room stay, discounted | Money | yes | no | |
CurrencyCode | The currency code | CurrencyCode_Type | yes | no | |
Taxes | no | no | |||
Tax | no | no | |||
Code | The fee tax type, only 3 (CityTax) for now | Fee Tax Type | yes | no | |
Amount | The fee amount | Money | yes | no | |
CurrencyCode | The fee currency code | CurrencyCode_Type | yes | no | |
Type | Always Exclusive, city tax is juste returned as an additionnal information to be possibly displayed | AmountDeterminationType | yes | no | |
Discount | |||||
AmountAfterTax | The total amount discounted for the Room stay | Money | |||
CurrencyCode | The currency code | CurrencyCode_Type | |||
BasicPropertyInfo | Property Information for the Room Stay. | yes | no | ||
HotelCode | The Hotel identification code | StringLength1to16 | yes | no | |
Services | Refer to Service availability |
Important note
Concerning the penalty amount and deadline, please note that the reference values are passed in the AmountPercent>Amount and Deadline>AbsoluteDeadline attributes. The other values are given for information only.
Use cases
Use case #1: a request for availability in multiple properties
When needed, multiple HotelRef elements can be present in the OTA_HotelAvailRQ request so that availability in the different properties is checked.
In that case, the HotelCode attribute of the BasicPropertyInfo element of each RoomStay specifies the hotel where the roomstay is available.
<?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="1.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> <HotelSearchCriteria BestOnlyIndicator="false"> <Criterion> <HotelRef HotelCode="YOURHOTELCODE1" HotelCodeContext="HotelSpider" /> <HotelRef HotelCode="YOURHOTELCODE2" HotelCodeContext="HotelSpider" /> <StayDateRange Start="ARRIVALDATE" End="DEPARTUREDATE" /> <RoomStayCandidates> <RoomStayCandidate> <GuestCounts> <GuestCount Count="GUESTCOUNT" /> </GuestCounts> </RoomStayCandidate> </RoomStayCandidates> </Criterion> </HotelSearchCriteria> </AvailRequestSegment> </AvailRequestSegments> </OTA_HotelAvailRQ>
Use case #2: a request with a promotion code
If you settled some promotion codes, you can apply them by adding PromotionCode attribute. You can add multiple promo codes by separing them with a comma (,).
<?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="1.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> <HotelSearchCriteria BestOnlyIndicator="false"> <Criterion> <HotelRef HotelCode="YOURHOTELCODE" HotelCodeContext="HotelSpider" /> <StayDateRange Start="ARRIVALDATE" End="DEPARTUREDATE" /> <RatePlanCandidates> <RatePlanCandidate PromotionCode="YOURPROMOCODE" RPH="1"> <!-- RatePlanCandidate PromotionCode="YOURPROMOCODE1,YOURPROMOCODE2" RPH="1" --> </RatePlanCandidates> <RoomStayCandidates> <RoomStayCandidate RatePlanCandidateRPH="1"> <GuestCounts> <GuestCount Count="GUESTCOUNT" /> </GuestCounts> </RoomStayCandidate> </RoomStayCandidates> </Criterion> </HotelSearchCriteria> </AvailRequestSegment> </AvailRequestSegments> </OTA_HotelAvailRQ>
Use case #3: a request for discounted availabilities only
By adding RatePlanType attribute with value 12 you will only get discounted availabilities.
<?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="1.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> <HotelSearchCriteria BestOnlyIndicator="false"> <Criterion> <HotelRef HotelCode="YOURHOTELCODE" HotelCodeContext="HotelSpider" /> <StayDateRange Start="ARRIVALDATE" End="DEPARTUREDATE" /> <RatePlanCandidates> <RatePlanCandidate PromotionCode="YOURPROMOCODE" RatePlanType="12" RPH="1"> </RatePlanCandidates> <RoomStayCandidates> <RoomStayCandidate RatePlanCandidateRPH="1"> <GuestCounts> <GuestCount Count="GUESTCOUNT" /> </GuestCounts> </RoomStayCandidate> </RoomStayCandidates> </Criterion> </HotelSearchCriteria> </AvailRequestSegment> </AvailRequestSegments> </OTA_HotelAvailRQ>
Use case #4: a request for Packages only
By adding RatePlanType attribute with value 11 you will only get packages availabilities.
<?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="1.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> <HotelSearchCriteria BestOnlyIndicator="false"> <Criterion> <HotelRef HotelCode="YOURHOTELCODE" HotelCodeContext="HotelSpider" /> <StayDateRange Start="ARRIVALDATE" End="DEPARTUREDATE" /> <RatePlanCandidates> <RatePlanCandidate RatePlanType="11" RPH="1"> </RatePlanCandidates> <RoomStayCandidates> <RoomStayCandidate RatePlanCandidateRPH="1"> <GuestCounts> <GuestCount Count="GUESTCOUNT" /> </GuestCounts> </RoomStayCandidate> </RoomStayCandidates> </Criterion> </HotelSearchCriteria> </AvailRequestSegment> </AvailRequestSegments> </OTA_HotelAvailRQ>
Use case #5: a request with a minimum of disponibility required
If for some reasons you only want to get availabilities which can be booked multiple times, you can add the Quantity attribute with the minimum of disponibility required.
<?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="1.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> <HotelSearchCriteria BestOnlyIndicator="false"> <Criterion> <HotelRef HotelCode="YOURHOTELCODE" HotelCodeContext="HotelSpider" /> <StayDateRange Start="ARRIVALDATE" End="DEPARTUREDATE" /> <RoomStayCandidates> <RoomStayCandidate Quantity="2"> <GuestCounts> <GuestCount Count="GUESTCOUNT" /> </GuestCounts> </RoomStayCandidate> </RoomStayCandidates> </Criterion> </HotelSearchCriteria> </AvailRequestSegment> </AvailRequestSegments> </OTA_HotelAvailRQ>
Use case #6: a response without any availability
If no room stays are available for a given request, the response will have nothing but the success node
<?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="1.0" TransactionIdentifier="7cfd96af0a9e4885bd59617a3e3bd122" PrimaryLangID="en" AltLangID="fr" CorrelationID=""> <Success></Success> </OTA_HotelAvailRS>
Use case #7: a non refundable room stay
When a certain RoomStay is non refundable, the CancelPenalty element will contain only the policy name (inside the Name attribute of the PenaltyDescription element) and neither the AmountPercent nor the Deadline elements.
... <RoomStay> <RoomTypes> <RoomType RoomID="GUESTROOMID"> <RoomDescription Name="Double Room" /> </RoomType> </RoomTypes> <RatePlans> <RatePlan RatePlanID="RATEPLANID" RatePlanType="0" PriceViewableInd="1" RatePlanName="Rate plan name" /> </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" /> </Rate> </Rates> </RoomRate> </RoomRates> <CancelPenalties> <CancelPenalty Start="2015-09-15" End="2015-09-16" NonRefundable="1" NoCancelInd="0"> <PenaltyDescription Language="en" Name="Cancellation penalty name" /> </CancelPenalty> </CancelPenalties> <BasicPropertyInfo HotelCode="YOURHOTELCODE" /> </RoomStay> ...
Use case #8: a refundable room stay with free text cancellation penalty definition
When a RoomStay is refundable, the CancelPenalty can be defined either by a calculation that will give the final Amount and Deadline values, or by a free text entered by the hotelier. The example below demonstrate the later case:
... <RoomStay> <RoomTypes> <RoomType RoomID="GUESTROOMID"> <RoomDescription Name="Double Room" /> </RoomType> </RoomTypes> <RatePlans> <RatePlan RatePlanID="RATEPLANID" RatePlanType="0" PriceViewableInd="1" RatePlanName="Rate plan name" /> </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" /> </Rate> </Rates> </RoomRate> </RoomRates> <CancelPenalties> <CancelPenalty Start="2015-09-15" End="2015-09-16" NonRefundable="0" NoCancelInd="0"> <PenaltyDescription Language="en" Name="Cancellation penalty name"> <Text>Cancellation penalty description text that can span over multiple lines. </Text> </PenaltyDescription> </CancelPenalty> </CancelPenalties> <BasicPropertyInfo HotelCode="YOURHOTELCODE" /> </RoomStay> ...
Use case #9: making an availability request for more than one room
When more than one room is needed, one RoomStayCandidate node have to be present for each requested room. Each of them will describe the room’s occupancy using the GuestCount nodes.
In order to know the correspondence between the requested rooms and the rooms in the results, an RPH attribute have to be set on each of the RoomStayCandidate node. In the response, each of the RoomStay node will have a RoomStayCandidateRPH attribute to give the correspondance with the RoomStayCandidate nodes.
<!-- Request --> ... <RoomStayCandidates> <RoomStayCandidate RPH="0"> <GuestCounts> <GuestCount Count="GUESTCOUNT_FOR_THE_FIRST_ROOM" /> </GuestCounts> </RoomStayCandidate> <RoomStayCandidate RPH="1"> <GuestCounts> <GuestCount Count="GUESTCOUNT_FOR_THE_SECOND_ROOM" /> </GuestCounts> </RoomStayCandidate> </RoomStayCandidates> ... <!-- Response --> <OTA_HotelAvailRS ...> <Success/> <RoomStays> <RoomStay RoomStayCandidateRPH="0"> <!-- This room correspond to the first requested room --> </RoomStay> <RoomStay RoomStayCandidateRPH="0"> <!-- This room correspond to the first requested room --> </RoomStay> <RoomStay RoomStayCandidateRPH="1"> <!-- This room correspond to the second requested room --> </RoomStay> <RoomStay RoomStayCandidateRPH="1"> <!-- This room correspond to the second requested room --> </RoomStay> <RoomStay RoomStayCandidateRPH="0"> <!-- This room correspond to the first requested room --> </RoomStay> <RoomStay> </OTA_HotelAvailRS>