城市查询

优质
小牛编辑
130浏览
2023-12-01

请求地址

https://api.es.xiaojukeji.com/river/City/get

返回数据格式

JSON

请求方式

GET

请求参数

参数名称数据类型必选说明
client_idstringyes申请应用时分配的AppKey
access_tokenstringyes授权后的access token
timestampstringyes当前时间戳
signstringyes签名

请求示例

curl -X GET -H "Content-Type: application/x-www-form-urlencoded" https://api.es.xiaojukeji.com/river/City/get?client_id=client_id_test&access_token=access_token_test&timestamp=1566764837&company_id=12345678980&sign=091cf244ad5ab16935cfe44fc698bc58

返回参数说明

参数名称数据类型说明
city_idstring地级市ID
city_namestring地级市名称
county_listarray区县列表

county_list:

参数名称数据类型说明
county_idstring区县ID
county_namestring区县名称

返回示例:

{
    "errno": 0,
    "errmsg": "SUCCESS",
    "data": [{
        "city_id": 274,
        "city_name": "澄迈县",
        "county_list": [{
            "county_id": 469023,
            "county_name": "澄迈县"
        }]
    }, {
        "city_id": 149,
        "city_name": "安庆市",
        "county_list": [{
            "county_id": 340802,
            "county_name": "迎江区"
        }, {
            "county_id": 340803,
            "county_name": "大观区"
        }, {
            "county_id": 340811,
            "county_name": "宜秀区"
        }, {
            "county_id": 340822,
            "county_name": "怀宁县"
        }, {
            "county_id": 340824,
            "county_name": "潜山县"
        }, {
            "county_id": 340825,
            "county_name": "太湖县"
        }, {
            "county_id": 340826,
            "county_name": "宿松县"
        }, {
            "county_id": 340827,
            "county_name": "望江县"
        }, {
            "county_id": 340828,
            "county_name": "岳西县"
        }, {
            "county_id": 340881,
            "county_name": "桐城市"
        }]
    }]
}