【顺丰快递管家】通用接口文档


3.路由查询接口

<h3>功能描述</h3> <ul> <li>该接口用于:客户查询已下单的订单路由信息。</li> </ul> <pre><code>注:1.只有在路由节点(如小哥扫单)操作后,才会产生路由; 2.测试环境如需测试该接口,请将测试环境下单后的订单号与运单号发给顺丰研发接口人,便于其生成测试路由信息; 3.路由查询是3个月内的订单 4.此路由查询接口支持2类查询方式: a.系统内查询:根据客户订单号查询; b.顺丰大网内查询:根据运单号+运单对应的收寄人任一方电话号码后4位(参数checkPhoneNo中传入)查询。若一次性查多个路由,checkPhoneNo传入多个电话号码后4位,用英文逗号隔开,作为一个字符串</code></pre> <h3>接口定义</h3> <table> <thead> <tr> <th style="text-align: center;">服务名称</th> <th style="text-align: center;">批量交易</th> <th style="text-align: center;">接口类型</th> <th style="text-align: center;">接口uri</th> </tr> </thead> <tbody> <tr> <td style="text-align: center;">路由查询接口</td> <td style="text-align: center;">支持(最多10个trackingNumber)</td> <td style="text-align: center;">接入/POST</td> <td style="text-align: center;">/public/order/v2/listOrderRoute</td> </tr> </tbody> </table> <h3>请求</h3> <table> <thead> <tr> <th style="text-align: center;">序号</th> <th style="text-align: center;">字段名</th> <th style="text-align: center;">类型(约束)</th> <th style="text-align: center;">必填</th> <th style="text-align: center;">默认值</th> <th style="text-align: left;">描述</th> </tr> </thead> <tbody> <tr> <td style="text-align: center;">1</td> <td style="text-align: center;">companyId</td> <td style="text-align: center;">String(20)</td> <td style="text-align: center;">是</td> <td style="text-align: center;">分配客户sendAppId</td> </tr> <tr> <td style="text-align: center;">2</td> <td style="text-align: center;">trackingType</td> <td style="text-align: center;">Number(1)</td> <td style="text-align: center;">否</td> <td style="text-align: center;">1</td> <td style="text-align: left;">查询号类别:1-根据顺丰运单号查询,trackingNumber传顺丰运单号;2-根据客户订单号查询,trackingNumber传客户订单号</td> </tr> <tr> <td style="text-align: center;">3</td> <td style="text-align: center;">trackingNumber</td> <td style="text-align: center;">List&lt;String&gt;</td> <td style="text-align: center;">是</td> <td style="text-align: center;">查询号:1-如果trackingType=1,则此值为顺丰运单号;2-如果trackingType=2,则此值为客户订单号</td> </tr> <tr> <td style="text-align: center;">4</td> <td style="text-align: center;">checkPhoneNo</td> <td style="text-align: center;">String(30)</td> <td style="text-align: center;">条件</td> <td style="text-align: center;">收寄人任一方电话号码后4位,当trackingType=1时必填,trackingType=2时选填。若一次性查多个路由,checkPhoneNo传入多个电话号码后4位,用英文逗号隔开,作为一个字符串</td> </tr> </tbody> </table> <h3>响应</h3> <ul> <li><strong>主体</strong></li> </ul> <table> <thead> <tr> <th style="text-align: center;">序号</th> <th style="text-align: center;">字段名</th> <th style="text-align: center;">类型(约束)</th> <th style="text-align: center;">必填</th> <th style="text-align: center;">字段说明</th> <th style="text-align: left;">描述</th> </tr> </thead> <tbody> <tr> <td style="text-align: center;">1</td> <td style="text-align: center;">msg</td> <td style="text-align: center;">String (200)</td> <td style="text-align: center;">否</td> <td style="text-align: center;">信息</td> <td style="text-align: left;">提示信息</td> </tr> <tr> <td style="text-align: center;">2</td> <td style="text-align: center;">succ</td> <td style="text-align: center;">String (10)</td> <td style="text-align: center;">是</td> <td style="text-align: center;">状态码</td> <td style="text-align: left;">返回成功或失败信息(ok/fail)</td> </tr> <tr> <td style="text-align: center;">3</td> <td style="text-align: center;">result</td> <td style="text-align: center;">List</td> <td style="text-align: center;">是</td> <td style="text-align: center;">数据</td> <td style="text-align: left;">数据(集合),可能为空</td> </tr> </tbody> </table> <ul> <li><strong>result</strong></li> </ul> <table> <thead> <tr> <th style="text-align: center;">序号</th> <th style="text-align: center;">字段名</th> <th style="text-align: center;">类型(约束)</th> <th style="text-align: center;">必填</th> <th style="text-align: center;">字段说明</th> <th style="text-align: left;">描述</th> </tr> </thead> <tbody> <tr> <td style="text-align: center;">1</td> <td style="text-align: center;">mailNo</td> <td style="text-align: center;">String(64)</td> <td style="text-align: center;">是</td> <td style="text-align: center;">顺丰运单号</td> </tr> <tr> <td style="text-align: center;">2</td> <td style="text-align: center;">orderId</td> <td style="text-align: center;">String(64)</td> <td style="text-align: center;">否</td> <td style="text-align: center;">订单号</td> <td style="text-align: left;">根据订单号查会返回订单号,根据运单号查不返回订单号</td> </tr> <tr> <td style="text-align: center;">3</td> <td style="text-align: center;">routes</td> <td style="text-align: center;">List</td> <td style="text-align: center;">是</td> <td style="text-align: center;">路由信息(集合)</td> </tr> </tbody> </table> <ul> <li><strong>routes</strong></li> </ul> <table> <thead> <tr> <th style="text-align: center;">序号</th> <th style="text-align: center;">字段名</th> <th style="text-align: center;">类型(约束)</th> <th style="text-align: center;">必填</th> <th style="text-align: center;">字段说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: center;">1</td> <td style="text-align: center;">acceptTime</td> <td style="text-align: center;">String</td> <td style="text-align: center;">是</td> <td style="text-align: center;">路由节点发生的时间 格式:yyyy-MM-DD HH24:MM:SS,示例:2012-7-30 09:30:00</td> </tr> <tr> <td style="text-align: center;">2</td> <td style="text-align: center;">acceptAddress</td> <td style="text-align: center;">String</td> <td style="text-align: center;">否</td> <td style="text-align: center;">路由节点发生的地点</td> </tr> <tr> <td style="text-align: center;">3</td> <td style="text-align: center;">remark</td> <td style="text-align: center;">String</td> <td style="text-align: center;">是</td> <td style="text-align: center;">路由节点具体描述</td> </tr> <tr> <td style="text-align: center;">4</td> <td style="text-align: center;">opCode</td> <td style="text-align: center;">String</td> <td style="text-align: center;">是</td> <td style="text-align: center;">路由节点操作码</td> </tr> <tr> <td style="text-align: center;">5</td> <td style="text-align: center;">reasonCode</td> <td style="text-align: center;">String(200)</td> <td style="text-align: center;">否</td> <td style="text-align: center;">异常编码,需配置顾客编码相应业务</td> </tr> <tr> <td style="text-align: center;">6</td> <td style="text-align: center;">reasonName</td> <td style="text-align: center;">String(200)</td> <td style="text-align: center;">否</td> <td style="text-align: center;">异常描述,需配置顾客编码相应业务</td> </tr> </tbody> </table> <h3>报文范例</h3> <ul> <li> <p><strong>请求报文</strong></p> <pre><code>{ { &amp;quot;companyId&amp;quot;: {{pub_appId}}, &amp;quot;trackingType&amp;quot;: 2, &amp;quot;trackingNumber&amp;quot;: [ &amp;quot;e14cfc0c5d09463d95c4952ef21a49c2&amp;quot;, &amp;quot;441228063f6d4b8a8883878580c7e780&amp;quot; ], &amp;quot;checkPhoneNo&amp;quot;: &amp;quot;&amp;quot; } }</code></pre> <pre><code>{ { &amp;quot;companyId&amp;quot;: {{pub_appId}}, &amp;quot;trackingType&amp;quot;: 1, &amp;quot;trackingNumber&amp;quot;: [ &amp;quot;SFxxxxxxxxxxx1&amp;quot;, &amp;quot;SFxxxxxxxxxxx2&amp;quot; ], &amp;quot;checkPhoneNo&amp;quot;: &amp;quot;1234,5678&amp;quot; } }</code></pre> </li> <li><strong>响应报文</strong> <ul> <li>成功报文 <pre><code>{ &amp;quot;result&amp;quot;: [ { &amp;quot;mailNo&amp;quot;: &amp;quot;SF1334455443460&amp;quot;, &amp;quot;routes&amp;quot;: [ { &amp;quot;acceptAddress&amp;quot;: &amp;quot;深圳市&amp;quot;, &amp;quot;acceptTime&amp;quot;: &amp;quot;2022-01-10 11:27:31&amp;quot;, &amp;quot;remark&amp;quot;: &amp;quot;顺丰速运 已收取快件&amp;quot;, &amp;quot;opCode&amp;quot;: &amp;quot;50&amp;quot;, &amp;quot;reasonCode&amp;quot;: &amp;quot;&amp;quot; }, { &amp;quot;acceptAddress&amp;quot;: &amp;quot;深圳市&amp;quot;, &amp;quot;acceptTime&amp;quot;: &amp;quot;2022-01-10 11:28:15&amp;quot;, &amp;quot;remark&amp;quot;: &amp;quot;正在派送途中,请您准备签收(派件人:212,电话:13000002222)&amp;quot;, &amp;quot;opCode&amp;quot;: &amp;quot;44&amp;quot;, &amp;quot;reasonCode&amp;quot;: &amp;quot;&amp;quot; }, { &amp;quot;acceptAddress&amp;quot;: &amp;quot;深圳市&amp;quot;, &amp;quot;acceptTime&amp;quot;: &amp;quot;2022-01-10 11:28:19&amp;quot;, &amp;quot;remark&amp;quot;: &amp;quot;您的快件已密钥认证签收,如有疑问请电联快递员【212,电话:13000002222】。疫情期间顺丰每日对网点消毒、快递员每日测温、配戴口罩,感谢您使用顺丰,期待再次为您服务。(主单总件数:3件)&amp;quot;, &amp;quot;opCode&amp;quot;: &amp;quot;80&amp;quot;, &amp;quot;reasonCode&amp;quot;: &amp;quot;&amp;quot; } ], &amp;quot;orderId&amp;quot;: &amp;quot;e14cfc0c5d09463d95c4952ef21a49c2&amp;quot; }, { &amp;quot;mailNo&amp;quot;: &amp;quot;SF1334455443026&amp;quot;, &amp;quot;routes&amp;quot;: [ { &amp;quot;acceptAddress&amp;quot;: &amp;quot;深圳市&amp;quot;, &amp;quot;acceptTime&amp;quot;: &amp;quot;2022-01-10 11:28:21&amp;quot;, &amp;quot;remark&amp;quot;: &amp;quot;顺丰速运 已收取快件&amp;quot;, &amp;quot;opCode&amp;quot;: &amp;quot;50&amp;quot;, &amp;quot;reasonCode&amp;quot;: &amp;quot;&amp;quot; }, { &amp;quot;acceptAddress&amp;quot;: &amp;quot;深圳市&amp;quot;, &amp;quot;acceptTime&amp;quot;: &amp;quot;2022-01-10 13:34:06&amp;quot;, &amp;quot;remark&amp;quot;: &amp;quot;正在派送途中,请您准备签收(派件人:212,电话:13000002222)&amp;quot;, &amp;quot;opCode&amp;quot;: &amp;quot;44&amp;quot;, &amp;quot;reasonCode&amp;quot;: &amp;quot;&amp;quot; }, { &amp;quot;acceptAddress&amp;quot;: &amp;quot;深圳市&amp;quot;, &amp;quot;acceptTime&amp;quot;: &amp;quot;2022-01-10 13:34:09&amp;quot;, &amp;quot;remark&amp;quot;: &amp;quot;您的快件已密钥认证签收,如有疑问请电联快递员【212,电话:13000002222】。疫情期间顺丰每日对网点消毒、快递员每日测温、配戴口罩,感谢您使用顺丰,期待再次为您服务。(主单总件数:3件)&amp;quot;, &amp;quot;opCode&amp;quot;: &amp;quot;80&amp;quot;, &amp;quot;reasonCode&amp;quot;: &amp;quot;&amp;quot; } ], &amp;quot;orderId&amp;quot;: &amp;quot;441228063f6d4b8a8883878580c7e780&amp;quot; } ], &amp;quot;succ&amp;quot;: &amp;quot;ok&amp;quot;, &amp;quot;msg&amp;quot;: null }</code></pre></li> <li>失败报文-范例1 <pre><code>{ &amp;quot;result&amp;quot;: null, &amp;quot;succ&amp;quot;: &amp;quot;fail&amp;quot;, &amp;quot;msg&amp;quot;: &amp;quot;订单不存在&amp;quot; }</code></pre></li> <li>失败报文-范例2 <pre><code>{ &amp;quot;msg&amp;quot;:&amp;quot;路由查询失败&amp;quot;, &amp;quot;result&amp;quot;: null, &amp;quot;succ&amp;quot;: &amp;quot;fail&amp;quot; }</code></pre></li> </ul></li> </ul>

页面列表

ITEM_HTML