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, ferry, toll, and highway. 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 non_null ID

Required

Other fields

route object RouteAlternative

Recommended route

alternatives list RouteAlternative

Available alternatives