Skip to main content

Inventory Retrieval

The HotelRatePlanInventoryRetrieve request message is sent to retrieve a list of Hotels > Rate Plans > Rooms, along with their configurations.

HotelRatePlanInventoryRetrieve Request​

caution

Inactive rate plans and rooms will not be returned in this message.

<Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Header>
<o:Security xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<o:UsernameToken Id="xnExysS120i8nwXu90DOToFTjoyuWpFe">
<o:Username>username</o:Username>
<o:Password>password</o:Password>
</o:UsernameToken>
</o:Security>
</Header>
<Body>
<HotelRatePlanInventoryRetrieve xmlns="http://schemas.xmltravelgate.com/hubpush/provider/2012/10">
<request Version="0">
<POS xmlns="http://www.opentravel.org/OTA/2003/05">
<Source>
<RequestorID ID="Seller Code"/>
<BookingChannel>
<CompanyName Code="Buyer Code"/>
</BookingChannel>
</Source>
</POS>
<RatePlans xmlns="http://www.opentravel.org/OTA/2003/05">
<RatePlan>
<HotelRef HotelCode="2"/>
</RatePlan>
</RatePlans>
</request>
</HotelRatePlanInventoryRetrieve>
</Body>
</Envelope>

Request Data Breakdown​

note

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.

ElementRelTypeDescription
HotelRatePlanInventoryRetrieve1
request1
request/POS1
POS/Source1
Source/TPA_Extensions0..1Optional, if empty only active inventory will be received
TPA_Extensions/Params0..1
Params/Param0..N
@key1StringonlyActive
@value1String1 - You will receive all active inventory data. 0 - Active and deactivated inventory will be received. (Same case as without TPA_Extensions node.)
RatePlans0..1Contains hotel filter
request/RatePlan0..1
RatePlan/HotelRef0..1
@HotelCode0..1StringIf the hotel is not specified, it returns Rooms and Rates of all user’s hotels.

HotelRatePlanInventoryRetrieve Response​

After each request, Travelgate will process the data and provide you with a response. Upon receiving a HotelRatePlanInventoryRetrieve request, Travelgate will send you a corresponding HotelRatePlanInventoryRetrieve 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 list of Hotels > Rate Plans > Rooms, along with their configurations.

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-22T10:59:26.629Z</u:Created>
<u:Expires>2023-11-22T11:04:26.629Z</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">
<HotelRatePlanInventoryRetrieveResponse xmlns="http://schemas.xmltravelgate.com/hubpush/provider/2012/10">
<HotelRatePlanInventoryRetrieveResult>
<Success xmlns="http://www.opentravel.org/OTA/2003/05"/>
<RatePlans HotelCode="2" HotelName="Hotel Test Pruebas Travelgate 2" HotelStatusType="Active" xmlns="http://www.opentravel.org/OTA/2003/05">
<RatePlan Duration="0" CurrencyCode="EUR" PromotionCode="25" RatePlanType="11" RatePlanCode="BAR" RateReturn="false" FreeChild="false" FreeBaby="true" RatePlanStatusType="Active" IsModifiable="true" YieldableIndicator="false">
<BookingRules>
<BookingRule Start="2023-11-30" End="2023-11-30">
<CancelPenalties>
<CancelPenalty>
<Deadline OffsetTimeUnit="Day" OffsetUnitMultiplier="20" OffsetDropTime="BeforeArrival"/>
<AmountPercent NmbrOfNights="3"/>
</CancelPenalty>
<CancelPenalty>
<Deadline OffsetTimeUnit="Day" OffsetUnitMultiplier="10" OffsetDropTime="BeforeArrival"/>
<AmountPercent Amount="10"/>
</CancelPenalty>
<CancelPenalty>
<Deadline OffsetTimeUnit="Day" OffsetUnitMultiplier="0" OffsetDropTime="BeforeArrival"/>
<AmountPercent/>
</CancelPenalty>
</CancelPenalties>
</BookingRule>
<BookingRule Start="2023-12-01" End="2023-12-01">
<CancelPenalties>
<CancelPenalty>
<Deadline OffsetTimeUnit="Day" OffsetUnitMultiplier="20" OffsetDropTime="BeforeArrival"/>
<AmountPercent NmbrOfNights="3"/>
</CancelPenalty>
<CancelPenalty>
<Deadline OffsetTimeUnit="Day" OffsetUnitMultiplier="10" OffsetDropTime="BeforeArrival"/>
<AmountPercent Amount="10"/>
</CancelPenalty>
<CancelPenalty>
<Deadline OffsetTimeUnit="Day" OffsetUnitMultiplier="0" OffsetDropTime="BeforeArrival"/>
<AmountPercent/>
</CancelPenalty>
</CancelPenalties>
</BookingRule>
<BookingRule>
<Viewerships>
<Viewership>
<LocationCodes LocationCodesInclusive="true">
<LocationCode CountryCode="ES"/>
</LocationCodes>
</Viewership>
<Viewership>
<LocationCodes LocationCodesInclusive="false"/>
</Viewership>
</Viewerships>
</BookingRule>
</BookingRules>
<Rates>
<Rate>
<AdditionalGuestAmounts>
<AdditionalGuestAmount AgeQualifyingCode="8" MaxAge="12"/>
<AdditionalGuestAmount AgeQualifyingCode="7" MaxAge="2"/>
</AdditionalGuestAmounts>
<PaymentPolicies>
<GuaranteePayment PaymentCode="MerchantPayment"/>
<GuaranteePayment PaymentCode="DirectPayment">
<AcceptedPayments>
<AcceptedPayment>
<PaymentCard CardCode="VI">
<IsVCC>false</IsVCC>
</PaymentCard>
</AcceptedPayment>
</AcceptedPayments>
</GuaranteePayment>
</PaymentPolicies>
<MealsIncluded MealPlanCodes="14"/>
</Rate>
</Rates>
<Offers>
<Offer OfferCode="offer" OfferStatusType="Active">
<OfferRules>
<OfferRule>
<DateRestriction Start="01/03/2018 0:00:00" End="06/03/2018 0:00:00"/>
<LengthsOfStay ArrivalDateBased="false">
<LengthOfStay Time="2" MinMaxMessageType="MinLOS"/>
<LengthOfStay Time="6" MinMaxMessageType="MaxLOS"/>
</LengthsOfStay>
<DOW_Restrictions>
<AvailableDaysOfWeek Mon="true" Tue="true" Weds="true" Thur="true" Fri="true" Sat="true" Sun="true"/>
</DOW_Restrictions>
<Inventories>
<Inventory InvCode="STD3"/>
</Inventories>
</OfferRule>
</OfferRules>
<Discount NightsDiscounted="1" DiscountPattern="Last"/>
<OfferDescription>
<Text>Offer Test</Text>
</OfferDescription>
</Offer>
</Offers>
<SellableProducts>
<SellableProduct InvCode="STD2" InvType="ROOM" InvStatusType="Active" InvTypeCode="MYROOM2">
<GuestRoom>
<Quantities StandardNumBeds="2"/>
<Occupancy MinOccupancy="2" MaxOccupancy="2" AgeQualifyingCode="10"/>
<Room RoomTypeCode="STD2" RoomID="47915"/>
<Description>
<Text>Standard</Text>
</Description>
</GuestRoom>
</SellableProduct>
<SellableProduct InvCode="STD3" InvType="ROOM" InvStatusType="Active" InvTypeCode="MYROOM3">
<GuestRoom>
<Quantities StandardNumBeds="3"/>
<Occupancy MinOccupancy="2" MaxOccupancy="2" AgeQualifyingCode="10"/>
<Occupancy MinOccupancy="1" MaxOccupancy="1" AgeQualifyingCode="8"/>
<Room RoomTypeCode="STD3" RoomID="47918"/>
<Description>
<Text>Triple</Text>
</Description>
</GuestRoom>
</SellableProduct>
</SellableProducts>
<Commission Percent="15"/>
<Description>
<Text>Test rate</Text>
</Description>
<Taxes>
<Tax Amount="20" CurrencyCode="EUR" ChargeUnit="PerPax" ChargeFrequency="PerNight">
<TaxDescription>
<Text>City</Text>
</TaxDescription>
</Tax>
</Taxes>
<Fees>
<AmendFees>
<AmendFee Amount="13" CurrencyCode="EUR" ChargeUnit="2"/>
</AmendFees>
</Fees>
<AdditionalDetails>
<AdditionalDetail Code="code" Type="39">
<DetailDescription>
<Text>Negotiated</Text>
</DetailDescription>
</AdditionalDetail>
</AdditionalDetails>
</RatePlan>
</RatePlans>
</HotelRatePlanInventoryRetrieveResult>
</HotelRatePlanInventoryRetrieveResponse>
</s:Body>
</s:Envelope>

Success Response Data Breakdown​

ElementRelTypeDescription
HotelRatePlanInventoryRetrieveResult1
HotelRatePlanInventoryRetrieveResult/Success0..1
HotelRatePlanInventoryRetrieveResult/RatePlans0..1
@HotelCode1StringHotel code
@HotelName1StringHotel name
@HotelStatusType1StringActive or Deactivated
RatePlans/RatePlan0..n
@FreeChild1BooleanIndicates if childern are free with this rate plan.
@FreeBaby1BooleanIndicates if babies are free with this rate plan.
@RatePlanCode1StringRate code
@BaseRatePlanCode0..1StringBase rate plan code. This field is exclusively used for Derivated Rates, so if this field appears, the @RatePlanCode will always be 'DERIVED'.
@RateReturn0..1BooleanIf true, the base rate will be provided to the channel instead of the derived one.
@RatePlanNotifType0..1StringNew, Delta or Remove
@RatePlanStatusType1StringActive or Deactivated
@CurrencyCode0..1StringISO Currency. This field is exclusively used for Basic Rates.
@YieldableIndicator0..1BooleanIf true or it's not returned, the product can be sold below the price. If false, the product cannot be sold below the price.
@Start0..1DateThe start date when the product associated with the rate plan becomes available for booking.
@End0..1DateThe end date when booking for the product associated with the rate plan is no longer available.
@RatePlanType0..1String
Rate Rule Codes
Code Description
0 No selected
7 Large Family
8 Public Servant
10 Negotiated
11 Package
34 Canary Resident
35 Balearic Resident
36 Honeymoon
If the attribute is not present and it is a Base Rate, the value is 0; if it is a Derived Rate, the value is the same as the Base Rate.
@PromotionCode0..1String
Senior Rates Codes
Code Description
0 No promotion
25 Senior 55
26 Senior 60
27 Senior 65
If the attribute is not present or its value is 0, there is no promotion.
@Duration0..1StringDuration of the rate booking window. Only present if Start and End are not. When present value is always 0 and means the rate has no booking window (available all dates).
@IsModifiable0..1BooleanIf present and equals true, the rate will allow modifications. To apply fees, check Amend Fees.
RatePlan/Commission0..1
@Percent1DecimalCommission percentage applied.
RatePlan/BookingRules0..1
BookingRules/BookingRule1..n
@Code0..1StringEmpty if there are viewerships conditions
BookingRule/CancelPenalties1
CancelPenalties/CancelPenalty1..n
@NonRefundable1BooleanIndicates if a rate is non refundable (true) or refundable (false).
@Start0..1DateThe start date when the cancellation policies will come into effect.
@End0..1DateThe end date when the cancellation policies will cease to be in effect.
CancelPenalty/Deadline1
@OffsetTimeUnit1StringDay
@OffsetUnitMultiplier1IntegerNumber of days before check-in.
@OffsetDropTime1StringBeforeArrival
CancelPenalty/AmountPercent1Only one option will be returned (@NmbrOfNights, @Percent or @Amount).
@NmbrOfNights0..1IntegerNumber of nights that will be charged.
@Percent0..1DecimalThe percentage of the total amount that will be charged in the event of cancellation, in accordance with the current cancellation penalty.
@Amount0..1DecimalAmount that will be charged.
@CurrencyCode0..1StringISO Currency. If the @Amount tag is included, the @CurrencyCode must also be present.
BookingRule/Viewerships0..1
Viewerships/Viewership1..n
Viewership/LocationCodes1
@LocationCodesInclusive1BooleanCan or cannot be requested from this @CountryCode.
LocationCodes/LocationCode0..1If it is missing, applies to all @CountryCode.
@CountryCode1StringCountry ISO2 code.
RatePlan/Rates1
Rates/Rate1..n
Rate/AdditionalGuestAmounts1
AdditionalGuestAmounts/AdditionalGuestAmount1..2
@AgeQualifyingCode1Integer
Age Qualifying Codes
Code Description
7 Baby
8 Child
10 Adult
@MaxAge1IntegerMax age of the additional guest.
Rate/PaymentPolicies1
PaymentPolicies/GuaranteePayment1..n
@PaymentCode1Integer
Payment Type Codes
Code Description
MerchantPayment The customer pays the client and the client will pay the provider
DirectPayment The customer will have to use a credit card as guarantee for the hotel and the payment will be done by the customer at check-in
BookingDatePayment The client will use a credit card with the exact amount of the option so he can pay the provider/hotel. The provider will charge the payment on the reservation day
ArrivalDatePayment The client will use a credit card with the exact amount of the option so he can pay the provider/hotel, the provider will charge the payment on the checking day
GuaranteePayment/AcceptedPayments0..1Only present if @PaymentCode is not 'MerchantPayment'.
AcceptedPayments/AcceptedPayment1..n
AcceptedPayment/PaymentCard1..n
@CardCode1String
Credit Card codes
Code Name
VI Visa
AX American Express
BC BC Card
CA MasterCard
CB Carte Blanche
CU China Union Pay
DS Discover
DC Diners Club
T Carta Si
R Carte Bleue
N Dankort
L Delta
E Electron
JC Japan Credit Bureau
TO Maestro
S Switch
EC Electronic Cash
EU EuroCard
TP Universal air travel card
OP optima
ER Air Canada/RnRoute
XS access
O others
Rate/MealsIncluded0..1
@MealPlanCodes1Integer
Meal Plan codes
Code Description
1 All inclusive
2 American
3 Bed & breakfast
4 Buffet breakfast
5 Caribbean breakfast
6 Continental breakfast
7 English breakfast
8 European plan
9 Family plan
10 Full board
11 Full breakfast
12 Half board/modified American plan
13 As brochured
14 Room only
15 Self catering
16 Bermuda
17 Dinner bed and breakfast plan
18 Family American
19 Breakfast
20 Modified
255 Full board And Drinks
256 Half board And Drinks
257 All inclusive Premium
258 Gala Dinner
259 All Inclusive Light
260 Bed and breakfast + Half board
261 All Inclusive Limited
262 Bed and Brunch
263 Full board wine and water
264 Half board wine and water
RatePlan/SellableProducts0..1Room list. If no rooms are listed and it's a derived rate, it will apply to all rooms; otherwise, it will only apply to the listed rooms.
SellableProducts/SellableProduct0..n
@InvCode1StringRoom code
@InvTypeCode0..1StringExternal information about the room (own code, own description, etc.).
@InvType1StringROOM
@InvStatusType1StringActive or Deactivated
@InvNotifType0..1StringNew, Delta or Remove
SellableProduct/GuestRoom1..n
GuestRoom/Quantities1
@StandardNumBeds1IntegerStandard occupation of the room.
GuestRoom/Occupancy1
@MinOccupancy1IntegerMinimum occupancy
@MaxOccupancy1IntegerMaximum occupancy
@AgeQualifyingCode1Integer
Age Qualifying Codes
Code Description
7 Baby
8 Child
10 Adult
GuestRoom/Room1
@RoomTypeCode0..1StringRoom code
@RoomID1IntegerRoom ID
GuestRoom/Description0..1
Description/Text1StringRoom description
RatePlan/Taxes0..1
Taxes/Tax1..n
@Amount/Percent1DecimalTax will be applied relative to an amount or a percentage.
@ChargeFrequency0..1BooleanTax is applied or not based on the number of nights booked.
@ChargeUnit0..1BooleanTax is applied or not based on the amount of paxes booked.
@Type0..1StringIf Inclusive is indicated, it means that tax must be added to the final price. If the type is different from Inclusive or is not present, the tax is for informational purposes only.
Tax/TaxDescription1
TaxDescription/Text1StringTax description, tax type.
RatePlan/RatePlanInclusionsType0..1Only used for Derivated Rates.
RatePlanInclusionsType/RatePlanInclusionDescription1Only used for Derivated Rates.
RatePlanInclusionDescription/Name1Only used for Derivated Rates.
RatePlan/Description0..1
Description/Text1StringRate description
RatePlan/Offers0..1
Offers/Offer1..n
@OfferCode1StringOffer code
@OfferStatusType1StringActive or Deactivated
@OfferNotifType0..1StringNew, Delta or Remove
Offer/OfferRules1
OfferRules/OfferRule1
OfferRule/LengthsOfStay1
LengthsOfStay/LengthOfStay1..2
@Time1IntegerIt indicates the number of nights for this stay.
@MinMaxMessageType1StringMinLOS (minimum) or MaxLOS (maximum) @LenghtOfStay for the @Offer.
OfferRule/DOW_Restrictions1
DOW_Restrictions/AvailableDaysOfWeek1
@Mon1BooleanIf true the offer data applies on Monday.
@Tue1BooleanIf true the offer data applies on Tuesday.
@Weds1BooleanIf true the offer data applies on Wednesday.
@Thur1BooleanIf true the offer data applies on Thursday.
@Fri1BooleanIf true the offer data applies on Friday.
@Sat1BooleanIf true the offer data applies on Saturday.
@Sun1BooleanIf true the offer data applies on Sunday.
OfferRule/Inventories0..1If no Inventories are sent, the offer will apply to all the rooms in the rate.
Inventories/Inventory1..n
@InvCode1StringRoom code to which the offer will apply.
OfferRules/Discount1
@NightsDiscounted1StringNights discounted by the offer from the total stay amount.
@DiscountPattern1StringFirst, Last or Cheapest. Booking night(s) the offer will dicount.
OfferRule/OfferDescription0..1
OfferDescription/Text1StringOffer description
RatePlan/AdditionalDetails0..1
AdditionalDetails/AdditionalDetail0..n
@Code1StringClient code for whom the rate is offered.
@Type1StringContract/negotiated booking information, allowed only for 39.
AdditionalDetail/DetailDescription1
DetailDescription/Text1StringIf the additional details type is 39, the name of the client for whom the rate is offered will be sent as text.

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">
<HotelRatePlanInventoryRetrieveResponse xmlns="http://schemas.xmltravelgate.com/hubpush/provider/2012/10">
<HotelRatePlanInventoryRetrieveResult>
<Errors xmlns="http://www.opentravel.org/OTA/2003/05">
<Error ShortText="Invalid hotel id" Code="10"/>
</Errors>
</HotelRatePlanInventoryRetrieveResult>
</HotelRatePlanInventoryRetrieveResponse>
</s:Body>
</s:Envelope>

Error Response Data Breakdown​

ElementRelTypeDescription
HotelRatePlanInventoryRetrieveResult1
HotelRatePlanInventoryRetrieveResult/Errors0..1
Errors/Error1
@ShortText1String
Error Codes and Description
Error Code Error Description
-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
34 Cancel error
35 Confirmation error
36 Valuation_error
37 Authorization error
38 Authentication error
90 Connection time out
@Code1String
Error Codes and Description
Error Code Error Description
-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
34 Cancel error
35 Confirmation error
36 Valuation_error
37 Authorization error
38 Authentication error
90 Connection time out

Frequently Asked Questions​

I have received the same room twice, why?
When you receive, for example, one hotel, one rate plan, and 2 rooms, where one of the rooms appears twice, it is because each one represents different occupancies. For instance, a standard room has 2 possible occupancies: 2 adults + 1 child or 2 adults.
How can I know if a rate has a meal plan adhered to it?
If your rate plan contains information about the adherence of meal plans, it will be displayed in the MealsIncluded tag.
What does New, Delta and Remove mean?
Rates can be created, deleted or modified. "New" means a newly added rate, "Delta" is for a changed rate, and "Removed" is used when a rate is deleted.