# 跑腿上游渠道接入文档(2B) - 普通询价下单

本文档为 跑腿上游渠道接入文档(2B) 的询价下单模式子文档,仅描述【普通询价下单】流程。通用约定、附录、签名算法等公共内容请参考主文档。

# 询价下单模式说明

普通询价下单流程:调用方先通过 /estimatePrice 询价,得到腾讯侧的运费金额;随后使用同一 third_order_id 调用 /createOrder 完成下单,腾讯侧根据询价的预提单直接创单派单。

  • third_order_id 询价与下单一致
  • 询价结果金额(total_fee)可透传到下单接口的 estimate_deliver_fee 字段
  • 询价结果有效期 5 分钟(需提前沟通)

# 接口

# 1.1 询价

Route: /estimatePrice

请求Body:

名称 类型 描述 必须
third_order_id string(64) 接入方业务订单号,作为预提单的id,后续下单同一个id会作为结果直接创单,有效期5分钟(需要注意这个有效期需要提前沟通) Yes
city_name string(32) 城市名称 No
city_code string(32) 城市行政区域编码,标准行政区划编码,可参见 WebService API | 腾讯位置服务 (opens new window) Yes
goods_type int(11) 物品类别,详细见附录 3.3 Yes
goods_weight float 物品重量(单位 kg) Yes
express_type int 跑腿类型,详细见枚举 Yes
order_phone varchar(64) 下单人手机号 Yes
sender_address AddressInfo 地址信息,详细结构见附录 AddressInfo Yes
receiver_address AddressInfo 地址信息,详细结构见附录 AddressInfo Yes
enable_receive_code bool 是否启用收货码 Yes
trade_order_source string 订单来源,可见订单来源枚举,未在枚举中可传入原始字符串 No
trade_order_source_sequence string 订单来源流水号 No
goods_details List<GoodsDetail> 物品明细数据 No
expected_delivery_time long 预期送达时间,时间戳,格式为 long,时区为 GMT+8,即距离 Epoch(1970年1月1日)以秒计算的时间(unix-timestamp) No
trade_order_id string 商流订单号(订单来源渠道的订单号) No

响应Body业务字段:

名称 类型 描述 必须
express_type int 跑腿类型,详细见枚举 Yes
delivery_time long 预计送达时间 No
delivery_distance int 配送距离,米 Yes
deliver_fee int 运费总价 Yes
total_fee int 实际支付金额 Yes
coupon_fee int 优惠金额 Yes

# 1.2 创建订单

询价和创单传递信息不一致的情况,需要提前告知,询价不作为预提单来源。

Route: /createOrder

请求Body:

名称 类型 描述 必须
third_order_id string(64) 接入方业务订单号 Yes
city_name string(64) 寄件城市名称,如北京市、深圳市 Yes
city_code string(64) 寄件城市 code No
goods_type int(11) 物品类别,详细见附录 3.3 Yes
goods_weight float 物品重量(单位 kg) Yes
order_phone varchar(64) 下单人手机号 Yes
express_type int 跑腿类型,详细见枚举 Yes
sender_address AddressInfo 地址信息,详细结构见附录 AddressInfo Yes
receiver_address AddressInfo 地址信息,详细结构见附录 AddressInfo Yes
enable_receive_code boolean 启用收货码 Yes
estimate_deliver_fee int 询价结果金额(询价时腾讯返回的金额 total_fee),直接下单时不需要 No
remark string 备注(按照运力支持备注长度截取) No
callback string 回调地址,如果不需要根据订单设置不同的回调地址,可以给固定值腾讯侧配置(使用该字段,需要和腾讯侧确认) No
trade_order_source string 订单来源,可见订单来源枚举,未在枚举中可传入原始字符串 Yes
trade_order_source_sequence string 订单来源流水号 Yes
goods_details List<GoodsDetail> 订单详情数据 No
expected_delivery_time long 时间戳,格式为 long,时区为 GMT+8,即距离 Epoch(1970年1月1日)以秒计算的时间(unix-timestamp) No
trade_order_id string 商流订单号(订单来源渠道的订单号) No

响应Body业务字段:

名称 类型 描述 必须
order_code string(64) 腾讯业务订单号 Yes
express_type int 跑腿类型,详细见枚举 Yes
delivery_time long 预计送达时间 No
delivery_distance int 配送距离,米 Yes
deliver_fee int 运费总价 Yes
total_fee int 实际支付金额 Yes
coupon_fee int 优惠金额 Yes