
| 接口环境 | 接口地址 |
|---|---|
| 正式环境 | 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/fee/getFee?appCode=你的appCode×tamp=当前时间戳
请求方式:POST
请求数据类型:application/text
请求参数示例:
xxxxxxxxxx{ "data": { "deliveryAreaCode": "NGA01180", "deliveryCityCode": "NGC00464", "deliveryCountryCode": "NG", "deliveryProvinceCode": "NGR000301", "deliverySiteCode": "", "pickedTime": 1666340603000, "productCode": "1", "sendAreaCode": "NGA01180", "sendCityCode": "NGC00464", "sendCountryCode": "NG", "sendProvinceCode": "NGR00030", "sendSiteCode": "", "source": "", "subjectCode": "101", "weight": "1" }, "sign": "65ae68b1325ab1597a4411d53ff8a9ac"}
请求参数描述:
| 参数名称 | 数据类型 | 是否必填 | 描述 | 示例值 |
|---|---|---|---|---|
| sendAreaCode | String | 是 | 寄件区编码 | NGA01180 |
| sendCityCode | String | 是 | 寄件市编码 | NGC00464 |
| sendCountryCode | String | 是 | 寄件国家编码 | NG |
| sendProvinceCode | String | 是 | 寄件省编码 | NGR00030 |
| deliveryAreaCode | String | 是 | 派件区编码 | NGA01180 |
| deliveryCityCode | String | 是 | 派件市编码 | NGC00464 |
| deliveryCountryCode | String | 是 | 派件国家编码 | NG |
| deliveryProvinceCode | String | 是 | 派件省编码 | NGR000301 |
| sendSiteCode | String | 否 | 寄件网点 | |
| deliverySiteCode | String | 否 | 派件网点 | |
| pickedTime | Date | 是 | 揽件时间/当前业务时间 | 1666340603000 |
| productCode | String | 是 | 产品类型 | 1:快递 2:零担 3:整车 |
| subjectCode | String | 是 | 科目类型 | 101:运费 |
| weight | String | 是 | 重量 | 1 |
响应状态:
成功响应参数示例:
x{ "success": true, "error": null, "data": [ { "fee": 10.00, "offerCode": "NG000002", "formula": "10.00", "currencyCode": "CNY" } ]}
响应参数描述:
| 参数名称 | 参数说明 | 数据类型 |
|---|---|---|
| fee | 费用 | decimal |
| offerCode | 报价编码 | String |
| formula | 公式 | String |
| currencyCode | 币种 | String |
失败响应参数示例:
xxxxxxxxxx{ "success": false, "error": { "code": "500", "message": "" }, "data": null}
接口地址: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}