Skip to main content
POST
/
calculate
Calculate transport emissions
curl --request POST \
  --url https://api.terratwin.com/api/v1/transportation/emissions/calculate \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "options": {
    "fallbackTransportModes": [
      "ROAD",
      "AIR"
    ]
  },
  "cargo": {
    "category": "GENERAL",
    "densityCharacteristics": "LIGHT",
    "weight": {
      "unit": "KILOGRAM",
      "value": 100
    }
  },
  "origin": {
    "type": "PLACE",
    "street": "10 Downing St",
    "postCode": "SW1A 2AB",
    "city": "London",
    "countryCode": "GB"
  },
  "destination": {
    "type": "PLACE",
    "street": "Wetstraat 175",
    "postCode": "1048",
    "city": "Brussel",
    "countryCode": "BE"
  },
  "transportChain": [
    {
      "type": "WATER",
      "departureDateTime": "2025-12-25T00:00:00+00:00",
      "arrivalDateTime": "2026-01-01T18:12:30Z",
      "vehicle": "CONTAINER",
      "containerTypeCode": "22G1",
      "navigationConstraints": [
        "AVOID_KIEL_CANAL",
        "AVOID_NORTHEAST_PASSAGE",
        "AVOID_NORTHWEST_PASSAGE"
      ],
      "firstMile": {
        "structure": "ARTICULATED",
        "grossWeight": {
          "unit": "METRIC_TONNE",
          "value": 40.234
        },
        "energyType": "DIESEL"
      }
    },
    {
      "type": "HUB",
      "hubType": "MARITIME_TERMINAL",
      "location": {
        "type": "HARBOR",
        "unLoCode": "BEANR"
      }
    },
    {
      "type": "RAIL",
      "departureDateTime": "2026-01-02T10:00:00+01:00",
      "arrivalDateTime": "2026-01-02T22:00:00+01:00",
      "trainType": "MANIFEST",
      "energyType": "ELECTRICITY"
    }
  ]
}
'
{
  "origin": {
    "type": "PLACE",
    "latitude": 51.503314,
    "longitude": -0.127697
  },
  "destination": {
    "type": "PLACE",
    "latitude": 50.842953,
    "longitude": 4.380659
  },
  "activityDistanceKm": 432.7984446224102,
  "activityTonneKm": 43.27984446224102,
  "transportIntensities": {
    "wttCo2eGramsPerTonneKm": 7.357542146587524,
    "ttwCo2eGramsPerTonneKm": 24.427625106240143,
    "wtwCo2eGramsPerTonneKm": 31.785167252827666
  },
  "transportEmissions": {
    "wttCo2eGrams": 318.433279728691,
    "ttwCo2eGrams": 1057.2238151800073,
    "wtwCo2eGrams": 1375.6570949086981
  },
  "hubIntensities": {
    "co2eGramsPerTonne": 6.199999999999999
  },
  "hubEmissions": {
    "co2eGrams": 0.62
  },
  "totalIntensities": {
    "co2eGramsPerTonneKm": 31.789557287088666
  },
  "totalEmissions": {
    "co2eGrams": 1375.8470949086982
  },
  "transportChain": [
    {
      "type": "WATER",
      "start": {
        "type": "PLACE",
        "latitude": 51.503314,
        "longitude": -0.127697
      },
      "end": {
        "type": "HARBOR",
        "countryCode": "BE",
        "unLoCode": "BEANR",
        "latitude": 51.27936713324465,
        "longitude": 4.3567657470703125,
        "address": "Antwerp"
      },
      "activityDistanceKm": 358.2482682667749,
      "activityTonneKm": 35.824826826677494,
      "transportIntensities": {
        "wttCo2eGramsPerTonneKm": 7.317301534252274,
        "ttwCo2eGramsPerTonneKm": 29.191807981849095,
        "wtwCo2eGramsPerTonneKm": 36.50910951610137
      },
      "transportEmissions": {
        "wttCo2eGrams": 262.14106030316924,
        "ttwCo2eGrams": 1045.7914657073657,
        "wtwCo2eGrams": 1307.932526010535
      },
      "hubIntensities": {
        "co2eGramsPerTonne": 1.9
      },
      "hubEmissions": {
        "co2eGrams": 0.19
      },
      "totalIntensities": {
        "co2eGramsPerTonneKm": 36.50910951610137
      },
      "totalEmissions": {
        "co2eGrams": 1307.932526010535
      },
      "elements": [
        {
          "vehicle": "ARTICULATED_TRUCK_40000_TO_44000_KG",
          "start": {
            "type": "PLACE",
            "latitude": 51.503314,
            "longitude": -0.127697
          },
          "end": {
            "type": "PLACE",
            "latitude": 51.459472,
            "longitude": 0.340663
          },
          "activityDistanceKm": 44.7001,
          "activityTonneKm": 4.47001,
          "transportIntensities": {
            "wttCo2eGramsPerTonneKm": 21,
            "ttwCo2eGramsPerTonneKm": 69,
            "wtwCo2eGramsPerTonneKm": 90
          },
          "transportEmissions": {
            "wttCo2eGrams": 93.87021,
            "ttwCo2eGrams": 308.43069,
            "wtwCo2eGrams": 402.3009
          },
          "resultsByEnergyType": [
            {
              "energyType": "DIESEL",
              "activityDistanceKm": 44.7001,
              "activityTonneKm": 4.47001,
              "intensities": {
                "wttCo2eGramsPerTonneKm": 21,
                "ttwCo2eGramsPerTonneKm": 69,
                "wtwCo2eGramsPerTonneKm": 90
              },
              "emissions": {
                "wttCo2eGrams": 93.87021,
                "ttwCo2eGrams": 308.43069,
                "wtwCo2eGrams": 402.3009
              },
              "resultsByEnergySource": [
                {
                  "energySource": "FOSSIL_DIESEL",
                  "emissions": {
                    "wttCo2eGrams": 93.87021,
                    "ttwCo2eGrams": 308.43069,
                    "wtwCo2eGrams": 402.3009
                  }
                }
              ]
            }
          ],
          "type": "ROAD"
        },
        {
          "hubType": "MARITIME_TERMINAL",
          "activityTonnes": 0.1,
          "intensities": {
            "co2eGramsPerTonne": 1.9000000000000001
          },
          "emissions": {
            "co2eGrams": 0.19
          },
          "type": "HUB"
        },
        {
          "vehicle": "CONTAINER",
          "capacityBand": "POST_PANAMAX",
          "containerType": "TWENTY_FOOT_CONTAINER",
          "start": {
            "type": "HARBOR",
            "countryCode": "GB",
            "unLoCode": "GBTIL",
            "latitude": 51.459502138725945,
            "longitude": 0.3407907485961914,
            "address": "Tilbury"
          },
          "end": {
            "type": "HARBOR",
            "countryCode": "BE",
            "unLoCode": "BEANR",
            "latitude": 51.27936713324465,
            "longitude": 4.3567657470703125,
            "address": "Antwerp"
          },
          "activityDistanceKm": 313.5481682667749,
          "activityTonneKm": 31.354816826677492,
          "transportIntensities": {
            "wttCo2eGramsPerTonneKm": 5.366666666666667,
            "ttwCo2eGramsPerTonneKm": 23.516666666666666,
            "wtwCo2eGramsPerTonneKm": 28.883333333333333
          },
          "transportEmissions": {
            "wttCo2eGrams": 168.27085030316923,
            "ttwCo2eGrams": 737.3607757073656,
            "wtwCo2eGrams": 905.6316260105349
          },
          "resultsByEnergyType": [
            {
              "energyType": "VLSFO",
              "activityDistanceKm": 313.5481682667749,
              "activityTonneKm": 31.354816826677492,
              "intensities": {
                "wttCo2eGramsPerTonneKm": 5.366666666666667,
                "ttwCo2eGramsPerTonneKm": 23.516666666666666,
                "wtwCo2eGramsPerTonneKm": 28.883333333333333
              },
              "emissions": {
                "wttCo2eGrams": 168.27085030316923,
                "ttwCo2eGrams": 737.3607757073656,
                "wtwCo2eGrams": 905.6316260105349
              },
              "resultsByEnergySource": [
                {
                  "energySource": "FOSSIL_VLSFO",
                  "emissions": {
                    "wttCo2eGrams": 168.27085030316923,
                    "ttwCo2eGrams": 737.3607757073656,
                    "wtwCo2eGrams": 905.6316260105349
                  }
                }
              ]
            }
          ],
          "type": "WATER"
        }
      ]
    },
    {
      "hubType": "MARITIME_TERMINAL",
      "activityTonnes": 0.1,
      "intensities": {
        "co2eGramsPerTonne": 1.9000000000000001
      },
      "emissions": {
        "co2eGrams": 0.19
      },
      "type": "HUB"
    },
    {
      "type": "RAIL",
      "start": {
        "type": "PLACE",
        "latitude": 51.278965,
        "longitude": 4.356775
      },
      "end": {
        "type": "PLACE",
        "latitude": 50.842953,
        "longitude": 4.380659
      },
      "activityDistanceKm": 74.55017635563529,
      "activityTonneKm": 7.45501763556353,
      "transportIntensities": {
        "wttCo2eGramsPerTonneKm": 7.550917003466829,
        "ttwCo2eGramsPerTonneKm": 1.5335107214373964,
        "wtwCo2eGramsPerTonneKm": 9.084427724904227
      },
      "transportEmissions": {
        "wttCo2eGrams": 56.29221942552173,
        "ttwCo2eGrams": 11.432349472641542,
        "wtwCo2eGrams": 67.72456889816328
      },
      "hubIntensities": {
        "co2eGramsPerTonne": 2.4
      },
      "hubEmissions": {
        "co2eGrams": 0.24
      },
      "totalIntensities": {
        "co2eGramsPerTonneKm": 9.084427724904227
      },
      "totalEmissions": {
        "co2eGrams": 67.72456889816328
      },
      "elements": [
        {
          "vehicle": "LIGHT_DUTY_VEHICLE",
          "start": {
            "type": "PLACE",
            "latitude": 51.278965,
            "longitude": 4.356775
          },
          "end": {
            "type": "PLACE",
            "latitude": 51.278965,
            "longitude": 4.35677
          },
          "activityDistanceKm": 0.0003,
          "activityTonneKm": 0.000029999999999999997,
          "transportIntensities": {
            "wttCo2eGramsPerTonneKm": 77.26027397260273,
            "ttwCo2eGramsPerTonneKm": 257.73972602739724,
            "wtwCo2eGramsPerTonneKm": 334.99999999999994
          },
          "transportEmissions": {
            "wttCo2eGrams": 0.0023178082191780817,
            "ttwCo2eGrams": 0.007732191780821917,
            "wtwCo2eGrams": 0.010049999999999998
          },
          "resultsByEnergyType": [
            {
              "energyType": "DIESEL",
              "activityDistanceKm": 0.0003,
              "activityTonneKm": 0.000029999999999999997,
              "intensities": {
                "wttCo2eGramsPerTonneKm": 77.26027397260273,
                "ttwCo2eGramsPerTonneKm": 257.73972602739724,
                "wtwCo2eGramsPerTonneKm": 335
              },
              "emissions": {
                "wttCo2eGrams": 0.0023178082191780817,
                "ttwCo2eGrams": 0.007732191780821917,
                "wtwCo2eGrams": 0.010049999999999998
              },
              "resultsByEnergySource": [
                {
                  "energySource": "FOSSIL_DIESEL",
                  "emissions": {
                    "wttCo2eGrams": 0.0023178082191780817,
                    "ttwCo2eGrams": 0.007732191780821917,
                    "wtwCo2eGrams": 0.010049999999999998
                  }
                }
              ]
            }
          ],
          "type": "ROAD"
        },
        {
          "hubType": "TRANSSHIPMENT",
          "activityTonnes": 0.1,
          "intensities": {
            "co2eGramsPerTonne": 1.2
          },
          "emissions": {
            "co2eGrams": 0.12
          },
          "type": "HUB"
        },
        {
          "vehicle": "AVERAGE_TRAIN",
          "start": {
            "type": "RAIL_YARD",
            "countryCode": "BE",
            "latitude": 51.279002,
            "longitude": 4.356769,
            "address": ""
          },
          "end": {
            "type": "RAIL_YARD",
            "countryCode": "BE",
            "latitude": 50.842691,
            "longitude": 4.380654,
            "address": "L161A"
          },
          "activityDistanceKm": 74.5358763556353,
          "activityTonneKm": 7.4535876355635295,
          "transportIntensities": {
            "wttCo2eGramsPerTonneKm": 7.537542990127235,
            "ttwCo2eGramsPerTonneKm": 1.4843565549069828,
            "wtwCo2eGramsPerTonneKm": 9.021899545034218
          },
          "transportEmissions": {
            "wttCo2eGrams": 56.18173723374091,
            "ttwCo2eGrams": 11.063781664422365,
            "wtwCo2eGrams": 67.24551889816328
          },
          "resultsByEnergyType": [
            {
              "energyType": "ELECTRICITY",
              "activityDistanceKm": 70.68151401824215,
              "activityTonneKm": 7.068151401824216,
              "intensities": {
                "wttCo2eGramsPerTonneKm": 7.479360000000002,
                "ttwCo2eGramsPerTonneKm": 0,
                "wtwCo2eGramsPerTonneKm": 7.479360000000002
              },
              "emissions": {
                "wttCo2eGrams": 52.865248868747976,
                "ttwCo2eGrams": 0,
                "wtwCo2eGrams": 52.865248868747976
              },
              "resultsByEnergySource": [
                {
                  "energySource": "ELECTRICAL_GRID",
                  "emissions": {
                    "wttCo2eGrams": 52.865248868747976,
                    "ttwCo2eGrams": 0,
                    "wtwCo2eGrams": 52.865248868747976
                  }
                }
              ]
            },
            {
              "energyType": "DIESEL",
              "activityDistanceKm": 3.854362337393138,
              "activityTonneKm": 0.3854362337393138,
              "intensities": {
                "wttCo2eGramsPerTonneKm": 8.604505945945949,
                "ttwCo2eGramsPerTonneKm": 28.704570810810825,
                "wtwCo2eGramsPerTonneKm": 37.309076756756774
              },
              "emissions": {
                "wttCo2eGrams": 3.3164883649929378,
                "ttwCo2eGrams": 11.063781664422365,
                "wtwCo2eGrams": 14.380270029415303
              },
              "resultsByEnergySource": [
                {
                  "energySource": "FOSSIL_DIESEL",
                  "emissions": {
                    "wttCo2eGrams": 3.3164883649929378,
                    "ttwCo2eGrams": 11.063781664422365,
                    "wtwCo2eGrams": 14.380270029415303
                  }
                }
              ]
            }
          ],
          "type": "RAIL"
        },
        {
          "hubType": "TRANSSHIPMENT",
          "activityTonnes": 0.1,
          "intensities": {
            "co2eGramsPerTonne": 1.2
          },
          "emissions": {
            "co2eGrams": 0.12
          },
          "type": "HUB"
        },
        {
          "vehicle": "LIGHT_DUTY_VEHICLE",
          "start": {
            "type": "PLACE",
            "latitude": 50.842887,
            "longitude": 4.380823
          },
          "end": {
            "type": "PLACE",
            "latitude": 50.842953,
            "longitude": 4.380659
          },
          "activityDistanceKm": 0.014,
          "activityTonneKm": 0.0014000000000000002,
          "transportIntensities": {
            "wttCo2eGramsPerTonneKm": 77.26027397260273,
            "ttwCo2eGramsPerTonneKm": 257.73972602739724,
            "wtwCo2eGramsPerTonneKm": 335
          },
          "transportEmissions": {
            "wttCo2eGrams": 0.10816438356164385,
            "ttwCo2eGrams": 0.3608356164383562,
            "wtwCo2eGrams": 0.4690000000000001
          },
          "resultsByEnergyType": [
            {
              "energyType": "DIESEL",
              "activityDistanceKm": 0.014,
              "activityTonneKm": 0.0014000000000000002,
              "intensities": {
                "wttCo2eGramsPerTonneKm": 77.26027397260273,
                "ttwCo2eGramsPerTonneKm": 257.73972602739724,
                "wtwCo2eGramsPerTonneKm": 335
              },
              "emissions": {
                "wttCo2eGrams": 0.10816438356164385,
                "ttwCo2eGrams": 0.3608356164383562,
                "wtwCo2eGrams": 0.4690000000000001
              },
              "resultsByEnergySource": [
                {
                  "energySource": "FOSSIL_DIESEL",
                  "emissions": {
                    "wttCo2eGrams": 0.10816438356164385,
                    "ttwCo2eGrams": 0.3608356164383562,
                    "wtwCo2eGrams": 0.4690000000000001
                  }
                }
              ]
            }
          ],
          "type": "ROAD"
        }
      ]
    }
  ],
  "creditCost": 5
}

Authorizations

x-api-key
string
header
required

API key for authenticating requests. Include this header in all calls.

Body

application/json
cargo
Cargo · object
required

Defines the transported goods for which emissions are calculated. Cargo parameters affect vehicle choice, load factors, and resulting emission estimates throughout the transport chain. Only the weight property is mandatory. Other properties will be defaulted if they are not provided. However, the more detail provided, the more accurate the results will be.

options
Calculation options · object

Used to customize emissions calculations and to control which details are included in the response.

origin
Coordinates · object

Locations resolve either to a transport facility (airport, harbor, or rail yard) or to a general geographic area such as a building, street, postcode, or city. For larger areas, centroids are used to represent the approximate position.

Identification and geocoding

  • Airports and harbors can be identified directly by code (iataCode for airports, unLoCode for harbors).
  • Otherwise, the location is geocoded based on the available address components, and if the type is not PLACE, the closest transport facility of the indicated type is selected.

Geocoding priority

When multiple data sources are provided, they are evaluated in the following order of preference:

  1. Geographic coordinates (latitude and longitude)
  2. IATA code (for non-airport locations)
  3. Structured address components
  4. UN/LOCODE (for non-harbor locations)
  5. Unstructured address text

Geocoding accuracy depends on the quality and completeness of the input. Structured addresses almost always yield better results and are tolerant of minor data-entry errors, such as postcodes appearing in street fields. For both structured and unstructured inputs, the most probable match is selected based on lexicographical similarity to known locations.

Operational behavior

When a transport facility is specified directly, it will be used regardless of any transport vehicle specified. The system does not enforce suitability constraints. For example, a large aircraft such as a Boeing 747-8F may be routed to Gibraltar International (LXGB) despite its short runways. If the airport were not explicitly chosen, the system would instead select a nearby suitable airport such as Málaga-Costa del Sol (AGP).

Similarly, a container vessel may be routed to Plymouth (GBPLY) even though the port lacks container handling facilities. If the port were not specified explicitly, a capable alternative such as Southampton (GBSOU) would be selected automatically.

destination
Coordinates · object

Locations resolve either to a transport facility (airport, harbor, or rail yard) or to a general geographic area such as a building, street, postcode, or city. For larger areas, centroids are used to represent the approximate position.

Identification and geocoding

  • Airports and harbors can be identified directly by code (iataCode for airports, unLoCode for harbors).
  • Otherwise, the location is geocoded based on the available address components, and if the type is not PLACE, the closest transport facility of the indicated type is selected.

Geocoding priority

When multiple data sources are provided, they are evaluated in the following order of preference:

  1. Geographic coordinates (latitude and longitude)
  2. IATA code (for non-airport locations)
  3. Structured address components
  4. UN/LOCODE (for non-harbor locations)
  5. Unstructured address text

Geocoding accuracy depends on the quality and completeness of the input. Structured addresses almost always yield better results and are tolerant of minor data-entry errors, such as postcodes appearing in street fields. For both structured and unstructured inputs, the most probable match is selected based on lexicographical similarity to known locations.

Operational behavior

When a transport facility is specified directly, it will be used regardless of any transport vehicle specified. The system does not enforce suitability constraints. For example, a large aircraft such as a Boeing 747-8F may be routed to Gibraltar International (LXGB) despite its short runways. If the airport were not explicitly chosen, the system would instead select a nearby suitable airport such as Málaga-Costa del Sol (AGP).

Similarly, a container vessel may be routed to Plymouth (GBPLY) even though the port lacks container handling facilities. If the port were not specified explicitly, a capable alternative such as Southampton (GBSOU) would be selected automatically.

transportChain
(Unknown transport · object | Air transport · object | Rail transport · object | Road transport · object | Water transport · object | Weighted modes transport · object | Hub operation · object)[]

Represents the sequence of transport and hub operations that define a complete multimodal logistics chain.

Structure

The transportChain is an ordered array of elements describing how cargo moves between points.

  • Each transport element represents a specific operation and has a type value of AIR, RAIL, ROAD, WATER, or WEIGHTED_MODES.
  • Each hub element has a type of HUB and represents the connecting location between consecutive transport segments.

Behavior

  • If this array is not provided or is empty, fallback transport modes are attempted instead. The system will cycle through the fallback modes in order, applying default parameters for each until one succeeds or all fail.
  • Hubs must appear between each pair of transport operations to define the connecting locations between them.
  • Hubs may also appear as the first and/or last elements in the array. This allows a logistics hub to act as the origin or destination in place of the top-level origin and destination properties, enabling emissions to be attributed to those locations.

Response

Emissions calculation successfully performed

origin
Location · object
required

The origin location for the transport chain.

destination
Location · object
required

The destination location for the transport chain.

activityDistanceKm
number<double>

The total distance in kilometers across all transport operations in the request.

activityTonneKm
number<double>

The total transport activity for all transport operations in the request. Measured in tonne kilometers.

transportIntensities
object

The combined emission intensity rates across all the transport operations.

transportEmissions
object

The total emissions for all the transport operations.

hubIntensities
object

The combined emission intensity rates across all the logistics hubs.

hubEmissions
object

The total emissions for all the logistics hubs.

totalIntensities
object

The combined emission intensity rates across the entire transport chain.

totalEmissions
object

The total emissions for the entire transport chain.

creditCost
number<integer>

Number of credits consumed to generate the emissions calculation results, deducted from the user’s account as part of processing the request.

transportChain
(Transport chain result · object | Hub operation result · object)[]

Array of emissions calculation results for the transport operations defined in the request’s transport chain, along with any automatically inserted logistics hub operation results. The results appear in the same order as in the request, with any inserted hub operations results placed where they occurred in the transport chain.