面单回收
回收单号
一、请求参数
请求URL:
| 参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
|---|---|---|---|---|
| appid | String | 是 | 合作伙伴AppId | |
| timestamp | String | 是 | 1657525936 | 当前Unix时间戳,秒 |
| seller_nick | String | 是 | 38173182 | 店铺账号,对应蜂巢授权返回seller_nick字段 |
| sign | String | 是 |
业务参数
| 参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
|---|---|---|---|---|
| waybill_id | String | 是 | 快递单号 |
二、请求示例代码
Java
@Testpublic void waybillCancel() throws Exception {
String sellerNick = "xxx"; //业务参 Map<String, String> data = new HashMap(); data.put("appid", Config.AppId); data.put("seller_nick", sellerNick); Long timestamp = System.currentTimeMillis(); data.put("timestamp", timestamp.toString()); data.put("waybill_id", "xxxx"); // 参数签名 data.put("sign", Utils.Sign(data, Config.AppSecret)); String result = doHttpRequest(apiUrl, data); System.out.println("result:"+result);}三、返回结果
返回结果如下
{ "code": 0, "message": "处理成功", "data": { "status": true, "delivery_error_msg": "成功" }}返回code为0表示成功, 非0为失败,失败时message会有失败原因。