文档中心 > API类目 > 飞猪推广平台

alibaba.fliggy.xhotel.distribution.info (飞猪四海通分销通用酒店标准信息接口)

飞猪分销通用酒店标准信息接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
city_code Number 必须 100100 城市code
shid Number 可选 1000000 标准酒店id,如果需要查询单条酒店的信息,需要传入此参数
current_page Number 可选 1 分页参数:当前页数,从1开始计数。默认值:1
page_size Number 可选 10 分页参数:每页酒店数量。最小值1,最大值为50。默认值:20
pid String 可选 mm_2000059001_20312022_20470013 pid
cursor Number 可选 100 游标
promote_app_key Number 必须 1001 媒体ID
promotion_position_id Number 必须 1001 推广位ID
activity_id String 必须 1234 活动ID

响应参数

名称 类型 示例值 描述
result ResultDO 结果
  • └ msg_code
  • String
  • 200
  • 异常码
  • └ msg_info
  • String
  • 服务异常
  • 异常信息
  • └ success
  • Boolean
  • true
  • 是否成功
  • model
  • QueryHotelInfoResponse
  • 酒店标准信息
  • └ total_results
  • Number
  • 1000
  • 总数
  • hotels
  • HotelInfo []
  • 标准酒店信息
  • └ shid
  • Number
  • 1000256
  • 标准酒店ID
  • └ name
  • String
  • 北京大饭店
  • 酒店名称
  • └ type
  • String
  • 1,2
  • 酒店类型
  • └ province
  • Number
  • 100000
  • 省份code
  • └ city
  • Number
  • 100100
  • 城市code
  • └ district
  • Number
  • 100000
  • 地区code
  • └ address
  • String
  • 崇文门西大街1号
  • 酒店地址
  • └ lat
  • String
  • 18.264846
  • 纬度
  • └ lng
  • String
  • 109.50098
  • 经度
  • └ star
  • String
  • 1
  • 酒店星级,1-5星,0是客栈
  • └ opening_time
  • String
  • 2000
  • 酒店开业时间
  • └ decorate_time
  • String
  • 2000-01-01
  • 酒店装修时间
  • └ tel
  • String
  • 0086-010-85322688
  • 电话,包括三种类型:1.固定电话,例如:0086-010-853226882.移动电话,例如:138696963633.400或800电话,例如:0086-4006123928
  • └ rate_number
  • Number
  • 18
  • 评论数
  • └ rate_score
  • String
  • 4.5
  • 评分
  • └ description
  • String
  • 酒店描述
  • 酒店描述
  • └ pic_urls
  • String
  • http://img08.taobaocdn.com/bao/uploaded/i8/T1v5JOFptbXXaAGmMT_013104.jpg,http://img04.taobaocdn.com/bao/uploaded/i4/T1TPVNFwFcXXaAGmMT_013104.jpg
  • 图片url,多张图片使用","隔开
  • └ hotel_facilities
  • String
  • 酒店设施
  • 酒店设施
  • └ services
  • String
  • 服务设施
  • 服务设施
  • └ brand
  • String
  • 品牌
  • 酒店品牌
  • └ status
  • Number
  • 0
  • 酒店状态,0,营业中;-1,筹建中;-2,暂停营业;-3,已停业;
  • └ h5_detail_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
  • H5的detail页面的URL
  • └ pc_detail_url
  • String
  • http://kezhan.trip.taobao.com/hotel_detail2.htm?shid=10004405&searchBy=yisou&requestId=1232322313
  • 酒店detail页面的url
  • rooms
  • SRoomTypeDO []
  • 房型信息
  • └ srid
  • Number
  • 123456
  • 匹配的标准房型
  • └ shid
  • Number
  • 12345
  • shid
  • └ name
  • String
  • 房型名
  • 房型名
  • └ floor
  • String
  • 7-8层
  • 楼层
  • └ bed
  • String
  • 床型
  • 床型。json格式:[{"bedType":"大床","bedSize":"1.5m"},{"bedType":"双床","bedSize":"1.2m"}]
  • └ internet
  • String
  • 网络信息
  • 宽带服务"0","有线上网(免费),"1","有线上网(无)","2","有线上网(收费)","3","有线上网(部分有且免费)","4","有线上网(部分有且收费)"
  • └ pic_url
  • String
  • aa
  • 房型图片
  • └ facility
  • String
  • aa
  • 房间设施
  • └ area
  • String
  • 16-30平米
  • 面积
  • └ max_occupancy
  • Number
  • 1
  • 最大入住人数
  • └ window_type
  • String
  • 窗型
  • 有窗
  • └ status
  • Number
  • 0
  • 状态
  • └ bnb_hotel
  • Boolean
  • false
  • 是否为民宿类型
  • └ check_in_time
  • String
  • "14:00"
  • 入住时间
  • └ check_out_time
  • String
  • "12:00"
  • 离店时间
  • └ pet_info
  • String
  • 可携带宠物
  • 宠物信息
  • └ foreign_type
  • Number
  • 1
  • 外宾类型
  • └ foreign_desc
  • String
  • 仅中国大陆地区客人
  • 外宾描述
  • └ cursor
  • Number
  • 100
  • 游标

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaFliggyXhotelDistributionInfoRequest req = new AlibabaFliggyXhotelDistributionInfoRequest();
req.setCityCode(100100L);
req.setShid(1000000L);
req.setCurrentPage(1L);
req.setPageSize(10L);
req.setPid("mm_2000059001_20312022_20470013");
req.setCursor(100L);
req.setPromoteAppKey(1001L);
req.setPromotionPositionId(1001L);
req.setActivityId("1234");
AlibabaFliggyXhotelDistributionInfoResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_fliggy_xhotel_distribution_info_response>
    <result>
        <msg_code>200</msg_code>
        <msg_info>服务异常</msg_info>
        <success>true</success>
        <model>
            <total_results>1000</total_results>
            <hotels>
                <hotel_info>
                    <shid>1000256</shid>
                    <name>北京大饭店</name>
                    <type>1,2</type>
                    <province>100000</province>
                    <city>100100</city>
                    <district>100000</district>
                    <address>崇文门西大街1号</address>
                    <lat>18.264846</lat>
                    <lng>109.50098</lng>
                    <star>1</star>
                    <opening_time>2000</opening_time>
                    <decorate_time>2000-01-01</decorate_time>
                    <tel>0086-010-85322688</tel>
                    <rate_number>18</rate_number>
                    <rate_score>4.5</rate_score>
                    <description>酒店描述</description>
                    <pic_urls>http://img08.taobaocdn.com/bao/uploaded/i8/T1v5JOFptbXXaAGmMT_013104.jpg,http://img04.taobaocdn.com/bao/uploaded/i4/T1TPVNFwFcXXaAGmMT_013104.jpg</pic_urls>
                    <hotel_facilities>酒店设施</hotel_facilities>
                    <services>服务设施</services>
                    <brand>品牌</brand>
                    <status>0</status>
                    <h5_detail_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_detail_url>
                    <pc_detail_url>http://kezhan.trip.taobao.com/hotel_detail2.htm?shid=10004405&amp;searchBy=yisou&amp;requestId=1232322313</pc_detail_url>
                    <rooms>
                        <s_room_type_d_o>
                            <srid>123456</srid>
                            <shid>12345</shid>
                            <name>房型名</name>
                            <floor>7-8层</floor>
                            <bed>床型</bed>
                            <internet>网络信息</internet>
                            <pic_url>aa</pic_url>
                            <facility>aa</facility>
                            <area>16-30平米</area>
                            <max_occupancy>1</max_occupancy>
                            <window_type>窗型</window_type>
                            <status>0</status>
                        </s_room_type_d_o>
                    </rooms>
                    <bnb_hotel>false</bnb_hotel>
                    <check_in_time>&quot;14:00&quot;</check_in_time>
                    <check_out_time>&quot;12:00&quot;</check_out_time>
                    <pet_info>可携带宠物</pet_info>
                    <foreign_type>1</foreign_type>
                    <foreign_desc>仅中国大陆地区客人</foreign_desc>
                </hotel_info>
            </hotels>
            <cursor>100</cursor>
        </model>
    </result>
</alibaba_fliggy_xhotel_distribution_info_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

返回
顶部