文档中心 > API类目 > 飞猪酒店标准库

alitrip.hotel.hstdf.poilocation.get (根据平台城市id分页查询poi location)

根据平台城市id分页查询poi location

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param_get_by_trdi_division_id_param GetByTrdiDivisionIdParam 可选 参数封装
  • └ page
  • Number
  • 可选
  • 1
  • 第一页
  • └ page_size
  • Number
  • 可选
  • 100
  • 每页取100条
  • └ trdi_division_id
  • Number
  • 可选
  • 110100
  • 平台区划id,北京市

响应参数

名称 类型 示例值 描述
result TopStdResultSet top返回结果
  • └ has_next
  • Boolean
  • true
  • 当前分页之后是否还有数据,true--有,可继续查询
  • module_list
  • HotelPOI []
  • 结果集合
  • └ city
  • Number
  • 110100
  • 所在城市id
  • └ city_name
  • String
  • N/A
  • 暂不使用
  • └ country
  • String
  • China
  • 所在国家英文名
  • └ country_code
  • Number
  • 1
  • 所在国家id
  • └ district
  • Number
  • 110101
  • 所在区县id
  • └ division_id
  • Number
  • 110101
  • 能精确到的最低层级区划id,优先区县,次选城市
  • └ division_tree
  • String
  • 1,110000,110100,110101
  • 行政区划树,冗余字段,不一定有值
  • └ domestic
  • Number
  • 0
  • 国内外,0-国内,1--国外
  • └ en_name
  • String
  • Duanqiao
  • 英文名
  • └ hot
  • Number
  • 23
  • 热度
  • └ id
  • Number
  • 1
  • id
  • └ latitude
  • String
  • 23.7
  • poi location纬度
  • └ longitude
  • String
  • 123.2
  • poi locaiton经度
  • └ name
  • String
  • 断桥
  • 中文名
  • └ order_index
  • Number
  • 1
  • 分组内排序
  • └ parent_id
  • Number
  • 2
  • 父id
  • └ position_type
  • Number
  • 0
  • 经纬度服务商,0--高德,一般用于国内,1- - 谷歌,一般用于国际
  • └ province
  • Number
  • 110000
  • 所在省份id,北京直辖市
  • └ time_zone_id
  • String
  • N/A
  • 时区,冗余字段,不一定有值
  • └ trdi_division_id
  • Number
  • 110101
  • 最精确的行政区划对应的平台id
  • └ type
  • Number
  • 3
  • 类型,3--地铁线路,4--地铁站,20--考点,5--景点,6--机场,7--火车站,8--汽车站,9--医院,10--大学,11--热点搜索,12--城市,13--办公区
  • └ search_percent
  • String
  • 99.9
  • 搜索热度
  • └ result_code
  • String
  • N/A
  • 暂不使用
  • └ result_msg
  • String
  • 参数异常
  • 请求失败时的错误信息,一般success=false时有值
  • └ success
  • Boolean
  • false
  • 是否成功
  • └ total_results
  • Number
  • 123
  • 当前查询条件下的数据总数;判断是否需要继续查询时,可以使用已请求数据量对比该值,但建议对结果集合进行判空,为空即停止

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripHotelHstdfPoilocationGetRequest req = new AlitripHotelHstdfPoilocationGetRequest();
AlitripHotelHstdfPoilocationGetRequest.GetByTrdiDivisionIdParam obj1 = new AlitripHotelHstdfPoilocationGetRequest.GetByTrdiDivisionIdParam();
obj1.setPage(1L);
obj1.setPageSize(100L);
obj1.setTrdiDivisionId(110100L);
req.setParamGetByTrdiDivisionIdParam(obj1);
AlitripHotelHstdfPoilocationGetResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alitrip_hotel_hstdf_poilocation_get_response>
    <result>
        <has_next>true</has_next>
        <module_list>
            <hotel_p_o_i>
                <city>110100</city>
                <city_name>N/A</city_name>
                <country>China</country>
                <country_code>1</country_code>
                <district>110101</district>
                <division_id>110101</division_id>
                <division_tree>1,110000,110100,110101</division_tree>
                <domestic>0</domestic>
                <en_name>Duanqiao</en_name>
                <hot>23</hot>
                <id>1</id>
                <latitude>23.7</latitude>
                <longitude>123.2</longitude>
                <name>断桥</name>
                <order_index>1</order_index>
                <parent_id>2</parent_id>
                <position_type>0</position_type>
                <province>110000</province>
                <time_zone_id>N/A</time_zone_id>
                <trdi_division_id>110101</trdi_division_id>
                <type>3</type>
                <search_percent>99.9</search_percent>
            </hotel_p_o_i>
        </module_list>
        <result_code>N/A</result_code>
        <result_msg>参数异常</result_msg>
        <success>false</success>
        <total_results>123</total_results>
    </result>
</alitrip_hotel_hstdf_poilocation_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>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部