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


5.运费估算接口(含增值服务)

<h3>功能描述</h3> <ul> <li>该接口用于:在下单生成实际运费之前,根据运费计算公式及逻辑,产生的预估费用(包含增值服务)。</li> </ul> <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/order/v1/getFreightAddedServices</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;">senderProvince</td> <td style="text-align: center;">String(30)</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;">senderCity</td> <td style="text-align: center;">String(100)</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;">senderArea</td> <td style="text-align: center;">String(100)</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;">senderAddress</td> <td style="text-align: center;">String(450)</td> <td style="text-align: center;">是</td> <td style="text-align: center;">寄件详细地址。此详细地址需包含省市信息,以提高地址识别的成功率,示例:“广东省深圳市福田区新洲十一街万基商务大厦10楼”。</td> </tr> <tr> <td style="text-align: center;">6</td> <td style="text-align: center;">receiptProvince</td> <td style="text-align: center;">String(30)</td> <td style="text-align: center;">是</td> <td style="text-align: center;">到件方所在省份。字段填写要求:必须是标准的省名称称谓 如:广东省,如果是直辖市,请直接传北京、上海等。</td> </tr> <tr> <td style="text-align: center;">7</td> <td style="text-align: center;">receiptCity</td> <td style="text-align: center;">String(100)</td> <td style="text-align: center;">是</td> <td style="text-align: center;">到件方所在城市名称。必须是标准的城市称谓 如:深圳市。</td> </tr> <tr> <td style="text-align: center;">8</td> <td style="text-align: center;">receiptArea</td> <td style="text-align: center;">String(100)</td> <td style="text-align: center;">否</td> <td style="text-align: center;">到件区/县。必须是标准的区/县称谓 如:南山区。</td> </tr> <tr> <td style="text-align: center;">9</td> <td style="text-align: center;">receiptAddress</td> <td style="text-align: center;">String(450)</td> <td style="text-align: center;">是</td> <td style="text-align: center;">到件方详细地址。此详细地址需包含省市信息,以提高地址识别的成功率,示例:“广东省深圳市福田区新洲十一街万基商务大厦10楼”。</td> </tr> <tr> <td style="text-align: center;">10</td> <td style="text-align: center;">payMethod</td> <td style="text-align: center;">String(1)</td> <td style="text-align: center;">是</td> <td style="text-align: center;">运费付款方式,根据实际情况选择一种付款方式:0-寄付月结;1-寄付现结;2-收方付;3-第三方付;</td> </tr> <tr> <td style="text-align: center;">11</td> <td style="text-align: center;">monthlyCard</td> <td style="text-align: center;">String(10)</td> <td style="text-align: center;">条件</td> <td style="text-align: center;">月结卡号。如果是月结账户,必填字段;付款方式为月结时,必填字段;修改代收货款,必填字段;</td> </tr> <tr> <td style="text-align: center;">12</td> <td style="text-align: center;">expressType</td> <td style="text-align: center;">String(4)</td> <td style="text-align: center;">是</td> <td style="text-align: center;">业务类型产品编码。如1,2,154等,详见《附录-2.快件产品类列表》。</td> </tr> <tr> <td style="text-align: center;">13</td> <td style="text-align: center;">depositumInfo</td> <td style="text-align: center;">String(128)</td> <td style="text-align: center;">是</td> <td style="text-align: center;">托寄物内容,按实际托寄物填写,可填写简称(文件、水果等)</td> </tr> <tr> <td style="text-align: center;">14</td> <td style="text-align: center;">packagesNo</td> <td style="text-align: center;">String(5)</td> <td style="text-align: center;">否</td> <td style="text-align: center;">1</td> <td style="text-align: left;">件数</td> </tr> <tr> <td style="text-align: center;">15</td> <td style="text-align: center;">parcelWeighs</td> <td style="text-align: center;">Number(16,3)</td> <td style="text-align: center;">否</td> <td style="text-align: center;">包裹重量,订单货物单位重量,包含子母件,单位千克,精确到小数点后3位并大于0.001,跨境件报关需要填写</td> </tr> <tr> <td style="text-align: center;">16</td> <td style="text-align: center;">isCodServiceValue</td> <td style="text-align: center;">Number(1)</td> <td style="text-align: center;">否</td> <td style="text-align: center;">是否代收:0-否;1-是;</td> </tr> <tr> <td style="text-align: center;">17</td> <td style="text-align: center;">codServiceValue</td> <td style="text-align: center;">Number(16,3)</td> <td style="text-align: center;">否</td> <td style="text-align: center;">未开通额度:5.000~20000.000;开通额度:5.000~100000.000</td> <td style="text-align: left;">代收金额,当isCollection=1时根据实际代收金额填写,isCollection=0时则无需填写</td> </tr> <tr> <td style="text-align: center;">18</td> <td style="text-align: center;">isAddServiceValue</td> <td style="text-align: center;">Number(1)</td> <td style="text-align: center;">否</td> <td style="text-align: center;">是否保价:0-否;1-是;</td> </tr> <tr> <td style="text-align: center;">19</td> <td style="text-align: center;">addServiceValue</td> <td style="text-align: center;">Number(16,3)</td> <td style="text-align: center;">否</td> <td style="text-align: center;">范围:1.000~500000.000</td> <td style="text-align: left;">保价金额,如需保价时,填写物品声明价值以原寄地所在区域币种为准,如中国大陆为人民币,香港为港币,保留3位小数。没有保价金额则无需填写,限制在1到50万之间</td> </tr> <tr> <td style="text-align: center;">20</td> <td style="text-align: center;">isReceipt</td> <td style="text-align: center;">Number(1)</td> <td style="text-align: center;">否</td> <td style="text-align: center;">是否签回单:0-否;1-是;</td> </tr> <tr> <td style="text-align: center;">21</td> <td style="text-align: center;">fresh</td> <td style="text-align: center;">Number(1)</td> <td style="text-align: center;">否</td> <td style="text-align: center;">保鲜服务:0-否;1-是;</td> </tr> <tr> <td style="text-align: center;">22</td> <td style="text-align: center;">packaging</td> <td style="text-align: center;">Number(1)</td> <td style="text-align: center;">否</td> <td style="text-align: center;">包装服务:0-否;1-是;</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;">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 (/)</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;">5</td> <td style="text-align: center;">originalPrice</td> <td style="text-align: center;">String(10)</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;">discountPrice</td> <td style="text-align: center;">String(10)</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;">subPrice</td> <td style="text-align: center;">String(10)</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;">vas</td> <td style="text-align: center;">List&lt;Map&gt;</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;">totalBD</td> <td style="text-align: center;">BigDecimal(10,1)</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;">total</td> <td style="text-align: center;">String(10)</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;">productServiceFeeList</td> <td style="text-align: center;">List&lt;ServiceFee&gt;</td> <td style="text-align: center;">否</td> <td style="text-align: center;">产品相关附加增值费列表,如超长超重费;<strong>透传pvs,字段非固定</strong>,可与快递管家开发沟通并择取有用字段</td> </tr> </tbody> </table> <h3>响应&lt;Map&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;">vasName</td> <td style="text-align: center;">String (10)</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;">vasValue</td> <td style="text-align: center;">String (10)</td> <td style="text-align: center;">否</td> <td style="text-align: center;">增值服务费用,值为空时以- -表示</td> </tr> </tbody> </table> <h3>响应&lt;ServiceFee&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;">currency</td> <td style="text-align: center;">String (10)</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;">guide</td> <td style="text-align: center;">Boolean</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;">serviceCode</td> <td style="text-align: center;">String (10)</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;">serviceFee</td> <td style="text-align: center;">Double</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;">serviceName</td> <td style="text-align: center;">String (50)</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;">stdServiceFee</td> <td style="text-align: center;">Double</td> <td style="text-align: center;">否</td> <td style="text-align: center;">标准服务费</td> </tr> <tr> <td style="text-align: center;">7</td> <td style="text-align: center;">weight</td> <td style="text-align: center;">Double</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;: xxx, &amp;quot;senderProvince&amp;quot;: &amp;quot;广东省&amp;quot;, &amp;quot;senderCity&amp;quot;: &amp;quot;深圳市&amp;quot;, &amp;quot;senderArea&amp;quot;: &amp;quot;南山区&amp;quot;, &amp;quot;senderAddress&amp;quot;: &amp;quot;广东省深圳市南山区粤海街道海阔天空雅居B栋16B&amp;quot;, &amp;quot;receiptProvince&amp;quot;: &amp;quot;北京市&amp;quot;, &amp;quot;receiptCity&amp;quot;: &amp;quot;北京市&amp;quot;, &amp;quot;receiptArea&amp;quot;: &amp;quot;顺义区&amp;quot;, &amp;quot;receiptAddress&amp;quot;: &amp;quot;北京市顺义区南法信顺捷大厦&amp;quot;, &amp;quot;payMethod&amp;quot;: &amp;quot;2&amp;quot;, &amp;quot;monthlyCard&amp;quot;: &amp;quot;9999999999&amp;quot;, &amp;quot;expressType&amp;quot;: &amp;quot;1&amp;quot;, &amp;quot;depositumInfo&amp;quot;: &amp;quot;电脑&amp;quot;, &amp;quot;packagesNo&amp;quot;: 3, &amp;quot;parcelWeighs&amp;quot;: 340.00, &amp;quot;isCodServiceValue&amp;quot;: 1, &amp;quot;codServiceValue&amp;quot;: 100, &amp;quot;isAddServiceValue&amp;quot;: 1, &amp;quot;addServiceValue&amp;quot;: 1000, &amp;quot;isReceipt&amp;quot;: 1, &amp;quot;fresh&amp;quot;: 1, &amp;quot;packaging&amp;quot;: 1 }</code></pre> </li> <li><strong>响应报文</strong> <ul> <li>成功报文 <pre><code>{ &amp;quot;result&amp;quot;: { &amp;quot;originalPrice&amp;quot;: &amp;quot;150.0&amp;quot;, &amp;quot;discountPrice&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;subPrice&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;productServiceFeeList&amp;quot;: [ { &amp;quot;currency&amp;quot;: &amp;quot;CNY&amp;quot;, &amp;quot;guide&amp;quot;: false, &amp;quot;serviceCode&amp;quot;: &amp;quot;IN23&amp;quot;, &amp;quot;serviceFee&amp;quot;: 300.0, &amp;quot;serviceName&amp;quot;: &amp;quot;超长超重附加费&amp;quot;, &amp;quot;stdServiceFee&amp;quot;: 300.0, &amp;quot;weight&amp;quot;: 340.0 } ], &amp;quot;vas&amp;quot;: [ { &amp;quot;vasName&amp;quot;: &amp;quot;代收货款&amp;quot;, &amp;quot;vasValue&amp;quot;: &amp;quot;--&amp;quot; }, { &amp;quot;vasName&amp;quot;: &amp;quot;包装服务&amp;quot;, &amp;quot;vasValue&amp;quot;: &amp;quot;--&amp;quot; }, { &amp;quot;vasName&amp;quot;: &amp;quot;保价&amp;quot;, &amp;quot;vasValue&amp;quot;: &amp;quot;10.0&amp;quot; }, { &amp;quot;vasName&amp;quot;: &amp;quot;签单返还(纸质回单)&amp;quot;, &amp;quot;vasValue&amp;quot;: &amp;quot;8.0&amp;quot; } ], &amp;quot;totalBD&amp;quot;: 168.0, &amp;quot;total&amp;quot;: &amp;quot;168.0&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