Skip to content

General Information

This is the complete specification of the EcoTransIT World Rest Api
Please note: in order to try out the API you need to contact our team to get a test account.

Authorization

If you are already a customer or have a test account see your instance of swagger-ui https://customer-name.ecotransit.org/swagger-ui (replace customer-name with your company name or the test server name) for details on authorization and how to send your first request to the REST API!

Download OpenAPI description
Languages
Servers

https://customer-name.ecotransit.org/

calculate transport

calculate Emissions for specified Transport

Operations

collection and delivery

calculate Emissions for round trip (milkrun)

Operations

collection and delivery calculation

Request

calculate a collection and delivery round ("milkrun") from json input

Security
oAuth2AuthorizationCode
Bodyapplication/jsonrequired
accountingobject(accountingCoDe)
transportChainElementsArray of objects(transportChainElement)>= 2 itemsrequired

The shipmentIds of the loads/unloads of the first transportChainElement will be ommitted because the emissionPercentage for them will always be 0 by definition.

Example: [{"location":{"locationType":"ZIP_CODE","country":"DE","code":20539},"load":[{"cargo":{"unit":"TONS","amount":20}}]},{"location":{"locationType":"ZIP_CODE","country":"DE","code":30167},"unload":[{"cargo":{"unit":"TONS","amount":15},"freightUnitIdentifier":"terminalhannoverCustomerA","listEmissionsInResponse":true},{"cargo":{"unit":"TONS","amount":5},"freightUnitIdentifier":"terminalhannoverCustomerB","listEmissionsInResponse":true}]}]
transportChainElements[].​locationobject(location)
transportChainElements[].​loadArray of objects(distributionLoad)
transportChainElements[].​unloadArray of objects(distributionLoad)
transportChainElements[].​carriageParametersobject(ROAD)
settingsobject(settings)
curl -i -X POST \
  https://customer-name.ecotransit.org/etw-rest/calculateCollectionAndDelivery \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "transportChainElements": [
      {
        "location": {
          "locationType": "ZIP_CODE",
          "country": "DE",
          "code": 20539
        },
        "load": [
          {
            "cargo": {
              "unit": "TONS",
              "amount": 20
            }
          }
        ]
      },
      {
        "location": {
          "locationType": "ZIP_CODE",
          "country": "DE",
          "code": 30167
        },
        "unload": [
          {
            "cargo": {
              "unit": "TONS",
              "amount": 15
            },
            "freightUnitIdentifier": "terminalhannoverCustomerA",
            "listEmissionsInResponse": true
          },
          {
            "cargo": {
              "unit": "TONS",
              "amount": 5
            },
            "freightUnitIdentifier": "terminalhannoverCustomerB",
            "listEmissionsInResponse": true
          }
        ]
      }
    ],
    "settings": {
      "showRoute": "true"
    }
  }'

Responses

Successful operation

Bodyapplication/vnd.ecotransit.app.v2025r2+json
emissionsPerFreightUnitArray of objects(freightUnitResult)

Note that the emissions for the load/undload elements of the first transportChainElement from the request are not shown in the response because they are always 0 by definition!

transportOperationCategoryArray of objects(tceDistributionResult)

List of transport chain elements (TCE) showing the emissions for each leg for the whole freight

kmlFilestring(uri)

specifies the URL of the KML file that displays the route taken by the truck

Response
application/vnd.ecotransit.app.v2025r2+json
{ "emissionsPerFreightUnit": [ {} ], "transportOperationCategory": [ {} ], "kmlFile": "http://example.com" }

Info

get general Information about the api

Operations