Availability Retrieval
The HotelAvailRetrieve
request message is sent to retrieve a complete breakdown of availability, including details about the Hotels, Rate Plans, and Rooms.
HotelAvailRetrieve Request
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://schemas.xmltravelgate.com/hubpush/provider/2012/10" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns1="http://www.opentravel.org/OTA/2003/05">
<s:Header>
<wsse:Security>
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password>password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</s:Header>
<s:Body>
<ns:HotelAvailRetrieve>
<ns:request PrimaryLangID="EN">
<ns1:POS>
<ns1:Source>
<ns1:RequestorID ID="Seller Code"/>
<ns1:BookingChannel>
<ns1:CompanyName Code="Buyer Code"/>
</ns1:BookingChannel>
<ns1:TPA_Extensions>
<ns1:Param key = "onlyActive" value = "0"/>
</ns1:TPA_Extensions>
</ns1:Source>
</ns1:POS>
<ns1:HotelAvailRequests>
<ns1:HotelAvailRequest>
<ns1:DateRange Start="2023-12-01" End="2023-12-31"/>
<ns1:RatePlanCandidates>
<ns1:RatePlanCandidate RatePlanCode="BAR" PromotionCode="" />
</ns1:RatePlanCandidates>
<ns1:HotelRef HotelCode="2"/>
</ns1:HotelAvailRequest>
</ns1:HotelAvailRequests>
</ns:request>
</ns:HotelAvailRetrieve>
</s:Body>
</s:Envelope>
Request Data Breakdown
During the onboarding process, your username and password will be provided. After each connection is established, you'll receive an email with RequestorID (Seller Code) and CompanyName (Buyer Code) values.
Element | Rel | Type | Description |
---|---|---|---|
HotelAvailRetrieve | 1 | ||
HotelAvailRetrieve/request | 1 | ||
request/POS | 1 | ||
POS/Source | 1 | ||
Source/TPA_Extensions | 0..1 | Optional, if empty only active inventory will be received | |
TPA_Extensions/Params | 0..1 | ||
Params/Param | 0..N | ||
@key | 1 | String | onlyActive |
@value | 1 | String | 1 - You will receive all active inventory data. 0 - Active and deactivated inventory will be received. (Same case as without TPA_Extensions node.) |
HotelAvailRequests | |||
HotelAvailRequests/HotelAvailRequest | 1 | ||
HotelAvailRequest/DateRange | |||
@Start | 1 | Date | Start date to search rates. |
@End | 1 | Date | End date to search rates. |
HotelAvailRequest/HotelRef | 1 | ||
@HotelCode | 1 | String | Hotel date to search rates. |
HotelAvailRequest/RatePlanCandidates | 0..1 | If exists, contains rate filter. | |
RatePlanCandidates/RatePlanCandidate | 1..n | ||
@RatePlanCode | 1 | String | Rate Plan Code to search rates. |
HotelAvailRetrieve Response
After each request, Travelgate will process the data and provide you with a response. Upon receiving a HotelRatePlanRetrieve
request, Travelgate will send you a corresponding HotelRatePlanRetrieve
response.
The response options include either success or an error. In the event of success, Travelgate will provide you a response in which retrieves a breakdown of availability, including details about the Hotel, Rate Plans, and Rooms.
Success
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0">
<u:Created>2023-11-22T11:11:00.838Z</u:Created>
<u:Expires>2023-11-22T11:16:00.838Z</u:Expires>
</u:Timestamp>
</o:Security>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<HotelAvailRetrieveResponse xmlns="http://schemas.xmltravelgate.com/hubpush/provider/2012/10">
<HotelAvailRetrieveResult>
<Success xmlns="http://www.opentravel.org/OTA/2003/05"/>
<AvailStatusMessages HotelCode="2" xmlns="http://www.opentravel.org/OTA/2003/05">
<AvailStatusMessage>
<StatusApplicationControl Start="2023-12-01" End="2023-12-31" RatePlanCode="BARDEV" Mon="true" Tue="true" Weds="true" Thur="true" Fri="true" Sat="true" Sun="true"/>
<RestrictionStatus Status="Open"/>
</AvailStatusMessage>
<AvailStatusMessage BookingLimit="14" BookingSold="0">
<StatusApplicationControl Start="2023-12-20" End="2023-12-22" RatePlanCode="BAR" InvCode="STD3" InvType="ROOM" Mon="false" Tue="false" Weds="true" Thur="true" Fri="true" Sat="false" Sun="false"/>
<LengthsOfStay ArrivalDateBased="false">
<LengthOfStay Time="1" TimeUnit="Day" MinMaxMessageType="MinLOS"/>
<LengthOfStay Time="28" TimeUnit="Day" MinMaxMessageType="MaxLOS"/>
</LengthsOfStay>
<RestrictionStatus Status="Open" SellThroughOpenIndicator="false" MaxAdvancedBookingOffset="2" MinAdvancedBookingOffset="1"/>
</AvailStatusMessage>
</AvailStatusMessages>
</HotelAvailRetrieveResult>
</HotelAvailRetrieveResponse>
</s:Body>
</s:Envelope>
Sucess Response Data Breakdown
Element | Rel | Type | Description |
---|---|---|---|
HotelAvailRetrieveResult | 1 | ||
HotelAvailRetrieveResult/Success | 1 | ||
HotelAvailRetrieveResult/AvailStatusMessages | 1 | ||
@HotelCode | 1 | String | Hotel code |
AvailStatusMessages/AvailStatusMessage | 1..n | ||
@BookingLimit | 0..1 | Integer | The number of rooms available per Room-RatePlan for the specified dates. This field is exclusively used for Derivated Rates. |
@BookingSold | 0..1 | Integer | The number of rooms booked per Room-RatePlan for the specified dates. The available allotment is calculated as the difference between @BookingLimit and @BookingSold. This field is exclusively used for Derivated Rates |
AvailStatusMessage/StatusApplicationControl | 1 | ||
@Start | 1 | Date | Start date |
@End | 1 | Date | End date |
@RatePlanCode | 1 | String | |
@InvCode | 0..1 | String | Room code. This field is exclusively used for Basic Rates. |
@InvType | 0..1 | String | ROOM . This field is exclusively used for Basic Rates. |
@PromotionCode | 0..1 | String | OfferCode . This field is exclusively used for Offers. |
@Mon | 0..1 | Boolean | If true or attribute is not present, there is availability on Monday. |
@Tue | 0..1 | Boolean | If true or attribute is not present, there is availability on Tuesday. |
@Weds | 0..1 | Boolean | If true or attribute is not present, there is availability on Wednesday. |
@Thur | 0..1 | Boolean | If true or attribute is not present, there is availability on Thurday. |
@Fri | 0..1 | Boolean | If true or attribute is not present, there is availability on Friday. |
@Sat | 0..1 | Boolean | If true or attribute is not present, there is availability on Saturday. |
@Sat | 0..1 | Boolean | If true or attribute is not present, there is availability on Sunday. |
AvailStatusMessage/LengthsOfStay | 0..1 | ||
@ArrivalDateBased | 0..1 | Boolean | If true, the Minimum and Maximum Stay is checked ONLY the first day of the availability. If false or null, the Minimum and Maximum Stay is checked all the availability days. If both values are needed, two @AvailStatusMessage will be sent. |
LengthsOfStay/LengthOfStay | 1..2 | ||
@Time | 1 | Integer | Indicates the number of @TimeUnit for this stay. When value is 0 or -1, condition should be deleted from the system. |
@TimeUnit | 1 | String | Day |
@MinMaxMessageType | 1 | String | MinLOS (minimum) or MaxLOS (maximum) @LenghtOfSaty. |
AvailStatusMessage/RestrictionStatus | 0..1 | ||
@Status | 0..1 | String | Open or Close |
@Restriction | 0..1 | String | Master , Arrival or Departure |
@MinAdvancedBookingOffset | 0..1 | Integer | Minimum number of days before the check-in date to be available to be booked. This restriction is usually used to offer discounts on early bookings. When value is 0 or -1, condition should be deleted from the system. |
@MaxAdvancedBookingOffset | 0..1 | Integer | Maximum number of days before the check-in date to be available to be booked. This restriction is usually used to offer last minute discounts on unsold inventory. When value is -1, condition should be deleted from the system. |
@SellThroughOpenIndicator | 0..1 | Boolean | Room-RatePlan can be sold with no limit if @Status is 'Open'. This field is exclusively used for Basic Rates. |
Error
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0">
<u:Created>2023-11-22T11:11:00.838Z</u:Created>
<u:Expires>2023-11-22T11:16:00.838Z</u:Expires>
</u:Timestamp>
</o:Security>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<HotelAvailRetrieveResponse xmlns="http://schemas.xmltravelgate.com/hubpush/provider/2012/10">
<HotelAvailRetrieveResult>
<Errors xmlns="http://www.opentravel.org/OTA/2003/05">
<Error ShortText="Invalid hotel id" Code="10"/>
</Errors>
</HotelAvailRetrieveResult>
</HotelAvailRetrieveResponse>
</s:Body>
</s:Envelope>
Error Response Data Breakdown
Element | Rel | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
HotelAvailRetrieveResult | 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
HotelAvailRetrieveResult/Errors | 0..1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Errors/Error | 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
@ShortText | 1 | String | Error Codes and Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
@Code | 1 | String | Error Codes and Description
|