# 获取网点信息
接口地址: http://www.damaijia168.com/vv/external/pddGetNetworkInformation
请求方式: POST
传参方式: JSON
返回格式: JSON
# 请求头参数
| 参数 | 类型 | 必选 | 值 | 示例 |
|---|---|---|---|---|
| Authorization | string | 是 | 授权 access_token | 1798c6aadec33d1bc2f5b707f1049aefexxxx |
# 请求参数
| 参数 | 类型 | 必选 | 描述 |
|---|---|---|---|
| owner_id | string | 是 | 店铺 ID |
| wp_code | string | 否 | 快递编号,比如:SF,STO |
| edition | string | 否 | 版本 默认:1(不传默认为1) 1:1.0,2:2.0 |
# 请求示例
{
"owner_id": "店铺 ID"
}
# 请求代码示例
cURL请求代码示例
curl --location --request POST 'http://www.damaijia168.com/vv/external/pddGetNetworkInformation' \
--header 'Authorization: d705a2c26e05d7dXXXXXXXXX' \
--header 'Content-Type: application/json' \
--data-raw '{
"owner_id": "123456789"
}'
PHP请求代码示例
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://www.damaijia168.com/vv/external/pddGetNetworkInformation',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"owner_id": "123456789"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: d705a2c26e05d7dXXXXXXXXX',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
JAVA请求代码示例
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"owner_id\": \"123456789\"\r\n}");
Request request = new Request.Builder()
.url("http://www.damaijia168.com/vv/external/pddGetNetworkInformation")
.method("POST", body)
.addHeader("Authorization", "d705a2c26e05d7dXXXXXXXXX")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
Python请求代码示例
import requests
url = "http://www.damaijia168.com/vv/external/pddGetNetworkInformation"
payload="{\r\n \"owner_id\": \"123456789\"\r\n}"
headers = {
'Authorization': 'd705a2c26e05d7dXXXXXXXXX',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
# 响应参数
| 参数 | 类型 | 描述 |
|---|---|---|
| data | object | 返回数据 |
| -branch_account_cols | array | wp网点信息及对应的商家的发货信息 |
| --allocated_quantity | long | 已用面单数量 |
| --branch_code | string | 网点Code |
| --branch_name | string | 网点名称 |
| --cancel_quantity | long | 取消的面单总数 |
| --quantity | long | 电子面单余额数量 |
| --recycled_quantity | long | 已回收用面单数量 |
| --service_info_cols | array | 服务类型列表 |
| ---required | bool | 是否必须 |
| ---service_attributes | array | 服务属性类型列表 |
| ----attribute_code | string | 属性code |
| ----attribute_name | string | 属性名称 |
| ----attribute_type | string | 属性类型 |
| ----type_desc | string | 属性描述 |
| ---service_code | string | 服务code |
| ---service_desc | string | 服务描述 |
| ---service_name | string | 服务名称 |
| --shipp_address_cols | array | 当前网点下的发货地址 |
| ---city | string | 市名称(二级地址) |
| ---detail | string | 详细地址 |
| ---district | string | 区名称(三级地址) |
| ---province | string | 省名称(一级地址) |
| ---country | string | 国家/地区 |
| --vas_account_cols | array | 增值服务账号 |
| ---account_type_desc | string | 账户类型描述 |
| ---quantity | long | 电子面单余额数量 |
| ---allocated_quantity | long | 已用面单数量 |
| ---cancel_quantity | long | 取消的面单总数 |
| ---recycled_quantity | long | 已回收用面单数量 |
| -wp_code | string | 快递公司ID |
| -wp_type | int | 物流服务商业务类型 |
| --deduct_money | int | 消耗点券 |
| status | int | 状态码,0为成功 |
# 返回数据
{
"data": {
"deduct_money":1,
"content": [
{
"wp_type": 1,
"branch_account_cols": [
{
"branch_code": "450123",
"quantity": 15,
"branch_name": "湖南大客户部星辰服务部",
"cancel_quantity": 32,
"shipp_address_cols": [
{
"country": "中国",
"province": "湖南省",
"city": "长沙市",
"district": "岳麓区",
"detail": "物流园"
}
],
"recycled_quantity": 0,
"allocated_quantity": 85
}
],
"wp_code": "YUNDA"
}
]
},
"status": 0
}
# 错误码
| 状态码(status) | 错误信息 | 解决方案 |
|---|---|---|
| 132 | 请求格式必须为JSON | 修改请求参数格式为json |
| 422 | 参数列表不合法,在err中会给出提示 | 根据提示做相应修改 |
| 200 | 认证失败 | 请确保请求头里的Authorization存在或者未过期 |