Skip to main content
Guide

Route

Planning routes for EVs comes with unique challenges. Battery capacity, real-world energy consumption, topography, weather, and charging network availability all determine whether a vehicle will reach its destination.

The Route API considers all these variables to find optimal EV routes. Using a world-class energy consumption model, it automatically places charging stops exactly when and where they’re needed. Routes are fully customizable, so you can fine-tune them to fit your own business rules.

How it works

To ensure high performance, the Route API operates asynchronously, following the same async pattern used across the API. Creating and retrieving a route happen in separate steps.

  1. Create a routeCall the createRoute mutation with at least a vehicle, origin, and destination. The mutation returns a route id right away, which you’ll use in the next step to track and retrieve the route. Many more customization options are available; see customize your route below.
  2. Open a subscriptionSubscribe to the route subscription using the id from the previous step. While the route is being calculated, the subscription pushes status updates you can use to drive an async loading state in your UI.
  3. Render the resultOnce the route’s status resolves to done, error, or not_found, render the corresponding UI for that outcome.
  4. Re-fetch on demandA route that has reached a final status that is successful is stored with its complete details. If you need to display it again later, for example after navigating back to it, use the getRoute query instead of opening a new subscription.

Customize your route

createRoute accepts a range of optional input to fine-tune how a route is calculated. More details on each field can be found in the API reference.

FeatureDescription
WaypointsAdd intermediate stops. Provide via.properties.station.station_id to force a charging stop at a specific station, or only via.geometry for a plain transit point with no charging.
Stop durationSet how long, in seconds, the vehicle stays at a waypoint or the destination, using properties.station.stop_duration or properties.location.stop_duration.
Highway chargingPrioritize charging stations located directly on the highway with station_preferences.prefer_highway_charging, avoiding stops that require exiting the highway.
WeatherApply a weather preset or custom weather conditions to the consumption model. Defaults to real-time weather data.
SeasonAssume summer, winter, or current weather conditions, as a simpler alternative to weather.
Route features to avoidAvoid toll_road or ferry on a best effort basis.
Operator rankingPrefer specific charging networks with type: preferred, or restrict routing to only those networks with type: required. Rank operators as high, medium, or low, and scope a ranking to specific countries per operator.
Operator exclusionsExclude an operator entirely from the route with operators.exclude. Falls back to your project’s dashboard configuration when not set at the request level.
Operator avoidanceAvoid an operator without excluding it outright, using operators.avoid.
Alternative charging stationsSearch for alternative charging stations within a radius between 500 and 5000 meters along the route.
Alternative routesRequest additional route options, on a best effort basis. Set to 0 to calculate only the recommended route.
Driving preferencesAdjust the driving style with speed_factor or maximum_speed, or pick a style of eco or sport.
Traffic awarenessTake real-time traffic congestion into account. Contact support to enable this for your project.
Departure timeCalculate expected arrival times using real-time traffic and historical, current, or forecasted weather.
Destination as a stationSet a specific station as the route’s destination. This is treated as a non-charging stop.
Vehicle load per waypointSet occupants, total_occupant_weight, and total_cargo_weight on origin or via. These propagate through the rest of the journey, and can be overridden at any later via point.
Minimum charging powerBy default, routing excludes connectors below 43 kW. Set a different minimum to match your vehicle’s charging speed. Higher-rated chargers are still selected even if your vehicle charges slower than their maximum rate.

Was this content helpful?

Developers

Chargetrip ©

Status unknown

Manage cookies

Effective: 20th March, 2024 · Updated: 1 September, 2026

We use cookies to help improve your experience of developers.chargetrip.com. This cookie policy is part of the privacy policy, and covers the use of cookies between your device and our site. We also provide basic information on third-party services we may use, who may also use cookies as part of their service, though they are not covered by our policy.

If you don’t wish to accept any cookies from us, you should instruct your browser to refuse cookies from developers.chargetrip.com, with the understanding that we may be unable to provide you with some of your desired content and services.

A cookie is a small piece of data that a website stores on your device when you visit, typically containing information about the website itself, a unique identifier that allows the site to recognize your web browser when you return, additional data that serves the purpose of the cookie itself, and the lifespan of the cookie itself.

Cookies are used to enable certain features (e.g. logging in), to track site usage (e.g. analytics), to store your user settings (e.g. timezone, notification preferences), and to personalize your content (e.g. advertising, language).

Cookies set by the website you are visiting are normally referred to as “first-party cookies,” and typically only track your activity on that particular site. Cookies set by other sites and companies (i.e. third parties) can be used to track you on other websites that use the same third-party service.

Essential cookies

Cookies set by the website you are visiting are normally referred to as “first-party cookies,” and typically only track your activity on that particular site. Cookies set by other sites and companies (i.e. third parties) can be used to track you on other websites that use the same third-party service.

Performance cookies

Targeting / advertising cookies are used in determining what promotional content is more relevant and appropriate to you and your interests. Websites may use them to deliver targeted advertising or to limit the number of times you see an advertisement. This helps companies improve the effectiveness of their campaigns and the quality of content presented to you. These cookies may be set by the website you’re visiting (first-party) or by third-party services. Targeting/advertising cookies set by third parties may be used to track you on other websites that use the same third-party service. We use targeting/advertising cookies on our site.

Marketing / advertising cookies

Targeting / advertising cookies are used in determining what promotional content is more relevant and appropriate to you and your interests. Websites may use them to deliver targeted advertising or to limit the number of times you see an advertisement. This helps companies improve the effectiveness of their campaigns and the quality of content presented to you. These cookies may be set by the website you’re visiting (first-party) or by third-party services. Targeting/advertising cookies set by third parties may be used to track you on other websites that use the same third-party service. We use targeting/advertising cookies on our site.

Third party promise

We review the privacy policies of all our third-party providers before enlisting their services to ensure their practices align with ours. We will never knowingly include third-party services that compromise or violate the privacy of our users.

Cookie
google-cookie-consent
Description
Stores your cookie preferences, meaning which categories you have accepted or declined, so we can respect your choice on every visit and only load the analytics or marketing tools you have allowed.
Lifetime
2 years

How you can control or opt out of cookies

If you do not wish to accept cookies from us, you can instruct your browser to refuse cookies from our website. Most browsers are configured to accept cookies by default, but you can update these settings to either refuse cookies altogether or to notify you when a website is trying to set a cookie.

If you browse websites from multiple devices, you may need to update your settings on each individual device.

Although some cookies can be blocked with little impact on the experience of a website, blocking all cookies may mean you are unable to access certain features and content across the sites you visit.

We may update this Cookie Policy from time to time in order to reflect, for example, changes to the cookies we use or for other operational, legal, or regulatory reasons. Please re-visit this Cookie Policy to stay informed about our use of cookies and related technologies. The date at the top of this Cookie Policy indicates when it was last updated.