获取快递公司列表
获取快递公司列表
1.请求参数:
请求URL:
参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
---|---|---|---|---|
appid | String | 是 | 合作伙伴AppId | |
timestamp | String | 是 | 1657525936 | 当前Unix时间戳,秒 |
seller_nick | String | 是 | 38173182 | 快手的店铺账号,对应蜂巢授权返回seller_nick字段 |
sign | String | 是 |
业务参数
无
2. 请求示例代码(Java)
@Test
public void GetExpressCompany() throws Exception {
String sellerNick = Config.KSSellerNick ;
//业务参
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("sign", Utils.Sign(data, Config.AppSecret));
String result = doHttpRequest(Config.KS_GET_EXPRESS_COMPANY, data);
System.out.println("result:"+result);
}
3. 返回结果
返回结果如下
{
"code": 0,
"message": "ok",
"data": [
{
"cp_code": "ZTO",
"send_code": "9",
"name": "中通快递"
},
{
"cp_code": "YUNDA",
"send_code": "11",
"name": "韵达快递"
},
{
"cp_code": "YTO",
"send_code": "6",
"name": "圆通快递"
},
{
"cp_code": "STO",
"send_code": "3",
"name": "申通快递"
},
{
"cp_code": "JT",
"send_code": "109",
"name": "极兔快递"
},
{
"cp_code": "FENGWANG",
"send_code": "127",
"name": "丰网速运"
},
{
"cp_code": "SF",
"send_code": "4",
"name": "顺丰速运"
},
{
"cp_code": "POSTB",
"send_code": "8",
"name": "邮政快递包裹"
},
{
"cp_code": "JD",
"send_code": "14",
"name": "京东物流"
},
{
"cp_code": "DBKD",
"send_code": "53",
"name": "德邦快递"
},
{
"cp_code": "EMS",
"send_code": "2",
"name": "EMS"
},
{
"cp_code": "YDKY",
"send_code": "7",
"name": "韵达快运\t"
},
{
"cp_code": "DANNIAO",
"send_code": "113",
"name": "丹鸟"
},
{
"cp_code": "ANNTO",
"send_code": "44",
"name": "安得物流"
},
{
"cp_code": "BEST800_LOGISTICS\t",
"send_code": "48",
"name": "百世快运"
},
{
"cp_code": "ZTOKY",
"send_code": "12",
"name": "中通快运"
},
{
"cp_code": "JDKY",
"send_code": "136",
"name": "京东快运"
},
{
"cp_code": "DSU",
"send_code": "57",
"name": "D速快递"
},
{
"cp_code": "ZHAIJISONG",
"send_code": "10",
"name": "宅急送"
},
{
"cp_code": "POST_DSBK",
"send_code": "139",
"name": "邮政电商标快"
}
]
}
返回code为0表示成功, 非0为失败,失败时message会有失败原因。
- cp_code为电子面单取号代码
- send_code为物流发货代码
文档更新时间: 2023-06-27 00:13 作者:admin