获取面单
接口方法
请求方式:
请求示例:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.example.org/">
<SOAP-ENV:Body>
<ns1:callService>
<paramsJson>
{
"order_code": "WP-191017-0001",
"reference_no": "113-0802283-8048250",
"tracking_no": "794653791999",
"no_label_file": "1",
"merge_label": "1"
}
</paramsJson>
<appToken>appToken</appToken>
<appKey>appKey</appKey>
<service>getShipmentLabel</service>
</ns1:callService>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
请求参数:
参数 |
类型 |
是否必填 |
说明 |
长度限制 |
order_code |
String |
是 |
面单号 |
30 |
reference_no |
String |
否 |
参考单号 |
50 |
tracking_no |
String |
否 |
跟踪号(运单号) |
50 |
no_label_file |
int |
否 |
设置是否返回物流标签, 1-表示返回数据中不包含物流标签 |
|
merge_label |
int |
否 |
是否合并面单文件 1.合并输出(默认) 2.分开输出 |
|
attachment_type |
int |
否 |
附件格式:0:Base64(默认) 1:URL(merge_label=2分开输出时有效) |
|
返回结果示例:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.example.org/">
<SOAP-ENV:Body>
<ns1:callServiceResponse>
<response>
{
"ask":"Success",
"data":[
{
"base64":"",
"order_code":"YDL-191017-0001",
"tracking_no":"794653790857",
"file_type":"png"
},
{
"base64":"",
"order_code":"YDL-191017-0001",
"tracking_no":"794653794521",
"file_type":"png"
}
],
"data":{
"base64":"",
"order_code":"YDL-191017-0001",
"tracking_no":"794653790857",
"file_type":"png"
},
"message":"Success",
"nextPage":false
}
</response>
</ns1:callServiceResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
返回参数:
参数 |
类型 |
说明 |
ask |
String |
返回结果,Success表示请求成功,Failure表示请求失败 |
message |
String |
返回信息 |
nextPage |
boolean |
true 有下一页,false 没有下一页 |
data |
Object |
传参merge_label为1(默认)时,合并为一个文件输出,跟踪号返回主跟踪号 |
data |
Array |
传参merge_label为2时 |
Error |
Object |
参考Error格式 |
data参数:
参数 |
类型 |
说明 |
order_code |
String |
面单号 |
base64 |
String |
base64编码 |
tracking_no |
String |
跟踪号(运单号) |
file_type |
String |
文件类型 pdf,png |
download_url |
String |
下载地址(传参merge_label为2时有效) |
返回失败结果示例:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<SOAP-ENV:Envelope xmlns:ns1="http://www.example.org/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<callServiceResponse>
<response>
{
"ask":"Failure",
"error":{
"errCode":500,
"errMessage":"获取面单失败:[YB-XX-XXXXXXXXXX]状态为[异常] ERROR:Recipient Postal-State Mismatch"
},
"message":"获取面单失败:[YB-XX-XXXXXXXXXX]状态为[异常] ERROR:Recipient Postal-State Mismatch",
"nextPage":false
}
</response>
</callServiceResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
返回失败结果参数:
参数 |
类型 |
说明 |
ask |
String |
返回结果,Success表示请求成功,Failure表示请求失败 |
error |
Object |
详见返回公共参数error |
message |
String |
返回信息 |
nextPage |
boolean |
是否有下一页,true表示有,false表示没有 |
作者:WesternPost 创建时间:2021-07-02 23:58
最后编辑:WesternPost 更新时间:2024-07-18 20:07