获取标签--getLabelUrl
POST
/default/svc/web-service
getLabelUrl
请求参数
Body 参数application/xml
reference_no
string
必需
type
integer | null
单号类型
label_type
enum<integer> | enum<null>
可选
枚举值:
123
默认值:
1
label_content_type
enum<integer> | enum<null>
可选
枚举值:
1234567
默认值:
4
示例
<?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/Ec/">
<SOAP-ENV:Body>
<ns1:callService>
<paramsJson>
<![CDATA[
{"reference_no":"CR36600006"}
]]>
</paramsJson>
<appToken>{{appToken}}</appToken>
<appKey>{{appKey}}</appKey>
<service>getLabelUrl</service>
</ns1:callService>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://8.129.234.2:8085/default/svc/web-service' \
--header 'Content-Type: application/xml' \
--data-raw '<?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/Ec/">
<SOAP-ENV:Body>
<ns1:callService>
<paramsJson>
<![CDATA[
{"reference_no":"CR36600006"}
]]>
</paramsJson>
<appToken>a106eb7a118d78f92cabbc91586caa84</appToken>
<appKey>a106eb7a118d78f92cabbc91586caa8401ac591bb285b42966f035d8d49a7b5c</appKey>
<service>getLabelUrl</service>
</ns1:callService>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>'
返回响应
🟢200成功
application/xml
Body
ask
enum<string>
请求结果状态
枚举值:
SuccessFailure
message
string
请求结果提示信息
Error
object
必需
errCode
string
错误信息状态码
errMessage
string
错误信息
type
string
标签文件类型
示例值:
pdf
url
string
标签文件链接
invoiceUrl
string | null
可选
invoiceType
string | null
可选
reference_no
string
请求单号
time_cost(s)
string
耗时,单位秒
示例
<?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/Ec/">
<SOAP-ENV:Body>
<ns1:callServiceResponse>
<response>{"ask":"Success","message":"Success","Error":{"errCode":"","errMessage":""},"type":"pdf","url":"http:\/\/112.74.74.27:2018\/index\/get-label?code=CR36600006&other=0&sign=1d3a6ead69a82f89","invoiceUrl":["http:\/\/112.74.74.27:2018\/default\/index\/get-invoice-label\/code\/CR36600006\/index\/0\/0.pdf"],"invoiceType":"pdf","reference_no":"CR36600006","time_cost(s)":0.25939989089966}</response>
</ns1:callServiceResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
🟢200失败
修改于 2025-01-02 02:20:48