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.

Show elevation details

Fetch the height profile of a route and display it in a graph

Show elevation details

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 ID

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 scalar 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 scalar Int

Elevation (altitude) in meters

averageSpeed scalar Float

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

recommendedSpeed scalar Float

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

consumption scalar Float

Consumption, in kWh, of a route path segment

consumptionPerKm scalar Float

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

distance scalar Float

Distance, in meters, of a route path segment

duration scalar Float

Duration, in seconds, of a route path segment

stateOfCharge scalar Float

State of charge, in kWh, 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 and warnings

Error

ERROR_FORBIDDEN_MESSAGE

You are forbidden to execute this operation

Error

ROUTE_INVALID_SAFE_RISK_MARGIN

Safe risk margin needs to be a value between 0 and 60.

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