文档中心 > API类目 > 酒店商品API

taobao.xhotel.bnbpoi.surrounding (民宿周边poi查询)

民宿周边poi查询

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
city_code Number 必须 510100 城市code
latitude String 必须 30.657349 经纬度
longitude String 必须 104.065837 经纬度
poi_filter_distance Json 必须 {"food":1000,"play":1000,"shopping":1000,"sight":1000,"traffic":1000} poi分类直线过滤大小

响应参数

名称 类型 示例值 描述
result BnbResult 返回结果
  • └ success
  • Boolean
  • true
  • 是否成功
  • module
  • BnbPoiTab []
  • {}
  • 返回数据
  • └ tab_name
  • String
  • 景点
  • pou分类
  • └ tab_type
  • String
  • sight
  • 标识
  • poi_entity_list
  • PoiEntity []
  • poi相关信息
  • └ distance
  • Number
  • 1
  • 距离当前poi直线距离
  • └ latitude
  • String
  • 30.657349
  • 经纬度
  • └ name
  • String
  • 测试
  • 名字
  • └ poi_id
  • Number
  • 1
  • id
  • └ longitude
  • String
  • 104.065837
  • 经纬度
  • └ result_code
  • String
  • 200
  • code码
  • └ result_msg
  • String
  • ""
  • 描述

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelBnbpoiSurroundingRequest req = new XhotelBnbpoiSurroundingRequest();
req.setCityCode(510100L);
req.setLatitude("30.657349");
req.setLongitude("104.065837");
req.setPoiFilterDistanceString("{\"food\":1000,\"play\":1000,\"shopping\":1000,\"sight\":1000,\"traffic\":1000}");
XhotelBnbpoiSurroundingResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<xhotel_bnbpoi_surrounding_response>
    <result>
        <success>true</success>
        <module>
            <bnb_poi_tab>
                <tab_name>景点</tab_name>
                <tab_type>sight</tab_type>
                <poi_entity_list>
                    <poi_entity>
                        <distance>1</distance>
                        <latitude>30.657349</latitude>
                        <name>测试</name>
                        <poi_id>1</poi_id>
                        <longitude>104.065837</longitude>
                    </poi_entity>
                </poi_entity_list>
            </bnb_poi_tab>
        </module>
        <result_code>200</result_code>
        <result_msg>&quot;&quot;</result_msg>
    </result>
</xhotel_bnbpoi_surrounding_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

返回
顶部