Query route emissions (NEW)

To receive data about the emissions of a planned route, use the getRouteEmissions query. It provides information on the embedded, operational and, end_of_life emissions. The co2e_saved was also moved to this query, ensuring all the emissions related data can be retrieved in one go. The data is available for the vehicle used on the route and an equivalent gasoline internal combustion engine vehicle.

Query

A route_id and a route_details_id are required to get route emissions data. Create a route_id by using the createRoute mutation as described here. Use it together with the route_details_id to receive the emissions of a route.

The getRouteEmissions query is currently released as a beta product and is experimental. Anything within the emissions query may change, break, or disappear at any time. As long as the feature is in beta, it is free of charge.

Arguments

route_id ID

Required

ID of the route for which we retrieve the emissions profile.

route_details_id ID

Required

ID of the route details for which we retrieve the emissions profile. If not provided, we will retrieve the recommended route details.

Frequently used fields

route_vehicle RouteVehicleEmissions

Emissions profile for the vehicle used in route.

Other fields

route_id ID

ID of the route for which we retrieve the emissions profile.

route_alternative_id ID

internal_combustion_vehicle RouteInternalCombustionVehicleEmissions

Show arguments

co2e_saved Float

Estimated GHG emissions saved by a user driving this route with the electric vehicle in grams of CO2e.

Show arguments

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.