# EV smart routing · v2.0

> API reference: [`POST /2.0/evsmartrouting`](https://benomad.com/dev/doc/bemap-api/api/electric-mobility/evsmartrouting-v2-0.md)

<span class="float-right shadow">![Illustration of near POI service](https://benomad.com/dev/doc/bemap-api/guides/images/evsmartrouting-service-map.jpg)</span>

<p class="eyebrow">REST API, Service version 2.0.0</p>

# EV smart routing · v2.0

## EV Smart Routing service
Performs a route calculation dedicated to electric vehicles. If the autonomy of the vehicle is not sufficient to reach final destination, this service returns a route which includes deviations through charging stations (aka step points). If the optimization criteria is fastest the calculated route optimizes the overall time (driving + charging) to reach the final destination.

### Request
The request must be sent with the HTTP method `POST` and the HTTP header `Content-Type` set to `application/json`.

**Sample:**

End-point URI: `/bgis/service/2.0/evsmartrouting`.

HTTP header: `Content-Type: application/json`.

POST data:
```javascript
{
  "geoserver": "here",
  "csps": [
    "gireve"
  ],
  "vehicle": {
    "initBatLvl": 70,
    "key": "06b5c02d-ba2e-4b14-8b2b-6d793aac0da0",
    "payload": 75
  },
  "start": {
    "lon": 2.3414,
    "lat": 48.85717
  },
  "stop": {
    "lon": 3.569,
    "lat": 47.79602
  },
  "condition": {
    "minBatLvl": 10,
    "minArrivalBatLvl": 15,
    "temperature": 20,
    "currency": "EUR",
    "encodedGeometry": true,
    "departureTime": 1704905400000,
    "chargePluggingTime": 300
  }
}
```

All coordinates are defined by longitude and latitude, see the [coordinate system](https://benomad.com/dev/doc/bemap-api/guides/reference/glossary-coordinate-system.md) glossary for more details.

#### __Parameters__

- `vehicle` (Vehicle, required): Vehicle model (UUID key).
  - `key` (string, required): The vehicle's UUID key. You can fin the UUID key in the API Vehicles.
  - `initBatLvl` (number (float)): Initial battery level in percent. Available value 0 to 100. Default value 100.
  - `payload` (integer (int32)): Vehicle's payload in kg (i.e: passengers, luggage and consumables weight). 75 kg by default.
  - `feature` (VehicleFeatureFront): Vehicle features is used to set the information about the vehicle.
    - `height` (integer (int32)): Height of vehicle in centimeters. Affects route calculation. Physical restriction.
    - `width` (integer (int32)): Width of vehicle in centimeters. Affects route calculation. Physical restriction.
    - `length` (integer (int32)): Length of vehicle in centimeters. Affects route calculation. Physical restriction.
    - `weight` (integer (int32)): Weight of vehicle in tens of metric tons, i.e.: `35` = 3.5t. Affects route calculation. Legal and physical restrictions.
    - `axleWeight` (integer (int32)): Axle weight in tens of metric tons, i.e.: `12` = 1.2t. Affects route calculation. Legal and physical restrictions.
    - `hazardousMaterials` (enum): Hazardous materials carried by the vehicle. Affects route calculation. Legal restriction.
      - `NONE`: No hazardous material.
      - `ALL`: General hazardous materials.
      - `EXPLOSIVE`: Trucks with Explosive and Flammable Goods.
      - `WATER`: Trucks with Goods Harmful for Water.
      - `US_CORROSIVE`: USA only : Corrosive materials (e.g., hydrochloric acid, sulfuric acid, mercury, sodium hydroxide).
      - `US_EXPLOSIVES`: USA only : Explosives (e.g., TNT, ammunition, flares, fireworks).
      - `US_FLAM`: USA only : Flammable and combustible liquids (e.g., jet fuel, gasoline, fuel oil, alcohols).
      - `US_FLAM_SOL`: USA only : Flammable solids, spontaneously combustible materials and water reactive substances (e.g., matches, white phosphorus, potassium).
      - `US_GAS`: USA only : Flammable, compressed and poisonous gases (e.g., propane, compressed oxygen, chlorine).
      - `US_ORGANIC`: USA only : Oxidizers and organic peroxides (e.g., ammonium nitrate and benzoyl peroxide).
      - `US_OTHER`: USA only : Miscellaneous hazardous materials (e.g., asbestos, dry ice, lithium batteries).
      - `US_PIH`: USA only : Poisonous inhalation hazards (PIH).
      - `US_POISON`: USA only : Poisonous (toxic) and infectious substances (e.g., cyanide, most mercury-based compounds, viruses, toxins and regulated medical waste).
      - `US_RADIO_ACTIVE`: USA only : Radioactive materials (e.g., plutonium-239 and uranium-235).
      - `TUNNEL_CAT_B`: Tunnel Category B.
      - `TUNNEL_CAT_B1000C`: Tunnel Category B1000C.
      - `TUNNEL_CAT_BD`: Tunnel Category B/D.
      - `TUNNEL_CAT_BE`: Tunnel Category B/E.
      - `TUNNEL_CAT_C`: Tunnel Category C.
      - `TUNNEL_CAT_C5000D`: Tunnel Category C5000D.
      - `TUNNEL_CAT_CD`: Tunnel Category C/D.
      - `TUNNEL_CAT_CE`: Tunnel Category C/E.
      - `TUNNEL_CAT_D`: Tunnel Category D.
      - `TUNNEL_CAT_DE`: Tunnel Category D/E.
      - `TUNNEL_CAT_E`: Tunnel Category E.
    - `nbTrailer` (integer (int32)): Vehicle's number of trailers (`-1`: not defined, `0`: no trailer). Affects route calculation. Legal restriction.
    - `tollTransportCategory` (enum): Defines the toll vehicle category. Affects toll calculation. `UNDEFINED` by default.
      - `UNDEFINED`: Undefined.
      - `MOTORCYCLE`: Motorcycle.
      - `AUTO`: Automobile.
      - `TRUCK`: Truck.
      - `MOTOR_HOME`: Motor home.
      - `MINIBUS`: Mini bus.
      - `BUS`: Bus.
      - `SIDECAR`: Sidecar (EU only).
      - `TRICYCLE`: Tricycle (EU only).
      - `DLV_TRUCK`: Delivery truck (EU only).
      - `SNOWMOBILE`: Snowmobile (US only).
      - `PICK_UP`: Pick up (US only).
      - `TRACTOR`: Tractor (US only).
    - `caravan` (enum): Defines if the vehicle has a caravan. Affects toll calculation. `UNDEFINED` by default.
      - `UNDEFINED`: Undefined.
      - `YES`: Yes.
      - `NO`: No.
    - `hybrid` (enum): Defines if vehicle has a hybrid engine. Affects toll calculation. `UNDEFINED` by default.
      - `UNDEFINED`: Undefined.
      - `YES`: Yes.
      - `NO`: No.
    - `disEquipped` (enum): Defines if vehicle is equipped for disabled people. Affects toll calculation. `UNDEFINED` by default.
      - `UNDEFINED`: Undefined.
      - `YES`: Yes.
      - `NO`: No.
    - `pollMin` (enum): Defines if vehicle has minimal pollution. Affects toll calculation. `UNDEFINED` by default.
      - `UNDEFINED`: Undefined.
      - `YES`: Yes.
      - `NO`: No.
    - `hov` (enum): Defines if vehicle is a High Occupancy Vehicle (USA only). See [Wikipedia: High-occupancy vehicle lane](http://en.wikipedia.org/wiki/High-occupancy_vehicle_lane). Affects toll calculation. `UNDEFINED` by default.
      - `UNDEFINED`: Undefined.
      - `YES`: Yes.
      - `NO`: No.
    - `cial` (enum): Defines if vehicle is a commercial vehicle. Affects toll calculation. `UNDEFINED` by default.
      - `UNDEFINED`: Undefined.
      - `YES`: Yes.
      - `NO`: No.
    - `nbVehAxles` (integer (int32)): Defines the number of axles of the vehicle (optional). Affects toll calculation.
    - `nbTrailAxles` (integer (int32)): Defines the number of axles of the trailer (optional). Affects toll calculation.
    - `nbTires` (integer (int32)): Defines the number of tires (optional). Affects toll calculation.
    - `nbPassengers` (integer (int32)): Defines the number of passengers (optional). Affects toll calculation.
    - `vehHeight` (integer (int32)): Defines vehicle's height in centimeters (optional, use field `height` to define total height : vehicle + trailer). Affects toll calculation.
    - `trailHeight` (integer (int32)): Defines trailer's height in centimeters (optional, use field `height` to define total height : vehicle + trailer). Affects toll calculation.
    - `vehWeight` (integer (int32)): Defines vehicle's weight in tens of tons (optional, use field `weight` to define total weight : vehicle + trailer). Affects toll calculation.
    - `emissionClass` (enum): Defines vehicle's emission type (optional). See [Wikipedia: European emission standards](http://en.wikipedia.org/wiki/European_emission_standards). Affects toll calculation.
      - `UNDEFINED`: Undefined.
      - `EURO1`: EURO I.
      - `EURO2`: EURO II.
      - `EURO3`: EURO III.
      - `EURO4`: EURO IV.
      - `EURO5`: EURO V.
      - `EURO6`: EURO VI.
      - `EURO_EEV`: EURO EEV.
      - `ELECTRIC`: EURO Electric.
      - `EURO0`: EURO 0
      - `EURO2_PRC`: EURO II with PRC (Particle Reduction Composite/System)
      - `EURO3_PRC`: EURO III with PRC (Particle Reduction Composite/System)
      - `EURO6_CO2_1`: EURO VI CO2 1
      - `EURO6_CO2_2`: EURO VI CO2 2
      - `EURO6_CO2_3`: EURO VI CO2 3
      - `EURO6_CO2_4`: EURO VI CO2 4
      - `EURO6_CO2_5`: EURO VI CO2 5
      - `MAX`: Maximal value.
    - `adrTunnelCategory` (enum): ADR tunnel category defines all supported ADR (EU only, European Agreement concerning the International Carriage of Dangerous Goods by Road). Affects route calculation.
      - `NONE`: No tunnel category restriction (category A).
      - `CAT_B`: Tunnel Category B.
      - `CAT_C`: Tunnel Category C.
      - `CAT_D`: Tunnel Category D.
      - `CAT_E`: Tunnel Category E.
    - `onlyPhysical` (boolean): Defines if vehicle's weight (weight, weight per axle and trailers) and hazardous materials (hazardous materials and ADR) should be ignored outside respectively bridges and tunnels. `false` by default. Affects route calculation.
- `start` (Place, required): Departure coordinates (start point).
  - `lon` (number (double), required): Longitude in degrees decimal ([WGS84](https://benomad.com/dev/doc/bemap-api/guides/reference/glossary-coordinate-system.md)).
  - `lat` (number (double), required): Latitude in degrees decimal ([WGS84](https://benomad.com/dev/doc/bemap-api/guides/reference/glossary-coordinate-system.md)).
  - `alt` (number (double)): Altitude in meters.
  - `heading` (number (double)): Heading angle in degrees (optional). For BeNomad engine: If the angle is not available, set this field and speed field to 0.
  - `speed` (number (float)): Speed in km/h (optional). For BeNomad engine: Use this field only if the heading is available.
  - `time` (integer (int64)): GPS time in milliseconds.
  - `sat` (integer (int32)): Number of satellites available.
  - `radius` (integer (int32)): Radius in meters around the coordinate. This radius defines the maximum distance the route calculation should approach the coordinate.
  - `ignorePoint` (boolean): Defines if this coordinate is ignored by the route calculation. `false` by default.
  - `ignoreTrafficDirections` (boolean): Defines if traffic directions should be ignored by route calculation between this waypoint and the next one. `false` by default.
  - `ignoreRestrictions` (boolean): Defines if forbidden maneuvers and blocked passages should be ignored by route calculation between this coordinate and the next one. `false` by default.
  - `avoidUTurn` (boolean): Defines if a UTurn should be avoided by route calculation on this coordinate. Not defined by default.
  - `useStartAngle` (boolean): If set to `true` and coordinate is located on a two-way road and heading is defined, coordinate's heading will be used as a general direction for departure from this coordinate. See the `heading` parameter. Not defined by default.
  - `useStopRoadSide` (boolean): Defines if route calculation must arrive on this coordinate on its side (if coordinate is on a two-way road). Not defined by default.
- `stop` (Place, required): Arrival coordinates (stop point).
  - `lon` (number (double), required): Longitude in degrees decimal ([WGS84](https://benomad.com/dev/doc/bemap-api/guides/reference/glossary-coordinate-system.md)).
  - `lat` (number (double), required): Latitude in degrees decimal ([WGS84](https://benomad.com/dev/doc/bemap-api/guides/reference/glossary-coordinate-system.md)).
  - `alt` (number (double)): Altitude in meters.
  - `heading` (number (double)): Heading angle in degrees (optional). For BeNomad engine: If the angle is not available, set this field and speed field to 0.
  - `speed` (number (float)): Speed in km/h (optional). For BeNomad engine: Use this field only if the heading is available.
  - `time` (integer (int64)): GPS time in milliseconds.
  - `sat` (integer (int32)): Number of satellites available.
  - `radius` (integer (int32)): Radius in meters around the coordinate. This radius defines the maximum distance the route calculation should approach the coordinate.
  - `ignorePoint` (boolean): Defines if this coordinate is ignored by the route calculation. `false` by default.
  - `ignoreTrafficDirections` (boolean): Defines if traffic directions should be ignored by route calculation between this waypoint and the next one. `false` by default.
  - `ignoreRestrictions` (boolean): Defines if forbidden maneuvers and blocked passages should be ignored by route calculation between this coordinate and the next one. `false` by default.
  - `avoidUTurn` (boolean): Defines if a UTurn should be avoided by route calculation on this coordinate. Not defined by default.
  - `useStartAngle` (boolean): If set to `true` and coordinate is located on a two-way road and heading is defined, coordinate's heading will be used as a general direction for departure from this coordinate. See the `heading` parameter. Not defined by default.
  - `useStopRoadSide` (boolean): Defines if route calculation must arrive on this coordinate on its side (if coordinate is on a two-way road). Not defined by default.
- `geoserver` (string): Geoserver name.
- `swidx` (integer (int32)): Switch index.
- `csps` (string[]): List of charging station provider names.
- `csfsVersion` (base64 string): Represents the version of the filtering logic used in the charging station search query. This field determines which filtering implementation or algorithm is applied during processing. The default is 1.  The available values are: 1, 2.
- `csfs` (string[]): List of charging station filter, return only the points matching the filters. [Documentation of available filters](https://benomad.com/dev/doc/bemap-api/guides/reference/chargingstation-filter-v1.md).
- `tariffChargePassHashIds` (string[]): List of eligible charge pass hash IDs (retrieved from the Charge Pass Service). The backend will select the applicable charge pass based on station, provider, and tariff compatibility to propose the lowest cost for a charge. The effectively applied charge pass is returned in `chargingCost` section.
- `condition` (Condition): Condition of trip, that contains the options and settings parameters like weather, battery levels, etc.
  - `optimMode` (enum): Optimization mode.
    - `FASTEST`: Find the route which optimizes travel time. Default value.
    - `SHORTEST`: Find the route which optimizes travel distance.
    - `ECO_ENERGY`: Find the route which optimizes travel energy consumption.
  - `criterias` (enum[]): The EV's list of criterias.
    - `AVOID_FERRIES`: Find a route with no ferry.
    - `AVOID_MOTORWAYS`: Find a route without motorways.
    - `AVOID_TOLLS`: Find a route with no toll.
    - `AVOID_UNPAVED`: Find a route with no unpaved roads.
    - `AVOID_CROSSING_BORDER`: Find a route without country border crossing (makes sence only when the start and stop points are in the same country).
    - `LESS_EXPENSIVE`: Find the less expensive charging stations. Only with algorithm v2. Deprecated.
    - `TRAFFIC`: Use traffic info for route calculation.
  - `alternative` (base64 string): Index of alternative route. 0 to disable. 0 by default.
  - `startUTurnThreshold` (integer (int32)): Specifies the start UTurn threshold. This value determines, at start point or any via point for which a use start angle / avoid UTurn property is set, the threshold (in 1/10th seconds / meters / Wh in resp. FASTEST / SHORTEST / ECO mode) above which the property may be ignored (default = 3000). For instance, in SHORTEST mode, if the route from start to stop leaving start point in the desired direction is more than `startUTurnThreshold` meters longer than the route from start to stop leaving start point in the opposite direction, leave the start point in the opposite direction.
  - `departureTime` (string): This parameter is an EPOCH time stamp in milliseconds (UTC) or can take an string with ISO local date time format like '2011-12-03T10:15:30', '2011-12-03T10:15:30+01:00' or '2011-12-03T10:15:30+01:00[Europe/Paris]'. It is used to define the date and time of routing departure.
  - `temperature` (integer (int32)): Temperature in Celsius. Not used if weather is enabled. 20 by default.
  - `minBatLvl` (number (float)): Minimal battery level during the journey. This value is in percent. Available value 0 to 100.
  - `minArrivalBatLvl` (number (float)): Minimal battery level at destination. This value is in percent. Available value 0 to 100. The value of `minArrivalBatLvl` must be superior or equals to the value of `minBatLvl`. If the value of `minArrivalBatLvl` is lower than `minBatLvl`, the value of `minBatLvl` will be used instead of `minArrivalBatLvl`.
  - `maxAfterChargeBatLvl` (number (float)): Maximal battery level after a charge. This value is in percent. Available value 0 to 100.
  - `connectorTypes` (integer (int32)[]): List of connector type ID, used to perform a filtration based on those connector.
  - `chargingStationDeprecatedConnector` (boolean): Set to true to enable the support of charging station deprecated connector types. False by default.
  - `chargePluggingTime` (integer (int32)): Defines the fixed additional time in seconds for each charging stop. 300 by default.
  - `chargeTimeSlots` (ChargeTimeSlot[]): List of step-point time slots. Note: If forced charges are defined, they take priority over charge times.
    - `duration` (integer (int32), required): Stop duration in seconds.
    - `startDateTime` (string): Start local date time in text format ISO YYYY-MM-DDThh:mm:ss (eg: 2020-09-08T12:28:00).
    - `stopDateTime` (string): Stop local date time in text format ISO YYYY-MM-DDThh:mm:ss (eg: 2020-09-08T12:28:00).
    - `serviceCategory` (string): Service category. Semantics:<br/>- !: not (unary).<br/>- &verbar;: or (binary).<br/>- &amp;: and (binary).<br/>- (: open section.<br/>- ): close section.<br/>- any numeric value.<br/>Example: (7315&verbar;9105)&amp;!7395<br/>See the [Class ID list](https://benomad.com/dev/doc/bemap-api/guides/reference/sdk-jsiv-classids.md) in Glossary menu.
    - `maxWalkingDistance` (integer (int32)): Maximum walking distance in meters to the service(s) POI. Value range [50, 1000] between the step point and the service(s). 1000 meters by default.
  - `restrictedEvse` (boolean): Accept the restricted charging stations.
  - `allowNaStatus` (boolean): Allow use of pools with NA availability status. False by default.
  - `ignoreAvailableStatus` (boolean): Allow use of any pool regardless of availability status. False by default.
  - `drivingStyle` (DrivingStyle): Driving style definition for an electric vehicle.
    - `mode` (enum, required): Define the driving mode.
      - `ECO`: Reduce the acceleration/deceleration, auxiliary consumption and prefer the national road over the high-ways.
      - `NORMAL`: Use the speed limitation in vehicles database.
      - `SPORT`: No speed limitation (only the legal speed limit of roads). Increase the acceleration/deceleration. Prefer the high-ways.
      - `CUSTOM`: Allow to override ponderation parameters.
    - `allowOverVehSpdLim` (boolean): Allows to define a maximum speed above the vehicle's maximum speed defined in the vehicle's database.
    - `limitMaxSpeed` (integer (int32)): Defines vehicle's maximum speed in km/h used during the routing calculation. By default `null`. If `null`, uses the maximum speed defined in the vehicle's database. Note that if the speed is greater than the one defined in the database, it will be bounded by the later except if you activate the parameter `allowOverVehSpdLim`.
    - `maxAcc` (number (double)): Average vehicle's acceleration in m/s². Must be > 0. For example: 1.25 m/s².
    - `maxDec` (number (double)): Average vehicle's deceleration in m/s². Must be < 0. For example: -1.25 m/s².
    - `sps` (SpeedPonderationFront[]): Speed weight coefficient for the specified road network level. A value < 1 will reduce speeds. A value > 1 will increase speeds.
      - `factor` (number (float), required): Specifies a new ponderation factor for speeds (Default = 1). A value under 0 to reduce the speed, i.g: 0.8. A value upper to 1 for increase the speed, i.g: 1.3.
      - `level` (integer (int32), required): Road network level (0: all 4 levels, 1: main level, 2: secondary level, 3: third level, 4: fourth level).
      - `roadType` (enum): Define the road type.
        - `ALL`: All road network.
        - `DEFAULT`: Default.
        - `FERRY`: Ferries way.
        - `MOTORWAY`: Motor-way.
        - `PEDESTRIAN`: Pedestrian.
        - `ROUNDABOUNT`: Roundabout.
        - `SLIPROAD`: Slip road.
      - `pondType` (enum): Define the ponderation type.
        - `ALL`: Speed coefficient applies both for finding the fastest route and calculating its ETA. Default value.
        - `CAL`: Speed coefficient applies only searching for the fastest route.
        - `ETA`: Speed coefficient applies only for calculating route's travel time (ETA).
  - `allowMaxSpeedRecommendation` (boolean): Allow to calculate the maximum speeds to reach destination or step-point. Since algorithm v3.
  - `routesheet` (boolean): Enable the route-sheet.
  - `routesheetLanguage` (string): Define the language that will be used to render the text of route-sheet.
  - `routesheetMode` (enum): Define the output mode of route-sheet: only text, only details and both. `TEXT` by default.
    - `TEXT`: Render only the text information.
    - `DETAILS`: Render only the detailed information in separated fields.
    - `TEXT_DETAILS`: Render both text and details information.
  - `routesheetVerboseLevel` (enum): Select the information details level of route-sheet.
    - `LOW`: Low verbosity, the minimal information about the route-sheet instruction will be returned.
    - `MEDIUM`: Medium verbosity, the normal information about the route-sheet instruction will be returned.
    - `HIGH`: High verbosity, the maximum details information about the route-sheet instruction will be returned.
  - `geometry` (boolean): Set to true to enable the polyline otherwise set to false. True by default.
  - `encodedGeometry` (boolean): Set to true to enable the encoded polyline. False by default.
  - `co2emissions` (boolean): If set to true CO2 emissions will be calculated in the journey, set to false by default.
  - `weather` (boolean): Enable the weather information.
  - `weatherProvider` (string): Define the weather provider.
  - `currency` (string): Define the currency used for costs calculation. Currency ISO 4217 Code.
  - `routeDetails` (boolean): Set to true to enable the route events detailed information like consumption, speed, altitude, etc. False by default. See the `RouteConsumptionFront` class for more details about the returned values.
  - `routeDetailsFreq` (integer (int32)): Frequency in seconds of route event. 60 seconds by default which is also the minimal authorized value.
  - `tollCost` (boolean): Set to true to enable the toll cost calculation and toll events along the route. False by default.
- `vias` (Via[]): List of via places.
  - `lon` (number (double), required): Longitude in degrees decimal ([WGS84](https://benomad.com/dev/doc/bemap-api/guides/reference/glossary-coordinate-system.md)).
  - `lat` (number (double), required): Latitude in degrees decimal ([WGS84](https://benomad.com/dev/doc/bemap-api/guides/reference/glossary-coordinate-system.md)).
  - `alt` (number (double)): Altitude in meters.
  - `heading` (number (double)): Heading angle in degrees (optional). For BeNomad engine: If the angle is not available, set this field and speed field to 0.
  - `speed` (number (float)): Speed in km/h (optional). For BeNomad engine: Use this field only if the heading is available.
  - `time` (integer (int64)): GPS time in milliseconds.
  - `sat` (integer (int32)): Number of satellites available.
  - `radius` (integer (int32)): Radius in meters around the coordinate. This radius defines the maximum distance the route calculation should approach the coordinate.
  - `ignorePoint` (boolean): Defines if this coordinate is ignored by the route calculation. `false` by default.
  - `ignoreTrafficDirections` (boolean): Defines if traffic directions should be ignored by route calculation between this waypoint and the next one. `false` by default.
  - `ignoreRestrictions` (boolean): Defines if forbidden maneuvers and blocked passages should be ignored by route calculation between this coordinate and the next one. `false` by default.
  - `avoidUTurn` (boolean): Defines if a UTurn should be avoided by route calculation on this coordinate. Not defined by default.
  - `useStartAngle` (boolean): If set to `true` and coordinate is located on a two-way road and heading is defined, coordinate's heading will be used as a general direction for departure from this coordinate. See the `heading` parameter. Not defined by default.
  - `useStopRoadSide` (boolean): Defines if route calculation must arrive on this coordinate on its side (if coordinate is on a two-way road). Not defined by default.
  - `stopDuration` (integer (int32)): Stop duration in seconds associated to the destination coordinate. By default `0`. Note: if charging times are defined. Forced charges take priority over charge times. Note: only about forced charge, stop duration could be linked chargeMaxDist in case of forced charge. To ensure that charge duration is superior to stopDuration + FixedStopTime in EV Smart Routing, the stop duration used is min(stopDuration, KB_MIN_CHARGE_DURATION + FixedStopTime). However the original value stopDuration is not modified.
  - `chargeMaxDistance` (integer (int32)): This parameter should be defined to impose a charge around this destination. It defines the maximum walking distance 3000 meters a charge point can be from this destination to force a charge (0 means no charge forced). By default `0`. NOTE: If you combine this parameter with the `stopDuration` parameter it will define how much time can be used for charging.
  - `transportType` (enum): Transport type associated to the destination coordinate. Useful for discriminating between passenger car, taxi and emergency.
    - `PEDESTRIAN`: Pedestrian.
    - `BICYCLE`: Bicycle.
    - `MOTORCYCLE`: Motorcycle.
    - `CAR`: Passenger car, tourist car.
    - `TAXI`: Taxi.
    - `PUBLIC_BUS`: Public bus.
    - `EMERGENCY`: Emergency vehicle.
    - `DELIVERY_TRUCK`: Delivery truck.
    - `TRUCK`: Truck.
  - `maxSpeed` (integer (int32)): Maximum Speed in km/h associated to this destination coordinate. If not 0 this will force routing calculation to bound all driving speeds between this destination and the next one. If 0 the global maximum speed will be used if defined. By default `0`.
  - `ignoreVehicleProfile` (boolean): Ignore vehicle profile status.

To get the complete list of available connector types, see the [Charging station connector service](https://benomad.com/dev/doc/bemap-api/guides/services/chargingstation-connector.md).

See the [Currency Codes](https://benomad.com/dev/doc/bemap-api/guides/services/currency-codes.md) service to get the available codes.

### Response

#### Details of fields

- `journeys` (Journey[], required): Describes the whole itinerary which can be composed of multiple journeys.
  - `summary` (Summary, required): Summary of journey information.
    - `vehicleInfo` (VehicleInfoV2, required): Vehicle information used to compute the journey.
      - `brand` (string, required): Brand name.
      - `name` (string, required): Model name of vehicle.
      - `variant` (string): Variant of model.
      - `year` (string): Year of vehicle model.
    - `distance` (integer (int64), required): Distance: sum of distance, in meters.
    - `duration` (integer (int64), required): Duration: sum of duration, in seconds.
    - `batteryLevel` (number (double), required): Remaining battery level (in percentage) at the end of the trip.
    - `consumed` (number (double), required): Sum of consumed values in kWh.
    - `chargingTime` (integer (int64), required): Sum of charging time in seconds.
    - `departureTime` (integer (int64), required): Departure time in milliseconds.
    - `arrivalTime` (integer (int64), required): Arrival time in milliseconds.
    - `boundingBox` (BoundingBoxFront, required): The rectangle that encompasses the entire trip, defined by four coordinates.
      - `minLon` (number (double)): Minimum longitude, in degrees decimal ([WGS84](https://benomad.com/dev/doc/bemap-api/guides/reference/glossary-coordinate-system.md)).
      - `minLat` (number (double)): Minimum latitude, in degrees decimal ([WGS84](https://benomad.com/dev/doc/bemap-api/guides/reference/glossary-coordinate-system.md)).
      - `maxLon` (number (double)): Maximum longitude, in degrees decimal ([WGS84](https://benomad.com/dev/doc/bemap-api/guides/reference/glossary-coordinate-system.md)).
      - `maxLat` (number (double)): Maximum latitude, in degrees decimal ([WGS84](https://benomad.com/dev/doc/bemap-api/guides/reference/glossary-coordinate-system.md)).
    - `savedCo2Emissions` (number (float)): Saved CO2 Emissions (kg). This value is calculated from the amount of energy consumed for this journey using the profile of an ICE vehicle similar to the selected electric vehicle.
    - `chargingCost` (ChargingCostFront): Sum of charging cost.
      - `currency` (string): Currency ISO 4217 Code.
      - `withoutVat` (number (float)): Price without VAT.
      - `includeVat` (number (float)): Price include VAT.
      - `tariffChargePassHashId` (string): Represents the hashed identifier for tariff charge passes that used to calculate the cost.
    - `tollSumFees` (TollSumFeesFront): Sum of toll cost.
      - `currency` (string): Currency in norm ISO 4217, more details on Wikipedia ISO 4217 https://en.wikipedia.org/wiki/ISO_4217.
      - `feeMin` (number (double)): The minimum fee.
      - `feeMax` (number (double)): The maximum fee.
  - `events` (Event[], required): Describes all information along the computed journey.
    - `eventType` (enum, required): The event's type.
      - `START`: Start point, event contains information about the start location of trip.
      - `STOP`: Stop point, event contains information about the stop location of trip.
      - `VIA`: Via point, event contains information about the way-point location of trip.
      - `CHARGE`: Charge step, event contains information about the charge step location of trip.
      - `ROUTE`: Route, that represent the route information about part of trip.
      - `TOLL`: Toll along the journey.
      - `EXCEPTION`: Exception event can show the information about a error on the API conversion between backend and frontend.
      - `NOT_SUPPORTED_ENUM`: The event type is not supported by this API version, please check if a newer API is already released.
  - `timeSlotWarns` (TimeSlotWarning[]): List of warnings about the time slots request.
    - `statusCode` (string, required): Code of the time slot status. Available codes:<br/> - `TSS_UNINITIALIZED`: Time slot status uninitialized.<br/>- `TSS_NO_POOL_FOUND`: No pool found during this time slot (default value before EVRoute computation).<br/>- `TSS_NO_POOL_FOUND_WITH_SERVICE`: No pool found with the requested services.<br/>- `TSS_NOT_SELECTED_TOO_MUCH_ENERGY_NEEDED`: Too much additional energy needed to reach pools during this time slot.<br/>- `TSS_NOT_SELECTED_OPENING_TIME`: Opening Time are incorrect for pools found during these time slot.<br/>- `TSS_NOT_SELECTED`: Route with the pools found during this time slot validate less time slot that this current itinerary OR charge during time slot is useless.<br/>- `TSS_IGNORED_DEPARTURE_DATE_TIME_NOT_SET`: Time slot ignored: Departure date and time is not set.<br/>- `TSS_IGNORED_END_BEFORE_DEPARTURE`: Time slot ignored: Time slot end is before route departure OR stop duration implied to stop before route departure.<br/>- `TSS_IGNORED_BEGIN_AFTER_ARRIVAL`: Time slot ignored: Time slot begins after arrival date and time.<br/>- `TSS_IGNORED_INTERNAL_ERROR`: Time slot ignored: Internal error.<br/>- `TSS_NOT_VALID_BEGIN_AFTER_END`: Time slot not valid: Time slot begins after time slot end.<br/>- `TSS_NOT_VALID_DURATION_TOO_SHORT`: Time slot not valid: Stop duration is too short (should be superior to fixed stop time).<br/>- `TSS_NOT_VALID_DURATION_TOO_LONG`: Time slot not valid: Stop duration is too long (should be inferior to time slot duration).<br/>- `TSS_NOT_VALID_SERVICE`: Time slot not valid: Requested service format is incorrect").
    - `message` (string, required): Describes a time slot status: if the time slot has been validated by a EV route.
- `logTag` (string): Log tag is an UUID tag used during the request calculation.

See chapter [Google Encoded Polyline Algorithm Format](https://benomad.com/dev/doc/bemap-api/guides/reference/glossary-google-encoded-polyline-algorithm-format.md) of full description of encoding format.

#### Response samples

JSON Sample:
```javascript
{
  "journeys": [
    {
      "summary": {
        "vehicleInfo": {
          "brand": "Renault",
          "name": "Zoe 2",
          "year": "2019"
        },
        "distance": 169756,
        "duration": 7394,
        "batteryLevel": 15,
        "consumed": 34.13,
        "chargingTime": 467,
        "departureTime": 1704905690000,
        "arrivalTime": 1704913551000,
        "boundingBox": {
          "minLon": 2.3059,
          "minLat": 47.79602,
          "maxLon": 3.56947,
          "maxLat": 48.85848
        }
      },
      "events": [
        {
          "eventType": "START",
          "coord": {
            "lon": 2.3413990156969615,
            "lat": 48.85717
          },
          "address": "Pont Neuf, 75001 Paris, France",
          "departureTime": 1704905690000000
        },
        {
          "eventType": "ROUTE",
          "distance": 136762,
          "duration": 5501,
          "consumed": 27.512743964305944,
          "encodedGeometry": "ileiHwhhMGEKI[WYUu@g@ . . . TJLJDJAl@dG"
        },
        {
          "eventType": "CHARGE",
          "coord": {
            "lon": 3.243228,
            "lat": 47.93862
          },
          "arrivalTime": 1704911191000,
          "departureTime": 1704911958000,
          "arrivalBatteryLevel": 16.51411128574597,
          "departureBatteryLevel": 27.796459405101274,
          "chargingTime": 467,
          "chargingPower": {
            "currentType": "DC",
            "power": 50,
            "cnnTypeId": 38
          },
          "pool": {
            "providerName": "gireve",
            "providerMode": "LOCAL",
            "id": "402548",
            "sourceProvider": "Gireve",
            "updateDate": 1680318107013,
            "brand": "SDEY",
            "name": "SDEY/L4SV657FSZ",
            "countryCode": "FRA",
            "address": {
              "countryCode": "FR",
              "city": "Sépeaux-Saint Romain",
              "postalCode": "89116",
              "street": "D943"
            },
            "accessibility": "PUBLIC",
            "entrance": {
              "lon": 3.243228,
              "lat": 47.93862
            },
            "phoneNumber": "+33970830213",
            "availabilityStatus": "IN_SERVICE",
            "open24x7": false,
            "numberOfParkingSpace": 2,
            "comment": "Sepeaux, Echangeur A6 Sur Cd945",
            "stations": [
              {
                "id": "525614",
                "nature": "REAL",
                "availabilityStatus": "IN_SERVICE",
                "coordinate": {
                  "lon": 3.243228,
                  "lat": 47.93862
                },
                "authenticationModes": [
                  "RFID_BADGE",
                  "NA"
                ],
                "paymentModes": [
                  "OPERATOR_CONTRACT"
                ],
                "bookable": false,
                "chargingPoints": [
                  {
                    "id": "1168662",
                    "operatorId": "FR*S89*EVRFW*2",
                    "availabilityStatus": "IN_SERVICE",
                    "currentType": "DC",
                    "voltage": 400,
                    "ampere": 125,
                    "power": 50,
                    "type": 38,
                    "connectorTypes": [
                      {
                        "id": 38,
                        "key": "TYPE_2-CABLE_COMBO_CCS",
                        "deprecated": false,
                        "name": "Type 2 Combo",
                        "norm": "Combo Type 2 based, DC",
                        "maxPower": 350,
                        "acSingle": false,
                        "acThree": false,
                        "dc": true,
                        "cable": true
                      }
                    ]
                  }
                ]
              }
            ]
          }
        },
        {
          "eventType": "ROUTE",
          "distance": 32994,
          "duration": 1593,
          "consumed": 6.615769512437353,
          "encodedGeometry": "o_rcHqmxRb@YL|ASTER?PFRHJXDPQF . . . KLUPDP@"
        },
        {
          "eventType": "STOP",
          "coord": {
            "lon": 3.568998979043319,
            "lat": 47.79602
          },
          "address": "Place Charles Lepère, 89000 Auxerre, France",
          "departureTime": 7094
        }
      ]
    }
  ]
}
```

#### ErrorResponse object
If an error occurs during the process on server side, only an error object will be returned in the response. See `Error example` chapter.
* `code`: error code. See the Error list chapter.
* `message`: error message.
* `coordinate`: coordinate of error (optional).
* `lon`: longitude of coordinate in decimal degrees ([WGS84](https://benomad.com/dev/doc/bemap-api/guides/reference/glossary-coordinate-system.md)).
* `lat`: latitude of coordinate in decimal degrees ([WGS84](https://benomad.com/dev/doc/bemap-api/guides/reference/glossary-coordinate-system.md)).

##### Error codes
List of all possible error codes:

| Code                              | Description                                                  |
| --------------------------------- | ------------------------------------------------------------ |
| OK                                | No error.                                                    |
| CANNOT\_PERFORM\_CHARGINGTIME     | The charging time estimation cannot be performed.            |
| CANNOT\_PERFORM\_ROUTING          | The routing calculation cannot be performed with the input coordinates. |
| CHARGING\_STATION\_NOT\_FOUND     | Cannot find any charging station.                            |
| CANNOT\_GET\_CONNECTOR\_TYPES     | Issue to get the list of connector types.                    |
| COORDINATE\_NOT\_MATCH            | One of the input coordinates cannot be matched on a road.    |
| INTERNAL\_ERROR                   | The server cannot perform the routing calculation for internal service reason. |
| NO\_REACHABLE\_STEP\_POINT        | No charging stations found are reachable.                    |
| OVER\_ALLOWED\_DISTANCE           | Too many charges required (maximum charges = 16)             |
| RouteNotFoundException            | The initial route cannot be found.                           |
| TooMuchViaException               | Too much via coordinates in request.                         |
| ViaNotMatchException              | One of via coordinate of request cannot be map matched.      |
| NotEnoughViaException             | The via coordinates cannot be map matched. A minimal of 2 coordinates must be map matched to perform a route. |
| VehicleFeatureIsRequiredException | The vehicle feature is required. The vehicle must be checked. |
| VehicleProfileIsRequiredException | The vehicle profile is required. The vehicle must be checked. |
| RequestsQuotasExceededException   | When a "hard" quotas limit is reached. See the quotas service API to check the quotas limits "soft" and "hard". |

##### Error example
```javascript
{
   "error": {
      "code": "NO_REACHABLE_STEP_POINT",
      "message": "All charging stations found cannot be reachable. Around this coordinate.",
      "coordinate": {
         "lon": 8.193691832353528,
         "lat": 45.42630127240513
      }
   }
}
```

All coordinates are defined by longitude and latitude, see the [coordinate system](https://benomad.com/dev/doc/bemap-api/guides/reference/glossary-coordinate-system.md) glossary for more details.
