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

taobao.xhotel.price.get (酒店价格查询2)

查询酒店下所有房型日历价格

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
end_date Date 必须 2023-04-17 00:00:00 离店日期
pid String 可选 mm_2000059001_20312022_20470013 pid
shid_city_code String 必须 12332123_110100,4442131_110100 标准酒店id和城市编码拼接字符串,最多50个
start_date Date 必须 2023-04-16 00:00:00 入住日期
type Number 可选 0
  • 默认值:0
  • 请求类型:0批量请求;1实时请求
    data_version String 可选 5.0 版本控制(3.0支持信用住)
    open_id String 可选 r43rfef3r34 经过混淆的openid
    rate_key String 可选 111 rate
    is_feizhu_new Boolean 可选 true 是否菲住新会员
    condition_tags Number [] 可选 [111,222]
  • 最大列表长度:999
  • 需要返回的rate标签
    extend_param String 可选 sellerId_1 扩展参数
    out_crowds String 可选 gaodeCrowd1,gaodeCrowd2 外部人群

    响应参数

    名称 类型 示例值 描述
    hotel_prices HotelPriceSearchVTwoPriceResultSet 酒店报价查询结果
    • results
    • HotelPriceSearchVTwoHotelPrices []
    • 酒店报价信息集合
    • daily_prices
    • HotelPriceSearchVTwoHotelDailyPrices []
    • 日历价格信息集合
    • └ end
    • Date
    • 2015-06-17 15:56:57
    • 离店日期
    • room_type_prices
    • HotelPriceSearchVTwoRoomTypePriceInfo
    • 房型报价信息集合
    • rooms
    • HotelPriceSearchVTwoSRoomType []
    • 房型集合
    • └ name
    • String
    • demo
    • 房型名称
    • rates
    • HotelPriceSearchVTwoRate []
    • 报价集合
    • └ rate_id
    • Number
    • 123123
    • 报价id
    • └ rp_id
    • Number
    • 123
    • 价格政策id
    • └ pc_buy_url
    • String
    • http: //kezhan.trip.taobao.com/order/auction/buy_now.htm?city=110100&id=2100521217078&rpId=2438001075
    • pc购买地址
    • └ payment_type_byte
    • byte
    • 1
    • 报价类型
    • └ inventory_price
    • String
    • [{\"quota\":1,\"price\":1100,\"date\":\"2014-08-16\",\"cashback\":12}]
    • 库存价格信息
    • └ rate_plan_name
    • String
    • 预付无早
    • 价格政策名称
    • └ h5_buy_url
    • String
    • http: //h5.m.taobao.net/trip/hotel/order/order-confirm.html?id=10909001075&iid=2100521217078&rpid=2438001075&paymenttype=1&shid=10005252&hid=0&allbseller=1&sellerId=-1&ttid=12gao0000004
    • h5购买页地址
    • └ subtract
    • Number
    • 10
    • 立减金额
    • └ guarantee_type
    • Number
    • 1
    • 无担保0;分时首晚担保1;分时全额担保2;全天首晚担保3;全天全额担保4;
    • └ guarantee_start_time
    • String
    • 18:30
    • guaranteeStartTime
    • └ instant_confirm
    • Boolean
    • true
    • 是否闪电确认
    • └ cancel_policy_desc
    • String
    • 免费取消
    • 取消政策
    • └ flagship
    • String
    • 首旅如家酒店集团旗舰店
    • 旗舰店名称
    • └ is_student_price
    • Boolean
    • 是否是学生价
    • true/false
    • └ is_member_price
    • Boolean
    • 是否是会员价
    • true/false
    • └ is_f0_price
    • Boolean
    • 是否是f0商品报价,如家专用
    • true/false
    • └ is_nf0_price
    • Boolean
    • 是否是非f0商品报价,如家专用
    • true/false
    • └ member_level
    • Number
    • 需要的会员v等级
    • 1/2/3
    • └ partner_name
    • String
    • 集团名称
    • 首旅如家
    • └ seller_id
    • Number
    • 卖家id
    • 1994132278
    • └ item_id
    • Number
    • 商品id
    • 7777777
    • └ is_credit_pay
    • Boolean
    • 是否支持信用支付
    • false
    • └ is_first_stay
    • Boolean
    • 是否首住价
    • false
    • └ member_rights_types
    • String []
    • 权益类型
    • [1,2,3]
    • └ user_member_level
    • Number
    • 用户等级
    • 1
    • └ nod
    • Number
    • 连住天数
    • 0
    • └ nop
    • Number
    • 可住人数
    • 2
    • └ min_adv_hours
    • Number
    • 最小提前小时数
    • 0
    • └ min_days
    • Number
    • 最小提前天数
    • 0
    • └ currency_code
    • String
    • 币种
    • CNY
    • └ can_dawn_book
    • Boolean
    • 是否可以凌晨预订
    • true
    • └ dawn_book_start_time
    • String
    • 凌晨预订开始时间
    • 00:00
    • └ dawn_book_end_time
    • String
    • 凌晨预订结束时间
    • 06:00
    • └ is_tail_room
    • Boolean
    • 是否尾房商品
    • false
    • └ tail_start_time
    • String
    • 尾房开售时间
    • 18:00
    • └ start_time_daily
    • String
    • 每日开始时间
    • 1970-01-01 00:00:00
    • └ end_time_daily
    • String
    • 每日结束时间
    • 1970-01-01 00:00:00
    • └ board_types
    • String []
    • 餐食类型
    • [0, 2]
    • └ board_nums
    • String []
    • 餐食数量
    • [-1, 2]
    • └ cancel_policy_type
    • Number
    • 取消政策类型
    • 5
    • └ cancel_policy_hours
    • String []
    • 取消政策提前小时数
    • [1,3]
    • └ cancel_policy_values
    • String []
    • 取消政策值
    • [100,200]
    • └ can_b2b
    • Boolean
    • 是否可通过B2B直接下单
    • false
    • └ need_mail_box
    • Boolean
    • true
    • 是否需要邮箱
    • └ gaode_channel
    • Boolean
    • true
    • 高德专享
    • └ is_partner_member
    • Boolean
    • true
    • 集团会员
    • └ is_hour_rate
    • Boolean
    • true
    • 是否小时房rate
    • └ hour_check_in_start
    • String
    • 9:00
    • 小时房入住起始时间
    • └ hour_check_in_end
    • String
    • 22:00
    • 小时房入住结束时间
    • └ hour_age
    • String
    • 1.5
    • 小时房能预定几个小时
    • └ invoice_provider
    • Number
    • 1
    • 发票提供方
    • └ hotel_xitems
    • String
    • [{ "gmtCreate":"Apr 2, 2021 11:10:36 AM", "gmtModified":"Jul 2, 2021 2:52:35 PM", "xitemId":4194001744}]
    • 酒+x套餐信息
    • └ can_check_in_end
    • String
    • 22:00
    • 小时房最晚入住时间
    • └ promotion_detail
    • String
    • 11
    • 优惠详情
    • └ member_promotion_detail
    • String
    • 11
    • 会员优惠详情
    • └ rate_tags
    • Number []
    • [111,222]
    • rate标
    • └ cancel_policy
    • String
    • {"cancelPolicyType":4,"policyInfo":{"7":10}}
    • 退改规则
    • └ has_member_right
    • Boolean
    • true
    • 是否拥有会员权益
    • └ rid
    • Number
    • 123
    • 房型id
    • └ window_type
    • String
    • 1
    • 窗型
    • └ bed_type_string
    • String
    • 1
    • 床型
    • └ shotel_tags
    • Number []
    • [333,444]
    • 酒店标
    • └ start
    • Date
    • 2015-06-17 15:56:57
    • 入住日期
    • └ brand
    • String
    • 123
    • 品牌code
    • └ shid
    • Number
    • 123
    • 酒店id
    • └ total_results
    • Number
    • 123
    • 总记录数
    • └ error_code
    • String
    • isv.invalid-parameter:NOTNULL
    • 错误代码
    • └ error_msg
    • String
    • 参数不能为空
    • 错误信息

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
    XhotelPriceGetRequest req = new XhotelPriceGetRequest();
    req.setEndDate(StringUtils.parseDateTime("2023-04-17 00:00:00"));
    req.setPid("mm_2000059001_20312022_20470013");
    req.setShidCityCode("12332123_110100,4442131_110100");
    req.setStartDate(StringUtils.parseDateTime("2023-04-16 00:00:00"));
    req.setType(0L);
    req.setDataVersion("5.0");
    req.setOpenId("r43rfef3r34");
    req.setRateKey("111");
    req.setIsFeizhuNew(true);
    req.setConditionTags("111,222");
    req.setExtendParam("sellerId_1");
    req.setOutCrowds("gaodeCrowd1,gaodeCrowd2");
    XhotelPriceGetResponse rsp = client.execute(req);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <xhotel_price_get_response>
        <hotel_prices>
            <results>
                <hotel_price_search_v_two_hotel_prices>
                    <daily_prices>
                        <hotel_price_search_v_two_hotel_daily_prices>
                            <end>2015-06-17 15:56:57</end>
                            <room_type_prices>
                                <rooms>
                                    <hotel_price_search_v_two_s_room_type>
                                        <name>demo</name>
                                        <rates>
                                            <hotel_price_search_v_two_rate>
                                                <rate_id>123123</rate_id>
                                                <rp_id>123</rp_id>
                                                <pc_buy_url>http: //kezhan.trip.taobao.com/order/auction/buy_now.htm?city=110100&amp;id=2100521217078&amp;rpId=2438001075</pc_buy_url>
                                                <payment_type_byte>1</payment_type_byte>
                                                <inventory_price>[{\&quot;quota\&quot;:1,\&quot;price\&quot;:1100,\&quot;date\&quot;:\&quot;2014-08-16\&quot;,\&quot;cashback\&quot;:12}]</inventory_price>
                                                <rate_plan_name>预付无早</rate_plan_name>
                                                <h5_buy_url>http: //h5.m.taobao.net/trip/hotel/order/order-confirm.html?id=10909001075&amp;iid=2100521217078&amp;rpid=2438001075&amp;paymenttype=1&amp;shid=10005252&amp;hid=0&amp;allbseller=1&amp;sellerId=-1&amp;ttid=12gao0000004</h5_buy_url>
                                                <subtract>10</subtract>
                                                <guarantee_type>1</guarantee_type>
                                                <guarantee_start_time>18:30</guarantee_start_time>
                                                <instant_confirm>true</instant_confirm>
                                                <cancel_policy_desc>免费取消</cancel_policy_desc>
                                                <flagship>首旅如家酒店集团旗舰店</flagship>
                                                <is_student_price>是否是学生价</is_student_price>
                                                <is_member_price>是否是会员价</is_member_price>
                                                <is_f0_price>是否是f0商品报价,如家专用</is_f0_price>
                                                <is_nf0_price>是否是非f0商品报价,如家专用</is_nf0_price>
                                                <member_level>需要的会员v等级</member_level>
                                                <partner_name>集团名称</partner_name>
                                                <seller_id>卖家id</seller_id>
                                                <item_id>商品id</item_id>
                                                <is_credit_pay>是否支持信用支付</is_credit_pay>
                                                <is_first_stay>是否首住价</is_first_stay>
                                                <member_rights_types>
                                                    <string>权益类型</string>
                                                </member_rights_types>
                                                <user_member_level>用户等级</user_member_level>
                                                <nod>连住天数</nod>
                                                <nop>可住人数</nop>
                                                <min_adv_hours>最小提前小时数</min_adv_hours>
                                                <min_days>最小提前天数</min_days>
                                                <currency_code>币种</currency_code>
                                                <can_dawn_book>是否可以凌晨预订</can_dawn_book>
                                                <dawn_book_start_time>凌晨预订开始时间</dawn_book_start_time>
                                                <dawn_book_end_time>凌晨预订结束时间</dawn_book_end_time>
                                                <is_tail_room>是否尾房商品</is_tail_room>
                                                <tail_start_time>尾房开售时间</tail_start_time>
                                                <start_time_daily>每日开始时间</start_time_daily>
                                                <end_time_daily>每日结束时间</end_time_daily>
                                                <board_types>
                                                    <string>餐食类型</string>
                                                </board_types>
                                                <board_nums>
                                                    <string>餐食数量</string>
                                                </board_nums>
                                                <cancel_policy_type>取消政策类型</cancel_policy_type>
                                                <cancel_policy_hours>
                                                    <string>取消政策提前小时数</string>
                                                </cancel_policy_hours>
                                                <cancel_policy_values>
                                                    <string>取消政策值</string>
                                                </cancel_policy_values>
                                                <can_b2b>是否可通过B2B直接下单</can_b2b>
                                                <need_mail_box>true</need_mail_box>
                                                <gaode_channel>true</gaode_channel>
                                                <is_partner_member>true</is_partner_member>
                                                <is_hour_rate>true</is_hour_rate>
                                                <hour_check_in_start>9:00</hour_check_in_start>
                                                <hour_check_in_end>22:00</hour_check_in_end>
                                                <hour_age>1.5</hour_age>
                                                <invoice_provider>1</invoice_provider>
                                                <hotel_xitems>[{ &quot;gmtCreate&quot;:&quot;Apr 2, 2021 11:10:36 AM&quot;,         &quot;gmtModified&quot;:&quot;Jul 2, 2021 2:52:35 PM&quot;,         &quot;xitemId&quot;:4194001744}]</hotel_xitems>
                                                <can_check_in_end>22:00</can_check_in_end>
                                                <promotion_detail>11</promotion_detail>
                                                <member_promotion_detail>11</member_promotion_detail>
                                                <rate_tags>
                                                    <number>[111</number>
                                                    <number>222]</number>
                                                </rate_tags>
                                                <cancel_policy>{&quot;cancelPolicyType&quot;:4,&quot;policyInfo&quot;:{&quot;7&quot;:10}}</cancel_policy>
                                                <has_member_right>true</has_member_right>
                                            </hotel_price_search_v_two_rate>
                                        </rates>
                                        <rid>123</rid>
                                        <window_type>1</window_type>
                                        <bed_type_string>1</bed_type_string>
                                    </hotel_price_search_v_two_s_room_type>
                                </rooms>
                                <shotel_tags>
                                    <number>[333</number>
                                    <number>444]</number>
                                </shotel_tags>
                            </room_type_prices>
                            <start>2015-06-17 15:56:57</start>
                            <brand>123</brand>
                        </hotel_price_search_v_two_hotel_daily_prices>
                    </daily_prices>
                    <shid>123</shid>
                </hotel_price_search_v_two_hotel_prices>
            </results>
            <total_results>123</total_results>
            <error_code>isv.invalid-parameter:NOTNULL</error_code>
            <error_msg>参数不能为空</error_msg>
        </hotel_prices>
    </xhotel_price_get_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>

    错误码解释

    错误码 错误描述 解决方案
    isp.call-limited 调用被限制 请联系提供方

    API工具

    如何获得此API

    FAQ

    返回
    顶部