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

taobao.xhotel.price.get.for.hello (哈罗合作方获取酒店库存报价)

哈罗合作项目,供哈罗合作方按需查询已开通城市下的标准酒店下指定时间段内的库存报价信息;在用户登录方面,返回结果不涉及用户个人信息,不涉及商家信息;仅根据不同用户,查询对应会员等级后,返回不同报价;

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
hotel_price_param HotelPriceParam 可选 参数封装
  • └ data_version
  • String
  • 可选
  • 3.0
  • 版本控制(3.0支持信用住)
  • └ end_date
  • Date
  • 可选
  • 2020-03-06 15:45:59
  • 离店日期
  • └ open_id
  • String
  • 可选
  • r43rfef3r34
  • 经过混淆的userId
  • └ pid
  • String
  • 可选
  • mm_2000059001_20312022_20470013
  • 标志参数pid
  • └ shid_city_code
  • String
  • 可选
  • 12332123_110100,4442131_110100
  • 标准酒店id和城市编码拼接字符串,最多50个
  • └ start_date
  • Date
  • 可选
  • 2020-03-04 15:45:59
  • 入住日期
  • └ type
  • Number
  • 可选
  • 1
  • 请求类型:0批量请求;1实时请求

响应参数

名称 类型 示例值 描述
result HotelPriceResultSet 库价结果封装
  • └ channel_id
  • String
  • 1
  • 渠道id,0--pc,1--无线
  • └ error
  • Boolean
  • false
  • 本次请求是否错误,true--出粗
  • └ error_code
  • String
  • err_001
  • errorCode,error=true时有值
  • └ error_msg
  • String
  • 查询失败
  • 错误信息,error=true时有值
  • └ h5_list_url
  • String
  • http://h5.m.taobao.com/trip/hotel/detail/detail.html?hid=0&shid=10107739&checkin=2014-05-12&checkout=2014-05-13&curcitycode=110100
  • 报价list页h5链接
  • └ has_next
  • Boolean
  • false
  • 当前数据集合是否还有下一页
  • └ hotel_list_url
  • String
  • http://kezhan.trip.taobao.com/hotel_detail2.htm?shid=10004405&searchBy=yisou&requestId=1232322313
  • list页pc链接
  • └ request_id
  • String
  • 1232322313
  • 请求id,用于链路追踪
  • results
  • SHotelPrice []
  • 每个标准酒店的库价集合
  • daily_price_list
  • SHotelDailyPrice []
  • 每个标准酒店某一天的所有库价集合
  • └ end
  • Date
  • 2020-02-28
  • 离店日期
  • └ error_code
  • String
  • err_002
  • 错误码
  • └ error_msg
  • String
  • 参数错误
  • 错误信息
  • └ low_price
  • Number
  • 12300
  • 当日所有库价的最低价
  • └ shid
  • Number
  • 11111111
  • 对应标准酒店id
  • sroom_type_daily_price_list
  • SRoomTypeDailyPrice []
  • 本shid下所有标准房型的当日库价
  • └ end
  • Date
  • 2020-02-28
  • 离店日期
  • └ low_price
  • Number
  • 12300
  • 最低价
  • room_type_daily_price_list
  • RoomTypeDailyPrice []
  • 当前标准房型下所有库价集合
  • └ bed_type_string
  • 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下单页链接
  • └ name
  • String
  • 大床房
  • 房型名称
  • └ pc_buy_url
  • String
  • http: //kezhan.trip.taobao.com/order/auction/buy_now.htm?city=110100&id=2100521217078&rpId=2438001075
  • pc下单页链接
  • rates
  • Rate []
  • 库价具体信息
  • └ breakfast
  • String
  • 双早
  • 餐食信息
  • └ breakfast_count
  • Number
  • 2
  • 餐食类型,0--无早, 1--单早, 2--双早, 3--三早, 4--多早
  • └ can_checkin_end
  • String
  • 16:00
  • 最晚入住时间
  • └ can_checkin_start
  • String
  • 14:00
  • 最早入住时间
  • └ cancel_policy_desc
  • String
  • 限免
  • 退订政策描述,默认是短文案;
  • └ cancel_policy_desc_long
  • String
  • 入住当前12点前取消免费
  • 退订政策长文案
  • └ cancel_policy_desc_middle
  • String
  • 限时免费取消
  • 退订政策中文案
  • └ cancel_type
  • Number
  • 3
  • 退订政策类型枚举,1-不能退, 2-免费退, 3-按规则退
  • └ guarantee_start_time
  • String
  • 14:00
  • 担保开始时间
  • └ guarantee_type
  • Number
  • 1
  • 担保类型
  • └ 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下单页链接
  • └ hourage
  • String
  • 3.5
  • 最长可入住时间标识,float类型
  • └ instant_confirm
  • Boolean
  • true
  • 是否立即确认
  • └ inventory_price
  • String
  • 23400
  • 库存价格信息
  • └ member_level
  • Number
  • 1
  • 会员等级
  • └ member_level_name
  • String
  • 金牌
  • 会员等级名称
  • └ payment_type_byte
  • Number
  • 1
  • 报价类型
  • └ pc_buy_url
  • String
  • http: //kezhan.trip.taobao.com/order/auction/buy_now.htm?city=110100&id=2100521217078&rpId=2438001075
  • pc购买地址
  • └ rate_id
  • Number
  • 11
  • 报价id
  • └ rate_plan_name
  • String
  • 大床房-双早
  • 价格政策名称
  • └ register_status
  • Boolean
  • true
  • 注册状态,true-已注册,false-未注册
  • └ rp_id
  • Number
  • 1122
  • 价格政策id
  • └ subtract
  • Number
  • 1200
  • 立减金额; 最新接口数据已包含UMP优惠信息,用于信用住场景的优惠返回;
  • └ hour_rate
  • Boolean
  • false
  • 是否消失方,true--是,空或false-不是
  • └ rid
  • Number
  • 22221111
  • 当前报价对应的rid
  • └ seller_id
  • Number
  • 2345243646
  • 当前报价所属卖家id
  • └ srid
  • Number
  • 22222222
  • 当前报价对应的srid
  • └ can_check_out_end
  • String
  • 20:00
  • 最晚离店时间,HH:MM格式
  • └ later_pay
  • Boolean
  • true
  • 是否展示”信用住“标签,true--展示,false
  • └ member_price
  • Boolean
  • true
  • 是否展示“会员价”标签;不是原价的价格上也有优惠价与会员价的区分;true--展示
  • └ supplier
  • String
  • hello
  • 卖家供应商渠道代号,一个卖家可以有多个供应商,使用代号进行区别
  • └ rid
  • Number
  • 22221111
  • 卖家房型id
  • └ srid
  • Number
  • 22222222
  • 标准房型srid
  • └ window_type
  • String
  • 有窗
  • 床型信息
  • └ shid
  • Number
  • 11111111
  • 标准酒店id
  • └ srid
  • Number
  • 22222222
  • 标准房型id
  • └ start
  • Date
  • 2020-02-27
  • 入住时间
  • └ bed_type_string
  • String
  • 大床 1.8米
  • 床型字符串
  • └ name
  • String
  • 标准大床房
  • 标准房型名
  • └ window_type
  • String
  • 0
  • 窗型枚举,0-无窗,1-有窗,2-部分有窗,3-暗窗,4-部分暗窗
  • └ start
  • Date
  • 2020-02-27
  • 入住时间
  • └ shid
  • Number
  • 11111111
  • 标准房型shid
  • └ success
  • Boolean
  • true
  • 服务调用是否成功
  • └ total_results
  • Number
  • 23
  • 数据总量
  • └ version
  • Number
  • 2
  • 版本信息
  • bind_member_infos
  • SellerSupplierPartnerMemberInfoVo []
  • 当前用户的会员信息
  • └ card_name
  • String
  • 金卡
  • 会员卡名称
  • └ detail_memo
  • String
  • 金卡专项
  • 会员详细描述
  • └ has_binded
  • Boolean
  • true
  • 用户是否在第三方系统中绑定了会员,true--已绑定
  • └ member_level
  • Number
  • 1
  • 会员等级
  • └ seller_id
  • Number
  • 123456
  • 会员对应的商家
  • └ supplier
  • String
  • fliggy
  • 会员对应的供应商

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelPriceGetForHelloRequest req = new XhotelPriceGetForHelloRequest();
XhotelPriceGetForHelloRequest.HotelPriceParam obj1 = new XhotelPriceGetForHelloRequest.HotelPriceParam();
obj1.setDataVersion("3.0");
obj1.setEndDate(StringUtils.parseDateTime("2020-03-06 15:45:59"));
obj1.setOpenId("r43rfef3r34");
obj1.setPid("mm_2000059001_20312022_20470013");
obj1.setShidCityCode("12332123_110100,4442131_110100");
obj1.setStartDate(StringUtils.parseDateTime("2020-03-04 15:45:59"));
obj1.setType(1L);
req.setHotelPriceParam(obj1);
XhotelPriceGetForHelloResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<xhotel_price_get_for_hello_response>
    <result>
        <channel_id>1</channel_id>
        <error>false</error>
        <error_code>err_001</error_code>
        <error_msg>查询失败</error_msg>
        <h5_list_url>http://h5.m.taobao.com/trip/hotel/detail/detail.html?hid=0&amp;shid=10107739&amp;checkin=2014-05-12&amp;checkout=2014-05-13&amp;curcitycode=110100</h5_list_url>
        <has_next>false</has_next>
        <hotel_list_url>http://kezhan.trip.taobao.com/hotel_detail2.htm?shid=10004405&amp;searchBy=yisou&amp;requestId=1232322313</hotel_list_url>
        <request_id>1232322313</request_id>
        <results>
            <s_hotel_price>
                <daily_price_list>
                    <s_hotel_daily_price>
                        <end>2020-02-28</end>
                        <error_code>err_002</error_code>
                        <error_msg>参数错误</error_msg>
                        <low_price>12300</low_price>
                        <shid>11111111</shid>
                        <sroom_type_daily_price_list>
                            <s_room_type_daily_price>
                                <end>2020-02-28</end>
                                <low_price>12300</low_price>
                                <room_type_daily_price_list>
                                    <room_type_daily_price>
                                        <bed_type_string>大床</bed_type_string>
                                        <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>
                                        <name>大床房</name>
                                        <pc_buy_url>http: //kezhan.trip.taobao.com/order/auction/buy_now.htm?city=110100&amp;id=2100521217078&amp;rpId=2438001075</pc_buy_url>
                                        <rates>
                                            <rate>
                                                <breakfast>双早</breakfast>
                                                <breakfast_count>2</breakfast_count>
                                                <can_checkin_end>16:00</can_checkin_end>
                                                <can_checkin_start>14:00</can_checkin_start>
                                                <cancel_policy_desc>限免</cancel_policy_desc>
                                                <cancel_policy_desc_long>入住当前12点前取消免费</cancel_policy_desc_long>
                                                <cancel_policy_desc_middle>限时免费取消</cancel_policy_desc_middle>
                                                <cancel_type>3</cancel_type>
                                                <guarantee_start_time>14:00</guarantee_start_time>
                                                <guarantee_type>1</guarantee_type>
                                                <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>
                                                <hourage>3.5</hourage>
                                                <instant_confirm>true</instant_confirm>
                                                <inventory_price>23400</inventory_price>
                                                <member_level>1</member_level>
                                                <member_level_name>金牌</member_level_name>
                                                <payment_type_byte>1</payment_type_byte>
                                                <pc_buy_url>http: //kezhan.trip.taobao.com/order/auction/buy_now.htm?city=110100&amp;id=2100521217078&amp;rpId=2438001075</pc_buy_url>
                                                <rate_id>11</rate_id>
                                                <rate_plan_name>大床房-双早</rate_plan_name>
                                                <register_status>true</register_status>
                                                <rp_id>1122</rp_id>
                                                <subtract>1200</subtract>
                                                <hour_rate>false</hour_rate>
                                                <rid>22221111</rid>
                                                <seller_id>2345243646</seller_id>
                                                <srid>22222222</srid>
                                                <can_check_out_end>20:00</can_check_out_end>
                                                <later_pay>true</later_pay>
                                                <member_price>true</member_price>
                                                <supplier>hello</supplier>
                                            </rate>
                                        </rates>
                                        <rid>22221111</rid>
                                        <srid>22222222</srid>
                                        <window_type>有窗</window_type>
                                    </room_type_daily_price>
                                </room_type_daily_price_list>
                                <shid>11111111</shid>
                                <srid>22222222</srid>
                                <start>2020-02-27</start>
                                <bed_type_string>大床 1.8米</bed_type_string>
                                <name>标准大床房</name>
                                <window_type>0</window_type>
                            </s_room_type_daily_price>
                        </sroom_type_daily_price_list>
                        <start>2020-02-27</start>
                    </s_hotel_daily_price>
                </daily_price_list>
                <shid>11111111</shid>
            </s_hotel_price>
        </results>
        <success>true</success>
        <total_results>23</total_results>
        <version>2</version>
        <bind_member_infos>
            <seller_supplier_partner_member_info_vo>
                <card_name>金卡</card_name>
                <detail_memo>金卡专项</detail_memo>
                <has_binded>true</has_binded>
                <member_level>1</member_level>
                <seller_id>123456</seller_id>
                <supplier>fliggy</supplier>
            </seller_supplier_partner_member_info_vo>
        </bind_member_infos>
    </result>
</xhotel_price_get_for_hello_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

返回
顶部