文档中心 > International Hotel

Hotel Detail Query interface

Scene

When users select one hotel from hotel list page, Fliggy may query the room types and their rates of the exact hotel from the vendor , then show the result to users to help them make a decision on which rates to buy.

Request

  1. Duration of response: ≤3s (if delayed, the query should be deemed as no price returned.)
  2. Explicit result of “successful” or “failed” appears.

Method to receive the interface called by Fliggy

  1. The third party provides a service URL for receiving request from Fliggy (notes: all interface requests share the same address), the username and password for the purpose of validation.
  2. Kindly to distinguish different request types through root element of xml request structure, and handle request/response according to criteria belowed.

Request URL

POST http://{vendor's host}/hotelRooms

Request Parameters

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

10021918

CheckIn

String

R

format: yyyy-MM-dd

Check-in date string

2017-07-29

CheckOut

String

R

format: yyyy-MM-dd

Check-out date

2017-07-30

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

8

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

 

 

XML example:

<HotelRoomsRequest>
	<AuthenticationToken>
		<Username>taobao</Username>
		<RequestTimestamp>1500432371</RequestTimestamp>
		<Signature>fb731b39f746146140325a0f2ea6f4be2da949b22e9ccd805afba30fbea9cc11</Signature>
	</AuthenticationToken>
	<CheckIn>2017-07-29</CheckIn>
	<CheckOut>2017-07-30</CheckOut>
	<HotelCode>10021918</HotelCode>
	<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>
</HotelRoomsRequest>

Return result

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://fliggy.open.taobao.com/doc.htm?docId=32070&docType=2  PKT23

Hotel.PaymentType

 int  R  64  1. prepay online, 5. post pay at hotel  1

Hotel.MinPrice

 Decimal  R    The lowest price of rates provided by the hotel  230

Hotel.MinTaxPrice

 Decimal  R    The tax fee of the lowest price.  12

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 remaining rooms for this rate plan

10

RateInfo.MaxOccupancy

int

O

 

The number of max occupancies including adults and children for this rate plan

3

RateInfo.MaxChildren

int

O

 

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.RateCategory

int

O

 

1.instant reservation pre-sell voucher

1

RateInfo.PaymentType

int

R

 

1. prepay online, 5. post pay at hotel

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.ScenarioPriceTags

String

O

 

The user scenario

中宾:Chinese_price

内宾:Chinese_price_exp_hk

F2及以上会员:F2_member_price

F3及以上会员:F3_member_price

F4及以上会员:F4_member_price

F5及以上会员:F5_member_price

内地不含港澳台:Chinese_price_exp_hk_TW_MO

88vip会员:88Members

近60天国际机票:International_flight

近90天购买签证:International_visa

近60天购买签证+近30天购买大湾区机火+近30天预定国际机票:Travel_products

常住大湾区(香港、澳门、广东):Greater_Bay_Area

常住非大湾区(除香港、澳门、广东以外城市或者国外):Non-Greater_Bay_Area

常住为非大湾区且F2及以上飞猪会员:Fliggy_member_area_price

近30购大湾区机火且常住为非大湾区:Special_price_for_purchasing_area

多个用英文逗号隔开

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

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"

 

 

 

 

 

XML example:

<HotelRoomsResponse>
  <ResponseTimestamp>1500295485</ResponseTimestamp>
  <Hotel>
    <Name>普吉岛假日度假酒店</Name>
    <EnglishName>Holiday Inn Resort Phuket</EnglishName>
    <Address>52 Thaweewong Rd. Patong Beach Phuket, Thailand</Address>
    <CityCode>PKT23</CityCode>
    <HotelCode>10021918</HotelCode>
    <CheckIn>2017-07-29</CheckIn>
    <CheckOut>2017-07-30</CheckOut>
    <PaymentType>1</PaymentType>
    <MinPrice>230</MinPrice>
    <MinTaxPrice>12</MinTaxPrice>
    <CurrencyCode>CNY</CurrencyCode>
    <RoomTypes>
      <RoomType>
        <RoomTypeCode>Duxl-23434</RoomTypeCode>
        <RoomTypeName>测试房型</RoomTypeName>
        <RoomTypeEnglishName>test room type</RoomTypeEnglishName>
        <MaxRoomOccupancy>4</MaxRoomOccupancy>
        <RateInfos>
          <RateInfo>
            <RateKey>237a1bff37554d3db7c17a2f6fa7ae83</RateKey>
            <RateCode>BB-234-OX</RateCode>
            <RateName>含早提前预定</RateName>
            <RateEnglishName>Breakfast Included Book Advance</RateEnglishName>
            <Allotment>5</Allotment>
            <MaxOccupancy>3</MaxOccupancy>
            <MaxChildren>2</MaxChildren>
            <Refundable>false</Refundable>
            <Board>
              <BoardCode>American</BoardCode>
              <BoardCount>2</BoardCount>
            </Board>
	    <RateCategory>1</RateCategory>
            <PaymentType>1</PaymentType>
            <CurrencyCode>CNY</CurrencyCode>
            <TotalBasePrice>400</TotalBasePrice>
            <TotalPrice>400</TotalPrice>
            <TotalTaxAndFee>80</TotalTaxAndFee>
            <TaxBreakdown>
              <TaxCode>0</TaxCode>
              <Amount>80</Amount>
              <Currency>CNY</Currency>
            </TaxBreakdown>
            <ScenarioPriceTags>Chinese_price</ScenarioPriceTags>
            <SalesCountries>    
              <SalesCountry>CN</SalesCountry>
            </SalesCountries>
            <UserCountries>    
              <UserCountry>CN</UserCountry>
            </UserCountries>
            <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>
            <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>
</HotelRoomsResponse>

FAQ

关于此文档暂时还没有FAQ
返回
顶部