moovexDocs

Generate Route

Calculate an EV-optimized route synchronously

POST/routing/generate

Request Body

FieldTypeRequiredDescription
originLocationYesStarting point
destinationLocationYesEnd point
waypointsLocation[]NoIntermediate stops
vehicleVehicleYesVehicle configuration
preferencesPreferencesNoRouting preferences
conditionsConditionsNoCurrent conditions

Charging Strategies

StrategyDescription
minimumMinimize charging time
balancedBalance time with comfort
comfortableMore frequent, shorter stops

Example Response

{
  "route_id": "rt_abc123",
  "status": "success",
  "summary": {
    "total_distance_km": 615,
    "total_duration_minutes": 395,
    "charging_stops": 1,
    "total_charging_time_minutes": 25,
    "total_energy_kwh": 98.5
  },
  "legs": [
    {
      "start": { "lat": 37.7749, "lng": -122.4194, "name": "San Francisco" },
      "end": { "lat": 35.3733, "lng": -119.0187, "name": "Supercharger Bakersfield" },
      "distance_km": 280,
      "duration_minutes": 180,
      "start_soc_percent": 90,
      "end_soc_percent": 15
    },
    {
      "start": { "lat": 35.3733, "lng": -119.0187, "name": "Supercharger Bakersfield" },
      "end": { "lat": 34.0522, "lng": -118.2437, "name": "Los Angeles" },
      "distance_km": 335,
      "duration_minutes": 190,
      "start_soc_percent": 80,
      "end_soc_percent": 25,
      "charging_stop": {
        "station_id": "cs_bak123",
        "name": "Supercharger Bakersfield",
        "charge_time_minutes": 25,
        "target_soc_percent": 80
      }
    }
  ]
}

On this page