行政区查询

该接口用于查询票牛所有行政区列表,用于填充收货地址。

GET /openapi/v2/cities/district{?parentCode,sign,appId,timeStamp}

参数 :

name 意义 取值
sign 签名 483DFD2E8BE0AF2D486F04C7320C7C5E
appId 代理商的唯一id 1
timeStamp 时间戳 有效期10分钟 1482995969920
parentCode 父类地区编码 不传表示查询所有一级地区
请求示例(测试环境):
 curl 'http://openapi.beta.piaoniu.com/openapi/v2/cities/district?parentCode=130000&sign=4EAB218D9F0F186F4ECF8AEB5DB97D60&appId=10000&timeStamp=1482994263256'

返回值 :

name 意义 取值
id 地区id 84
code 地区编码 "130400",
name 地区名称 "邯郸市",
parentCode 父类地区编码 "130000",
level 等级 2,
cityId 城市id 27
示例:
[
    {
        "id":38,
        "code":"130100",
        "name":"石家庄市",
        "parentCode":"130000",
        "level":2,
        "cityId":24
    },
    {
        "id":61,
        "code":"130200",
        "name":"唐山市",
        "parentCode":"130000",
        "level":2,
        "cityId":25
    },
    {
        "id":76,
        "code":"130300",
        "name":"秦皇岛市",
        "parentCode":"130000",
        "level":2,
        "cityId":26
    },
    {
        "id":84,
        "code":"130400",
        "name":"邯郸市",
        "parentCode":"130000",
        "level":2,
        "cityId":27
    },
    {
        "id":104,
        "code":"130500",
        "name":"邢台市",
        "parentCode":"130000",
        "level":2,
        "cityId":28
    },
    {
        "id":124,
        "code":"130600",
        "name":"保定市",
        "parentCode":"130000",
        "level":2,
        "cityId":29
    },
    {
        "id":150,
        "code":"130700",
        "name":"张家口市",
        "parentCode":"130000",
        "level":2,
        "cityId":30
    },
    {
        "id":168,
        "code":"130800",
        "name":"承德市",
        "parentCode":"130000",
        "level":2,
        "cityId":31
    },
    {
        "id":180,
        "code":"130900",
        "name":"沧州市",
        "parentCode":"130000",
        "level":2,
        "cityId":32
    },
    {
        "id":197,
        "code":"131000",
        "name":"廊坊市",
        "parentCode":"130000",
        "level":2,
        "cityId":33
    },
    {
        "id":208,
        "code":"131100",
        "name":"衡水市",
        "parentCode":"130000",
        "level":2,
        "cityId":34
    }
]

results matching ""

    No results matching ""