获取城市列表

接口说明:获取城市区域信息
请求方式: GET(HTTPS)
请求地址https://api.xinrenxinshi.com/v3/common/citys?sign=MdbAE946ZE060YjVWb9Gw7uzpVw%3D&timestamp=1574043389544

请求Header:

key value
access_token 获取的access_token的实际值

参数说明

参数 类型 必传(Y/N) 说明
timestamp Long Y 请求时间戳(精确到毫秒)
sign String Y 请求参数签名

返回结果

参数 类型 必传(Y/N) 说明
errcode Integer Y 0成功,其他失败
errmsg String Y 结果描述
areaInfos List<AreaInfo> Y 区域信息列表

AreaInfo

参数 类型 必传(Y/N) 说明
id Integer Y 区域编码
name String Y 区域名称
type Integer Y 区域类型,2-省级,3-城市,4-区级
parentId Integer Y 父级区域编码id
isPrimary Integer Y 是否主要区域,0-否,1-是(暂无作用)
fullName String Y 区域全称

响应示例

{
    "errcode":0,
    "errmsg":"成功",
    "detailMsg":null,
    "areaInfos":[{
      "id": 1,
      "name": "北京市",
      "type": 2,
      "parentId": 0,
      "isPrimary": 0,
      "fullName": "北京市"
    },{
      "id": 2,
      "name": "北京市",
      "type": 3,
      "parentId": 1,
      "isPrimary": 0,
      "fullName": "北京市北京市"
    },{
      "id": 18,
      "name": "天津市",
      "type": 2,
      "parentId": 0,
      "isPrimary": 0,
      "fullName": "天津市"
    },{
      "id": 19,
      "name": "河北省",
      "type": 2,
      "parentId": 0,
      "isPrimary": 0,
      "fullName": "河北省"
    },{
      "id": 101,
      "name": "石家庄市",
      "type": 3,
      "parentId": 19,
      "isPrimary": 0,
      "fullName": "河北省石家庄市"
    }]
}
2020 © 企家有道网络技术(北京)有限公司版权所有@京ICP备15035315号 all right reserved,powered by Gitbookupdate by: 2020-12-16 14:23:56

results matching ""

    No results matching ""