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


16.统计数据类接口

<h3>功能描述</h3> <ul> <li>该接口用于:根据限定条件查询订单统计类数据。</li> <li>目前该接口支持统计数据如下: <ol> <li>预计到达快递统计:查询某个城市未来1~10天内某日到件数量及部分明细。(使用此统计,需先对接《15.预计派件时间查询接口》);</li> <li>在途快递数量查询:查询某个城市当前在途快递数量及部分明细;</li> </ol></li> </ul> <pre><code>注: 1.因统计类数据量过大,故本接口采用客户主动请求,系统根据请求条件进行处理后主动推送的方式将数据返回,而非在请求时返回的方式。 2.接口限制5分钟调用一次(测试环境无限制)。</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;">不支持</td> <td style="text-align: center;">接入/POST</td> <td style="text-align: center;">/public/orderMs/v1/getQuantityStatistics</td> </tr> </tbody> </table> <h2>==&gt;查询&lt;==</h2> <h3>元素&lt;请求&gt;</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;">分配客户AppId</td> </tr> <tr> <td style="text-align: center;">2</td> <td style="text-align: center;">promiseTm</td> <td style="text-align: center;">String(10)</td> <td style="text-align: center;">条件</td> <td style="text-align: center;">预计到达时间:未来1~10天。type=1时必填,type=2时非必填。格式:YYYY-MM-DD。</td> </tr> <tr> <td style="text-align: center;">3</td> <td style="text-align: center;">receiveCity</td> <td style="text-align: center;">String(20)</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;">type</td> <td style="text-align: center;">number(1)</td> <td style="text-align: center;">是</td> <td style="text-align: center;">1-预计到达快递统计;2(其他)-在途快递数量查询;</td> </tr> </tbody> </table> <h3>元素&lt;响应&gt;</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;">String(100)</td> <td style="text-align: center;">是</td> <td style="text-align: center;">数据</td> <td style="text-align: left;">数据</td> </tr> </tbody> </table> <h3>报文范例</h3> <ul> <li> <p><strong>请求报文</strong></p> <pre><code>{ &amp;quot;companyId&amp;quot;:&amp;quot;201905140011898&amp;quot;, &amp;quot;promiseTm&amp;quot;:&amp;quot;2020-03-20&amp;quot;, &amp;quot;receiveCity&amp;quot;:&amp;quot;北京市&amp;quot;, &amp;quot;type&amp;quot;:1 }</code></pre> </li> <li><strong>响应报文</strong> <ul> <li>成功报文 <pre><code>{ &amp;quot;result&amp;quot;: null, &amp;quot;succ&amp;quot;: &amp;quot;ok&amp;quot;, &amp;quot;msg&amp;quot;: &amp;quot;正在查询~ 稍后会将查询结果推送至您的接收接口。&amp;quot; }</code></pre></li> <li>失败报文-范例 <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> </ul></li> </ul> <h2>==&gt;推送&lt;==</h2> <h3>元素&lt;请求&gt;</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;">mainMailnos</td> <td style="text-align: center;">String(200000)</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;">promiseTm</td> <td style="text-align: center;">String(10)</td> <td style="text-align: center;">条件</td> <td style="text-align: center;">预计到达时间。查询参数type=1时必填,type=2时非必填。格式:YYYY-MM-DD。</td> </tr> <tr> <td style="text-align: center;">3</td> <td style="text-align: center;">receiveCity</td> <td style="text-align: center;">String(20)</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;">orderCount</td> <td style="text-align: center;">number(5)</td> <td style="text-align: center;">是</td> <td style="text-align: center;">订单总量:与订单号总量一致,子母件按1单计算。</td> </tr> <tr> <td style="text-align: center;">5</td> <td style="text-align: center;">packagesCount</td> <td style="text-align: center;">number(5)</td> <td style="text-align: center;">是</td> <td style="text-align: center;">订单总件数:与运单号总量一致,子母件按多单计算。</td> </tr> </tbody> </table> <h3>元素&lt;响应&gt;</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;">status</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-成功,ERR-失败。失败会重推两次,共推送三次,全部返回ERR则不再推送。</td> </tr> </tbody> </table> <h3>报文范例</h3> <ul> <li> <p><strong>请求报文</strong></p> <pre><code>{ &amp;quot;orderCount&amp;quot;: 2, &amp;quot;promiseTm&amp;quot;: &amp;quot;2021-03-20&amp;quot;, &amp;quot;mainMailnos&amp;quot;: &amp;quot;SF123456789012345,SF123456789012346&amp;quot;, &amp;quot;packagesCount&amp;quot;: 2, &amp;quot;receiveCity&amp;quot;: &amp;quot;北京市&amp;quot; }</code></pre> </li> <li><strong>响应报文</strong> <ul> <li>成功报文 <pre><code>{ &amp;quot;status&amp;quot;:&amp;quot;OK&amp;quot; }</code></pre></li> <li>失败报文-范例 <pre><code>{ &amp;quot;status&amp;quot;:&amp;quot;ERR&amp;quot; }</code></pre></li> </ul></li> </ul>

页面列表

ITEM_HTML