全部
淘宝
拼多多
抖音
京东
快手
当当
1688
淘工厂
小红书
有赞
微店
在线测试
通过面单号查询面单打印报文
接口地址: http://api.vv-tool.com/tool/erps/tbdybw
接口介绍: 通过面单号查询面单的打印报文 点击查看详情
必须用户授权 : 需要用户的授权,才能拿到被授权的数据
请求方式: POST
返回格式: JSON
接口收费: 扣账户余额
频率限制: 10 次/秒
请求头参数
参数 | 类型 | 必选 | 值 | 示例 |
---|---|---|---|---|
Authorization | string | 是 | 授权 access_token | Bearer 1798c6aadec33d1bc2f5b707f1049aefexxxx |
请求参数
参数 | 类型 | 必选 | 示例 | 描述 |
---|---|---|---|---|
shop_id | string | 是 | 123 | 店铺 ID |
param_list | WaybillDetailQueryByWaybillCodeRequest[] | 否 | 系统自动生成(最多传 20 个) | |
-cp_code | String | 否 | POSTB | 快递公司 code |
-object_id | String | 否 | 1 | 请求 id |
-waybill_code | String | 否 | 9890000066001 | 电子面单号 |
vvtype | int | 是 | 123 | 普通版 1,标准版 3 |
请求示例
{
"param_list": [
{
"cp_code": "SF",
"object_id": "123",
"waybill_code": "12321423465745"
}
],
"vvtype": "3",
"shop_id": "123"
}
请求代码示例
cURL请求代码示例
curl --location --request POST 'http://api.vv-tool.com/tool/erps/tbdybw' \
--header 'Authorization: Bearer XXXXXXXXXXXXXXXX' \
--header 'Content-Type: application/json' \
--header 'Cookie: __yjs_duid=1_631b442499ed9f835d199def5892e4091628487614220; PHPSESSID=opvplhvshaldeu0t7qprgiclvf; _csrf=d2f486baf1b13ce48fdf2306f77381842ac6e81e5b4fd8a3d2d78b52bcb88d65a%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%223tpHi936he9EP0uI_lql0YH4StENa9BI%22%3B%7D' \
--data-raw '{
"param_list": [
{
"cp_code": "SF",
"object_id": "123",
"waybill_code": "12321423465745"
}
],
"vvtype": "3",
"shop_id": "123"
}'
PHP请求代码示例
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://api.vv-tool.com/tool/erps/tbdybw',
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 =>'{
"param_list": [
{
"cp_code": "SF",
"object_id": "123",
"waybill_code": "12321423465745"
}
],
"vvtype": "3",
"shop_id": "123"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer XXXXXXXXXXXXXXXX',
'Content-Type: application/json',
'Cookie: __yjs_duid=1_631b442499ed9f835d199def5892e4091628487614220; PHPSESSID=opvplhvshaldeu0t7qprgiclvf; _csrf=d2f486baf1b13ce48fdf2306f77381842ac6e81e5b4fd8a3d2d78b52bcb88d65a%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%223tpHi936he9EP0uI_lql0YH4StENa9BI%22%3B%7D'
),
));
$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 \"param_list\": [\r\n {\r\n \"cp_code\": \"SF\",\r\n \"object_id\": \"123\",\r\n\t\t\t\t\t\t\"waybill_code\": \"12321423465745\"\r\n }\r\n \r\n ],\r\n \"vvtype\": \"3\",\r\n \"shop_id\": \"123\"\r\n\t\t\r\n\t\t\r\n}");
Request request = new Request.Builder()
.url("http://api.vv-tool.com/tool/erps/tbdybw")
.method("POST", body)
.addHeader("Authorization", "Bearer XXXXXXXXXXXXXXXX")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "__yjs_duid=1_631b442499ed9f835d199def5892e4091628487614220; PHPSESSID=opvplhvshaldeu0t7qprgiclvf; _csrf=d2f486baf1b13ce48fdf2306f77381842ac6e81e5b4fd8a3d2d78b52bcb88d65a%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%223tpHi936he9EP0uI_lql0YH4StENa9BI%22%3B%7D")
.build();
Response response = client.newCall(request).execute();
响应参数
参数 | 类型 | 示例 | 描述 |
---|---|---|---|
modules | WaybillCloudPrintWithResultDescResponse [] | x | 查询返回值 |
error_code | String | x | 错误码 |
error_message | String | x | 错误信息 |
object_id | String | x | 请求 id |
success | Boolean | x | 请求成功 |
waybill_cloud_print_response | WaybillCloudPrintResponse | x | 面单查询结构体 |
print_data | String | x | 面单信息 |
waybill_code | String | x | 面单号 |
parent_waybill_code | String | x | 快运子母件中的母单号 |
withholding_money | int | 1 | 该接口扣费金额(点券) |
返回数据
{
"code": 0,
"msg": "操作成功",
"msec": 920,
"time": 1667894399,
"data": {
"modules": {
"waybill_cloud_print_with_result_desc_response": [
{
"object_id": "1",
"success": true,
"waybill_cloud_print_response": {
"print_data": "{\"encryptedData\":\"AES:rU904rj6UH2oqfSUb43+Z5CuoOkTVqESmlQ0tcJbrUAuXZFoV8Alh6XzZ02viDHO8CQZFc6Z7G1O/rHrPwUvRV2XnKc/FVCulnA0ItCq5bqMmWnp7SXXXXXXXXqfbMSaClDHA2xBp57kNG4BBeGfVKLb8/ifg3Oe0pMLf5+3DoVirFiZQTZDpt5M7PNVlw==\",\"signature\":\"MD:rrDwv5CsZZh3dLjT1WVHTg==\",\"templateURL\":\"http://clouxxxxxxxxtemplate/standard/401\",\"ver\":\"waybill_print_secret_version_1\"}",
"waybill_code": "988xxxxxxxxx297"
}
},
{
"object_id": "2",
"success": true,
"waybill_cloud_print_response": {
"print_data": "{\"encryptedData\":\"AES:rU904rj6UH2oqfSUb43+Z5CuoOkTVqESmlQ0tcJbrUAuXZFoV8Alh6XzZ02viDHO8CQZFc6Z7G1O/rHrPwUvRV2XnKc/FVCulnA0ItCq5bqMmWnp7SFP+LmSvZBheXazObMq+8N2PA30csOg4jLuOExxxxxxxxKDQ4Dk2Yim1gqNXCw75R5GMmiLEXd7JG2zl3aykeSLdt+V5eCh1dKL3mF/gqn/ue72IaSryiNOQ880N1jYhGMKDGDYtwRqzKAQ9MT1xxxxxxxxver\":\"waybill_print_secret_version_1\"}",
"waybill_code": "98xxxxxxx8405"
}
}
]
},
"request_id": "15xxxxxxxi86y",
"withholding_money": 2
}
}
错误码 点击查看详情:查看