发货接口

发货接口

1.请求参数:

请求URL:

POST https://kf.fw199.com/gateway/wxv/logistics/send

参数名称 参数类型 是否必须 示例值 参数描述
appid String 合作伙伴AppId
timestamp String 1657525936 当前Unix时间戳,秒
seller_nick String 38173182 店铺账号,对应蜂巢授权返回seller_nick字段
sign String

业务参数

参数名称 参数类型 是否必须 示例值 参数描述
request_data JSON 报文

2. 请求示例代码(Java)

@Test  
public void logisticsSend() throws Exception {  
    String reqData = "{\n" + "    \"order_id\": \"8\",\n" + "    \"delivery_list\": [\n" + "      {\n" + "        \"delivery_id\": \"ZTO\",\n" + "        \"waybill_id\": \"73612959240139\",\n" + "        \"deliver_type\": 1,\n" + "        \"product_infos\": [\n" + "          {\n" + "            \"product_id\": \"63\",\n" + "            \"sku_id\": \"82\",\n" + "            \"product_cnt\": 24\n" + "          },\n" + "          {\n" + "            \"product_id\": \"30\",\n" + "            \"sku_id\": \"38\",\n" + "            \"product_cnt\": 69\n" + "          }\n" + "        ]\n" + "      }\n" + "    ]\n" + "}\n";

    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("request_data", reqData);   
    // 参数签名  
    data.put("sign", Utils.Sign(data, Config.AppSecret));  
    String result = doHttpRequest(apiUrl, data);  
    System.out.println("result:"+result);  
}

3. 返回结果

返回结果如下

{
    "code": 0,
    "message": "处理成功",
    "data": {
        "status": true,
        "message": "ok"
    }
}

返回code为0表示成功, 非0为失败,失败时message会有失败原因。

文档更新时间: 2025-12-29 20:21   作者:admin