获取运费模板列表

获取运费模板列表

请求URL:

POST https://kf.fw199.com/gateway/dd/freight/template/list

公共参数

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

业务参数

参数名称 参数类型 是否必须 示例值 参数描述
name String 模版1 运费模板名称,支持模糊搜索
page String 0 页数(默认为0,第一页从0开始)
size String 10 每页模板数(默认为10),最大值是100

2. 请求示例代码(Java)

请求示例代码

   @Test
    public void  DDFreightTemplateList() throws Exception {
        Map<String, Object> data = new HashMap<String, Object>();
        data.put("appid",  Config.AppId);
        Long timestamp = System.currentTimeMillis() / 1000;
        data.put("timestamp", timestamp.toString());
        data.put("seller_nick", Config.DDSellerNick);

//        data.put("name", "模版1");
        data.put("page", "0");
        data.put("size", "10");

        data.put("sign", Sign(data,Config.AppSecret));
        // 调用服务API
        String resp = doHttpRequest(Config.DDFreightTemplateList, data);
        System.out.println(resp);
    }

3. 返回结果如下:


{
    "code": 0,
    "message": "ok",
    "data": {
        "Count": 3,
        "List": [{
            "template": {
                "calculate_type": 2,
                "fixed_amount": 0,
                "id": 0,
                "product_city": "0",
                "product_province": "0",
                "rule_type": 0,
                "template_name": "全国包邮",
                "transfer_type": 1
            }
        }, {
            "template": {
                "calculate_type": 2,
                "fixed_amount": 1,
                "id": 123051871,
                "product_city": "320100",
                "product_province": "32",
                "rule_type": 1,
                "template_name": "测试运费模板",
                "transfer_type": 1
            }
        }, {
            "template": {
                "calculate_type": 2,
                "fixed_amount": 0,
                "id": 228644450,
                "product_city": "340800",
                "product_province": "34",
                "rule_type": 0,
                "template_name": "全国模板",
                "transfer_type": 1
            }
        }]
    }
}

说明: code为0表示成功,非0为失败,message会包含失败原因。返回字段说明见文档
https://op.jinritemai.com/docs/api-docs/16/565

文档更新时间: 2024-05-22 09:49   作者:JSL