跳转到内容
返回官网

获取运费模板列表

一、请求参数

请求URL:

POST https://kf.fw199.com/gateway/dd/freighttemplate/list

公共参数

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

业务参数

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

二、请求示例代码

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);
}

三、返回结果

{
"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