批量查询运费模板
根据偏移量、查询结果数、是否被使用 批量查询运费模板
1. 请求参数
请求URL:
POST https://kf.fw199.com/gateway/ks/logistics/template/list
公共参数
参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
---|---|---|---|---|
appid | String | 是 | 合作伙伴AppId | |
timestamp | String | 是 | 1657525936 | 当前Unix时间戳,秒 |
seller_nick | String | 是 | 38173182 | 快手的店铺账号,对应蜂巢授权返回seller_nick字段 |
sign | String | 是 |
业务参数
参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
---|---|---|---|---|
offset | int | 是 | 0 | 偏移量。按照模板的创建时间倒序排列,最新创建的模板offset=0,次新的offset=1,以此类推 |
limit | int | 是 | 10 | 返回的结果中的运费模板的个数 |
searchUsed | bool | 是 | false | false表示不查询运费模板的是否使用状态。所以当该值为false时,接口返回结果中的所有模板的used字段恒定为false |
2. 请求示例代码(Java)
@Test
public void KSLogisticsTemplateList() 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.KSSellerNick);
data.put("offset", 0);
data.put("limit", 10);
data.put("searchUsed", false);
data.put("sign", Sign(data,Config.AppSecret));
String resp = doHttpRequest(Config.KSLogisticsTemplateListUrl, data);
System.out.println(resp);
}
3. 返回结果
{
"code": 0,
"message": "ok",
"data": {
"expressTemplateDetailVOS": [
{
"id": 9426102401,
"name": "默认非偏远地区包邮模板",
"sellerId": 2589256601,
"calType": 1,
"sendProvinceCode": 0,
"sendProvinceName": "",
"sendCityCode": 0,
"sendCityName": "",
"sendDistrictCode": 0,
"sendDistrictName": "",
"sendTime": 4294967295,
"used": true,
"status": 1,
"sourceType": 40,
"deleteTime": 0,
"createTime": 1634012777070,
"updateTime": 1634012777070,
"config": {
"type": 1,
"content": {
"includeProvinces": [
11,
12,
13,
14,
21,
22,
23,
31,
32,
33,
34,
35,
36,
37,
41,
42,
43,
44,
45,
46,
50,
51,
52,
53,
61
],
"excludeProvinces": [
{
"code": 62,
"codeList": null,
"reasonCode": 7,
"autoRecover": false,
"planRecoverTime": null
},
{
"code": 15,
"codeList": null,
"reasonCode": 7,
"autoRecover": false,
"planRecoverTime": null
},
{
"code": 64,
"codeList": null,
"reasonCode": 7,
"autoRecover": false,
"planRecoverTime": null
},
{
"code": 63,
"codeList": null,
"reasonCode": 7,
"autoRecover": false,
"planRecoverTime": null
},
{
"code": 54,
"codeList": null,
"reasonCode": 7,
"autoRecover": false,
"planRecoverTime": null
},
{
"code": 65,
"codeList": null,
"reasonCode": 7,
"autoRecover": false,
"planRecoverTime": null
}
],
"provinceFees": null,
"consolidateProvinces": [
65
]
},
"delayExpressCompanyList": null
}
},
{
"id": 9426102001,
"name": "默认全国(非港澳台)包邮模板",
"sellerId": 2589256601,
"calType": 1,
"sendProvinceCode": 0,
"sendProvinceName": "",
"sendCityCode": 0,
"sendCityName": "",
"sendDistrictCode": 0,
"sendDistrictName": "",
"sendTime": 4294967295,
"used": false,
"status": 1,
"sourceType": 40,
"deleteTime": 0,
"createTime": 1634012777018,
"updateTime": 1634012777018,
"config": {
"type": 1,
"content": {
"includeProvinces": [
11,
12,
13,
14,
15,
21,
22,
23,
31,
32,
33,
34,
35,
36,
37,
41,
42,
43,
44,
45,
46,
50,
51,
52,
53,
54,
61,
62,
63,
64,
65
],
"excludeProvinces": null,
"provinceFees": null,
"consolidateProvinces": [
65
]
},
"delayExpressCompanyList": null
}
}
],
"total": 2
},
"trace_id": ""
}
4. 返回字段说明
返回 code为0时,说明成功,非0时,说明失败。message中会有失败原因。 其他字段说明见:https://open.kwaixiaodian.com/zone/new/docs/api?name=open.logistics.express.template.list&version=1
文档更新时间: 2025-07-28 17:48 作者:admin