Before entering the booking page, Fliggy may confirm whether the product is available for sales through direct connection to the vendor. The vendor should provide with the latest rate price/room allotment/cancel policy etc.Customer can modify the room allotment/occupancy/check in/check out .
The third-party system implements the room availability method according to the definition of the interface and shifts it into service. The Fliggy system will confirm if the product is available for sales by calling the room availability service from the third party when the user select an exact room type as well as the rate.
POST http://{vendor's host}/roomAvailability
O: Optional; R: Required; SR: Special Required
Name | Type | O/R/SR | Limitation | Description | Example |
---|---|---|---|---|---|
HotelCode |
String |
R |
64 |
OTA hotel id or hotel id in third-party system |
ATS034 |
RoomTypeCode |
String |
R |
64 |
OTA room type id or room type id in third-party system |
Duxl-23434 |
RateCode |
String |
R |
64 |
OTA rate plan id or rate plan id in third-party system |
123000123 |
RateKey |
String |
R |
200 |
Unique key to identify the rate. |
VIP32453343 |
CheckIn |
String |
R |
format: yyyy-MM-dd |
Check-in date string |
2013-12-24 |
CheckOut |
String |
R |
format: yyyy-MM-dd |
Check-out date |
2013-12-26 |
PaymentType |
int |
R |
Payment type: 1: Prepay; 5: Pay at hotel |
5 |
|
RateCategory |
int |
O |
1: instant reservation pre-sell voucher |
1 |
|
PaxRooms |
|
R |
|
Contain a list of occupancy for each room |
|
PaxRooms.PaxRoom |
|
R |
|
Contain the number of adults and children |
|
PaxRooms.PaxRoom.RoomIndex |
int |
R |
Range: 1-5 |
The room index of occupancy, begins with 1 |
1 |
PaxRooms.PaxRoom.Adults |
int |
R |
Range: 1-5 |
The number of adults |
2 |
PaxRooms.PaxRoom.Children |
int |
R |
Range: 1-3 |
The number of children |
2 |
PaxRooms.PaxRoom.ChildrenAges |
|
R |
|
Contain a list of children ages, the size is equal to the number of children |
|
PaxRooms.PaxRoom.ChildrenAges.age |
int |
R |
Range: 1-17 |
The age of children |
2 |
SalesCountry |
String |
R |
|
This RP is only available to users in the market 「SalesCountry」 The input parameter must be unique. |
CN |
UserCountry |
String |
R |
|
This RP is only available to users with nationality 「UserCountry」 The input parameter must be unique. |
CN |
<RoomAvailabilityRequest> <AuthenticationToken> <Username>taobao</Username> <RequestTimestamp>1500432371</RequestTimestamp> <Signature>fb731b39f746146140325a0f2ea6f4be2da949b22e9ccd805afba30fbea9cc11</Signature> </AuthenticationToken> <CheckIn>2017-07-29</CheckIn> <CheckOut>2017-07-30</CheckOut> <RateKey>XXX</RateKey> <RateCode>XXX</RateCode> <RoomTypeCode>XXX</RoomTypeCode> <HotelCode>10021918</HotelCode> <PaymentType>1</PaymentType> <RateCategory>1</RateCategory> <PaxRooms> <PaxRoom> <RoomIndex>1</RoomIndex> <Adults>2</Adults> <Children>2</Children> <ChildrenAges> <Age>8</Age> <Age>8</Age> </ChildrenAges> </PaxRoom> </PaxRooms> <SalesCountry>CN</SalesCountry> <UserCountry>CN</UserCountry> </RoomAvailabilityRequest>
Name | Type | O/R/SR | Limitation | Description | Example |
---|---|---|---|---|---|
Hotel |
|
R |
|
|
|
Hotel.HotelCode |
String |
R |
64 |
OTA hotel id or hotel id in third-party system |
80 |
Hotel.CheckIn |
String |
R |
format: yyyy-MM-dd |
Check-in date string |
2013-12-24 |
Hotel.CheckOut |
String |
R |
format: yyyy-MM-dd |
Check-out date |
2013-12-26 |
Hotel.Name |
String |
R |
128 |
The Chinese name of hotel |
普吉岛假日度假酒店 |
Hotel.EnglishName |
String | R | 128 | The English name of hotel | Holiday Inn Resort Phuket |
Hotel.Address |
String | R | 512 | The address of hotel | 52 Thaweewong Rd. Patong Beach Phuket, Thailand |
Hotel.CityCode |
String | R | 64 | OTA city id,you can use "taobao.xhotel.city.coordinates.batch.upload" upload the coordinates and after fliggy's calculate,you can thourgh "taobao.xhotel.city.coordinates.batch.download" download the citycode;apiurl:https://open.alitrip.com/docs/api_list.htm?spm=a21tt.7629065.0.0.5fb0c486lQ6mMS&cid=20752 | PKT23 |
Hotel.PaymentType |
int | R | 64 | 1. prepay online, 5. post pay at hotel | 1 |
Hotel.CurrencyCode |
String | R | The currency code for the min price | CNY | |
Hotel.RoomTypes |
R |
A list of room type information |
|||
RoomTypes.RoomType |
R | room type information |
|||
RoomType.RoomTypeName |
String |
R |
|
The room type name |
测试房型 |
RoomType.RoomTypeCode |
String |
R |
64 |
OTA room type id or room type id in third-party system |
Duxl-23434 |
RoomType.RoomTypeEnglishName |
String |
R |
|
The room type English name
|
test room type |
RoomType.MaxRoomOccupancy |
int |
R |
Range: 1, 10 |
Max number of people to stay in the room |
4 |
RoomType.RateInfos |
R |
A list of rate info |
|||
RateInfos.RateInfo |
rate info |
||||
RateInfo.RateKey |
String | R |
200 | The unique key of this rate plan to indentify the properties included in the rate.This key should not contain character "|" which is used by Fliggy internally. Notice that, this rate key will be validated by CreateOrder api |
237a1bff37554d3db7c17a2f6fa7ae83 |
RateInfo.RateCode |
String | R |
64 | OTA rate plan id or rate plan id in third-party system |
BB-234-OX |
RateInfo.RateName |
String | R |
128 | The description name of this rate |
含早提前预定 |
RateInfo.RateEnglishName |
String | R |
128 | The description name of this rate in English |
Breakfast Included Book Advance |
RateInfo.Refundable |
boolean | R |
Indentify the rate is refundable or not, if the rate is non-refundable, can skip the "CancelPolicyInfos" node. |
false | |
RateInfo.Allotment |
int | R |
The number of max bookable rooms for this rate plan.If the value is set as 1, it means it n doesn't support multi room |
10 | |
RateInfo.MaxOccupancy |
int | R |
The number of max occupancies including adults and children for this rate plan |
3 | |
RateInfo.MaxAdults |
int | R |
The number of max MaxAdults for this rate plan |
2 | |
RateInfo.MaxChildren |
int | R |
The number of max children for this rate plan |
1 | |
RateInfo.Board |
String | R |
The board information for this rate. |
||
Board.BoardCode |
String | R |
see board code list | The board category code |
American |
Board.BoardCount |
int | R |
The quantity of board will be served in the hotel. 2 for 2 adults for example. |
2 | |
RateInfo.PaymentType |
int | R |
1. prepay online, 5. post pay at hotel |
1 | |
RateInfo.RateCategory |
int | O |
1.instant reservation pre-sell voucher |
1 | |
RateInfo.CurrencyCode |
String | R |
The currency code for the price detailed nodes inside "RateInfo" node. |
GBP | |
RateInfo.TotalBasePrice |
Decimal | R |
The base total price before the promotion applies, if no promotion, the value is equal to "TotalPrice" |
23.34 | |
RateInfo.TotalPrice |
Decimal | R |
The total price of this order, which should be paid by users. |
45.65 | |
RateInfo.TotalTaxAndFee |
Decimal | R |
The total tax and fee is included in the "TotalPrice" |
2.43 | |
RateInfo.TaxBreakdown |
? | O |
? | ?TaxDetails (Included in the Total Price) |
? |
TaxBreakdown.TaxCode |
String | R |
? | TaxCode If the tax is unknown, please select other tax categories in TaxCode . Only one accommodation tax can be submitted. If multiple tax is submitted, Fliggy will take the first one as the main one. The supplier will be responsible for any problems caused by submitting multiple tax. |
0 |
TaxBreakdown.Amount |
Bigdecimal | O |
? | TaxAmount Note: The amount in RateInfo.taxBreakdown must be consistent with the sum of the amounts in DailyInfo.TaxAndFee, otherwise an error will be reported. If any of the two fields is empty, no verification will be performed. If the amount of a tax is unknown, the DailyInfo.TaxAndFee field can be omitted, and only the corresponding information can be passed in the RateInfo.taxBreakdown field. If the amount has a value, the corresponding currency must be passed, otherwise an error will be reported. |
80 |
TaxBreakdown.Currency |
String | O |
? | Currency (Must be consistent with the calendar pricing) This field must be passed if there is an amount.. |
CNY |
RateInfo.PaxPriceRooms |
R |
A collection of PaxPriceRoom |
|||
PaxPriceRooms.PaxPriceRoom |
The daily price of evey room |
||||
PaxPriceRoom.RoomIndex |
int |
R |
Range: 1-5 |
The room index of occupancy, begins with 1 |
1 |
PaxPriceRoom.Adults |
int |
R |
Range: 1-5 |
The number of adults |
2 |
PaxPriceRoom.Children |
int |
R |
Range: 1-3 |
The number of children |
2 |
PaxPriceRoom.ChildrenAges |
|
R |
|
Contain a list of children ages, the size is equal to the number of children |
|
PaxPriceRoom.ChildrenAges.age |
int |
R |
Range: 1-17 |
The age of children |
2 |
PaxPriceRoom.DailyInfos |
R | Contain a list of "DailyInfo", the length of list is the duration of stay in the hotel. | |||
DailyInfos.DailyInfo |
R | The daily price of rooms when stay in hotels. | |||
DailyInfo.Day | String | R | format: yyyy-MM-dd | The date of the stay in hotels | 2016-04-13 |
DailyInfo.BasePrice | Decimal | R | The base price of this date before the promotion applies, if no promotion, the value is equal to "Price" | 23.45 | |
DailyInfo.Price | Decimal | R | The price of this date | 24.65 | |
DailyInfo.TaxAndFee | Decimal | R | The tax and fee of this date | 2.00 | |
DailyInfo.CurrencyCode | String | R | The currency code for the price detailed nodes inside "DailyInfo" node. | CNY | |
RateInfo.CancelPolicyInfos | O | The cancel policy of this booking, notice that if the "Refundable" is false, this node can be omitted. | |||
CancelPolicyInfos.CancelPolicyInfo | R | ||||
CancelPolicyInfo.CancelTime | String | R | format: HH:mm | The cancel start time, it is the last check in time of the check in date. | 14:00 |
CancelPolicyInfo.StartWindowHours | int | R | The start hours from the CancelTime, this is the end point of the penalty. | 24 | |
CancelPolicyInfo.NightCount | int | O | The penalty is the daily price, the value of this node determines the number of day from the check in date . | 1 | |
CancelPolicyInfo.Amount | int | O | The penalty is this amount, the value of this node indicates the amount of penalty. Notice that, this node take precedence over nightCount node, should not let them appear together. |
23.00 | |
CancelPolicyInfo.TimeZone | String | R | format: +/-10:00 | The time zone offset |
+08:00 |
CancelPolicyInfo.CurrencyCode | String | R | The currency code of the amount |
AUD | |
RateInfo.HotelFees | O | Contain a list of "HotelFee", if no price shoud be paid at hotels, this node should be omitted. |
|||
HotelFees.HotelFee | R |
|
|||
HotelFee.TaxCode | String | R | TaxCode |
0 | |
HotelFee.Amount | Decimal | O | The amount of price should be paid at the front desk |
33.00 | |
HotelFee.CurrencyCode | String | O | The currency code of the price which should be paid at the front desk(This field must be passed if there is an amount.) |
CNY | |
RateInfo.RateComments | O | Contain a list of "rateComment", if no check in guide is available, this node is omitted. |
|||
rateComments.RateComment | String | R | The check in guide for the hotel visitors |
"Hotel resturant is in maintenance" | |
RateInfo.SalesCountries |
List |
O |
|
This RP is only available to users in the market 「SalesCountry」 |
CN |
RateInfo.UserCountries |
List |
O |
|
This RP is only available to users with nationality 「UserCountry」 |
CN |
<RoomAvailabilityResponse> <ResponseTimestamp>1500295485</ResponseTimestamp> <Hotel> <Name>测试</Name> <EnglishName>test</EnglishName> <Address>dsfdsf-234-234</Address> <CityCode>dsf</CityCode> <HotelCode>10021918</HotelCode> <CheckIn>2017-07-29</CheckIn> <CheckOut>2017-07-30</CheckOut> <PaymentType>1</PaymentType> <CurrencyCode>CNY</CurrencyCode> <RoomTypes> <RoomType> <RoomTypeCode>VIP</RoomTypeCode> <RoomTypeName>测试房型</RoomTypeName> <RoomTypeEnglishName>test room</RoomTypeEnglishName> <MaxRoomOccupancy>4</MaxRoomOccupancy> <RateInfos> <RateInfo> <RateKey>VIP</RateKey> <RateCode>VIP</RateCode> <RateName>测试rate</RateName> <RateEnglishName>test rate</RateEnglishName> <Allotment>5</Allotment> <MaxOccupancy>3</MaxOccupancy> <MaxAdults>3</MaxAdults> <MaxChildren>2</MaxChildren> <Refundable>true</Refundable> <Board> <BoardCode>American</BoardCode> <BoardCount>2</BoardCount> </Board> <PaymentType>1</PaymentType> <RateCategory>1</RateCategory> <CurrencyCode>CNY</CurrencyCode> <TotalBasePrice>400</TotalBasePrice> <TotalPrice>400</TotalPrice> <TotalTaxAndFee>80</TotalTaxAndFee> <TaxBreakdown> <TaxCode>0</TaxCode> <Amount>80</Amount> <Currency>CNY</Currency> </TaxBreakdown> <CancelPolicyInfos> <CancelPolicyInfo> <CancelTime>16:00</CancelTime> <StartWindowHours>0</StartWindowHours> <NightCount>1</NightCount> <TimeZone>-08:00</TimeZone> <CurrencyCode>CNY</CurrencyCode> </CancelPolicyInfo> <CancelPolicyInfo> <CancelTime>16:00</CancelTime> <StartWindowHours>48</StartWindowHours> <NightCount>0</NightCount> <TimeZone>-08:00</TimeZone> <CurrencyCode>CNY</CurrencyCode> </CancelPolicyInfo> </CancelPolicyInfos> <HotelFees> <HotelFee> <TaxCode>0</TaxCode> <Amount>33</Amount> <CurrencyCode>CNY</CurrencyCode> </HotelFee> </HotelFees> <RateComments> <RateComment>drop the key at the gate</RateComment> <RateComment>dinner can not be served</RateComment> </RateComments> <SalesCountries> <SalesCountry>CN</SalesCountry> </SalesCountries> <UserCountries> <UserCountry>CN</UserCountry> </UserCountries> <PaxPriceRooms> <PaxPriceRoom> <RoomIndex>1</RoomIndex> <Adults>2</Adults> <Children>2</Children> <ChildrenAges> <Age>10</Age> <Age>10</Age> </ChildrenAges> <DailyInfos> <DailyInfo> <Day>2016-12-24</Day> <Price>100</Price> <BasePrice>100</BasePrice> <TaxAndFee>20</TaxAndFee> <CurrencyCode>CNY</CurrencyCode> </DailyInfo> <DailyInfo> <Day>2016-12-25</Day> <Price>100</Price> <BasePrice>100</BasePrice> <TaxAndFee>20</TaxAndFee> <CurrencyCode>CNY</CurrencyCode> </DailyInfo> </DailyInfos> </PaxPriceRoom> <PaxPriceRoom> <RoomIndex>2</RoomIndex> <Adults>2</Adults> <Children>0</Children> <DailyInfos> <DailyInfo> <Day>2016-12-24</Day> <Price>100</Price> <BasePrice>100</BasePrice> <TaxAndFee>20</TaxAndFee> <CurrencyCode>CNY</CurrencyCode> </DailyInfo> <DailyInfo> <Day>2016-12-25</Day> <Price>100</Price> <BasePrice>100</BasePrice> <TaxAndFee>20</TaxAndFee> <CurrencyCode>CNY</CurrencyCode> </DailyInfo> </DailyInfos> </PaxPriceRoom> </PaxPriceRooms> </RateInfo> </RateInfos> </RoomType> </RoomTypes> </Hotel> </RoomAvailabilityResponse>