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<Map></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<ServiceFee></td>
<td style="text-align: center;">否</td>
<td style="text-align: center;">产品相关附加增值费列表,如超长超重费;<strong>透传pvs,字段非固定</strong>,可与快递管家开发沟通并择取有用字段</td>
</tr>
</tbody>
</table>
<h3>响应<Map></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>响应<ServiceFee></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>{
&quot;companyId&quot;: xxx,
&quot;senderProvince&quot;: &quot;广东省&quot;,
&quot;senderCity&quot;: &quot;深圳市&quot;,
&quot;senderArea&quot;: &quot;南山区&quot;,
&quot;senderAddress&quot;: &quot;广东省深圳市南山区粤海街道海阔天空雅居B栋16B&quot;,
&quot;receiptProvince&quot;: &quot;北京市&quot;,
&quot;receiptCity&quot;: &quot;北京市&quot;,
&quot;receiptArea&quot;: &quot;顺义区&quot;,
&quot;receiptAddress&quot;: &quot;北京市顺义区南法信顺捷大厦&quot;,
&quot;payMethod&quot;: &quot;2&quot;,
&quot;monthlyCard&quot;: &quot;9999999999&quot;,
&quot;expressType&quot;: &quot;1&quot;,
&quot;depositumInfo&quot;: &quot;电脑&quot;,
&quot;packagesNo&quot;: 3,
&quot;parcelWeighs&quot;: 340.00,
&quot;isCodServiceValue&quot;: 1,
&quot;codServiceValue&quot;: 100,
&quot;isAddServiceValue&quot;: 1,
&quot;addServiceValue&quot;: 1000,
&quot;isReceipt&quot;: 1,
&quot;fresh&quot;: 1,
&quot;packaging&quot;: 1
}</code></pre>
</li>
<li><strong>响应报文</strong>
<ul>
<li>成功报文
<pre><code>{
&quot;result&quot;: {
&quot;originalPrice&quot;: &quot;150.0&quot;,
&quot;discountPrice&quot;: &quot;&quot;,
&quot;subPrice&quot;: &quot;&quot;,
&quot;productServiceFeeList&quot;: [
{
&quot;currency&quot;: &quot;CNY&quot;,
&quot;guide&quot;: false,
&quot;serviceCode&quot;: &quot;IN23&quot;,
&quot;serviceFee&quot;: 300.0,
&quot;serviceName&quot;: &quot;超长超重附加费&quot;,
&quot;stdServiceFee&quot;: 300.0,
&quot;weight&quot;: 340.0
}
],
&quot;vas&quot;: [
{
&quot;vasName&quot;: &quot;代收货款&quot;,
&quot;vasValue&quot;: &quot;--&quot;
},
{
&quot;vasName&quot;: &quot;包装服务&quot;,
&quot;vasValue&quot;: &quot;--&quot;
},
{
&quot;vasName&quot;: &quot;保价&quot;,
&quot;vasValue&quot;: &quot;10.0&quot;
},
{
&quot;vasName&quot;: &quot;签单返还(纸质回单)&quot;,
&quot;vasValue&quot;: &quot;8.0&quot;
}
],
&quot;totalBD&quot;: 168.0,
&quot;total&quot;: &quot;168.0&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>