calculate Emissions for specified Transport
Please Note: this Api uses rate limits: max. 100 requests/second and max 7 simultaneous connections are allowed!
Exceeding the rate limit will result in a http 429 error ("too many requests")
Please visit get Access Token and provide username and password as given to you by the EcoTransIT staff.
After successful login you will r./eceive an access token and a refresh token. Use this access token as bearer token in your calculateTransport request (see first code snippet in Authorization section)
Please note that the access token expires after a while. You can use the refresh token to get a new access token, like in the following curl request.
curl -X POST https://customer-name.ecotransit.org/auth/realms/ETW/protocol/openid-connect/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "client_id=webservice-rest" \
-d "client_secret=<my-client-secret>" \
-d "grant_type=refresh_token" \
-d "refresh_token=<my-refresh-token>"
⚠️ Warning: Store the refresh token at a safe place as it contains sensitive information!!
An overview of the OpenId Endpoint Overview of the authorization server can be found here
Only Informational. Will also occur in Response. Use this to identify/tag/descripe your Requests
Input: Only relevant for sea with routing "ais-based" (default) and air routing
For longer trips the transportDate shall specify the arrival date Output: Same as provided in the request or otherwise set to default
metric tons (equal to 1000 kg)
Only available for air, sea and cooled transport (trucks, container trains and Clean Cargo container ships)
Only Informational. Can be used to tag/describe transport chain elements
The given information is simply passed through to the response as it is.
List of candidates for origin. The first match in the list will be set as origin All other items will be omitted
Key | Value |
---|---|
true | Disables the transfer point determination and the transport starts directly from the selected location. |
false | Depending on the transport mode the location will be validated and perhaps changed via the EcoTransIT World internal transfer point determination (default). |
The maximum road feeder distance defines a circle distance around the respective location. Within this circle all airports will be included as possible transfer points. If no airport is found, the closest suitable airport will be selected by EcoTransIT World.
List of candidates for destination. The first match in the list will be set as destination All other items will be omitted
Key | Value |
---|---|
true | Disables the transfer point determination and the transport starts directly from the selected location. |
false | Depending on the transport mode the location will be validated and perhaps changed via the EcoTransIT World internal transfer point determination (default). |
The maximum road feeder distance defines a circle distance around the respective location. Within this circle all airports will be included as possible transfer points. If no airport is found, the closest suitable airport will be selected by EcoTransIT World.
transported weight [t] / Maximum Payload of transport unit [t], expressed as percentage
disables the routing and overrides the distance used for calculation. For truck transports the emission calculation for a motorway is assumed
Factor for operational derivations in percentage. Increases the overall distance.
E.g.: distanceAdjustmentFactor of 5 increases the calculated distance from 100km to 105km
For sea transports with clean cargo activated the distanceAdjustmentFactor is set to 15 by default as suggested by clean cargo.
Providing a custom distanceAdjustmentFactor for clean cargo transports will override the default value and is not recommended!
The emissionClass of the transport vehicle
The truckType used for transportation (e.g. Class40 for truck with max. vehicle weight of 40 tons)
Option | Description |
---|---|
PREFERRED | Ferry lines will be preferred |
NORMAL | Normal ferry consideration (default) |
OBSTRUCT | Ferry lines will be avoided |
provide instead of loadFactor. Depending on value and parameters loadFactor will be calculated automatically
| Options| Description | | FTL |Full Truck Load | | LTL |Less than truck load| | FCL |Full container load| | AUTO | Automatic determination of FTL or LTL truck load | To calculate LCL please calculate a part container on the base of the t/TEU or t/FEU (e.g. 50% of the container are 0.5 TEU).
Input: Specify either vehicleEmptyWeight directly or truckBodyType which then calculates the EmptyWeight automatically.
If both values are provided the vehicleEmptyWeight will be taken into account and the truckBodyType will be ignored.
any desired information can be defined here (as a map / dictionary of string/string key-value pairs) and will also be shown in the response.
Can be specified as follows:
{
"someKey": "someValue",
"anotherKey": "anotherValue"
}
curl -i -X POST \
https://rest-api.ecotransit.world/_mock/apis/openapi/etw-rest/calculateTransport \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"cargo": {
"unit": "TONS",
"amount": "5.5"
},
"transportChainElements": [
{
"elementType": "TRANSPORT",
"route": {
"origin": [
{
"locationType": "ZIP_CODE",
"country": "DE",
"code": "20539"
}
],
"destination": [
{
"locationType": "ZIP_CODE",
"country": "DE",
"code": "30167"
}
]
},
"mainCarriage": {
"transportMode": "ROAD"
}
}
]
}'
Successful operation
Input: Only relevant for sea with routing "ais-based" (default) and air routing
For longer trips the transportDate shall specify the arrival date Output: Same as provided in the request or otherwise set to default
metric tons (equal to 1000 kg)
Only available for air, sea and cooled transport (trucks, container trains and Clean Cargo container ships)
specifies the URL of the KML file that contains the route of the transport chain elements.
indicating the number of the transport chain element (tce), if there is more than one
Informational data as provided in the request by the user.
one transportChainElement may have several pre/post/mainCarriageResults, e.g. when a flight requires stopovers
one transportChainElement may have several pre/post/mainCarriageResults, e.g. when a flight requires stopovers
in the Response location is always a wgs84Coordinate
ISO 3166-1 ALPHA-2 code of the country
in the Response location is always a wgs84Coordinate
ISO 3166-1 ALPHA-2 code of the country
Upstream energy consumption and upstream emissions (= energy provision, production and distribution)
Upstream energy consumption and upstream emissions (= energy provision, production and distribution)
Upstream energy consumption and upstream emissions (= energy provision, production and distribution)
Upstream energy consumption and upstream emissions (= energy provision, production and distribution)
Upstream energy consumption and upstream emissions (= energy provision, production and distribution)
transported weight [t] / Maximum Payload of transport unit [t], expressed as percentage
Factor for operational derivations in percentage. Increases the overall distance.
E.g.: distanceAdjustmentFactor of 5 increases the calculated distance from 100km to 105km
For sea transports with clean cargo activated the distanceAdjustmentFactor is set to 15 by default as suggested by clean cargo.
Providing a custom distanceAdjustmentFactor for clean cargo transports will override the default value and is not recommended!
The emissionClass of the transport vehicle
The truckType used for transportation (e.g. Class40 for truck with max. vehicle weight of 40 tons)
By default the empty run factor will be defined by the type of truck load (for road calculation) or the train type (for rail calculations).
For train calculations:
see schema for trainType
For road calculations:
Truck load | Empty run factor |
---|---|
FTL | 20% |
LTL | 15% |
Option | Description |
---|---|
PREFERRED | Ferry lines will be preferred |
NORMAL | Normal ferry consideration (default) |
OBSTRUCT | Ferry lines will be avoided |
provide instead of loadFactor. Depending on value and parameters loadFactor will be calculated automatically
| Options| Description | | FTL |Full Truck Load | | LTL |Less than truck load| | FCL |Full container load| | AUTO | Automatic determination of FTL or LTL truck load | To calculate LCL please calculate a part container on the base of the t/TEU or t/FEU (e.g. 50% of the container are 0.5 TEU).
Input: Specify either vehicleEmptyWeight directly or truckBodyType which then calculates the EmptyWeight automatically.
If both values are provided the vehicleEmptyWeight will be taken into account and the truckBodyType will be ignored.
currently not available
{ "transportID": "string", "transportDate": { "year": "2022", "month": "3", "day": "27" }, "cargo": { "unit": "TONS", "amount": 42 }, "accounting": { "air": { … }, "sea": { … }, "cooledTransport": { … } }, "kmlFile": "http://example.com", "notifications": [ { … } ], "resultsPerTransportChainElement": [ { … } ], "customDescription": { "property1": "string", "property2": "string" }, "debug": { "property1": "string", "property2": "string" } }
curl -i -X GET \
'https://rest-api.ecotransit.world/_mock/apis/openapi/etw-rest/calculateTransport/kml?expires=2007-04-05T14%3A30Z&signature=ol3RA-NjoO2POfxEcko994JIip1EQHTM8n6uqxYS730&uuid=b2d738cb-2b54-4f49-8f03-db838a03d91b'