1.根据入住,退房日期等参数获取酒店缓存或实时价格信息。
2.默认情况下,Lowest price search 和 Cache rate search 将返回基于 2 人的价格。
3.如果您使用 Lowest price search 或 cache rate search 来构建您本地未来 30 天的缓存,您需要单独调用 api 30 次,因为我们的缓存报价是基于每天的报价来构建的,所以在拉取我们报价的时候也只能一天一天拉取 (CheckIn = Today.AddDays(i), CheckOut = Today.AddDays(i + 1), 循环 i 从 0 到 30)。
4.当使用多酒店查询报价时建议用缓存报价。
5.在 PriceSearch 步骤中,DidaAPI 只返回 1 间房间的价格。如果您搜索多于 1 间的房间,比如 3 间房间,并且需要计算订单的总价,请使用1间房间的价格乘以 3。在 PriceConfirm 步骤中,我们返回的是所有房间的价格,即总金额。这部分非常重要,如果您需要详细解释,请联系您的专属 API 经理。
6.Dida API 支持单个请求包含多个房间,但仅限于相同房型的房间,也就是相同的 rateplanID。Dida API 不支持单个请求包含不同房型的多个房间。
7.在 PriceSearch 阶段,Dida 不支持不同房间含有不同的入住人数。对于需要2个或2个以上的房间,但是每个房间有不同入住人数的需求,Dida 不推荐拆成不同的请求发送到Dida,否则可能会出现第其中1个订单成功,其他订单失败的情况,从而产生争议单。 建议您还是发送一个请求,对于如何输入成人入住人数以及小孩入住人数,您应组合输入不同房间中的最大成人人数以及最大小孩人数。请注意,因为有的酒店可能不支持小孩入住,所以成人入住人数和小孩入住人数,应分别看待,请准确的输入成人入住人数和小孩入住人数。请参考下表中提供的示例,以获取具体指导。关于这一点,非常重要,有任何疑惑,请联系您的专属 API 客户经理。
Scene | Room1 | Room2 | RealTimeOccupancy |
---|---|---|---|
1 | 1 Adult | 2 Adult | 2 Adult |
2 | 1 Adult | 1 Adult 1 Child | 1 Adult 1 Child |
3 | 2 Adult | 1 Adult 1 Child | 2 Adult 1 Child |
4 | 2 Adult 1 Child | 2 Adult 2 Child | 2 Adult 2 Child |
8.关于餐型,Dida 有两个字段可以获取餐型信息。第一个是 BreakfastType,在 Response 里面,Dida 只返回是否含早或者不含早,不能显示具体的餐型份数,对于新开发 DidaAPI 的客户,不推荐使用这个字段。第二个是 MealType,在 Response 里面,不仅有 MealType 可以表示具体的餐型,还有 MealAmount 表示含餐的份数,如果您使用了 MealType,那么请一定要同时解析 MealAmount 字段,以免出现解析错误或者未来产生关于餐型份数的争议。 且理论上来说,MealAmount 的数量总是小于或者等于入住人数。例如,如果有两个客人入住,MealAmount 为 0,则表示不含早。MealAmount 为 1,表示只含1份早餐,这种情况是存在的,有些酒店2人入住,只包含1份免费早餐,如果需要2份早餐的话,另外一份需要在线或者到店额外付费购买。MealAmount 为 2,表示入住的2个人买,都含有早餐。
9.关于 IncludedFeeList 与 ExcludedFeeList 的详细说明:
- 理论上来说,IncludedFeeList 节点里面展示的税费,是包含在 TotalPrice 节点中的,例如 Tax and Fee,需要客人在线随着 TotalPrice 一起付款。ExcludedFeeList 结点里面展示的税费,是不包含在节点中的,例如 Resort Fee、City Fee 等等,这种一般是需要客人到达酒店后,直接付款给到酒店。
- IncludedFee 以及 ExcludedFee 的信息一般来自 Dida 供应商或者酒店,并不是每一个酒店都会包含着两个节点。
- 对于存在 IncludedFee 或者 ExcludedFee 的酒店,如果您需要在 Response 中看到这两个节点的信息,需要在 Dida 这边进行额外的配置后,才能看到,如果有需要,请联系您的专属 API 客户经理。
返回酒店的最低价
{
"Header": {
"ClientID": "DidaApiTestID",
"LicenseKey": "TestKey"
},
"CheckInDate": "2023-08-26",
"CheckOutDate": "2023-08-27",
"Destination": {
"CityCode": "602651"
},
"LowestPriceOnly": true,
"Nationality": "CN",
"Currency": "CNY"
}
<PriceSearchRequest>
<Header>
<ClientID>DidaApiTestID</ClientID>
<LicenseKey>TestKey</LicenseKey>
</Header>
<Destination CityCode="602651" />
<CheckInDate>2023-08-26</CheckInDate>
<CheckOutDate>2023-08-27</CheckOutDate>
<Nationality>CN</Nationality>
<LowestPriceOnly>true</LowestPriceOnly>
<Currency>CNY</Currency>
</PriceSearchRequest>
{
"Header": {
"ClientID": "DidaApiTestID",
"LicenseKey": "TestKey"
},
"CheckInDate": "2023-08-23",
"CheckOutDate": "2023-08-24",
"HotelIDList": [5982,11,7017,239133,1672],
"LowestPriceOnly": true,
"Nationality": "CN",
"Currency": "USD"
}
<PriceSearchRequest>
<Header>
<ClientID>DidaApiTestID</ClientID>
<LicenseKey>TestKey</LicenseKey>
</Header>
<HotelIDList>
<HotelID>5982</HotelID>
<HotelID>11</HotelID>
<HotelID>7017</HotelID>
<HotelID>239133</HotelID>
<HotelID>1672</HotelID>
</HotelIDList>
<CheckInDate>2023-08-23</CheckInDate>
<CheckOutDate>2023-08-24</CheckOutDate>
<Nationality>CN</Nationality>
<LowestPriceOnly>true</LowestPriceOnly>
<Currency>USD</Currency>
</PriceSearchRequest>
{
"Header": {
"ClientID": "DidaApiTestID",
"LicenseKey": "TestKey"
},
"CheckInDate": "2023-08-23",
"CheckOutDate": "2023-08-24",
"HotelIDList": [5982,11,7017,239133,1672],
"LowestPriceOnly": true,
"Nationality": "CN",
"Currency": "USD"
}
<PriceSearchRequest>
<Header>
<ClientID>DidaApiTestID</ClientID>
<LicenseKey>TestKey</LicenseKey>
</Header>
<HotelIDList>
<HotelID>5982</HotelID>
<HotelID>11</HotelID>
<HotelID>7017</HotelID>
<HotelID>239133</HotelID>
<HotelID>1672</HotelID>
</HotelIDList>
<CheckInDate>2023-08-23</CheckInDate>
<CheckOutDate>2023-08-24</CheckOutDate>
<Nationality>CN</Nationality>
<LowestPriceOnly>true</LowestPriceOnly>
<Currency>USD</Currency>
</PriceSearchRequest>
{
"Header": {
"ClientID": "DidaApiTestID",
"LicenseKey": "TestKey"
},
"HotelIDList": [76458,1250,512,251448,146962],
"CheckInDate": "2023-08-01",
"CheckOutDate": "2023-08-02",
"IsRealTime": {
"Value": false,
"RoomCount": 1
},
"Currency": "USD",
"Nationality": "CN"
}
<PriceSearchRequest>
<Header>
<ClientID>DidaApiTestID</ClientID>
<LicenseKey>TestKey</LicenseKey>
</Header>
<HotelIDList>
<HotelID>76458</HotelID>
<HotelID>1250</HotelID>
<HotelID>512</HotelID>
<HotelID>251448</HotelID>
<HotelID>146962</HotelID>
</HotelIDList>
<CheckInDate>2023-08-01</CheckInDate>
<CheckOutDate>2023-08-02</CheckOutDate>
<Nationality>CN</Nationality>
<IsRealTime RoomCount="1">false</IsRealTime>
<Currency>USD</Currency>
</PriceSearchRequest>
{
"Header": {
"ClientID": "DidaApiTestID",
"LicenseKey": "TestKey"
},
"HotelIDList": [76458],
"CheckInDate": "2023-08-01",
"CheckOutDate": "2023-08-02",
"IsRealTime": {
"Value": false,
"RoomCount": 1
},
"Currency": "USD",
"Nationality": "CN"
}
<PriceSearchRequest>
<Header>
<ClientID>DidaApiTestID</ClientID>
<LicenseKey>TestKey</LicenseKey>
</Header>
<HotelIDList>
<HotelID>76458</HotelID>
</HotelIDList>
<CheckInDate>2023-08-01</CheckInDate>
<CheckOutDate>2023-08-02</CheckOutDate>
<Nationality>CN</Nationality>
<IsRealTime RoomCount="1">false</IsRealTime>
<Currency>USD</Currency>
</PriceSearchRequest>
{
"Header": {
"ClientID": "DidaApiTestID",
"LicenseKey": "TestKey"
},
"HotelIDList": [76458],
"CheckInDate": "2023-08-01",
"CheckOutDate": "2023-08-02",
"IsRealTime": {
"Value": false,
"RoomCount": 1
},
"Currency": "USD",
"Nationality": "CN"
}
<PriceSearchRequest>
<Header>
<ClientID>DidaApiTestID</ClientID>
<LicenseKey>TestKey</LicenseKey>
</Header>
<HotelIDList>
<HotelID>76458</HotelID>
</HotelIDList>
<CheckInDate>2023-08-01</CheckInDate>
<CheckOutDate>2023-08-02</CheckOutDate>
<Nationality>CN</Nationality>
<IsRealTime RoomCount="1">false</IsRealTime>
<Currency>USD</Currency>
</PriceSearchRequest>
{
"Header": {
"ClientID": "DidaApiTestID",
"LicenseKey": "TestKey"
},
"HotelIDList": [
76458,1250,512,251448,146962
],
"CheckInDate": "2023-08-01",
"CheckOutDate": "2023-08-02",
"IsRealTime": {
"Value": true,
"RoomCount": 1
},
"RealTimeOccupancy": {
"AdultCount": 2,
"ChildCount": 0,
"ChildAgeDetails": []
},
"Currency": "USD",
"Nationality": "CN"
}
<PriceSearchRequest>
<Header>
<ClientID>DidaApiTestID</ClientID>
<LicenseKey>TestKey</LicenseKey>
</Header>
<HotelIDList>
<HotelID>76458</HotelID>
<HotelID>1250</HotelID>
<HotelID>512</HotelID>
<HotelID>251448</HotelID>
<HotelID>146962</HotelID>
</HotelIDList>
<CheckInDate>2023-08-01</CheckInDate>
<CheckOutDate>2023-08-02</CheckOutDate>
<Nationality>CN</Nationality>
<IsRealTime RoomCount="1">true</IsRealTime>
<RealTimeOccupancy AdultCount="2" ChildCount="0">
<ChildAgeDetails />
</RealTimeOccupancy>
<Currency>USD</Currency>
</PriceSearchRequest>
{
"Header": {
"ClientID": "DidaApiTestID",
"LicenseKey": "TestKey"
},
"HotelIDList": [
512
],
"CheckInDate": "2023-08-01",
"CheckOutDate": "2023-08-02",
"IsRealTime": {
"Value": true,
"RoomCount": 1
},
"RealTimeOccupancy": {
"AdultCount": 2,
"ChildCount": 0,
"ChildAgeDetails": []
},
"Currency": "USD",
"Nationality": "CN"
}
<PriceSearchRequest>
<Header>
<ClientID>DidaApiTestID</ClientID>
<LicenseKey>TestKey</LicenseKey>
</Header>
<HotelIDList>
<HotelID>512</HotelID>
</HotelIDList>
<CheckInDate>2023-08-01</CheckInDate>
<CheckOutDate>2023-08-02</CheckOutDate>
<Nationality>CN</Nationality>
<IsRealTime RoomCount="1">true</IsRealTime>
<RealTimeOccupancy AdultCount="2" ChildCount="0">
<ChildAgeDetails/>
</RealTimeOccupancy>
<Currency>USD</Currency>
</PriceSearchRequest>
{
"Header": {
"ClientID": "DidaApiTestID",
"LicenseKey": "TestKey"
},
"HotelIDList": [512],
"CheckInDate": "2023-08-01",
"CheckOutDate": "2023-08-02",
"IsRealTime": {
"Value": true,
"RoomCount": 1
},
"RealTimeOccupancy": {
"AdultCount": 2,
"ChildCount": 2,
"ChildAgeDetails": [1, 2]
},
"Currency": "USD",
"Nationality": "CN"
}
<PriceSearchRequest>
<Header>
<ClientID>DidaApiTestID</ClientID>
<LicenseKey>TestKey</LicenseKey>
</Header>
<HotelIDList>
<HotelID>512</HotelID>
</HotelIDList>
<CheckInDate>2023-08-01</CheckInDate>
<CheckOutDate>2023-08-02</CheckOutDate>
<Nationality>CN</Nationality>
<IsRealTime RoomCount="1">true</IsRealTime>
<RealTimeOccupancy AdultCount="2" ChildCount="2">
<ChildAgeDetails>
<ChildAge>1</ChildAge>
<ChildAge>2</ChildAge>
</ChildAgeDetails>
</RealTimeOccupancy>
<Currency>USD</Currency>
</PriceSearchRequest>
{
"Header": {
"ClientID": "DidaApiTestID",
"LicenseKey": "TestKey"
},
"HotelIDList": [
512
],
"CheckInDate": "2023-08-01",
"CheckOutDate": "2023-08-02",
"IsRealTime": {
"Value": true,
"RoomCount": 1
},
"RealTimeOccupancy": {
"AdultCount": 2,
"ChildCount": 2,
"ChildAgeDetails": [1, 2]
},
"Currency": "USD",
"Nationality": "CN"
}
<PriceSearchRequest>
<Header>
<ClientID>DidaApiTestID</ClientID>
<LicenseKey>TestKey</LicenseKey>
</Header>
<HotelIDList>
<HotelID>512</HotelID>
</HotelIDList>
<CheckInDate>2023-08-01</CheckInDate>
<CheckOutDate>2023-08-02</CheckOutDate>
<Nationality>CN</Nationality>
<IsRealTime RoomCount="1">true</IsRealTime>
<RealTimeOccupancy AdultCount="2" ChildCount="2">
<ChildAgeDetails>
<ChildAge>1</ChildAge>
<ChildAge>2</ChildAge>
</ChildAgeDetails>
</RealTimeOccupancy>
<Currency>USD</Currency>
</PriceSearchRequest>