Skip to content
Last updated

โšก EV Smart Routing API

Performs a route calculation dedicated to electric vehicles.
If the vehicle does not have enough autonomy, the service adds charging stations (step points) along the route.

The criteria by default is FASTEST, the service optimizes the total duration (driving + charging time).


๐ŸŒ Endpoint

POST /bgis/service/2.0/evsmartrouting

๐Ÿš— Example : EV Smart Routing โ€“ Paris โ†’ Brussels

๐Ÿ”‹ Electric Vehicle : Kia e-Niro 64kWh

๐Ÿ”Œ Charging Station Provider: ecoMovement

๐ŸŒ Geoserver Provider: osm

๐Ÿ“ค Request JSON

{
  "geoserver": "osm",
  "csps": ["ecoMovement"],
  "vehicle": {
    "initBatLvl": 100,
    "key": "eb1e9464-8654-4c01-bedd-b2f95412a60d"
  },
  "routingMode": "MODE_VIAS",
  "start": {
    "lon": 2.35222,
    "lat": 48.85661
  },
  "stop": {
    "lon": 4.35171,
    "lat": 50.85034
  },
  "condition": {
    "chargePluggingTime": 300,
    "geometry": true
  },
  "routingVehicleProfile": {
    "transportMode": "CAR"
  }
}

โœ… What it does:

  • Computes a route from Paris to Brussels
  • Starts with 100% battery
  • Adds a fixed 5-minute stop time at each charging station
  • Uses the default vehicle profile for a car
  • Minimal setup โ€“ easy to test and expand later

๐Ÿงพ Headers

HeaderValue
Content-Typeapplication/json
Acceptapplication/json
AuthorizationBearer YOUR_TOKEN

๐Ÿ“ฅ Request Body

๐Ÿงฉ Fields

FieldTypeOptionalDescription
geoserverstringYesGeoserver name (e.g., "here")
cspsstring[]YesCharging station provider names (e.g., "gireve")
vehicleobjectNoElectric vehicle configuration
startobjectNoStart coordinates
stopobjectNoDestination coordinates
conditionobjectYesTrip and EV-related conditions
csfsstring[]YesFilters applied to charging stations
viasobject[]YesList of via points
swidxintYesSwitch index

Example

{
  "geoserver": "osm",
  "csps": ["ecoMovement"],
  "vehicle": {
    "key": "06b5c02d-ba2e-4b14-8b2b-6d793aac0da0",
    "initBatLvl": 80,
    "payload": 100
  },
  "start": { "lon": 2.3522, "lat": 48.8566 },
  "stop": { "lon": 5.0415, "lat": 47.3220 },
  "condition": {
    "minBatLvl": 10,
    "minArrivalBatLvl": 15,
    "temperature": 20,
    "departureTime": "2025-07-04T08:00:00+01:00",
    "encodedGeometry": true
  },
  "vias": [
    { "lon": 3.0, "lat": 48.0 }
  ],
  "swidx": 0
}

๐Ÿ“ Place

Describes the coordinates of a place, such as a start or stop point. See field details below.

๐Ÿงฉ Fields

FieldTypeOptionalDescription
latdoubleNoLatitude
londoubleNoLongitude
{ "lon": 5.0415, "lat": 47.3220 }

๐Ÿš— Vehicle

Class representing a Vehicle. Fields details:

๐Ÿงฉ Fields

FieldTypeOptionalDescription
keystringNoVehicle UUID key (from EV vehicle API)
initBatLvlfloatYesInitial battery level (%) โ€“ Default: 100
payloadintYesPayload in kg โ€“ Default: 75 kg
"vehicle": {
  "key": "06b5c02d-ba2e-4b14-8b2b-6d793aac0da0",
  "initBatLvl": 75,
  "payload": 80
}

๐Ÿ“ฆ Condition

Defines the conditions of the EV smart routing trip, including routing options, energy constraints, environmental factors, and rendering settings.

๐Ÿงฉ Field

FieldOptionalDescription
allowMaxSpeedRecommendationYesAllow to calculate the maximum speeds to reach destination or step-point. Since algorithm v3. Type: boolean.
allowNaStatusYesAllow use of pools with NA availability status. False by default. Type: boolean.
alternativeYesIndex of alternative route. 0 to disable. 0 by default. Type: byte.
chargePluggingTimeYesDefines the fixed additional time in seconds for each charging stop. 300 by default. Type: int.
chargeTimeSlotsYesList of step-point time slots. If forced charges are defined, they take priority. Type: list of [ChargeTimeSlotFront].
chargingStationDeprecatedConnectorYesEnable support for deprecated connector types. False by default. Type: boolean.
co2emissionsYesCalculate COโ‚‚ emissions savings for the journey. False by default. Type: boolean.
connectorTypesYesList of connector type IDs to filter charging stations. Type: list of Integer.
currencyYesCurrency for cost calculation (ISO 4217 Code). Type: String.
Example:
- 'EUR'
- 'USD'
- 'JPY'
departureTimeYesDeparture timestamp (Epoch ms or ISO 8601). Type: String.
drivingStyleYesDriving behavior model. Type: [DrivingStyleFront].
encodedGeometryYesEnables encoded polyline output. False by default. Type: boolean.
criteriasYesList of routing criteria.
Available values :
- AVOID_CROSSING_BORDER
- AVOID_FERRIES
- AVOID_MOTORWAYS
- AVOID_TOLLS
- TRAFFIC
geometryYesEnables polyline output. True by default. Type: boolean.
ignoreAvailableStatusYesUse any station regardless of availability. False by default. Type: boolean.
maxAfterChargeBatLvlYesMaximum battery level after charge (%). Type: float.
minArrivalBatLvlYesMinimum required battery at destination (%). Type: float.
minBatLvlYesMinimum battery level during the trip (%). Type: float.
optimModeYesOptimization
mode Available values :
- ECO_ENERGY
- FASTEST (Default)
- SHORTEST).
restrictedEvseYesAccept restricted charging stations. Type: boolean.
routeDetailsYesEnable detailed route events (e.g., consumption). False by default. Type: boolean.
routeDetailsExtKeyYesAPI key to unlock extended route details. Type: String.
routeDetailsFreqYesFrequency (s) of route events. Default 60s. Type: int.
routesheetYesEnables generation of a route sheet. Type: boolean.
routesheetLanguageYesLanguage for route sheet rendering. Type: String.
routesheetModeYesOutput format :
- TEXT (Default)
- DETAILS
- TEXT_DETAILS.
routesheetVerboseLevelYesVerbosity level :
- LOW
- MEDIUM
- HIGH.
temperatureYesTemperature in Celsius. Default: 20. Type: int.
weatherYesEnable real-time weather data. Type: boolean.
weatherProviderYesChoose weather data provider. Type: String.

Example

{
  "departureTime": "2025-07-03T10:00:00+02:00",
  "temperature": 25,
  "minArrivalBatLvl": 15,
  "minBatLvl": 10,
  "encodedGeometry": true,
  "chargePluggingTime": 300,
  "optimMode": "FASTEST",
  "currency": "EUR"
}

๐Ÿš— DrivingStyle

The DrivingStyle object defines how the electric vehicle is driven, affecting the energy consumption during the route.

๐Ÿงฉ Fields

FieldOptionalDescription
modeDefines the driving mode.
Available values:
  • CUSTOM: Allow to override ponderation parameters.
  • ECO: Reduce acceleration and prefer national roads.
  • NORMAL: Use standard speed limits.
  • SPORT: Increase acceleration, prefer highways.
allowOverVehSpdLimYesAllows to define a maximum speed above the vehicle's maximum speed defined in the vehicle's database. Type: boolean.
limitMaxSpeedYesVehicle's max speed in km/h used during routing. If null, default from vehicle database is used. Type: short.
maxAccYesAverage vehicle's acceleration in m/sยฒ. Must be > 0. Example: 1.25. Type: double.
maxDecYesAverage vehicle's deceleration in m/sยฒ. Must be < 0. Example: -1.25. Type: double.
spsYesSpeed weight coefficient per road network level. Type: list of SpeedPonderation.
{
  "mode": "ECO",
  "allowOverVehSpdLim": false,
  "limitMaxSpeed": 110,
  "maxAcc": 1.2,
  "maxDec": -1.2,
  "sps": [
    {
      "factor": 0.9,
      "level": 2,
      "pondType": "ALL",
      "roadType": "MOTORWAY"
    },
    {
      "factor": 1.1,
      "level": 3,
      "pondType": "ETA",
      "roadType": "DEFAULT"
    }
  ]
}

๐Ÿ‘‰ For detailed examples and usage, check out the tutorial


๐Ÿ›ฃ๏ธ SpeedPonderation

Used inside sps, represents the speed ponderation per road level.

๐Ÿงฉ Fields

FieldOptionalDescription
factorPonderation factor for speed. (Default = 1)
Example: 0.8 (reduce), 1.3 (increase). Type: float.
levelRoad network level.
Values: 0 (all), 1 (main), 2 (secondary), 3 (third), 4 (fourth). Type: int.
pondTypeYesPonderation type.
Values:
- ALL (default)
- CAL
- ETA..
roadTypeYesRoad type for ponderation.
Values:
- ALL
- DEFAULT
- FERRY
- MOTORWAY
- PEDESTRIAN
- ROUNDABOUNT
- SLIPROAD
{
  "factor": 0.85,
  "level": 1,
  "pondType": "CAL",
  "roadType": "MOTORWAY"
}

๐Ÿ‘‰ For detailed examples and usage, check out the tutorial


๐Ÿงญ Via

Describes a coordinate used as a via (waypoint) in EV Smart Routing.


๐Ÿงฉ Fields

FieldTypeOptionalDescription
latdoubleNoLatitude in decimal degrees (WGS84).
londoubleNoLongitude in decimal degrees (WGS84).
chargeMaxDistanceintYesMaximum distance in meters from a charge point to force a charge. Default is 0.
ignoreVehicleProfilebooleanYesWhether to ignore the vehicle profile for this via.
maxSpeedintYesMax speed in km/h for the segment after this via. 0 means global speed is used.
stopDurationintYesStop duration in seconds at this via point. Default is 0.
transportTypestringYesType of transport. Options :
- BICYCLE
- CAR
- DELIVERY_TRUCK
- EMERGENCY
- MOTORCYCLE
- PEDESTRIAN
- PUBLIC_BUS
- TAXI
- TRUCK.

๐Ÿ’ก Example

{
  "lat": 45.764043,
  "lon": 4.835659,
  "chargeMaxDistance": 3000,
  "ignoreVehicleProfile": false,
  "maxSpeed": 90,
  "stopDuration": 600,
  "transportType": "CAR"
}

๐Ÿ‘‰ For detailed examples and usage, check out the tutorial

๐Ÿ”— Back to API Index

๐Ÿ”— API Playground

You can test this API endpoint directly in our dedicated BeMap documentation environment.

๐Ÿ‘‰ Go to BeMap API Playground