菜鸟获取网点开通状态
获取发货地,CP开通状态,账户的使用情况
1.请求参数:
POST https://kf.fw199.com/gateway/cnlink/waybill/subscription/query
参数名 | 类型 | 说明 | 示例 |
---|---|---|---|
appid | String | 合作伙伴AppId | uwkahf@jfs92 |
timestamp | String | 当前时间戳 | |
seller_nick | String | 授权菜鸟账号,非店铺名称 | kingdo |
sign | String | 接口签名 | 如何计算生成见示例代码 |
业务参数
参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
---|---|---|---|---|
cp_code | String | 否 | POSTB | 物流公司code。 传空串,表示全部 |
2. 请求示例代码(Java)
@Test
public void caiNiaoTmsWaybillSubscriptionQuery() throws Exception {
Map<String, String> data = new HashMap<String, String>();
data.put("appid", Config.AppId);
data.put("seller_nick", Config.CaiNiaoSellerNick);
Long timestamp = System.currentTimeMillis() / 1000;
data.put("timestamp", timestamp.toString());
data.put("cp_code","" );
// 参数签名
data.put("sign", Utils.Sign(data,Config.AppSecret));
doHttpRequest(Config.CaiNiaoTmsWaybillSubscriptionQuery, data);
}
3. 返回结果如下:
{
"code": 0,
"message": "ok",
"data": [
{
"cpCode": "ZTO",
"cpType": "2",
"branchAccountCols": [
{
"branchCode": "51880",
"quantity": "0",
"shippAddressCols": [
{
"province": "浙江省",
"city": "温州市",
"district": "瑞安市",
"customerCode": "",
"detail": "安阳街道华尔达路32店"
}
],
"allocatedQuantity": "6182",
"printQuantity": "0",
"serviceInfoCols": [
{
"serviceDesc": "根据商家/平台交易指令,在派送需“换新”包裹时,先向收件人回收旧货(只提供核对回收物品的品类及数量服务)并揽收发出的服务",
"serviceCode": "SVC-BARTER",
"serviceAttributes": [
{
"attributeCode": "orderItem_value",
"typeDesc": "{\"maxLength\":256,\"minLength\":1,\"required\":true,\"type\":\"string\"}",
"attributeType": "string",
"attributeName": "关联单号内物信息"
},
{
"attributeCode": "packageRequirement_value",
"typeDesc": "{\"maxLength\":128,\"minLength\":1,\"required\":false,\"type\":\"string\"}",
"attributeType": "string",
"attributeName": "关联单号包装要求"
}
],
"serviceName": "上门取旧换新",
"required": "false"
}
],
"segmentCode": "NORMAL",
"cancelQuantity": "0"
},
{
"branchCode": "577301",
"quantity": "20",
"shippAddressCols": [
{
"province": "浙江省",
"city": "温州市",
"district": "瑞安市",
"customerCode": "",
"detail": "莘塍街道镇府路532-542号1单元二楼星期六接吻猫女鞋购物中心"
}
],
"allocatedQuantity": "0",
"printQuantity": "0",
"serviceInfoCols": [
{
"serviceDesc": "根据商家/平台交易指令,在派送需“换新”包裹时,先向收件人回收旧货(只提供核对回收物品的品类及数量服务)并揽收发出的服务",
"serviceCode": "SVC-BARTER",
"serviceAttributes": [
{
"attributeCode": "orderItem_value",
"typeDesc": "{\"maxLength\":256,\"minLength\":1,\"required\":true,\"type\":\"string\"}",
"attributeType": "string",
"attributeName": "关联单号内物信息"
},
{
"attributeCode": "relateReceiveName_value",
"typeDesc": "{\"maxLength\":128,\"minLength\":1,\"required\":true,\"type\":\"string\"}",
"attributeType": "string",
"attributeName": "关联单号收件人姓名"
}
],
"serviceName": "上门取旧换新",
"required": "false"
}
],
"segmentCode": "NORMAL",
"cancelQuantity": "0"
},
{
"branchCode": "5773019",
"quantity": "0",
"shippAddressCols": [
{
"province": "浙江省",
"city": "温州市",
"district": "瑞安市",
"customerCode": "",
"detail": "浙江省温州市瑞安市安阳街道康宁路28号"
}
],
"allocatedQuantity": "2345",
"printQuantity": "0",
"serviceInfoCols": [
{
"serviceDesc": "根据商家/平台交易指令,在派送需“换新”包裹时,先向收件人回收旧货(只提供核对回收物品的品类及数量服务)并揽收发出的服务",
"serviceCode": "SVC-BARTER",
"serviceAttributes": [
{
"attributeCode": "orderItem_value",
"typeDesc": "{\"maxLength\":256,\"minLength\":1,\"required\":true,\"type\":\"string\"}",
"attributeType": "string",
"attributeName": "关联单号内物信息"
},
{
"attributeCode": "relateReceiveMobile_value",
"typeDesc": "{\"maxLength\":128,\"minLength\":1,\"required\":true,\"type\":\"string\"}",
"attributeType": "string",
"attributeName": "关联单号收件人联系方式"
},
{
"attributeCode": "relateReceiveName_value",
"typeDesc": "{\"maxLength\":128,\"minLength\":1,\"required\":true,\"type\":\"string\"}",
"attributeType": "string",
"attributeName": "关联单号收件人姓名"
}
],
"serviceName": "上门取旧换新",
"required": "false"
}
],
"segmentCode": "NORMAL",
"cancelQuantity": "0"
}
]
}
],
"trace_id": "187c6c00-af7d-443a-a5b2-c31dbf9c4964"
}
说明: code为0表示成功,非0为失败,message会包含失败原因。 业务层面是否成功见 success字段是否为true。如果为false的话,可以获取error_msg字段
文档更新时间: 2025-09-25 23:47 作者:admin