计算最优物流
<p><strong>简要描述:</strong>
1.所有接口都采用POST方式(包括查询接口)
2.请求和响应的数据都为JSON格式。注:请设置Header的Content-Type为application/json
3.采用UTF-8字符编码
4.所有请求都是raw方式使用的是纯字符串的数据上传方式,非Form-data的方式(也就是键值对)
5.签名算法
第一步:将参与签名的参数按照键值(key)进行字典排序(ascii表顺序)
第二步:将排序过后的参数,进行key和value字符串拼接
第三步:对签名字符串进行MD5加密,生成32位的字符串
第四步:将签名生成的32位字符串转换为大写</p>
<p><strong>请求URL:</strong></p>
<ul>
<li><code>https://order.toozan.cc/logistics/public/api/Modelselect/index</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST
<strong>请求参数说明:</strong>
|参数名 |必选|类型 |说明|
|fromplatform |是 |string | 小程序码 从我方获取
|token |是 |string | 验证token 从我方获取
|city |是 |string | 所在城市名
|weight |是 |string | 货物重量
|cargo_price |是 |string | 订单金额
|receiver_name |是 |string | 收货人姓名
|receiver_address |是 |string | 收货人地址
|receiver_phone |是 |string | 收货人手机号
|goods |是 |string | 货物名称
|token |是 |string | token
|sign |是 |string | 签名
|door_time |是 |string | 预约发单时间(预约时间unix时间戳(10位),精确到分;整10分钟为间隔,并且需要至少提前20分钟预约。)1为不预约
|mode_distribution|是 |string | 配送模式:1=推荐,2=最省钱,3=最快,4=其他 (暂时只支持最省钱,和最快,)</li>
</ul>
<p>|logistics |否 |string | 物流公司名称(有则指定该物流公司,没有则都发。现在只有‘闪送‘ 和‘达达’) |
|area_name |否 |string | 发货地区名(如浦东,本系统C端必填参数)
|true_name |否 |string | 发货人姓名(本系统C端必填参数)
|phone |否 |string | 发货人手机号(本系统C端必填参数)
|ship_address |否 |string | 发货人详细地址(本系统C端必填参数)
|openid |否 |string | openid(本系统C端必填参数)
|shop_no |否 |string | 门店编号(其他系统必填参数,我方获取)
|origin_id |否 |string |你方订单编号(其他系统必填参数)
|info |否 |string | 订单备注</p>
<p><strong>示例代码:</strong>
{
"fromplatform": "11111111",
"token": "111111111",
"city": "上海",
"weight": "1",
"cargo_price": "1",
"receiver_name": "杨文斌",
"receiver_address": "上海市嘉定区江桥万达9号写字楼",
"receiver_phone": "18942249050",
"info": "test",
"goods": "test",
"area_name": "浦东",
"true_name": "宋江",
"phone": "18942249050",
"ship_address": "上海市嘉定区江桥万达8号写字楼",
"openid": "1111",
"door_time": 1,
"mode_distribution": 2
"sign": "02D8C1286742B2EE8A8B06C5CE6E46C0"
}</p>
<p><strong>返回参数说明</strong></p>
<p>|参数名|类型|说明|</p>
<p>|msg |string |成功或错误消息 |
|code |int |0错误 1成功 |
|result |int |查询接口返回的数据 |</p>
<p><strong>返回成功实例</strong>
我方C端返回数据
{
"msg": "成功",
"code": 1,
"result": {
"logistics": "达达",
"fee": 3,
"stores": "XD1525769098145",
"origin_id": "CID15257715314584"
}
}</p>
<p>其他系统返回数据
{
"msg": "成功",
"code": 1,
"result": {
"logistics": "达达",
"fee": 3
}
}</p>
<p><strong>返回失败实例</strong>
{
"msg": "参数无效",
"code": 0,
"result": [
]
}</p>
<p><strong>result字段说明</strong>
|参数名|类型|说明|</p>
<p>|logistics |string |物流公司名称
|fee |float |运费
|stores |string |门店编号 (用于订单新增接口的shop_no)
|origin_id |string |订单号 (用于订单新增接口的origin_id)</p>
<p>欢迎使用ShowDoc!</p>