获取城市列表
获取城市区域信息
入参只有公共参数appkey、timestamp和sign请求方式:GET
请求URL:/v3/common/citys
出参说明:
参数 | 类型 | 必传(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": "河北省石家庄市"
}]
}