自动化设备到派-http接口文档


结果推送

<h4>【接口描述】</h4> <hr /> <p>本接口是客户开发,用来接收速配易推送的上传结果。</p> <h4>【传输方式】</h4> <hr /> <p>速配易通过客户提供的url地址实时推送物流操作结果</p> <h4>【报文结构】</h4> <hr /> <table> <thead> <tr> <th>参数名称</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>data</td> <td>消息内容</td> </tr> <tr> <td>dataDigest</td> <td>消息签名</td> </tr> <tr> <td>appId</td> <td>客户编码</td> </tr> </tbody> </table> <h4>【请求参数列表】</h4> <hr /> <table> <thead> <tr> <th>字段名</th> <th>含义</th> <th>类型</th> <th>是否必填(Y:是,N:否)</th> </tr> </thead> <tbody> <tr> <td>company</td> <td>快递公司编码 [YTO, ZTO, STO, YUNDA, JT, EMS])</td> <td>String</td> <td>Y</td> </tr> <tr> <td>sheetNo</td> <td>运单号</td> <td>String</td> <td>Y</td> </tr> <tr> <td>type</td> <td>扫码类型(DS: 到件, PJ:派件, DP:到派合一, FP:发派合一,ZY:转邮,DZ:到转合一)</td> <td>String</td> <td>Y</td> </tr> <tr> <td>code</td> <td>操作结果,成功为OK,失败为FAIL</td> <td>String</td> <td>Y</td> </tr> <tr> <td>msg</td> <td>操作失败内容</td> <td>String</td> <td>Y</td> </tr> </tbody> </table> <h4>【返回参数列表】</h4> <hr /> <table> <thead> <tr> <th>字段名</th> <th>含义</th> <th>类型</th> <th>是否必填(Y:是,N:否)</th> </tr> </thead> <tbody> <tr> <td>success</td> <td>成功失败标识 true-成功;false-失败</td> <td>boolean</td> <td>Y</td> </tr> <tr> <td>reason</td> <td>失败原因</td> <td>String</td> <td>N</td> </tr> </tbody> </table> <h4>【签名规则】</h4> <hr /> <ul> <li>加密步骤<br /> 生成签名规则的具体步骤如下:</li> </ul> <table> <thead> <tr> <th>序号</th> <th>步骤</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>在POST时用“dataDigest”字段进行签名验证。</td> </tr> <tr> <td>2</td> <td>在POST时用data字段表示要发送的JSON报文。</td> </tr> <tr> <td>3</td> <td>假设 data内容为:[{&quot;company&quot;:&quot;YTO&quot;}] , appKey(appId对应的客户密钥)为123456,则要签名的内容为[{&quot;company&quot;:&quot;YTO&quot;}]123456,然后对[{&quot;company&quot;:&quot;YTO&quot;}]123456先进行MD5加密,再转换为base64字符串。即经过md5(16位byte)和base64后的内容就为dauyVLeyCC2kTyfoZFXe0g== 。</td> </tr> <tr> <td>4</td> <td>最终要发送的数据为:{&quot;dataDigest&quot;:&quot;dauyVLeyCC2kTyfoZFXe0g==&quot;,&quot;appId&quot;:&quot;test&quot;,&quot;data&quot;:[{&quot;company&quot;:&quot;YTO&quot;}]}</td> </tr> </tbody> </table> <h4>【请求格式举例-data字段内容】</h4> <pre><code class="language-json"> [{ &amp;quot;company&amp;quot;: &amp;quot;YTO&amp;quot;, &amp;quot;sheetNo&amp;quot;: &amp;quot;YT9690144910909&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;DP&amp;quot;, &amp;quot;code&amp;quot;: &amp;quot;FAIL&amp;quot;, &amp;quot;msg&amp;quot;: &amp;quot;当前单号重复派件&amp;quot; }, { &amp;quot;company&amp;quot;: &amp;quot;YTO&amp;quot;, &amp;quot;sheetNo&amp;quot;: &amp;quot;YT9690144910909&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;DP&amp;quot;, &amp;quot;code&amp;quot;: &amp;quot;OK&amp;quot;, &amp;quot;msg&amp;quot;: &amp;quot;上传成功&amp;quot; } ]</code></pre>

页面列表

ITEM_HTML