送件侠开放平台

闪时送开放平台


计算运费

<p><strong>简要描述:</strong> </p> <ul> <li> </li> </ul> <p><strong>请求URL:</strong> </p> <ul> <li><code>/v1/order/queryDeliverFee</code></li> </ul> <p><strong>请求方式:</strong></p> <ul> <li>POST</li> </ul> <p><strong>参数:</strong> </p> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">必选</th> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">sss_shop_id</td> <td style="text-align: left;">是</td> <td style="text-align: left;">int</td> <td>送件侠门店id</td> </tr> <tr> <td style="text-align: left;">order_id</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>订单id,即该订单在合作方系统中的唯一标识,最长不超过32个字符</td> </tr> <tr> <td style="text-align: left;">receiver_name</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>收件人名称,最长不超过20个字符</td> </tr> <tr> <td style="text-align: left;">receiver_address</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>收件人地址,最长不超过150个字符</td> </tr> <tr> <td style="text-align: left;">receiver_address_detail</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>收件人详细地址,最长不超过150个字符</td> </tr> <tr> <td style="text-align: left;">receiver_phone</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>收件人电话,最长不超过20个字符,隐私号必须以_分隔,例如:13700000000_1111</td> </tr> <tr> <td style="text-align: left;">receiver_lng</td> <td style="text-align: left;">是</td> <td style="text-align: left;">double</td> <td>收件人经度,使用高德地图的坐标</td> </tr> <tr> <td style="text-align: left;">receiver_lat</td> <td style="text-align: left;">是</td> <td style="text-align: left;">double</td> <td>收件人纬度,使用高德地图的坐标</td> </tr> <tr> <td style="text-align: left;">goods_type</td> <td style="text-align: left;">是</td> <td style="text-align: left;">int</td> <td>货物类型,1:食品小吃 2:饮料 3:蛋糕 4:鲜花 5:生鲜果蔬 6:电子数码 7:百货 8:文印票务 9:医药 10:同城电商 11:小商品市场 12:小龙虾 100:其它</td> </tr> <tr> <td style="text-align: left;">goods_weight</td> <td style="text-align: left;">是</td> <td style="text-align: left;">int</td> <td>货物重量,单位为kg</td> </tr> <tr> <td style="text-align: left;">expected_pickup_time</td> <td style="text-align: left;">是</td> <td style="text-align: left;">int</td> <td>期望骑手上门时间,时区为GMT+8,当前距离Epoch(1970年1月1日) 以秒计算的时间,即unix-timestamp。传0则为立即上门</td> </tr> <tr> <td style="text-align: left;">poi_seq</td> <td style="text-align: left;">是</td> <td style="text-align: left;">int</td> <td>门店订单流水号,指定店铺的每日订单顺序号,比如是今日第4单,那就传4</td> </tr> <tr> <td style="text-align: left;">note</td> <td style="text-align: left;">否</td> <td style="text-align: left;">string</td> <td>订单备注,最长不超过200个字符,如果值为空,则不传此参数</td> </tr> <tr> <td style="text-align: left;">coupon_alias</td> <td style="text-align: left;">否</td> <td style="text-align: left;">string</td> <td>优惠券唯一码,传入则表示指定一张优惠券,调用<code>订单可用优惠券</code>接口可获取, 如果不需要则不传此参数,系统默认会推出一张可用优惠券</td> </tr> <tr> <td style="text-align: left;">insurance_fee</td> <td style="text-align: left;">否</td> <td style="text-align: left;">int</td> <td>此订单保价金额, 不传则不保价, 目前只固定支持 0,100,200,300,400,500元</td> </tr> <tr> <td style="text-align: left;">attach</td> <td style="text-align: left;">否</td> <td style="text-align: left;">int</td> <td>发单成功后,如需要再次计价,传入attach:1, 此参数作用为过滤掉第一次发单时已选择的运力,并重新计价 (如attach:1,则sss_peisong_id必传)</td> </tr> <tr> <td style="text-align: left;">sss_peisong_id</td> <td style="text-align: left;">否</td> <td style="text-align: left;">string</td> <td>送件侠订单号</td> </tr> <tr> <td style="text-align: left;">notify_url</td> <td style="text-align: left;">否</td> <td style="text-align: left;">string</td> <td>自定义订单状态通知回调地址,无须参与sign签名</td> </tr> </tbody> </table> <p><strong>特别说明</strong></p> <pre><code> 首次调用此接口,将返回一个sss_peisong_id值,如返回值为1 再次调用此接口,将返回一个新的sss_peisong_id值,如返回值为2 如果业务方订单号是同一个,可以在第一次调用接口之后,记录sss_peisong_id, 如需再次调用,可传入sss_peisong_id:最新的订单号如2 这样的好处是业务方同一个订单号对应送件侠一个订单号 如果需要发单后追加运力功能,流程为 1. 调用计价-&amp;gt;调用下单接口 2. 再次调用计价接口,传入以下附加参数 attach:1 sss_peisong_id:第1步时返回的送件侠订单号 3. 调用下单接口,third_logistics_ids 传入本次下单需要追加的运力ID </code></pre> <p><strong>返回示例</strong></p> <pre><code>{ &amp;quot;code&amp;quot;: 0, &amp;quot;message&amp;quot;: &amp;quot;ok&amp;quot;, &amp;quot;data&amp;quot;: { &amp;quot;sss_peisong_id&amp;quot;: 2269722, &amp;quot;detail&amp;quot;: [ { &amp;quot;third_logistics_id&amp;quot;: 14, &amp;quot;third_logistics_name&amp;quot;: &amp;quot;蜂鸟即配&amp;quot;, &amp;quot;third_logistics_icon&amp;quot;: &amp;quot;https://sss-admin.oss-cn-zhangjiakou.aliyuncs.com/image/fn.png&amp;quot;, &amp;quot;distance&amp;quot;: 9.4, &amp;quot;fee&amp;quot;: 18, &amp;quot;is_custom_capacity&amp;quot;: 0, &amp;quot;custom_capacity_fee&amp;quot;: 0, &amp;quot;custom_capacity_error_msg&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;used_coupon_alias&amp;quot;: &amp;quot;62400ce5c3e640b39da44db78d2207c3&amp;quot;, &amp;quot;coupon_fee&amp;quot;: 3, &amp;quot;is_use_insurance&amp;quot;: 1, &amp;quot;insurance_deduct_fee&amp;quot;: 2 }, { &amp;quot;third_logistics_id&amp;quot;: 6, &amp;quot;third_logistics_name&amp;quot;: &amp;quot;点我达&amp;quot;, &amp;quot;third_logistics_icon&amp;quot;: &amp;quot;https://sss-admin.oss-cn-zhangjiakou.aliyuncs.com/image/dwd.png&amp;quot;, &amp;quot;distance&amp;quot;: 9.8, &amp;quot;fee&amp;quot;: 18.4, &amp;quot;is_custom_capacity&amp;quot;: 0, &amp;quot;custom_capacity_fee&amp;quot;: 0, &amp;quot;custom_capacity_error_msg&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;used_coupon_alias&amp;quot;: &amp;quot;62400ce5c3e640b39da44db78d2207c3&amp;quot;, &amp;quot;coupon_fee&amp;quot;: 3, &amp;quot;is_use_insurance&amp;quot;: 0, &amp;quot;insurance_deduct_fee&amp;quot;: 0 }, { &amp;quot;third_logistics_id&amp;quot;: 12, &amp;quot;third_logistics_name&amp;quot;: &amp;quot;快服务&amp;quot;, &amp;quot;third_logistics_icon&amp;quot;: &amp;quot;https://sss-admin.oss-cn-zhangjiakou.aliyuncs.com/image/kfw-logo.png&amp;quot;, &amp;quot;distance&amp;quot;: 9.8, &amp;quot;fee&amp;quot;: 20, &amp;quot;is_custom_capacity&amp;quot;: 0, &amp;quot;custom_capacity_fee&amp;quot;: 0, &amp;quot;custom_capacity_error_msg&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;used_coupon_alias&amp;quot;: &amp;quot;62400ce5c3e640b39da44db78d2207c3&amp;quot;, &amp;quot;coupon_fee&amp;quot;: 3, &amp;quot;is_use_insurance&amp;quot;: 0, &amp;quot;insurance_deduct_fee&amp;quot;: 0 }, { &amp;quot;third_logistics_id&amp;quot;: 8, &amp;quot;third_logistics_name&amp;quot;: &amp;quot;UU跑腿&amp;quot;, &amp;quot;third_logistics_icon&amp;quot;: &amp;quot;https://sss-admin.oss-cn-zhangjiakou.aliyuncs.com/image/uu.png&amp;quot;, &amp;quot;distance&amp;quot;: 9.495, &amp;quot;fee&amp;quot;: 21, &amp;quot;is_custom_capacity&amp;quot;: 0, &amp;quot;custom_capacity_fee&amp;quot;: 0, &amp;quot;custom_capacity_error_msg&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;used_coupon_alias&amp;quot;: &amp;quot;62400ce5c3e640b39da44db78d2207c3&amp;quot;, &amp;quot;coupon_fee&amp;quot;: 3, &amp;quot;is_use_insurance&amp;quot;: 0, &amp;quot;insurance_deduct_fee&amp;quot;: 0 }, { &amp;quot;third_logistics_id&amp;quot;: 1, &amp;quot;third_logistics_name&amp;quot;: &amp;quot;达达&amp;quot;, &amp;quot;third_logistics_icon&amp;quot;: &amp;quot;https://sss-admin.oss-cn-zhangjiakou.aliyuncs.com/image/dd.png&amp;quot;, &amp;quot;distance&amp;quot;: 9.41, &amp;quot;fee&amp;quot;: 21, &amp;quot;is_custom_capacity&amp;quot;: 0, &amp;quot;custom_capacity_fee&amp;quot;: 0, &amp;quot;custom_capacity_error_msg&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;used_coupon_alias&amp;quot;: &amp;quot;62400ce5c3e640b39da44db78d2207c3&amp;quot;, &amp;quot;coupon_fee&amp;quot;: 3, &amp;quot;is_use_insurance&amp;quot;: 1, &amp;quot;insurance_deduct_fee&amp;quot;: 1 }, { &amp;quot;third_logistics_id&amp;quot;: 11, &amp;quot;third_logistics_name&amp;quot;: &amp;quot;顺丰&amp;quot;, &amp;quot;third_logistics_icon&amp;quot;: &amp;quot;https://sss-admin.oss-cn-zhangjiakou.aliyuncs.com/image/sf.png&amp;quot;, &amp;quot;distance&amp;quot;: 9.409, &amp;quot;fee&amp;quot;: 21, &amp;quot;is_custom_capacity&amp;quot;: 0, &amp;quot;custom_capacity_fee&amp;quot;: 0, &amp;quot;custom_capacity_error_msg&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;used_coupon_alias&amp;quot;: &amp;quot;62400ce5c3e640b39da44db78d2207c3&amp;quot;, &amp;quot;coupon_fee&amp;quot;: 3, &amp;quot;is_use_insurance&amp;quot;: 1, &amp;quot;insurance_deduct_fee&amp;quot;: 1.5 }, { &amp;quot;third_logistics_id&amp;quot;: 16, &amp;quot;third_logistics_name&amp;quot;: &amp;quot;闪送v5&amp;quot;, &amp;quot;third_logistics_icon&amp;quot;: &amp;quot;https://sss-admin.oss-cn-zhangjiakou.aliyuncs.com/image/ss.png&amp;quot;, &amp;quot;distance&amp;quot;: &amp;quot;8.00&amp;quot;, &amp;quot;fee&amp;quot;: 23, &amp;quot;is_custom_capacity&amp;quot;: 0, &amp;quot;custom_capacity_fee&amp;quot;: 0, &amp;quot;custom_capacity_error_msg&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;used_coupon_alias&amp;quot;: &amp;quot;62400ce5c3e640b39da44db78d2207c3&amp;quot;, &amp;quot;coupon_fee&amp;quot;: 3, &amp;quot;is_use_insurance&amp;quot;: 1, &amp;quot;insurance_deduct_fee&amp;quot;: 1.5 } ] } } </code></pre> <p><strong>返回参数说明</strong></p> <table> <thead> <tr> <th>参数</th> <th>说明</th> <th>类型</th> <th>必定返回</th> </tr> </thead> <tbody> <tr> <td>sss_peisong_id</td> <td>string</td> <td>送件侠订单号</td> <td>是</td> </tr> <tr> <td>third_logistics_id</td> <td>int</td> <td>运力公司标识ID,详见附录</td> <td>是</td> </tr> <tr> <td>third_logistics_name</td> <td>string</td> <td>运力公司名,详见附录</td> <td>是</td> </tr> <tr> <td>third_logistics_icon</td> <td>string</td> <td>运力logo</td> <td>是</td> </tr> <tr> <td>distance</td> <td>double</td> <td>配送距离,单位为公里</td> <td>是</td> </tr> <tr> <td>fee</td> <td>double</td> <td>最终运费,单位为元</td> <td>是</td> </tr> <tr> <td>is_custom_capacity</td> <td>int</td> <td>是否使用自运力账号</td> <td>是</td> </tr> <tr> <td>custom_capacity_fee</td> <td>double</td> <td>自运力账号-本次运费</td> <td>是</td> </tr> <tr> <td>custom_capacity_error_msg</td> <td>string</td> <td>自运力计算运费错误信息</td> <td>否</td> </tr> <tr> <td>used_coupon_alias</td> <td>string</td> <td>已使用的优惠券码,如无则为空字符</td> <td>是</td> </tr> <tr> <td>coupon_fee</td> <td>double</td> <td>优惠券金额</td> <td>是</td> </tr> <tr> <td>is_use_insurance</td> <td>int</td> <td>是否成功由运力方保价, 1:是 0:否</td> <td>是</td> </tr> <tr> <td>insurance_deduct_fee</td> <td>double</td> <td>保价扣除金额 (如返回运费为10元,其中有2元为保价溢价金额)</td> <td>是</td> </tr> </tbody> </table> <p><strong>请求示例demo x-www-form-urlencoded</strong></p> <pre><code>appkey:4aa32923334940099ad6ecf6a552de33 timestamp:1575525613228 version:1.0 sign:xxxxxxx sss_shop_id:18000016 receiver_name:李安 receiver_phone:15632131234 receiver_address:阿里巴巴西溪园区(淘宝城) receiver_address_detail:1幢1402 receiver_lng:120.024393 receiver_lat:30.279713 goods_type:3 goods_weight:1 note:备注信息 poi_seq:30 expected_pickup_time:1589292000 order_id:11123123 notify_url:https://www.qq.com</code></pre>

页面列表

ITEM_HTML