获取面单二维码

接口方法

  • getShipmentQRCode

请求方式:

  • POST

请求示例:

<?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"
                }
            </paramsJson>
            <appToken>appToken</appToken>
            <appKey>appKey</appKey>
            <service>getShipmentQRCode</service>
        </ns1:callService>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

请求参数:

参数 类型 是否必填 说明 长度限制
order_code String 面单号 30
reference_no String 参考单号 50
tracking_no String 跟踪号(运单号) 50

注意:以上3个参数至少传递1个

返回结果示例:

<?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":"WP-191017-0001",
                      "tracking_no":"794653790857",
                      "file_type":"png"
                    },
                    {
                      "base64":"",
                      "order_code":"WP-191017-0001",
                      "tracking_no":"794653794521",
                      "file_type":"png"
                    }
                  ],
                  "message":"Success",
                  "nextPage":false
                }
                // 反例
                {
                    "ask":"Failure",
                    "error":{
                        "errCode":500,
                        "errMessage":"跟踪号[123456]对应渠道[UPS_XXX]不支持QRCode"
                    },
                    "message":"跟踪号[123456]对应渠道[UPS_XXX]不支持QRCode",
                    "nextPage":false
                }
            </response>
            </ns1:callServiceResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

返回参数:

参数 类型 说明
ask String 返回结果,Success表示请求成功,Failure表示请求失败
message String 返回信息
nextPage boolean true 有下一页,false 没有下一页
data Array data
Error Object 参考Error格式

data参数:

参数 类型 说明
order_code String 面单号
base64 String base64编码
tracking_no String 跟踪号(运单号)
file_type String 文件类型(USPS渠道为png)
文档更新时间: 2023-09-12 18:36   作者:WesternPost