文档中心 通用接口 根据市ID查询区字典表

根据市ID查询区字典表

1.功能说明

根据市ID查询区字典表

2.接口调用说明

请求URL

https://openapi.guanaitong.tech/common/address/getDistrictByCityId

正式环境和测试环境的域名请见通用协议

HTTPS请求方式

POST

输入参数说明

(1)公共参数

发送请求是必须传入公共参数,详见公共参数

(2)私有参数

参数名称 是否必须 参数类型 长度限制 描述
city_id Integer [1,10] 城市id
请求示例
POST /common/address/getDistrictByCityId HTTP/1.1
Host: openapi.guanaitong.tech
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache

access_token=0701c0bc1ee62987678d3d1f3f4e5ce3&city_id=370100&
timestamp=1505901939&version=1.0.0&sign=5fa02548600eb2607a40fef728ff29ba24ec67d2
					
返回参数说明
参数名称 描述
code 返回码。详见错误代码
msg 如果错误,返回错误信息。
data 地区字典Map<String,String> key:地区ID,value:地区名称
正确返回示例(如济南市id=370100,区域如下)
{
	"code": 0,
	"data": {
		"370112": "历城区",
		"370102": "历下区",
		"370113": "长清区",
		"370124": "平阴县",
		"370181": "章丘市",
		"370103": "市中区",
		"370125": "济阳县",
		"370104": "槐荫区",
		"370126": "商河县",
		"370105": "天桥区"
	},
	"msg": "OK"
}
					
错误返回示例
{"code":1000210002,"data":null,"msg":"sign check failed!"}