预估价格

说明

  1. 预估价格只是参考价格,最终支付费用,以实际产生费用为准

地址URL

/v1/common/Estimate/priceCoupon

支持格式

{url}?k1=v1&k2=v2&k3=v3&...

HTTP请求方式

GET

是否需要登录

是 关于登录授权,参见 如何登录授权

访问授权限制

暂无

请求参数

名称 类型 必选 描述
client_id string yes 申请应用时分配的APP_KEY
access_token string yes 乘客认证信息
timestamp int yes 时间戳
flat float yes 出发地纬度
flng float yes 出发地经度
tlat float yes 目的地纬度
tlng float yes 目的地经度
map_type enum no 地图类型,暂只支持soso
require_level string yes 车型代码,详情见:订单状态定义
rule int yes 计价模型分类,201(专车);301(快车);203(专车接机);204(专车送机)
city int yes 出发城市id(城市车型接口返回)
type int yes 0:实时单 1:预约单
passenger_phone string yes 乘客手机号
departure_time datetime no 预约单必须传(格式例如:2015-06-16 12:00:09)
sign string yes 签名
pricing_mode int no 计价模式:0-普通计价 1-一口价 默认为0

rule为203和204时,require_level只能为100、200和400,若传其他值,返回参数错误提示:“require_level错误,接送机订单目前只支持专车舒适(100)、专车商务(400)、豪华型(200)”

注意事项

sign签名请参照 签名算法

请求示例

curl -X GET -H "Content-Type: application/x-www-form-urlencoded" 'https://api.es.xiaojukeji.com/v1/common/Estimate/priceCoupon?client_id=testclient&access_token=test&timestamp=1533914354&flat=40.044648&flng=116.321149&tlat=40.039534&tlng=116.323408&city=1&departure_time=2015-06-15%2012:00:09&sign=test&rule=201&require_level=100&type=1'

返回参数说明

返回字段 字段类型 字段说明
errno int 错误码
errmsg string 错误信息
data object
name string 单车类型名称
code int 单车类型的对应码(100舒适型,400六座商务, 200行政级, 600普通快车,900优享快车)
price float 总价格(包含dynamic_price) 单位:元
dynamic_price float 动调溢价 单位:元
dynamic_md5 string 价格md5
price_tip string 价格提示
start_price float 起步价格 单位:元
normal_unit_price float 每公里单价 单位:元

返回示例

{
  "errno": 0,
  "errmsg": "SUCCESS",
  "data": {
    "600": {
      "name": "快车型",
      "code": "600",
      "price": 134.2,
      "dynamic_price": 91,
      "dynamic_md5": "1c94d686828bb8cdd22207f51f515741",
      "price_tip": "需求过旺临时调价{3.1倍}",
      "start_price": 0,
      "normal_unit_price": 1.5
    }
  }
}

results matching ""

    No results matching ""