Upgrading

If you're currently using the legacy routing service, check the migration guide to learn how to transition to this service.

Create a route

The createRoute mutation initiates an EV route calculation by specifying waypoints, vehicle parameters, and routing preferences.

Render route and route data

Plot a route on a map and render the route detail data.

Render route and route data

Mutation

The createRoute mutation requires a vehicle.id , an origin, and a destination. Fetch valid vehicle IDs using the vehicle query.

Routing Constraints

Slow Charging Connectors - Routing excludes connectors below 43 kW. If your vehicle is limited to a lower charging speed, compatible higher-rated chargers will still be selected.

Hybrid Vehicles - Routes for hybrid and plug-in hybrid vehicles don't include recommended charging stops.

Beyond the required arguments, you can use the optional arguments to tailor the route to specific trip conditions and business goals. Explore the sections below to learn how these arguments enable key features.

Arguments

input CreateRouteInput

Required

Input for generating a route.

Selectable fields

ID

Response

A response can either contain a data or an errors object. The response header will always return 200 as a status code.

Data object

When successful, a data object will be returned with the requested fields. If there are no fields present the data object will return the operation name with the appropriate return type. If the operation was a query, this output will be an object of the schema’s query root type; if the operation was a mutation, this output will be an object of the schema’s mutation root type.

Error object

If unsuccessful, an errors object will be returned with more details in the extensions object. The error object can contain any of the following objects.