alitrip.btrip.hotel.distribution.search.static (商旅酒店api分销-酒店静态信息接口)

商旅酒店api分销-酒店静态信息接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param_hotel_info_r_q HotelInfoRq 可选 基础信息入参
  • └ city_code
  • Number
  • 必须
  • 330100
  • 城市code
  • └ current_page
  • Number
  • 必须
  • 1
  • 页码
  • └ page_size
  • Number
  • 必须
  • 1
  • 每页数量
  • └ sub_channel
  • String
  • 必须
  • distribution_hkfghnmiujhgv01
  • 渠道子ID
  • └ shid
  • Number
  • 可选
  • 67691070
  • 标准酒店id
  • └ isv_name
  • String
  • 可选
  • demo
  • 可选项,自定义渠道名称(用于创建渠道)

响应参数

名称 类型 示例值 描述
result HisvResult 返回报文
  • module
  • HotelInfoListRs
  • 返回报文
  • hotels
  • HotelDto []
  • 基础酒店数据列表
  • └ address
  • String
  • 杭州市杭海路96号(近秋涛路)
  • 地址
  • └ bnb_hotel
  • Boolean
  • false
  • 是否是客栈
  • └ brand
  • String
  • 3
  • 品牌
  • └ check_in_time
  • String
  • 2021-06-06
  • 入住时间
  • └ check_out_time
  • String
  • 2021-06-06
  • 离店时间
  • └ city
  • Number
  • 330100
  • 市级代码
  • └ decorate_time
  • String
  • 2008
  • 装修时间
  • └ description
  • String
  • 经济连锁
  • 酒店描述
  • └ district
  • Number
  • 330104
  • 地区代码
  • └ h5_detail_url
  • String
  • http://h5.m.taobao.com/trip/hotel/detail/detail.html?curcitycode=330100&ttid=12gao0000003&shid=10018341
  • h5的detail页面的url
  • └ hotel_facilities
  • String
  • {"wifi":true}
  • 酒店设施
  • └ lat
  • String
  • 18.264846
  • 维度
  • └ lng
  • String
  • 109.50098
  • 经度
  • └ name
  • String
  • 杭州中洲大酒店
  • 酒店名称
  • └ opening_time
  • String
  • 2008
  • 开业时间
  • └ pc_detail_url
  • String
  • http://kezhan.trip.taobao.com/hotel_detail2.htm?shid=10018341
  • 酒店详情页的URL
  • └ pic_urls
  • String
  • //img.alicdn.com/imgextra/i4/6000000005015/O1CN01M4LmUM1muutbhZnur_!!6000000005015-0-hotel.jpg
  • 图片地址
  • └ province
  • Number
  • 330000
  • 省级diamante
  • └ rate_number
  • Number
  • 360
  • 评论数
  • └ rate_score
  • String
  • 4.5
  • 评分
  • rooms
  • RoomTypeDto []
  • 房间列表
  • └ area
  • String
  • 20
  • 面积
  • └ bed
  • String
  • [{"bedSize":"1.2m","bedType":"双床"}]
  • 床型
  • └ facility
  • String
  • 健身房
  • 设施
  • └ floor
  • String
  • 2
  • 楼层
  • └ internet
  • String
  • 0
  • 宽带类型
  • └ max_occupancy
  • Number
  • 2
  • 最大入住人数
  • └ pic_url
  • String
  • //img.alicdn.com/imgextra/i4/6000000005015/O1CN01M4LmUM1muutbhZnur_!!6000000005015-0-hotel.jpg
  • 图片地址
  • └ shid
  • Number
  • 67691070
  • 酒店Id
  • └ srid
  • Number
  • 21526421
  • 房型Id
  • └ window_type
  • String
  • 1
  • 窗型
  • └ name
  • String
  • 大床房
  • 房型名称
  • └ services_str
  • String
  • {"airportShuttle":true}
  • 服务设施
  • └ shid
  • Number
  • 67691070
  • 酒店标准ID
  • └ star
  • String
  • 3
  • 档次
  • └ status
  • Number
  • 0
  • 状态,0,营业中;-1,筹建中;-2,暂停营业;-3,已停业;默认为0
  • └ supplier_code
  • String
  • fliggy
  • 供应商ID
  • └ supplier_name
  • String
  • 飞猪
  • 供应商名称
  • └ tel
  • String
  • 0086-0571-86999999
  • 电话
  • └ type
  • String
  • 1,2
  • 酒店类型
  • └ total
  • Number
  • 12
  • 酒店数量
  • └ result_code
  • Number
  • 0
  • 返回状态
  • └ result_msg
  • String
  • demo
  • 错误状态

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripBtripHotelDistributionSearchStaticRequest req = new AlitripBtripHotelDistributionSearchStaticRequest();
AlitripBtripHotelDistributionSearchStaticRequest.HotelInfoRq obj1 = new AlitripBtripHotelDistributionSearchStaticRequest.HotelInfoRq();
obj1.setCityCode(330100L);
obj1.setCurrentPage(1L);
obj1.setPageSize(1L);
obj1.setSubChannel("distribution_hkfghnmiujhgv01");
obj1.setShid(67691070L);
obj1.setIsvName("demo");
req.setParamHotelInfoRQ(obj1);
AlitripBtripHotelDistributionSearchStaticResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alitrip_btrip_hotel_distribution_search_static_response>
    <result>
        <module>
            <hotels>
                <hotel_dto>
                    <address>杭州市杭海路96号(近秋涛路)</address>
                    <bnb_hotel>false</bnb_hotel>
                    <brand>3</brand>
                    <check_in_time>2021-06-06</check_in_time>
                    <check_out_time>2021-06-06</check_out_time>
                    <city>330100</city>
                    <decorate_time>2008</decorate_time>
                    <description>经济连锁</description>
                    <district>330104</district>
                    <h5_detail_url>http://h5.m.taobao.com/trip/hotel/detail/detail.html?curcitycode=330100&amp;ttid=12gao0000003&amp;shid=10018341</h5_detail_url>
                    <hotel_facilities>{&quot;wifi&quot;:true}</hotel_facilities>
                    <lat>18.264846</lat>
                    <lng>109.50098</lng>
                    <name>杭州中洲大酒店</name>
                    <opening_time>2008</opening_time>
                    <pc_detail_url>http://kezhan.trip.taobao.com/hotel_detail2.htm?shid=10018341</pc_detail_url>
                    <pic_urls>//img.alicdn.com/imgextra/i4/6000000005015/O1CN01M4LmUM1muutbhZnur_!!6000000005015-0-hotel.jpg</pic_urls>
                    <province>330000</province>
                    <rate_number>360</rate_number>
                    <rate_score>4.5</rate_score>
                    <rooms>
                        <room_type_dto>
                            <area>20</area>
                            <bed>[{&quot;bedSize&quot;:&quot;1.2m&quot;,&quot;bedType&quot;:&quot;双床&quot;}]</bed>
                            <facility>健身房</facility>
                            <floor>2</floor>
                            <internet>0</internet>
                            <max_occupancy>2</max_occupancy>
                            <pic_url>//img.alicdn.com/imgextra/i4/6000000005015/O1CN01M4LmUM1muutbhZnur_!!6000000005015-0-hotel.jpg</pic_url>
                            <shid>67691070</shid>
                            <srid>21526421</srid>
                            <window_type>1</window_type>
                            <name>大床房</name>
                        </room_type_dto>
                    </rooms>
                    <services_str>{&quot;airportShuttle&quot;:true}</services_str>
                    <shid>67691070</shid>
                    <star>3</star>
                    <status>0</status>
                    <supplier_code>fliggy</supplier_code>
                    <supplier_name>飞猪</supplier_name>
                    <tel>0086-0571-86999999</tel>
                    <type>1,2</type>
                </hotel_dto>
            </hotels>
            <total>12</total>
        </module>
        <result_code>0</result_code>
        <result_msg>demo</result_msg>
    </result>
</alitrip_btrip_hotel_distribution_search_static_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

返回
顶部