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.

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.

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 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
    Required
  • Frequently used fields

  • route object RouteAlternative

    Recommended route

  • status enum RouteStatus

    Route status

  • Other fields

  • alternatives list [RouteAlternative]

    Available alternatives

  • ev object RequestEv

    EV specific data for a route request

  • user object RequestUser
    Deprecated
  • routeRequest object RequestRoute

    Route request data

  • Response

    If successful, the HTTP status code in the response header is 200 and the response body contains the attributes you requested.

    If unsuccessful, the header status code is an error code and the response body contains an error response object. The error response object can be any of the ones below.

    Errors & warnings

    • Error
      ROUTE_NOT_FOUND

      No route was found with the provided ID