获取邮费模板

查询运费模板

1.请求参数:

请求URL:

POST https://kf.fw199.com/gateway/jd/sku/fare/template/service/gettemplates

公共参数

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

业务参数

名称 类型 必须 示例值 描述
source String fc 请求来源

2. 请求示例代码(Java)

请求示例代码

    @Test
    public void     JDGetAgingTemplate() throws Exception {
        String sellerNick = Config.JDSellerNick ;
        //业务参数
        Map<String, String> data = new HashMap<String, String>();
        data.put("appid",  Config.AppId);
        data.put("seller_nick", sellerNick);
        Long timestamp = System.currentTimeMillis() / 1000;
        data.put("timestamp", timestamp.toString());
        data.put("source", "fc");
        data.put("sign", Utils.Sign(data, Config.AppSecret));
        doHttpRequest(Config.JDGetAgingTemplate, data);
    }

3. 返回结果如下:

{
    "code": 0,
    "message": "ok",
    "data": {
        "agingTemplateList": [{
            "templateId": 73505222,
            "templateName": "24小时发货"
        }, {
            "templateId": 73505219,
            "templateName": "48小时发货"
        }, {
            "templateId": 73505225,
            "templateName": "20天发货"
        }],
        "resultCode": 1,
        "resultMsg": "OK"
    }
}

说明: code为0表示成功,非0为失败,message会包含失败原因。

文档更新时间: 2025-05-12 22:30   作者:JSL