Schemas
EmissionsRequest
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, or send null, the API calculates the distance along the roads.
Point
xyRoute
stopIdsTransportMode
The SINTEF energy module calculates the emission for all transport modes, but not for BIKE, ELECTRICAL_BIKE and ELECTRICAL_SCOOTER. For these three, the API uses a fixed factor from SINTEF for each passenger kilometre. METRO is one MX3000 trainset on the Oslo subway, and METRO_TWO_TRAINSETS is two coupled MX3000 trainsets. If you do not know the length of the train, use METRO_TWO_TRAINSETS.
CalculationModel
nameThe model that calculated the emission. SMEC is the SINTEF energy module. SINTEF_EMISSION_FACTORS is a set of fixed emission factors from SINTEF for each passenger kilometre, which the API uses for bike, electrical bike and electrical scooter. The API can get more models in the future, so a client must accept values that it does not know.
versionCodeThe version of the model. For SMEC, it is the version code that the SINTEF energy module gave for the calculation, the same value as versionCode in the response from SINTEF. It can be null if the SINTEF energy module does not give a version. For SINTEF_EMISSION_FACTORS, it is the version of the set of factors that the API uses. Entur increases it when a factor changes. For a train trip with more than one leg, the value is null if the legs have different versions. Then each leg in legs has its own version.
CalculationSummary
numberOfVehiclesThe number of vehicles that are necessary for all the passengers.
co2eEmissionInGrams^-?\d+(\.\d+)?$ · requiredThe total CO2e emission for all passengers in grams. The value is a decimal number in a string, so that a client that reads JSON numbers as floating point numbers does not lose digits.
The model that calculated the emission.
distanceKmThe length of the route in kilometres. The value is null if the SINTEF energy module does not give a length.
EmissionsResponse
warningsInformation about the response as a whole.
ResponseMetadata
sourceThe organisation that makes the results available. Credit it when you use or show the results. «Terms of use» in the API description gives the attribution text that NLOD requires.
SintefCalculation
versionCodeThe version of the SINTEF energy module that made the calculation. The value changes when SINTEF changes the model.
SintefEmissions
The emission in grams for each part of the lifecycle of the vehicle.
The emission in grams.
SintefLifecycleEmission
tailpipeGvehicleManufacturingGvehicleMaintenanceGfuelProductionGtotalLifecycleGSintefResults
travelTimeSThe travel time in seconds.
routeLengthKmThe length of the route in kilometres.
averageSpeedKmHThe average speed in kilometres each hour.
The emission of one vehicle on the route.
SintefSource
vehicleIdThe SINTEF vehicle that the calculation uses.
TrainLeg
vehicleIdThe SINTEF vehicle that the calculation for the leg uses.
co2eEmissionInGrams^-?\d+(\.\d+)?$ · requiredThe CO2e emission of the leg in grams. The value is a decimal number in a string, so that a client that reads JSON numbers as floating point numbers does not lose digits.
The model that calculated the leg.
The response from the SINTEF energy module for the leg, without changes. The emissions are for one train set, not for the passengers in the request. The emission of the passengers on the leg is co2eEmissionInGrams. A sum over the legs is for one train set on each leg. The schema shows only the fields that clients use most. The response has more fields.
trainLineThe diesel line of the leg. The value is null if the leg uses an electric train.
distanceKmThe length of the leg in kilometres. The value is null if the SINTEF energy module does not give a length.
TransportModeCalculation
transportModeThe transport mode of the calculation. It is one of the transport modes in the request. The API can get more transport modes in the future, so a client must accept values that it does not know.
The response from the SINTEF energy module, without changes. The emissions are for one vehicle, not for the passengers in the request. The emission for the request is calculationSummary.co2eEmissionInGrams. The schema shows only the fields that clients use most. The response has more fields. The value is null for bike, electrical bike and electrical scooter. It is also null for a train trip with more than one leg. Then each leg in legs has its own response.
The parts of a train trip. Each leg uses one train type, for example an electric train or a diesel train. If the full trip uses one train type, there is one leg, and detailedSintefCalculations also has a value. The value is null for all transport modes other than TRAIN.
TransportModeCalculationFailure
transportModeThe transport mode of the calculation. It is one of the transport modes in the request. The API can get more transport modes in the future, so a client must accept values that it does not know.
reasonThe cause of the failure, as text for a person to read. Use it in logs. Do not compare it with a fixed value, because the text can change.
Problem
typeIdentifies the type of error. Errors from the API have their own URI. The URI only identifies the type of error: it does not open a page. For other errors, the value is about:blank.
titleFor errors from the API, a code for the type of error, for example unknown_stop_place. For other errors, the HTTP status text.
statusThe HTTP status code.
instanceIdentifies this occurrence of the error with the correlation ID of the request. If the correlation ID is a UUID, the value is urn:uuid:<correlation ID>. If not, the value is urn:correlation-id:<correlation ID>. Give this value when you contact Entur about the error.
detailAn explanation of this occurrence of the error, as text for a person to read.