Schemas
TransportMode
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.
Route
stopIdsDecision Table
| Variant | Matching Criteria |
|---|---|
| requires: waypoints | |
| requires: stopIds |
waypointsPoint
xyzEmissionsRequest
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.
EmissionsResponse
warningsTransportModeCalculation
transportModeThe 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.
The response from the SINTEF energy module, without changes. The value is null for bike, electrical bike and electrical scooter. It is also null for a train trip with more than one leg.
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.
TrainLeg
vehicleIdThe SINTEF vehicle that the calculation for the leg uses.
co2eEmissionInGramsThe CO2e emission of the leg in grams. The value is a string, to keep full precision.
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.
CalculationSummary
numberOfVehiclesThe number of vehicles that are necessary for all the passengers.
co2eEmissionInGramsThe total CO2e emission for all passengers in grams. The value is a string, to keep full precision.
distanceKmThe length of the route in kilometres. The value is null if the SINTEF energy module does not give a length.
TransportModeCalculationFailure
transportModeThe 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.
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.