文档中心 > API类目 > 酒店导购API

taobao.xhotel.distribution.realtime.price (飞猪分销通用酒店实时报价接口)

飞猪分销通用酒店实时报价接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
shids Number 必须 123123,321321 查询报价的酒店列表
checkin_date String 必须 2023-01-01 入住日期 yyyy-MM-dd
checkout_date String 必须 2023-01-02 离店日期 yyyy-MM-dd
open_id String 可选 oisaojshfabfa openId
telephone_number Number 可选 13244445555 用户手机号

响应参数

名称 类型 示例值 描述
hotel_prices_result HotelPricesResult 酒店报价查询结果
  • └ error_code
  • Number
  • 0
  • 错误码,不为0表示有异常
  • └ error_message
  • String
  • 当前请求已被限流
  • 错误信息
  • module
  • RealtimeDistributionHotelPricesResp
  • 酒店报价信息
  • └ search_id
  • String
  • searchId
  • 用于请求复现
  • hotel_prices
  • ShotelPrice []
  • 酒店报价列表
  • └ shid
  • Number
  • 123456
  • 酒店id
  • └ name
  • String
  • 万豪行政公寓
  • 酒店名称
  • room_prices
  • SroomPrice []
  • 房型报价列表
  • └ srid
  • Number
  • 456789
  • 房型id
  • └ name
  • String
  • 豪华大床房
  • 房型名称
  • └ bed_json
  • String
  • 床型信息json
  • 床型信息json
  • └ window_json
  • String
  • 窗型信息json
  • 窗型信息json 0无窗 1有窗 2部分有窗 3暗窗 4部分有窗 5落地窗
  • rate_prices
  • RealtimeRatePrice []
  • 报价列表
  • └ rate_id
  • Number
  • 123456789
  • rateId
  • └ rateplan_id
  • Number
  • 123456789
  • rpId
  • └ item_id
  • Number
  • 123456789
  • iid
  • └ currency_code
  • String
  • CNY
  • 币种
  • └ attribute
  • String []
  • 商品属性,INSTANT_CONFIRM("及时确认"),MORNING_ORDER("支持凌晨入住"),
  • └ invoice_provider
  • Number
  • 1
  • 开票类型,0、不开票;1、门店开票;2、商家开票
  • checkin_checkout_prices
  • CheckInCheckOutPrice []
  • 日历报价列表
  • └ checkin_date
  • String
  • 2023-01-01
  • 入住日期 yyyy-MM-dd
  • └ checkout_date
  • String
  • 2023-01-02
  • 离店日期 yyyy-MM-dd
  • └ stay_days
  • Number
  • 1
  • 入住天数
  • └ price
  • Number
  • 10000
  • 商品营销后报价,精度(分)
  • └ breakfast_count
  • Number
  • 1
  • 早餐数,-1代表早餐数和入住人数一致
  • promotions
  • PromotionPrice []
  • 飞猪营销优惠列表
  • └ name
  • String
  • 商家立减
  • 营销活动名称
  • └ amount
  • Number
  • 1000
  • 营销优惠金额
  • └ promotion_types
  • String []
  • 营销类型
  • └ ump_id
  • String
  • 123123
  • 营销活动id
  • └ original_price
  • Number
  • 15000
  • 商品营销前报价,精度(分)
  • └ daily_prices
  • Number []
  • 入离日期内,每一天的rate价格
  • └ cancel_policy_json
  • String
  • 退改政策json
  • 退改政策json
  • └ cancel_policy_desc
  • String
  • 在今天下午6点前可免费取消
  • 退改政策描述信息
  • └ order_url
  • String
  • 飞猪下单页链接
  • 飞猪下单页链接
  • └ support_invoice_type
  • String []
  • 发票类型,0 普票 1 专票 3 收据
  • └ x_items
  • String
  • 酒+X元素
  • 酒+X元素
  • └ commercialization_id
  • Number
  • 10010101
  • 10010101
  • └ merge_occupancy
  • Number
  • 2
  • 经过rate,rp,roomtype,sroomtype聚合后的入住人数
  • └ trace_id
  • String
  • traceId
  • traceId

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelDistributionRealtimePriceRequest req = new XhotelDistributionRealtimePriceRequest();
req.setShids(123123,321321L);
req.setCheckinDate("2023-01-01");
req.setCheckoutDate("2023-01-02");
req.setOpenId("oisaojshfabfa");
req.setTelephoneNumber(13244445555L);
XhotelDistributionRealtimePriceResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<xhotel_distribution_realtime_price_response>
    <hotel_prices_result>
        <error_code>0</error_code>
        <error_message>当前请求已被限流</error_message>
        <module>
            <search_id>searchId</search_id>
            <hotel_prices>
                <shotel_price>
                    <shid>123456</shid>
                    <name>万豪行政公寓</name>
                    <room_prices>
                        <sroom_price>
                            <srid>456789</srid>
                            <name>豪华大床房</name>
                            <bed_json>床型信息json</bed_json>
                            <window_json>窗型信息json</window_json>
                            <rate_prices>
                                <realtime_rate_price>
                                    <rate_id>123456789</rate_id>
                                    <rateplan_id>123456789</rateplan_id>
                                    <item_id>123456789</item_id>
                                    <currency_code>CNY</currency_code>
                                    <invoice_provider>1</invoice_provider>
                                    <checkin_checkout_prices>
                                        <check_in_check_out_price>
                                            <checkin_date>2023-01-01</checkin_date>
                                            <checkout_date>2023-01-02</checkout_date>
                                            <stay_days>1</stay_days>
                                            <price>10000</price>
                                            <breakfast_count>1</breakfast_count>
                                            <promotions>
                                                <promotion_price>
                                                    <name>商家立减</name>
                                                    <amount>1000</amount>
                                                    <ump_id>123123</ump_id>
                                                </promotion_price>
                                            </promotions>
                                            <original_price>15000</original_price>
                                        </check_in_check_out_price>
                                    </checkin_checkout_prices>
                                    <cancel_policy_json>退改政策json</cancel_policy_json>
                                    <cancel_policy_desc>在今天下午6点前可免费取消</cancel_policy_desc>
                                    <order_url>飞猪下单页链接</order_url>
                                    <x_items>酒+X元素</x_items>
                                    <commercialization_id>10010101</commercialization_id>
                                    <merge_occupancy>2</merge_occupancy>
                                </realtime_rate_price>
                            </rate_prices>
                        </sroom_price>
                    </room_prices>
                </shotel_price>
            </hotel_prices>
            <trace_id>traceId</trace_id>
        </module>
    </hotel_prices_result>
</xhotel_distribution_realtime_price_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部