Subscribe to route updates
When you have obtained a
route ID through the route mutation, you can start a route subscription to obtain your polyline and other route details. Because longer routes take some time to finish you can use a GraphQL subscription as described in the introduction.
The subscription service needs to be initiated with a
route ID. From there on it will start calculating and, based on your interval, provide you with a route status. For all possible statuses, see the response section of this document.
Last but not least, if your route supported any additional options you can now request them on the subscription response, as described here;
Support alternative stations along a route
If your route mutation included the
stationsAlongRouteRadius with a valid distance, you can now request the station details. 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
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.
You can configure this query to use percentages for the state of charge and final state of charge. This way client-side conversions are no longer needed. Please be aware that the percentages are based upon the
usableCarBattery or the capacity included inside this mutation.
Frequently used fields
EV specific data for a route request
Route request data
Application who requested a route
If successful, the HTTP status code in the response header is
200 and the response body contains the attributes you requested. The most important value here is the status field. This will tell you what data is available.
Route is waiting to be processed
Route is being calculated
Route has successfully been processed and data is available
Route could not be found
Route could not be calculated due to an error