Query route path

Whenever you need data about a specific point in your route, you can use the routePath query. It can return information about temperatures, speed, elevation and more.

Query

When using the routePath query you need a route id and location as a GeoJSON point of a specific point in the route. You can create a new route and receive the route id using the new route mutation as described here. Please note that the coordinates need to be identical to those you receive back from your route request. You can find all coordinates by decoding the encoded polyline.

Arguments

  • id non_null
    Required

    ID of a route that you require for a route path segment

  • location non_null PointInput
    Required

    The GeoJSON Point of a route path segment

  • alternativeId id

    Optional alternative ID. By default we will retrieve the fastest route

  • Other fields

  • location object Point

    GeoJSON location of a route path segment

  • elevation int

    Elevation (altitude) in meters

  • averageSpeed float

    Average speed, in km/h, for this route path segment

  • recommendedSpeed float

    Recommended speed, in km/h for this route path segment to optimise the consumption

  • consumption float

    Consumption, in kWh, of a route path segment

  • consumptionPerKm float

    Consumption, in kWh per km, of a route path segment

  • distance float

    Distance, in meters, of a route path segment

  • duration float

    Duration, in seconds, of a route path segment

  • 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

    • Error
      ROUTE_PATH_INVALID_POINT_COORDINATES

      The coordinates provided are not valid

    • Error
      ROUTE_PATH_LOCATION_NOT_FOUND

      No location was found with the provided input

    • Error
      ROUTE_PATH_NOT_FOUND

      No route path was found with the provided ID or alternative ID