跳转到内容
返回官网

获取网点开通信息

菜鸟获取网点开通状态

获取发货地,CP开通状态,账户的使用情况  

一、请求参数

POST https://kf.fw199.com/gateway/cnlink/waybill/subscription/query

参数名类型说明示例
appidString合作伙伴AppIduwkahf@jfs92
timestampString当前时间戳
seller_nickString授权菜鸟账号,非店铺名称kingdo
signString接口签名如何计算生成见示例代码

业务参数

参数名称参数类型是否必须示例值参数描述
cp_codeStringPOSTB物流公司code。 传空串,表示全部

二、请求示例代码

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

三、返回结果

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