# 预估价格
# 简介
本接口用于获取行程预估价格信息。本接口返回内容包含estimate_id字段,该字段在下单接口使用,防止异常下单,并保证订单请求的时效性。
# 服务提供方
享道
# 接口URL
/openapi/order/estimateinfo
# 请求方式
POST
# 请求频次
单次
# 请求参数
参数名称 | 类型 | 必选 | 说明 |
---|---|---|---|
timestamp | long | 是 | 请求时间,Unix Timestamp单位毫秒 |
slon | double | 是 | 出发地经度,接机单非必传 |
slat | double | 是 | 出发地纬度,接机单非必传 |
sname | string | 是 | 出发地名称,接机单非必传 |
dlon | double | 是 | 目的地经度 |
dlat | double | 是 | 目的地纬度 |
dname | string | 是 | 目的地名称 |
flight_no | string | 否 | 航班号,接机单必传 |
flight_date | string | 否 | 航班起飞日期,格式yyyy-MM-dd,接机单必传 |
delay_time | int | 否 | 落地后多长时间用车,单位(S),接机单必传 |
aircode | string | 否 | 到达机场三字码,接机单必传 |
service_id | int | 是 | 服务类型,参见附录2 |
product_type | string | 否 | 产品类型,参见附录1,默认返回所有商定运力 |
ride_type | string | 否 | 运力类型,默认指定车型下所有商定运力,参见附录1 |
city_code | string | 是 | 城市code,默认为出发地所在城市code,参见附录6 |
departure_time | long | 是 | 出发时间,Unix timestamp,单位秒(S),默认为当前时间。以该字段作为用车时间预估价格。 |
order_id | string | 否 | 享道订单ID,修改目的地预估必传 |
estimate_type | int | 否 | 预估类型,修改目的地预估必传 estimate_type=1 |
current_lon | string | 否 | 当前位置经度,修改目的地预估必传 |
current_lat | string | 否 | 当前位置纬度,修改目的地预估必传 |
spoiid | string | 否 | 起点poiid |
dpoiid | string | 否 | 终点poiid |
price_type | int | 否 | 计价类型 0-实时计价 1-端内一口价 2-端外一口价 |
viaPoint | list | 否 | 途径点信息 |
viaPoint.lon | double | 是 | 地址经度 |
viaPoint.lat | double | 是 | 地址纬度 |
viaPoint.addressLong | string | 是 | 长地址 |
viaPoint.addressShort | string | 是 | 短地址 |
viaPoint.seq | int | 是 | 点位顺序 |
viaPoint.cityCode | string | 是 | 城市编码 |
changeType | int | 否 | 1添加途经点,2修改目的地,3同时修改途经点和目的地 |
multi_call | array | 否 | 多车级同时呼叫时使用,传递此字段时,ride_type字段必须为空,否则会按ride_type进行处理 |
multi_call[].ride_type | string | 是 | 多车级同时呼叫时使用,运力类型,参见附录1 |
multi_call[].price_type | string | 否 | 计价类型 0-实时计价 1-端内一口价 2-端外套餐一口价 3-端外预估一口价 |
# 响应参数
参数名称 | 类型 | 必有 | 说明 |
---|---|---|---|
errCode | int | 是 | 服务响应状态,参见附录5 |
errMsg | string | 是 | 服务响应状态说明,参见附录5 |
content | object | 是 | |
content.distance | int | 是 | 预估距离,单位米(m),不足1m,返回1 |
content.estimate_time | int | 是 | 预估时间,单位秒(S),不足60秒,返回60 |
content.prices | list | 是 | 运力预估价格信息列表 |
content.prices.product_type | string | 是 | 产品类型 |
content.prices.ride_type | string | 是 | 运力类型 |
content.prices.estimate_id | string | 是 | 预估标识,创建订单时使用,有效期10分钟 |
content.prices.estimate_price | int | 是 | 预估价格 |
content.prices.long_distance | int | 是 | 远途距离,单位米 |
content.prices.detail | list | 是 | 预估价格明细 |
content.prices.detail.description | string | 是 | 明细名称 |
content.prices.detail.amount | int | 是 | 明细金额 |
content.prices.detail.type | string | 是 | 明细类型 |
# 请求示例
请求
curl --location --request POST 'https://open-sit.saicmobility.com/merchant/v1/openapi/order/estimateinfo' \
--header 'X-Sign: 291595b571561a004dd9c387c608a62363b940bf' \
--header 'X-SignAlgorithm: 1' \
--header 'X-Timestamp: 20201021105700' \
--header 'X-MerchantId: open_app_OqPcV19dBV1KoBHs' \
--header 'Content-Type: application/json' \
--header 'Cookie: tgw_l7_route=e69a8b2c70d886177d45685f7ad428d3' \
--data-raw '{"timestamp":1603247504744,"slon":121.556136,"slat":31.203579,"dlon":121.45605244284734,"dlat":31.183222624165392,"city_code":"021","product_type":"private-car","ride_type":"compact","service_id":1}'
响应
{
"errCode": 10000,
"errMsg": "successful",
"content": {
"distance": 14299,
"estimate_time": 1567,
"prices": [
{
"product_type": "private-car",
"ride_type": "compact",
"estimate_id": "201021f40643586ad1418690e6b5593e16d0c901",
"dynamic_rate": 1.0,
"estimate_price": 4242,
"detail": [
{
"description": "起步费(含3.00公里/10.00分钟)",
"amount": 1500,
"type": "minFee"
},
{
"description": "超里程费 (11.30公里)",
"amount": 1130,
"type": "distanceFee"
},
{
"description": "超时长费 (16.12分钟)",
"amount": 1612,
"type": "routingFee"
}
],
"long_distance": 0
}
]
}
}