Query route details

After you received your route ID through the route mutation, you can query your route details. These route details will contain everything from a polyline to charge stations, ideal for plotting a route on a map or providing turn-by-turn instructions. If you need more details for your specific route, see query route path.

Render route and route data

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

Render route and route data

Query

To query the route details you will need to configure it with the route ID. Be sure to include the status in your response and check it. If your route hasn't completed processing yet, then your route details will not be available. To prevent this from happening you can use the subscription service.

If you also supported additional route options in the route mutation you will now be able to collect the details. Below you can find instructions on how to do that.

Pricing

To render pricing when using the Eco-Movement station database, you can use pricing to fetch a list of prices on the connector level. The pricing field is available on evse.connectors. The pricing list includes CPO and MSP prices. The "adhoc price" is the CPO price.

When using any other station database, use the tariff query and tariff details query.

Route steps

Every leg of the route includes the steps property. These steps allow you to easily identify different road characteristics and highlight them in your application. The type of route steps are: road, highway, ferry, toll, and crossborder. Every step includes the distance, duration, consumption and a separate polyline. If you want to know what type of road characteristics there are on your entire journey you can include the tags property in your route request.

Support alternative stations along a route

If your route mutation included the stationsAlongRouteRadius with a valid distance, you can now request the station details in this query. To do so, you will need to add the stationsAlongRoute field with its appropriate children.

Support stations as waypoint

If your route mutation included stations in the via parameter, you will receive a route with additional stations as waypoints. These station as waypoints can be found inside the route.leg.

Get additional properties

Our route destination, origin and stations have an optional properties attribute in any of our route queries. You can use this to fetch a complete address, the current temperature (temp) and air pressure at that location.

Arguments

id ID

Required

Frequently used fields

route RouteAlternative

Recommended route.

status RouteStatus

Route status.

Show RouteStatus enum values

Other fields

alternatives RouteAlternative

Available alternatives.

ev RequestEv

EV specific data for a route request.

telemetry JSON

Route telemetry data.

user RequestUser

Deprecated

routeRequest RequestRoute

Route request data.

app RouteApp

Application who requested a route.

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.