Create a new route
As described in the route introduction, the first thing you will need to do is fetch a route ID
. 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
, you will need to provide us with EV details and at least a departure location and destination. Apart from that you can also support any of the options that are described below.
Arguments
input • RequestInput
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.
CAR_NOT_FOUND
No car was found with the provided ID
CONSUMPTION_EXCEEDED
Provided consumption value for $LOCATION is not valid. The value must be between 0 and $MAXVALUE kwh/100km for this car
EMPTY_ARRAY_NOT_ALLOWED
Array $NAME should have at least one value
ERROR_FORBIDDEN_MESSAGE
You are forbidden to execute this operation
INVALID_COORDINATES
Coordinates provided for $LOCATION are not valid.
INVALID_UNIT
Provided unit type $TYPE for $LOCATION is not valid.
INVALID_VALUE
Provided value $VALUE for $LOCATION is not valid. Expected value of type $EXPECTEDTYPE.
NEGATIVE_VALUE_NOT_ALLOWED
Negative value for $LOCATION is not allowed.
OCCUPANTS_ABOVE_ALLOWED
Provided number of occupants for $LOCATION is not valid. The value must be less than $OCCUPANTSCOUNT for this car.
OCCUPANTS_BELOW_ALLOWED
Provided number of occupants for $LOCATION is not valid. The value must be at least 1.
OPERATOR_BOTH_EXCLUDED_AND_RANKING
Operator $OPERATORID is in both in the ranking and excluded lists
OPERATOR_DUPLICATED_IN_EXCLUDE
Operator $OPERATORID is present multiple times in the exclude lists
OPERATOR_DUPLICATED_IN_RANKING
Operator $OPERATORID is present multiple times in the ranking lists
OPERATOR_INVALID_RANKING
Operator ranking must be between 1 and 10!
OPERATOR_NOT_FOUND
No operator was found with the $OPERATORID ID
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
ROUTE_BATTERY_CAPACITY_ABOVE_ALLOWED
The provided battery capacity is too high. The value must be less than or equal to $MAX kwh
ROUTE_BATTERY_CAPACITY_BELOW_ALLOWED
The provided battery capacity is too small. The value must be greater than or equal to $MIN kwh
ROUTE_CARGO_BELOW_ALLOWED
Provided amount of cargo weight is not valid . The value must be greater than 0.
ROUTE_CONSUMPTION_INVALID_WORST
Provided consumption value for $NAME is not valid. The worst value must be greater than or equal to best value
ROUTE_CONSUMPTION_TOTAL_EXCEEDED
Provided consumption values are not valid. The total must be between 0 and $MAXVALUE for this car
ROUTE_DESTINATION_STATION_AND_EXTERNAL_STATION_NOT_MATCHING
The destination station for the route requested was not matched with the external station
ROUTE_DESTINATION_STATION_NOT_FOUND
The destination station for the route requested was not found with the provided ID
ROUTE_DUPLICATE_AMENITIES
Amenities $DUPLICATEDAMENITIES are duplicated
ROUTE_FINAL_SOC_EXCEEDING_BATTERY_CAPACITY
The provided final state of charge is too high. The value must be less than or equal to 80% of the car battery capacity
ROUTE_INVALID_AMENITIES
Amenities $INVALIDAMENITIES are not valid. Allowed: $ALLOWEDAMENITIES
ROUTE_INVALID_DESTINATION_COORDINATES
The destination coordinates provided are not valid
ROUTE_INVALID_ORIGIN_COORDINATES
The origin coordinates provided are not valid
ROUTE_INVALID_SCHEDULED_CHARGE_STOP_DURATION
The scheduled charge stop duration is invalid. The value must be between 900 and 86400 seconds
ROUTE_INVALID_SCHEDULED_CHARGE_STOP_MAX_DISTANCE_FROM_STATION
The scheduled charge stop max_distance_from_station is invalid. The value must be between 0 and 1000 meters
ROUTE_INVALID_VIA_COORDINATES
The via coordinates provided are not valid
ROUTE_MAX_NUMBER_OF_PASSENGERS_EXCEEDED
Provided number of passengers is not valid. The value must be between 1 and $PASSENGERCOUNT for this car
ROUTE_MIN_POWER_BELOW_ALLOWED
The provided minimum power is too small. The value must be greater than 0 kwh
ROUTE_ORIGIN_STATION_AND_EXTERNAL_STATION_NOT_MATCHING
The origin station for the route requested was not matched with the external station
ROUTE_ORIGIN_STATION_NOT_FOUND
The origin station for the route requested was not found with the provided ID
ROUTE_RADIUS_ABOVE_ALLOWED
The radius value is above allowed, the maximum value is 5000 meters
ROUTE_RADIUS_BELOW_ALLOWED
The radius value is below allowed, the minimum value is 500 meters
ROUTE_STATION_INVALID_CHARGER
The charger standard used on this car is not supported by the station
ROUTE_STATION_INVALID_MIN_POWER
The minimum power requested is higher than the station could support
ROUTE_STATION_INVALID_SPEED
The station speed is not fast or turbo
ROUTE_VIA_CARGO_BELOW_ALLOWED
Provided amount of cargo is not valid. The value must be greater than 0.
ROUTE_VIA_STATION_AND_EXTERNAL_STATION_NOT_MATCHING
The via station for the route requested was not matched with the external station
ROUTE_VIA_STATION_NOT_FOUND
The via station for the route requested was not found with the provided ID
SOC_EXCEEDING_BATTERY_CAPACITY
The provided state of charge for $LOCATION is too high. The value must be less than or equal to the car battery capacity
STATION_DESTINATION_COORDINATES_NOT_MATCHING
Coordinates [$DESTINATIONCOORDINATES] of destination don't match with station coordinates [$STATIONCOORDINATES]
STATION_ORIGIN_COORDINATES_NOT_MATCHING
Coordinates [$ORIGINCOORDINATES] of origin don't match with station coordinates [$STATIONCOORDINATES]
STATION_VIA_COORDINATES_NOT_MATCHING
Coordinates [$VIACOORDINATES] of via don't match with station coordinates [$STATIONCOORDINATES]
TIRE_PRESSURE_BELOW_ALLOWED
Provided tire pressure is not valid. The value must be at least 1.
ZERO_OR_NEGATIVE_VALUE_NOT_ALLOWED
Zero or negative value for $LOCATION is not allowed.