Availability Push
The HotelAvailNotif request message pushes availabilities for the inventory that has been previously setup.
HotelAvailNotif Requestβ
In the following examples, you will see the requests that you need to send in order to Push Availability.
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.opentravel.org/OTA/2003/05" xmlns:ns2="http://schemas.xmltravelgate.com/hubpush/provider/2012/10" xmlns:ns3="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<SOAP-ENV:Header>
<ns3:Security SOAP-ENV:mustUnderstand="1">
<ns3:UsernameToken>
<ns3:Username>username</ns3:Username>
<ns3:Password>password</ns3:Password>
</ns3:UsernameToken>
</ns3:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns2:HotelAvailNotif>
<ns2:request>
<ns1:POS>
<ns1:Source>
<ns1:RequestorID ID="Seller Code"/>
<ns1:BookingChannel>
<ns1:CompanyName Code="Buyer Code"/>
</ns1:BookingChannel>
</ns1:Source>
</ns1:POS>
<ns1:AvailStatusMessages HotelCode="2">
<ns1:AvailStatusMessage BookingLimit="13">
<ns1:StatusApplicationControl Start="2023-12-20" End="2023-12-22" PromotionCode = "25" RatePlanCode="BAR" Mon="true" Tue="true" Weds="true" Thur="true" Fri="true" Sat="true" Sun="true"/>
</ns1:AvailStatusMessage>
<ns1:AvailStatusMessage>
<ns1:StatusApplicationControl Start="2023-12-20" End="2023-12-22" RatePlanCode="BAR" InvCode="STD3" Mon="true" Tue="true" Weds="true" Thur="true" Fri="true" Sat="true" Sun="true"/>
<ns1:LengthsOfStay>
<ns1:LengthOfStay Time="1" TimeUnit="Day" MinMaxMessageType="MinLOS"/>
<ns1:LengthOfStay Time="28" TimeUnit="Day" MinMaxMessageType="MaxLOS"/>
</ns1:LengthsOfStay>
<ns1:RestrictionStatus Restriction="Master" Status="Open"/>
</ns1:AvailStatusMessage>
<ns1:AvailStatusMessage>
<ns1:StatusApplicationControl Start="2023-12-20" End="2023-12-22" RatePlanCode="BAR" InvCode="STD3" Mon="true" Tue="true" Weds="true" Thur="true" Fri="true" Sat="true" Sun="true"/>
<ns1:RestrictionStatus Restriction="Arrival" Status="Open"/>
</ns1:AvailStatusMessage>
<ns1:AvailStatusMessage>
<ns1:StatusApplicationControl Start="2023-12-20" End="2023-12-22" RatePlanCode="BAR" InvCode="STD3" Mon="true" Tue="true" Weds="true" Thur="true" Fri="true" Sat="true" Sun="true"/>
<ns1:RestrictionStatus Restriction="Departure" Status="Open"/>
</ns1:AvailStatusMessage>
<ns1:AvailStatusMessage>
<ns1:StatusApplicationControl Start="2023-12-20" End="2023-12-22" RatePlanCode="BAR" InvCode="STD3" Mon="true" Tue="true" Weds="true" Thur="true" Fri="true" Sat="true" Sun="true"/>
<ns1:RestrictionStatus SellThroughOpenIndicator="false" MaxAdvancedBookingOffset="2" MinAdvancedBookingOffset="1"/>
</ns1:AvailStatusMessage>
<ns1:AvailStatusMessage BookingLimit="14">
<ns1:StatusApplicationControl Start="2023-12-20" End="2023-12-22" RatePlanCode="BAR" InvCode="STD3" Mon="true" Tue="true" Weds="true" Thur="true" Fri="true" Sat="true" Sun="true"/>
</ns1:AvailStatusMessage>
<ns1:AvailStatusMessage>
<ns1:StatusApplicationControl Start="2023-12-20" End="2023-12-22" RatePlanCode="BAR" InvCode="STD3" Mon="true" Tue="true" Weds="true" Thur="true" Fri="true" Sat="true" Sun="true"/>
<ns1:LengthsOfStay>
<ns1:LengthOfStay Time="1" TimeUnit="Day" MinMaxMessageType="MinLOS"/>
<ns1:LengthOfStay Time="28" TimeUnit="Day" MinMaxMessageType="MaxLOS"/>
</ns1:LengthsOfStay>
<ns1:RestrictionStatus Restriction="Master" Status="Open"/>
</ns1:AvailStatusMessage>
<ns1:AvailStatusMessage>
<ns1:StatusApplicationControl Start="2023-12-20" End="2023-12-22" RatePlanCode="BAR" InvCode="STD3" Mon="true" Tue="true" Weds="true" Thur="true" Fri="true" Sat="true" Sun="true"/>
<ns1:RestrictionStatus Restriction="Arrival" Status="Open"/>
</ns1:AvailStatusMessage>
<ns1:AvailStatusMessage>
<ns1:StatusApplicationControl Start="2023-12-20" End="2023-12-22" RatePlanCode="BAR" InvCode="STD3" Mon="true" Tue="true" Weds="true" Thur="true" Fri="true" Sat="true" Sun="true"/>
<ns1:RestrictionStatus Restriction="Departure" Status="Open"/>
</ns1:AvailStatusMessage>
<ns1:AvailStatusMessage>
<ns1:StatusApplicationControl Start="2023-12-20" End="2023-12-22" RatePlanCode="BAR" InvCode="STD3" Mon="true" Tue="true" Weds="true" Thur="true" Fri="true" Sat="true" Sun="true"/>
<ns1:RestrictionStatus SellThroughOpenIndicator="false" MaxAdvancedBookingOffset="2" MinAdvancedBookingOffset="1"/>
</ns1:AvailStatusMessage>
</ns1:AvailStatusMessages>
</ns2:request>
</ns2:HotelAvailNotif>
</SOAP-ENV:Body>
</SOAP-ENV: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 |
|---|---|---|---|
| HotelAvailNotif | 1 | ||
| HotelAvailNotif/request | 1 | ||
| request/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. In the case of Derived Rates this element will not be returned. |
| @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. |
| 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 Thursday. |
| @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 | ||
| @Restriction | 0..1 | String | Master, Arrival or Departure |
| @Status | 0..1 | String | Open or Close |
| @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. |
HotelAvailNotif Responseβ
After each request, Travelgate will process the data and provide you with a response. Upon receiving a HotelAvailNotif request, Travelgate will send you a corresponding HotelAvailNotif response. The response options include either success or an error.
- Success
- 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:03:26.904Z</u:Created>
<u:Expires>2023-11-22T11:08:26.904Z</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">
<HotelAvailNotifResultResponse xmlns="http://schemas.xmltravelgate.com/hubpush/provider/2012/10">
<HotelAvailNotifResultResult>
<Success xmlns="http://www.opentravel.org/OTA/2003/05"/>
</HotelAvailNotifResultResult>
</HotelAvailNotifResultResponse>
</s:Body>
</s:Envelope>
<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:03:26.904Z</u:Created>
<u:Expires>2023-11-22T11:08:26.904Z</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">
<HotelAvailNotifResponse xmlns="http://schemas.xmltravelgate.com/hubpush/provider/2012/10">
<HotelAvailNotifResult>
<Errors xmlns="http://www.opentravel.org/OTA/2003/05">
<Error ShortText="Unexpected error" Code="-1">An unexpected error occurred.</Error>
</Errors>
</HotelAvailNotifResult>
</HotelAvailNotifResponse>
</s:Body>
</s:Envelope>
Response Data Breakdownβ
| Element | Rel | Type | Description |
|---|---|---|---|
| HotelAvailNotifResult | 1 | ||
| HotelAvailNotifResult/Success | 0..1 | If SUCESS | |
| HotelAvailNotifResult/Errors | 0..1 | If ERROR | |
| Errors/Error | 1 | ||
| @Code | 1 | String | Error code. TravelGate defines the standardized codes listed below; when the Seller's own system returns a code, it is forwarded as-is (so you may occasionally receive codes outside this list, e.g. 361). |
| @Type | 0..1 | String | OTA Error Warning Type (EWT) categorizing the error. Optional: it appears only when the responding system provides it (TravelGate-generated errors omit it). |
| @ShortText | 1 | String | Short, standardized label of the error. |
| Error (text) | 0..1 | String | Detailed, human-readable description of the error. |
When the Seller has implemented the Push API, its system returns the error following the OTA standard: @Code, an optional @Type, @ShortText and a descriptive body. When the Seller has not implemented it, TravelGate standardizes the response using the error codes below (without @Type). This is why you may occasionally receive a @Code outside the standardized list (e.g. 361), forwarded from the Seller's own system.
Error codes
| Error Code | ShortText |
|---|---|
| -1 | Unexpected error |
| 1 | Invalid request |
| 10 | Invalid hotel id |
| 11 | Invalid dates |
| 12 | Invalid rate plan code |
| 13 | Invalid reservation id |
| 14 | Invalid derived rate adjust values |
| 15 | Invalid id |
| 16 | Invalid amount type |
| 17 | Invalid supplement type |
| 18 | Invalid number of hotel |
| 19 | Invalid rate currency code |
| 20 | Requestor id not found |
| 21 | Provider id not found |
| 22 | Rooms not found |
| 23 | Rates not found |
| 30 | Occupation error |
| 31 | Rate error |
| 32 | Avail rq error |
| 33 | Data Base error |
| 37 | Authorization error |
| 38 | Authentication error |
| 90 | Connection time out |