Migration Guide
This guide is intended for developers migrating from Chargetrip’s legacy Route service to the latest version of the Route service. If you have any additional questions, please contact our support team.
The new Route service delivers key improvements, including a streamlined and reorganized schema, per-country operator preferences, faster route computation, and greater maintainability. The legacy service will remain available until May 2026, after which all legacy operations will be removed from the schema.
Introduction
The new Route service consolidates the legacy five operations to four. While the operation names and schema have changed, the usage pattern for creating and retrieving routes continues to rely on the same type of GraphQL operations—query, mutation, and subscription.
The table below maps the legacy Route service operations to their corresponding operations in the new Route service:
| Operation Type | Legacy | New | |
|---|---|---|---|
| Mutation | newRoute | -> | createRoute |
| Subscription | routeUpdateByID | -> | route |
| Query | route | -> | getRoute |
| Query | routePath | -> | getRoute |
| Query | RouteEmissions | -> | getRouteEmissions |
General schema changes
Below you can find an overview of general schema changes that apply to all operations.
Mutation changes
This section details all changes to the input schema between the legacy newRoute mutation and the new createRoute mutation. For complete schema definitions and usage, see mutate to create a new route.
⚡️ Changes from legacy
- Schema reorganization; the argument
inputhas been reorganized and simplified. - Extended operator preferences; the ranking system for operator preferences has been simplified to three levels and supports country-specific preferences.
- Total occupant weight; users can directly input the total occupant weight for the route’s origin and via, overriding the default value derived from the number of occupants.
📦 Deprecated features
- Amenity preferences; amenity preferences have been removed and will be added in a different format at a later stage.
Schema reorganization
The input field has been restructured in the new Route service. The legacy fields - routeRequest, ev, and telemetry — have been flattened and reorganized.
routeRequest
The routeRequest fields have been moved directly under the input and input.vehicle.charging.
| Legacy | New | |
|---|---|---|
input.routeRequest.amenities | -> | removed |
input.routeRequest.amenity_preferences | -> | removed |
input.routeRequest.operatorRequired | -> | removed |
input.routeRequest.operatorIds | -> | removed |
input.routeRequest.operatorPrefer | -> | removed |
input.routeRequest.operators | -> | input.operators |
input.routeRequest.season | -> | input.season |
input.routeRequest.safeRiskMargin | -> | input.vehicle.charging.risk_margin |
input.routeRequest.chargeMode | -> | input.vehicle.charging.mode |
input.routeRequest.origin | -> | input.origin |
input.routeRequest.destination | -> | input.destination |
input.routeRequest.via | -> | input.via |
input.routeRequest.stationsAlongRouteRadius | -> | input.alternative_station_radius |
input.routeRequest.instructions | -> | removed |
EV
The ev fields are now structured under the vehicle object or redistributed across origin, via, and other typed properties.
| Legacy | New | |
|---|---|---|
input.ev.id | -> | input.vehicle.id |
input.ev.battery | -> | input.vehicle.battery |
input.ev.plugs | -> | input.vehicle.charging.connectors |
input.ev.adapters | -> | input.vehicle.charging.adapters |
input.ev.minPower | -> | input.vehicle.charging.minimum_power |
input.ev.climate | -> | input.vehicle.climate |
input.ev.heatPump | -> | input.vehicle.heat_pump |
input.ev.cabin | -> | input.vehicle.cabin |
input.ev.cargo | -> | input.origin.properties.vehicle.total_cargo_weightinput.via.properties.vehicle.total_cargo_weight |
input.ev.occupants | -> | input.origin.properties.vehicle.occupantsinput.via.properties.vehicle.occupants |
input.ev.consumption | -> | input.vehicle.auxiliary_consumption |
input.ev.bmsConsumption | -> | removed |
Telemetry
The telemetry fields are now structured under the vehicle object and moved into a strongly typed reference.
| Legacy | New | |
|---|---|---|
input.telemetry | -> | input.vehicle.headinginput.vehicle.motor_rpminput.vehicle.odometerinput.vehicle.outside_temperatureinput.vehicle.tire_pressureinput.vehicle.vehicle_speed |
Extended operator preferences
Operator ranking levels have been simplified to low, medium, and high. Additionally, preferences can be scoped per country using the countries field. Note: To apply preferences globally (as in the legacy service), either omit the countries field or set it as an empty array.
API Reference / Migration / Operator Preference
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
operators: { ranking: { type: preferred, levels: { # Operator only uses a high preference in the Netherlands. high: [ { id: "op1", countries: [NL] } ], # Operator uses a low preference globally. low: [ { id:"op3" } ] } } # Operator is excluded globally. exclude: [ { id: "op2" } ]}
Total occupant weight
Cargo and occupant information have been moved to properties.vehicle under origin and via location points. Moreover, the default occupants' weight can now be overridden by setting the total_occupant_weight. This field can only be used in combination with occupants.
API Reference / Migration / Total Occupant Weight
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
origin { vehicle { occupants: 3 total_occupant_weight: { value: 160 type: kilogram source: manual } }}
Query / subscription changes
This section details all changes to the legacy route and routePath queries and the routeUpdateById subscription in comparison to the getRoute query and route subscription. For complete schema definitions and usage, see Subscribe to route updates and Query route details.
⚡️ Changes from legacy
- Schema reorganization; field naming and grouping have been revised, and redundant fields have been removed to enhance developer usability and minimize integration overhead.
- Input re-usage; the output includes the same input data as the original
createRouterequest, enriched with default property values if not provided. This allows the response to be reused for future route recalculations without re-entering the same information. Stepshave been replaced bySections; sections provide more granular information, including section origin and destination details.- Navigation instructions; in the new route service, instruction data is now scoped per leg. Full route instructions are now available exclusively through the
navigationquery.
📦 Deprecated features
- Alternative routes; only the recommended route is returned, alternatives will be added in a new format at a later stage.
routePathquery; information about the route path can be retrieved by requesting the fieldrecommended.path_plotingetRoutequery orroutesubscription.- CO₂ savings; have been removed from
savingsand can now be queried through thegetRouteEmissionsendpoint
Schema reorganization
The new Route service response, for both the getRoute query and route subscription, has the following changes:
- Consolidated top-level fields from 7 to 5.
- Unified Input Representation under
request_input.
Top level response
The table below maps the legacy route request / subscription fields to their corresponding query / subscription fields in the new Route service:
| Legacy | New | |
|---|---|---|
route | -> | recommended |
alternatives | -> | removed |
ev | -> | request_input |
telemetry | -> | request_input |
routeRequest | -> | request_input |
app | -> | meta.app_id |
status | -> | status |
Route
The legacy route field has been renamed to recommended and reorganized to improve clarity and extensibility.
| Legacy | New | |
|---|---|---|
route.id | -> | idrecommended.id |
route.type | -> | removed |
route.charges | -> | recommended.charges |
route.chargesAvailable | -> | removed |
route.chargesOccupied | -> | removed |
route.chargesUnknown | -> | removed |
route.chargesOutOfOrder | -> | removed |
route.distance | -> | recommended.distance |
route.duration | -> | recommended.durations.total |
route.consumption | -> | recommended.consumption |
route.chargeTime | -> | recommended.durations.charging |
route.rangeStartKwhroute.rangeStartPercentageroute.rangeStart | -> | recommended.range_at_origin |
route.rangeEndroute.rangeEndKwhroute.rangeEndPercentage | -> | recommended.range_at_destination |
route.via | -> | removed |
route.polyline | -> | recommended.polyline |
route.pathPlot | -> | recommended.path_plot |
route.elevationUp | -> | recommended.elevation.up |
route.elevationDown | -> | recommended.elevation.down |
route.elevationMax | -> | recommended.elevation.max |
route.saving | -> | recommended.savings |
route.legs | -> | recommended.legs |
route.instructions | -> | removed |
route.stationsAlongRoute | -> | recommended.alternative_stations |
route.tags | -> | recommended.tags |
route.amenityRanking | -> | removed |
route.elevationPlot | -> | recommended.path_plot.elevation |
Legs
The legs field has been updated with several improvements. The origin.properties and destination.properties fields are now typed, replacing the previous free-form JSON format. Range data has been reorganized under range_at_origin and range_at_destination, and a new range_after_charge field has been added. Lastly, the steps field has been renamed to sections. See the “Steps” section below for more details.
| Legacy | New | |
|---|---|---|
route.legs.id | -> | removed |
route.legs.distance | -> | recommended.legs.distance |
route.legs.duration | -> | recommended.legs.durations |
route.legs.consumption | -> | recommended.legs.consumption |
route.legs.rangeStartroute.legs.rangeStartKwhroute.legs.rangeStartPercentage | -> | recommended.legs.range_at_origin |
route.legs.rangeEndroute.legs.rangeEndKwhroute.legs.rangeEndPercentage | -> | recommended.legs.range_at_destination |
route.legs.origin | -> | recommended.legs.origin |
route.legs.destination | -> | recommended.legs.destination |
route.legs.type | -> | recommended.legs.type |
route.legs.name | -> | removed |
route.legs.stationId | -> | recommended.legs.station.station_id |
route.legs.operatorId | -> | removed |
route.legs.operatorName | -> | removed |
route.legs.operatorRanking | -> | removed |
route.legs.chargeTime | -> | recommended.legs.durations.charging |
route.legs.evse | -> | route.legs.station.evse_id |
route.legs.connector | -> | route.legs.station.connector_id |
route.legs.plugsAvailable | -> | removed |
route.legs.plugsOccupied | -> | removed |
route.legs.plugsUnknown | -> | removed |
route.legs.plugsOutOfOrder | -> | removed |
route.legs.plugsCount | -> | removed |
route.legs.polyline | -> | recommended.legs.polyline |
route.legs.steps | -> | recommended.legs.sections |
route.legs.tags | -> | recommended.legs.tags |
route.legs.cargo | -> | recommended.legs.destination.properties.total_cargo_weightrecommended.legs.origin.properties.total_cargo_weight |
route.legs.occupants | -> | recommended.legs.via.properties.occupantsrecommended.legs.origin.properties.occupants |
Steps
steps are now replaced with sections. Sections provide additional information — such as origin and destination — and make it easy to identify different road characteristics to display on a frontend.
API Reference / Migration / Sections
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
sections { type tags polyline(decimals: five) distance(unit: meter) duration consumption origin { id type properties { occupants total_occupant_weight total_cargo_weight } geometry { type coordinates } } destination { id type properties { occupants total_occupant_weight total_cargo_weight } geometry { coordinates type } }}