CO2e emission calculations
Calculate the CO2e emission of a route for each transport mode
Each emission is in grams of CO2e and is for all passengers (numberOfPassengers) together. The calculation is different for each group of transport modes:
- Train, plane, bus, metro, tram and ferry: the emission of one vehicle, divided by its number of seats and multiplied by the number of passengers.
- Car and motorcycle: the emission of all the vehicles that are necessary for the passengers.
- Bike, electrical bike and electrical scooter: the distance multiplied by a fixed factor from SINTEF for each passenger kilometre, and by the number of passengers.
Usually, the response has one calculation for each transport mode in the request. But calculations can have fewer items than transportModes, for two causes:
- Some transport modes cannot travel the route. An example is a plane between two places that have no airport near them. The response does not include these transport modes. It includes a warning instead.
- If the calculation fails for a transport mode, the response shows the transport mode in
failures. The response still includes the other transport modes.
Headers
ET-Client-NameEntur Client Header.
It is required that all consumers identify themselves by using this header.
Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers.
The structure of ET-Client-Name should be: <company>-<application>.
X-Correlation-IdCorrelation id
Calculate the CO2e emission of a route for each transport mode › Request Body
transportModesThe route of the trip, as waypoints or as stop IDs. A stop ID can identify a stop place, a quay or a group of stop places.
If the route has waypoints, the API uses only the waypoints and ignores the stop IDs. Then the route must have two or more waypoints, and each waypoint must have x and y. If the route has no waypoints, the API uses the stop IDs. Then the route must have two or more stop IDs.
numberOfPassengersdistanceKmThe distance of the trip in kilometres. The API uses this distance for bike, electrical bike and electrical scooter. If you do not send it, the API calculates the distance along the roads.
Calculate the CO2e emission of a route for each transport mode › Responses
The CO2e emission for each transport mode
warnings