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<String></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>{
{
&quot;companyId&quot;: {{pub_appId}},
&quot;trackingType&quot;: 2,
&quot;trackingNumber&quot;: [
&quot;e14cfc0c5d09463d95c4952ef21a49c2&quot;,
&quot;441228063f6d4b8a8883878580c7e780&quot;
],
&quot;checkPhoneNo&quot;: &quot;&quot;
}
}</code></pre>
<pre><code>{
{
&quot;companyId&quot;: {{pub_appId}},
&quot;trackingType&quot;: 1,
&quot;trackingNumber&quot;: [
&quot;SFxxxxxxxxxxx1&quot;,
&quot;SFxxxxxxxxxxx2&quot;
],
&quot;checkPhoneNo&quot;: &quot;1234,5678&quot;
}
}</code></pre>
</li>
<li><strong>响应报文</strong>
<ul>
<li>成功报文
<pre><code>{
&quot;result&quot;: [
{
&quot;mailNo&quot;: &quot;SF1334455443460&quot;,
&quot;routes&quot;: [
{
&quot;acceptAddress&quot;: &quot;深圳市&quot;,
&quot;acceptTime&quot;: &quot;2022-01-10 11:27:31&quot;,
&quot;remark&quot;: &quot;顺丰速运 已收取快件&quot;,
&quot;opCode&quot;: &quot;50&quot;,
&quot;reasonCode&quot;: &quot;&quot;
},
{
&quot;acceptAddress&quot;: &quot;深圳市&quot;,
&quot;acceptTime&quot;: &quot;2022-01-10 11:28:15&quot;,
&quot;remark&quot;: &quot;正在派送途中,请您准备签收(派件人:212,电话:13000002222)&quot;,
&quot;opCode&quot;: &quot;44&quot;,
&quot;reasonCode&quot;: &quot;&quot;
},
{
&quot;acceptAddress&quot;: &quot;深圳市&quot;,
&quot;acceptTime&quot;: &quot;2022-01-10 11:28:19&quot;,
&quot;remark&quot;: &quot;您的快件已密钥认证签收,如有疑问请电联快递员【212,电话:13000002222】。疫情期间顺丰每日对网点消毒、快递员每日测温、配戴口罩,感谢您使用顺丰,期待再次为您服务。(主单总件数:3件)&quot;,
&quot;opCode&quot;: &quot;80&quot;,
&quot;reasonCode&quot;: &quot;&quot;
}
],
&quot;orderId&quot;: &quot;e14cfc0c5d09463d95c4952ef21a49c2&quot;
},
{
&quot;mailNo&quot;: &quot;SF1334455443026&quot;,
&quot;routes&quot;: [
{
&quot;acceptAddress&quot;: &quot;深圳市&quot;,
&quot;acceptTime&quot;: &quot;2022-01-10 11:28:21&quot;,
&quot;remark&quot;: &quot;顺丰速运 已收取快件&quot;,
&quot;opCode&quot;: &quot;50&quot;,
&quot;reasonCode&quot;: &quot;&quot;
},
{
&quot;acceptAddress&quot;: &quot;深圳市&quot;,
&quot;acceptTime&quot;: &quot;2022-01-10 13:34:06&quot;,
&quot;remark&quot;: &quot;正在派送途中,请您准备签收(派件人:212,电话:13000002222)&quot;,
&quot;opCode&quot;: &quot;44&quot;,
&quot;reasonCode&quot;: &quot;&quot;
},
{
&quot;acceptAddress&quot;: &quot;深圳市&quot;,
&quot;acceptTime&quot;: &quot;2022-01-10 13:34:09&quot;,
&quot;remark&quot;: &quot;您的快件已密钥认证签收,如有疑问请电联快递员【212,电话:13000002222】。疫情期间顺丰每日对网点消毒、快递员每日测温、配戴口罩,感谢您使用顺丰,期待再次为您服务。(主单总件数:3件)&quot;,
&quot;opCode&quot;: &quot;80&quot;,
&quot;reasonCode&quot;: &quot;&quot;
}
],
&quot;orderId&quot;: &quot;441228063f6d4b8a8883878580c7e780&quot;
}
],
&quot;succ&quot;: &quot;ok&quot;,
&quot;msg&quot;: null
}</code></pre></li>
<li>失败报文-范例1
<pre><code>{
&quot;result&quot;: null,
&quot;succ&quot;: &quot;fail&quot;,
&quot;msg&quot;: &quot;订单不存在&quot;
}</code></pre></li>
<li>失败报文-范例2
<pre><code>{
&quot;msg&quot;:&quot;路由查询失败&quot;,
&quot;result&quot;: null,
&quot;succ&quot;: &quot;fail&quot;
}</code></pre></li>
</ul></li>
</ul>