
| 接口环境 | 接口地址 |
|---|---|
| 正式环境 | https://apis.speedaf.com/ |
| 测试环境 | https://uat-api.speedaf.com/ |
假设相关参数
appCode:11111111
secretKey:uYMGr8eU
timestamp:1649823785567
注:appCode、secretKey 需要找速达非对接人获取
统一入参json格式
{ "data": { }, "sign": ""}| 参数名称 | 参数说明 | 是否必须 |
|---|---|---|
| data | 业务参数json格式 | true |
| sign | 签名 | true |
sign:签名
签名使用MD5方式对业务data的内容进行签名,原理:md5 (timestamp+secretKey+data)
详细解释如下:
假设json格式请求参数:{"mailNoList":["47234208672823"]},secretKey:uYMGr8eU,timestamp:1649823785567,
经过md5加密,得出sign为9a032a6baf9a6884b695382eb1d1e79f
Body:设置Body 为row属性,选择Text,将data和sign转成json字符串传入
xxxxxxxxxx{"data":"{\"countryCode\":\"CN\"}","sign":"00742abca6c98f4412f1c1bb42f8e802"}
接口地址:https://uat-api.speedaf.com/open-api/common/area/new/getArea?appCode=你的appCode×tamp=当前时间戳
请求方式:POST
请求数据类型:application/text
接口描述:
请求参数示例:
xxxxxxxxxx{ "data":{ "countryCode":"CN", "parentCode":"", "type":1 }, "sign":"65ae68b1325ab1597a4411d53ff8a9ac"}请求参数描述:
| 参数名称 | 参数说明 | 是否必须 | 数据类型 | 备注 |
|---|---|---|---|---|
| parentCode | 上级编码 | false | string | |
| countryCode | 国家编码 | false | string | 国家二字码,e.g.:CN,GH,NG,KE,MA |
| type | 类型 | true | int | 1=省,2=市,3=区 |
响应状态:
响应参数示例:
xxxxxxxxxx{ "success":true, "error":null, "data":[ { "code":"CNR00020", "name":"an hui sheng" }, { "code":"CNR00011", "name":"ao men te bie hang zheng qu" } ]}响应参数描述:
| 参数名称 | 参数说明 | 类型 | 备注 |
|---|---|---|---|
| code | 编码 | string | |
| name | 名称 | string |
接口地址:https://uat-api.speedaf.com/open-api/common/area/getTreeByCountryCode?你的appCode×tamp=当前时间戳
请求方式:POST
请求数据类型:application/text
请求参数示例:
xxxxxxxxxx{ "data": { "countryCode":"CN" }, "sign": "65ae68b1325ab1597a4411d53ff8a9ac"}请求参数描述:
| 参数名称 | 参数说明 | 是否必须 | 数据类型 | 备注 |
|---|---|---|---|---|
| countryCode | 国家编码 | true | string | CN,GH,NG,KE,MA |
响应状态:
成功响应参数示例:
xxxxxxxxxx{ "success": true, "error": null, "data": [ { "code": "CN", "name": "China", "type": 0, "children": [ { "code": "R001", "name": "Guangdong", "type": 1, "children": [ { "code": "C001", "name": "Guangzhou", "type": 2, "children": [ {} ] } ] } ] } ]}
响应参数描述:
| 参数名称 | 参数说明 | 类型 | 备注 |
|---|---|---|---|
| code | 编码 | string | |
| name | 名称 | string | |
| type | 类型 | int | 0=国家,1=省,2=市,3=区 |
| children | 子区域 | Array |
children参数描述:
| 参数名称 | 参数说明 | 类型 | 备注 |
|---|---|---|---|
| code | 编码 | string | |
| name | 名称 | string | |
| type | 类型 | int | 0=国家,1=省,2=市,3=区 |
失败响应参数示例:
xxxxxxxxxx{ "success": false, "error": { "code": "500", "message": "" }, "data": null}