When you have obtained a
route ID through the route mutation, you can start a route calculation 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 chapter.
Be aware that if the route is computed before you subscribe to it, you will not receive any updates. This could happen when you create a short route. To prevent that scenario, query the route details once right after you have set up the subscription. If the route is already calculated,
Last but not least, if your route supported any additional options you can now request them on the subscription response, as described here;
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.
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
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.
EV specific data for a route request
Route request data
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 one will tell you what data is available. It can contain any of the following statuses;
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