Skip to main content
POST
Calculate transport routes

Authorizations

x-api-key
string
header
required

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

Body

application/json
id
string

An identifier for the routes calculation, such as a shipment ID. It is returned in the response. Routes calculation results are not stored.

options
Routes options · object

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

cargo
Cargo · object

Optionally describes the transported goods. Only the cargo category is used: it determines the default vessel type for WATER transport operations, and so which harbors are selected. When not provided, the GENERAL category is used.

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 | Hub · 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 UNKNOWN.
  • 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, acting as the origin or destination in place of the top-level origin and destination properties.
  • The road operations connecting the start and end locations to the selected airports, harbors, and rail yards are added automatically.
  • WEIGHTED_MODES transport operations are not supported.
context
object

Any information you want returned in the response. It is returned unchanged.

Response

Routes successfully calculated

origin
Location · object
required
destination
Location · object
required
distanceKm
number<double>
required

The total distance of the transport chain in kilometers. Distances are the routed distances; no distance adjustment factors are applied.

transportChain
object[]
required

The legs of the transport chain, in order.

creditCost
number<double>
required

The number of credits charged for the request. Credits are charged in the same way as for an emissions calculation.

id
string

The id provided in the request.

context
object

The context provided in the request.