普通计价-车费预估

接口说明

  1. 获取普通计价业务的预估车费
  2. 可预估服务类型包括:即时、预约、接送机/站
  3. 返回结果中总金额和折后金额为浮点值
  4. 返回值中原价、车费预估价计算公式分别如下: 原价=套餐费+里程费+长途费+时长费+高速费+扩展价(动态加价、司机过节费、跨城费),对应计算字段如下: originalAmount=baseAmount+distanceAmount+longDistanceAmount+durationAmount+tollsAmount+extPriceInfo(dynamicDoublyAmount+costTypeAmount+crossCityFee) 车费预估价=原价-预计优惠金额,对应计算字段如下: actualAmount=originalAmount-couponAmount

接口地址

https:// <SQYC_DOMAIN>/carapi/partner/getFarePredictionV2

请求方式

POST

请求参数

名称 类型 是否必选 说明
serviceType int yes 服务类型id,参考服务类型对照表
bookingDate int yes 预定日期时间,10位秒级时间戳
cityId int yes 城市id
bookingStartPointLo string yes 上车坐标经度
bookingStartPointLa string yes 上车坐标纬度
bookingEndPointLo string yes 下车坐标经度
bookingEndPointLa string yes 下车坐标纬度
groups string yes 用车车型及数量,示例“34:1,35:1”
endPoiId string no B0FFFTQRTX(使用高德地图传此字段有效)
endPoiName string no 下车点名称
sign string yes 参考sign生成算法
channel string yes 渠道名称,由首汽提供
passingPoints List<Object> no 接入前联系研发配置
途经点:目前只支持两个途经点,
约定按照顺序先后确定第一个途经点与第二个途经点
List参数传递按照form形式:如下所示
第一个n=0,第二个途经点n=1 如:
passingPoints[0].bookingPassingLng

passingPoints请求参数

名称 类型 是否必选 说明
bookingPassingLng String yes 途经点经度如:"118.59252"
bookingPassingLat String yes 途经点纬度如:"24.800137"
bookingPassingPointAddr String yes 途经点地址如:"晋江机场航站楼"
bookingPassingPointShortAddr String no 途经点短地址:"航站楼"

返回数据

名称 类型 说明
result string 0:成功非0 :失败原因编号
errmsg string 失败原因描述,若成功则值为空
data FarePredictionV2DTO 车费预估信息,参见FarePredictionV2DTO

返回示例

{
    "result": "0",
    "errmsg": "SUCCESS",
    "data": {
        "amounts": [
            {
                "distance": "54.002",
                "groupId": "34",
                "actualAmount": "451.0",
                "longDistanceAmount": "104.76",
                "baseAmount": "2.0",
                "duration": "88.26",
                "couponAmount": "113.24",
                "tollsAmount": "0",
                "originalAmount": "564.24",
                "durationAmount": "168.0",
                "extPriceInfo": [
                    {
                        "name": "dynamicDoublyAmount",
                        "value": "184.51",
                        "desc": "动态加价金额"
                    },
                    {
                        "name": "crossCityFee",
                        "value": "184.51",
                        "desc": "跨城费"
                    },
                    {
                         "name": "costTypeAmount",
                         "value": "5.00",
                         "desc": "司机过节费"
                    }
                ],
                "priceToken": "0FE4BDB83F06FE6F03FD447324E447CD",
                "distanceAmount": "101.4",
                "emptyCarLevel1Num":1,
                "emptyCarLevel2Num":2,
                  "emptyCarLevel3Num":5
            }
        ]
    }
}
Copyright © 首约科技(北京)有限公司 2020 all right reserved,powered by Gitbook该文件修订时间: 2024-09-10 08:31:45

results matching ""

    No results matching ""