# 取消面单(面单回收)
微信小店代发 - 取消面单(面单回收)

一、接口名称

接口 URLhttps://kf.fw199.com/gateway/wxstore/df/waybill/cancel
请求方式POST
Content-Typeapplication/json


二、请求参数

参数名 类型 是否必需 说明 示例值
appid string 开发者分配的 AppID Config.AppId
seller_nick string 店铺 OpenID,从【获取店铺信息接口】得到 (对应业务字段 ownerId) f524edc1-c2fa-47b0-bfea-f05bbcb14a9a
timestamp string 毫秒级时间戳 1713824000000
sign string 请求参数签名字符串 682bc45f6d54d28e6664aec2ace60990
waybill_id string 需要回收的快递单号 73612959240139

三、请求示例代码 (Java)

import org.junit.Test;
import java.util.HashMap;
import java.util.Map;

public class WxstoreDfWaybillCancelTest {

    @Test
    public void waybillCancel() throws Exception {

        String apiUrl = "https://kf.fw199.com/gateway/wxstore/df/waybill/cancel";
        // 供货商(店铺)openid
        String sellerNick = "f524edc1-c2fa-47b0-bfea-f05bbcb14a9a";

        // 准备请求参数映射
        Map<String, String> data = new HashMap<>();
        data.put("appid",  Config.AppId);
        data.put("seller_nick", sellerNick);

        // 业务参数:快递单号
        data.put("waybill_id", "73612959240139");

        // 公共参数:时间戳
        Long timestamp = System.currentTimeMillis();
        data.put("timestamp", timestamp.toString());

        // 参数签名
        data.put("sign", Utils.Sign(data, Config.AppSecret));

        // 发起 HTTP 请求并打印结果
        String result = doHttpRequest(apiUrl, data);
        System.out.println("result:" + result);
    }
}

三、返回结果

{
    "code": 0,
    "message": "ok",
    "data": {
        "status": true,
        "delivery_error_msg": "success"
    },
    "trace_id": "6f62a122-1a70-4fa8-9d48-d16c08c4e29d"
}

取消成功以data中的 “status”为成功与否。true:成功,false:失败

文档更新时间: 2026-04-28 09:47   作者:admin