Create a new route
As described in the route introduction, after executing the mutation a new route ID
will be received in the response. This route ID
can then be sent to subscribe to route details and retrieve a polyline and other route data.
Render route and route data
Plot a route on a map and render the route detail data.
Mutation
To get a route ID
, the input must contain at least the EV details and a departure location and destination. Other supported options are described below.
Arguments
input • CreateRouteInput
• Required
Input for generating a route.
Response
A response can either contain a data
or an
errors
object. The response header will always return
200
as a status code.
Data object
When successful, a data
object will be returned with the
requested fields. If there are no fields present the
data
object will return the operation name with the
appropriate return type. If the operation was a query, this output
will be an object of the schema’s query root type; if the operation
was a mutation, this output will be an object of the schema’s mutation
root type.
Error object
If unsuccessful, an errors
object will be returned with
more details in the extensions
object. The error object
can contain any of the following objects.
Error
ALTERNATIVE_STATION_RADIUS_ABOVE_ALLOWED
The radius value is above allowed, the maximum value is $VALUE $UNIT.
Error
ALTERNATIVE_STATION_RADIUS_BELOW_ALLOWED
The radius value is below allowed, the minimum value is $VALUE $UNIT.
Error
CABIN_DESIRED_TEMPERATURE_ABOVE_ALLOWED
The provided desired cabin temperature is too high. The value must be less than or equal to $VALUE $UNIT.
Error
CABIN_DESIRED_TEMPERATURE_BELOW_ALLOWED
The provided desired cabin temperature is too low. The value must be greater than or equal to $VALUE $UNIT.
Error
CONSUMPTION_EXCEEDED
Provided consumption value for $LOCATION is not valid. The value must be between 0 and $MAXVALUE kwh, or the equivalent in another unit, for this vehicle.
Error
NEGATIVE_VALUE_NOT_ALLOWED
Negative value for $LOCATION is not allowed.
Error
OCCUPANTS_ABOVE_ALLOWED
Provided number of occupants for $LOCATION is not valid. The value must be less than or equal to $OCCUPANTSCOUNT for this vehicle.
Error
OCCUPANTS_BELOW_ALLOWED
Provided number of occupants for $LOCATION is not valid. The value must be at least 1.
Error
OCCUPANTS_NOT_SPECIFIED
Total occupant weight requires occupants to be specified for $LOCATION.
Error
OPERATOR_BOTH_EXCLUDED_AND_RANKING
Operator $OPERATORID is both in the ranking and excluded lists.
Error
OPERATOR_DUPLICATED_IN_EXCLUDE
Operator $OPERATORID is multiple times in the exclude lists.
Error
OPERATOR_DUPLICATED_IN_RANKING
Operator $OPERATORID is multiple times in the ranking lists.
Error
OPERATOR_IN_MULTIPLE_RANKING_LEVELS
Operator $OPERATORID is set in multiple ranking levels for [$COUNTRIES].
Error
OPERATOR_IN_RANKING_AND_EXCLUDED
Operator $OPERATORID is set in both ranking and excluded for [$COUNTRIES].
Error
OPERATOR_NOT_FOUND
No operator was found with the $OPERATORID ID.
Error
OPERATOR_RANKING_NONE_GIVEN
The route operator type was set to $ROUTEOPTYPE, but no ranking was provided. Please add an operator to your client or route request.
Error
ROUTE_BATTERY_CAPACITY_ABOVE_ALLOWED
The provided battery capacity is too high. The value must be less than or equal to $MAX kwh or the equivalent in another unit.
Error
ROUTE_BATTERY_CAPACITY_BELOW_ALLOWED
The provided battery capacity is too small. The value must be greater than or equal to $MIN kwh or the equivalent in another unit.
Error
ROUTE_CARGO_BELOW_ALLOWED
Provided amount of cargo weight is not valid. The value cannot be negative.
Error
ROUTE_DESTINATION_INVALID_PROPERTIES
Destination properties are invalid. $MESSAGE
Error
ROUTE_DESTINATION_STATION_AND_EXTERNAL_STATION_NOT_MATCHING
The destination station for the route requested was not matched with the external station.
Error
ROUTE_DESTINATION_STATION_NOT_FOUND
The destination station for the route requested was not found with the provided ID.
Error
ROUTE_FINAL_SOC_TOO_HIGH
The provided final state of charge is too high. The value must be less than or equal to 60% of the vehicle battery capacity.
Error
ROUTE_INVALID_DESTINATION_COORDINATES
The destination coordinates provided are not valid.
Error
ROUTE_INVALID_ORIGIN_COORDINATES
The origin coordinates provided are not valid.
Error
ROUTE_INVALID_SAFE_RISK_MARGIN
Safe risk margin needs to be a value between 0 and 60.
Error
ROUTE_INVALID_VIA_COORDINATES
The via coordinates provided are not valid.
Error
ROUTE_MIN_POWER_BELOW_ALLOWED
The provided minimum power is too small. The value must be greater than 0.
Error
ROUTE_OCCUPANT_WEIGHT_BELOW_ALLOWED
Provided occupant weight is not valid. The value cannot be negative.
Error
ROUTE_SAME_COORDINATES_CONSECUTIVE_VIA
The coordinates of consecutive via points cannot be the same.
Error
ROUTE_SAME_COORDINATES_ORIGIN_DESTINATION
The origin coordinates cannot be the same as the destination coordinates.
Error
ROUTE_SAME_COORDINATES_ORIGIN_VIA
The origin coordinates cannot be the same as the (first) via point coordinates.
Error
ROUTE_SAME_COORDINATES_VIA_DESTINATION
The (last) via coordinates cannot be the same as the destination coordinates.
Error
ROUTE_STATION_INVALID_CHARGER
The charger standard used on this vehicle is not supported by the station.
Error
ROUTE_STATION_INVALID_MIN_POWER
The minimum power requested is higher than the station could support.
Error
ROUTE_STATION_INVALID_SPEED
The station speed is not fast or turbo.
Error
ROUTE_VIA_CARGO_BELOW_ALLOWED
Provided amount of cargo is not valid. The value must be greater than 0.
Error
ROUTE_VIA_INVALID_PROPERTIES
Via properties are invalid. $MESSAGE
Error
ROUTE_VIA_STATION_AND_EXTERNAL_STATION_NOT_MATCHING
The via station for the route requested was not matched with the external station.
Error
ROUTE_VIA_STATION_NOT_FOUND
The station ID used as a via for the requested route was not found.
Error
SOC_EXCEEDING_BATTERY_CAPACITY
The provided state of charge for $LOCATION is too high. The value must be less than or equal to the vehicle battery capacity.
Error
STATION_DESTINATION_COORDINATES_NOT_MATCHING
Coordinates [$DESTINATIONCOORDINATES] of destination don't match with station coordinates [$STATIONCOORDINATES].
Error
STATION_VIA_COORDINATES_NOT_MATCHING
Coordinates [$VIACOORDINATES] of via don't match with station coordinates [$STATIONCOORDINATES].
Error
ZERO_OR_NEGATIVE_VALUE_NOT_ALLOWED
Zero or negative value for $LOCATION is not allowed.