Start a new navigation session
After creating a new route and obtaining your route id
, you can use the startNavigation
mutation to start a new navigation session. A navigation session is automatically finished after 48 hours of inactivity. During that time frame you can subscribe to it for updates or query its current state.
Mutation
To start a navigation session, you need a route id
, an alternative_id
and your current_location
. Of these three arguments alternative_id
is optional. In case no alternative was chosen explicitly the first route is used for the navigation session. In order to start a navigation session you need to be in proximity of the route.
Arguments
Navigation start input
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
NAVIGATION_INSTRUCTION_REQUIRED
Instruction need to be active in the route. Please plan another route with instruction on
- Error
NAVIGATION_LOCATION_TOO_FAR
Current location is too far away from the route origin. Please plan another route from current location
- Error
NAVIGATION_SOC_BELOW_ALLOWED
State of charge is bellow allowed by the route state of charge. Please plan another route from current location
- Error
ROUTE_ALTERNATIVE_NOT_FOUND
No route alternative was found with the provided ID
- Error
ROUTE_NOT_FOUND
No route was found with the provided ID
mutation startNavigation {
startNavigation(
input: {
route_id: "624c2e9658e5c17cd1b65a0d"
route_alternative_id: "624c2e961b7230e5aec14f20"
current_location: {
type: Point,
coordinates: [9.9936818, 53.5510846]
}
}
)
}
{
"data": {
"startNavigation": "624c2f33f3a27e9cb19fa0cc"
}
}