获取预估价格
说明
- 获取预估价格
地址URL
http:// <hqzx_DOMAIN>/v2/channel/open/order/getEstimateFee
HTTP请求方式
POST
访问授权限制
需要验签,参见:鉴权说明
注意事项
1、服务类型 参见:服务类型
2、预定车型 参见:车型类别
3、经纬度默认高德经纬度
请求参数
名称 | 类型 | 是否必选 | 说明 |
---|---|---|---|
cityId | int | yes | 城市ID |
serviceTypeId | int | yes | 服务类型,参见:服务类型 |
carGroupIds | String | yes | 车型ID,支持多个,用逗号分隔,参见:车辆类型 |
bookingStartPoint | String | yes | 预定起点经纬度(默认高德,精确小数点后6位) |
bookingStartAddr | String | no | 预定起点地址 |
bookingEndPoint | String | yes | 预定结束经纬度(默认高德,精确小数点后6位) |
bookingEndAddr | String | no | 预定结束地址 |
bookingDate | Long | yes | 预定时间(时间戳,毫秒级,13位) |
请求示例
curl
-H "accept:application/json;charset=utf-8"
-H "Content-Type:application/json"
-H "channel:XXX" -H "sign:XXX"
-X POST '参见请求地址URL'
-d
'
{
"cityId": 44,
"serviceTypeId": 1,
"carGroupIds": "34",
"bookingDate": 1582959639000,
"bookingStartPoint": "119.123123, 30.123123",
"bookingEndPoint": "119.123123, 30.123123"
}
'
返回结构说明
参见:接口说明
返回结果说明
名称 | 类型 | 说明 |
---|---|---|
estimatedId | String | 预估ID |
serviceTypeId | int | 服务类型,参见:服务类型 |
serviceTypeName | String | 服务名称 |
carGroupId | int | 车型ID |
carGroupName | String | 车型名称 |
distance | Double | 里程(公里) |
duration | int | 时长(分钟) |
totalAmount | Double | 总金额(元) |
discountAmount | Double | 折扣后金额(元) |
返回示例
{
"code": 1,
"msg": "SUCCESS",
"data": [
{
"estimatedId": "1231",
"serviceTypeId": 1,
"serviceTypeName": "即时用车",
"carGroupId": 34,
"carGroupName": "专享",
"distance": 3.5,
"duration": 18,
"totalAmount": 20,
"discountAmount": 16
}
]
}