openapi: 3.0.3
info:
  title: EcoTransIT World REST-API
  description: >-
    ## General Information

    This is the complete specification of the EcoTransIT World Rest Api <br>

    **Please note:** in order to try out the API you need to [contact our
    team](https://www.ecotransit.org/en/contact/) 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! <br>
  contact:
    email: support@ecotransit.world
  license:
    name: IVE Legal notice
    url: https://www.ecotransit.org/en/imprint/
  version: 2025r4.1.4
servers:
  - url: https://customer-name.ecotransit.org
tags:
  - name: calculate transport
    description: calculate Emissions for specified Transport
  - name: collection and delivery
    description: calculate Emissions for round trip (milkrun)
  - name: Info
    description: get general Information about the api
externalDocs:
  description: Official website of EcoTransIT World
  url: https://www.ecotransit.org/
paths:
  /etw-rest/getVersion:
    get:
      tags:
        - Info
      summary: etw-rest-api version
      description: Returns the current version of the etw-rest api
      operationId: getVersion
      security: []
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getVersionResponse'
        '400':
          description: Invalid input
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problemDetails'
  /etw-rest/calculateTransport:
    post:
      tags:
        - calculate transport
      summary: calculate Transport from json input
      security:
        - oAuth2AuthorizationCode:
            - openid
            - offline_access
      description: request for emission calculations
      operationId: calculateTransport
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/calculateTransportRestRequest'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/vnd.ecotransit.app.v2025r2+json:
              schema:
                $ref: '#/components/schemas/calculateTransportRestResponse'
        '400':
          description: Invalid input
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problemDetails'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problemDetails'
  /etw-rest/calculateCollectionAndDelivery:
    post:
      tags:
        - collection and delivery
      summary: collection and delivery calculation
      security:
        - oAuth2AuthorizationCode:
            - openid
            - offline_access
      description: calculate a collection and delivery round ("milkrun") from json input
      operationId: calculateCollectionAndDelivery
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/calculateCollectionAndDeliveryRestRequest'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/vnd.ecotransit.app.v2025r2+json:
              schema:
                $ref: >-
                  #/components/schemas/calculateCollectionAndDeliveryRestResponse
        '400':
          description: Invalid input
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problemDetails'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problemDetails'
  /etw-rest/calculateTransport/kml:
    get:
      tags:
        - calculate transport
      summary: get a google earth kml file
      security: []
      description: >-
        generates a google earth kml file of the routing for the provided
        request uuid
      operationId: calculateTransportKml
      parameters:
        - name: expires
          in: query
          description: expiry date and time in ISO_8601 Standard UTC. YYYY-MM-DDThh:mmZ
          required: true
          schema:
            type: string
            example: 2007-04-05T14:30Z
        - name: uuid
          in: query
          description: uuid of kml as stated in the original calculation response
          required: true
          schema:
            type: string
            example: b2d738cb-2b54-4f49-8f03-db838a03d91b
        - name: signature
          in: query
          description: signature to validate link
          required: true
          schema:
            type: string
            example: ol3RA-NjoO2POfxEcko994JIip1EQHTM8n6uqxYS730
      responses:
        '200':
          description: Successful operation
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '404':
          description: uuid not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problemDetails'
        '410':
          description: link expired
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problemDetails'
components:
  schemas:
    calculateTransportRestRequest:
      title: calculateTransportRequest
      type: object
      properties:
        transportID:
          description: >-
            Only Informational. Will also occur in Response. Use this to
            identify/tag/descripe your Requests
          type: string
        transportDate:
          $ref: '#/components/schemas/transportDate'
        cargo:
          $ref: '#/components/schemas/cargoParent'
        accounting:
          $ref: '#/components/schemas/accounting'
        transportChainElements:
          type: array
          items:
            $ref: '#/components/schemas/transportChainElement'
          minItems: 1
        settings:
          $ref: '#/components/schemas/settings'
        customDescription:
          description: >-
            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. <br>

            Can be specified as follows: <br>

            { <br>

            "someKey": "someValue", <br>

            "anotherKey": "anotherValue" <br>

            }
          type: object
          additionalProperties:
            type: string
          example:
            information1: Hello
            information2: World!
      required:
        - cargo
        - transportChainElements
      example:
        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
    calculateTransportRestResponse:
      title: calculateTransportResponse
      type: object
      properties:
        transportID:
          description: >-
            Only Informational. Displays transportID as specified earlier in the
            request.
          type: string
        transportDate:
          $ref: '#/components/schemas/transportDate'
        cargo:
          $ref: '#/components/schemas/cargoParent'
        accounting:
          $ref: '#/components/schemas/accounting'
        kmlFile:
          type: string
          format: uri
          description: >-
            specifies the URL of the KML file that contains the route of the
            transport chain elements.
        notifications:
          type: array
          items:
            $ref: '#/components/schemas/notification'
        resultsPerTransportChainElement:
          type: array
          items:
            $ref: '#/components/schemas/tceResult'
          minItems: 1
        customDescription:
          description: customerDescription as provided in the original request
          type: object
          additionalProperties:
            type: string
        debug:
          description: debug output only visible to EcoTransIT-Staff members
          type: object
          additionalProperties:
            type: string
      required:
        - cargo
        - resultsPerTransportChainElement
    calculateCollectionAndDeliveryRestRequest:
      title: calculateCollectionAndDeliveryRequest
      type: object
      properties:
        accounting:
          type: object
          title: accountingCoDe
          properties:
            cooledTransport:
              title: cooledTransportCoDe
              type: object
              description: >-
                If cooledTransport is set to true, all legs of the tour will be
                considered as cooled transport.
              properties:
                value:
                  type: boolean
                  example: true
              required:
                - value
        transportChainElements:
          description: >-
            The shipmentIds of the loads/unloads of the first
            transportChainElement will be ommitted because the
            emissionPercentage for them will always be 0 by definition. <br>
          type: array
          items:
            $ref: '#/components/schemas/transportChainElementCollectionAndDelivery'
          minItems: 2
        settings:
          $ref: '#/components/schemas/settingsCollectionAndDelivery'
      required:
        - transportChainElements
      example:
        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'
    calculateCollectionAndDeliveryRestResponse:
      title: calculateCollectionAndDeliveryResponse
      type: object
      properties:
        emissionsPerFreightUnit:
          description: >-
            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!
          type: array
          items:
            $ref: '#/components/schemas/freightUnitResult'
        transportOperationCategory:
          description: >-
            List of transport chain elements (TCE) showing the emissions for
            each leg for the whole freight
          type: array
          items:
            $ref: '#/components/schemas/tceDistributionResult'
        kmlFile:
          type: string
          format: uri
          description: >-
            specifies the URL of the KML file that displays the route taken by
            the truck
    getVersionResponse:
      title: getVersionResponse
      type: object
      description: returns Version of currently running etw-rest-api & background services
      properties:
        restWebservice:
          type: object
          additionalProperties:
            type: string
        calculationModule:
          $ref: '#/components/schemas/calculationModuleVersion'
      required:
        - restWebservice
    problemDetails:
      title: problemDetails
      type: object
      description: A Problem Details object according to RFC 9457
      properties:
        type:
          type: string
          description: >-
            a URI reference that identifies the problem via an errorKey. URI is
            not resolvable at the moment, but might be in the future
          enum:
            - LOCATION
            - PARAMETER
            - INTERNAL
            - ROUTING
            - ERROR_HANDLING
            - CONFIGURATION
          default: INTERNAL
          example: LOCATION
        title:
          type: string
          description: a short, human-readable summary of the error
          example: Location not found
        status:
          type: integer
          format: int32
          description: indicating the HTTP status code
          minimum: 400
          maximum: 600
          example: 400
        detail:
          type: string
          description: >-
            human-readable explanation specific to this occurrence of the
            problem
          example: 'could not find Location for IATA code: ZZZ'
        instance:
          type: string
          format: uri
          description: URI reference that identifies the specific occurrence of the problem
          example: /calculateTransport
        action:
          type: string
          description: proposed action to solve the problem
          example: Verify location existence or define another location.
        timestamp:
          type: string
          description: date and time (in UTC) when the error occurred (YYYY-MM-DD)
          example: '2024-06-30T06:39:25Z'
      required:
        - type
        - title
        - status
        - detail
    calculationModuleVersion:
      title: calculationModuleVersion
      type: object
      properties:
        general:
          type: object
          additionalProperties:
            type: string
        databases:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
            example:
              name: air_db_2024q3v2
              creationDate: '2024-10-11'
              lastUpdated: '2024-10-30'
              containsDataFrom: '2021-01-01'
              containsDataTo: '2024-07-01'
    transportDate:
      title: transportDate
      type: object
      description: >-
        Input: Only relevant for sea with routing "ais-based" (default) and air
        routing <br>

        For longer trips the transportDate shall specify the arrival date

        Output: Same as provided in the request or otherwise set to default
      properties:
        year:
          type: integer
          description: year in 4 digit notation
          example: '2022'
          minimum: 2000
        month:
          type: integer
          description: month as number - e.g. "3" for march
          example: '3'
          minimum: 1
          maximum: 12
        day:
          type: integer
          description: day of the month
          example: '27'
          minimum: 1
          maximum: 31
      required:
        - year
    containerInformationTons:
      title: containerInformationTons
      type: object
      description: >-
        In case the cargo is transported via container (e.g. default on
        sea-ships) you can specify container parameters. <br>

        Used to calculate the freight weight within the containers.
      properties:
        tonsPerTeu:
          type: number
          format: double
          minimum: 0
        containerEmptyWeightInTons:
          type: number
          format: double
          minimum: 0
      minProperties: 1
    TONS:
      title: TONS
      type: object
      properties:
        unit:
          type: string
          pattern: ^TONS$
          example: TONS
          description: __metric__ tons (equal to __1000 kg__)
        amount:
          type: number
          format: double
          example: 40
          minimum: 0
        containerInformation:
          $ref: '#/components/schemas/containerInformationTons'
      required:
        - unit
        - amount
    containerInformationKg:
      title: containerInformationKg
      type: object
      description: >-
        In case the cargo is transported via container (e.g. default on
        sea-ships) you can specify container parameters. <br>

        Used to calculate the freight weight within the containers.
      properties:
        kgPerTeu:
          type: integer
          minimum: 0
        containerEmptyWeightInKg:
          type: integer
          minimum: 0
      minProperties: 1
    KILOGRAMS:
      title: KILOGRAMS
      type: object
      properties:
        unit:
          type: string
          pattern: ^KILOGRAMS$
          example: KILOGRAMS
        amount:
          type: number
          format: double
          example: 1000
          minimum: 0
        containerInformation:
          $ref: '#/components/schemas/containerInformationKg'
      required:
        - unit
        - amount
    TEU:
      title: TEU
      type: object
      properties:
        unit:
          type: string
          pattern: ^TEU$
          example: TEU
          description: Twenty-foot equivalent unit
        amount:
          type: number
          format: double
          description: >-
            decimal values allowed (e.g. to render not fully loaded container in
            clean cargo calculation)
          minimum: 0
        tonsPerTeu:
          type: number
          format: double
          minimum: 0
        containerEmptyWeightInTons:
          type: number
          format: double
          minimum: 0
      required:
        - unit
        - amount
    FEU:
      title: FEU
      type: object
      properties:
        unit:
          type: string
          pattern: ^FEU$
          example: FEU
          description: Forty-foot equivalent unit (ISO Container)
        amount:
          type: number
          format: double
          description: >-
            decimal values allowed (e.g. to render not fully loaded container in
            clean cargo calculation)
          example: 2
          minimum: 0
        tonsPerFeu:
          type: number
          format: double
          minimum: 0
        containerEmptyWeightInTons:
          type: number
          format: double
          minimum: 0
      required:
        - unit
        - amount
    PALLETS:
      title: PALLETS
      type: object
      properties:
        unit:
          type: string
          pattern: ^PALLETS$
          example: PALLETS
          description: Used to calculate the freight weight of a pallet
        amount:
          type: number
          format: double
          description: decimal values allowed
          minimum: 0
        tonsPerPallet:
          type: number
          format: double
          minimum: 0
      required:
        - unit
        - amount
    containerInformationPounds:
      title: containerInformationPounds
      type: object
      description: >-
        In case the cargo is transported via container (e.g. default on
        sea-ships) you can specify container parameters. <br>

        Used to calculate the freight weight within the containers.
      properties:
        poundsPerTeu:
          type: integer
          minimum: 0
        containerEmptyWeightInPounds:
          type: integer
          minimum: 0
      minProperties: 1
    POUNDS:
      title: POUNDS
      type: object
      properties:
        unit:
          type: string
          pattern: ^POUNDS$
          example: POUNDS
          description: 1 pound is defined as 0.45359237 kilograms
        amount:
          type: number
          format: double
          example: 40
          minimum: 0
        containerInformation:
          $ref: '#/components/schemas/containerInformationPounds'
      required:
        - unit
        - amount
    containerInformationCustomUnit:
      title: containerInformationCustomUnit
      type: object
      description: >-
        in case the cargo is transported via container (e.g. default on
        sea-ships) you can specify container parameters
      properties:
        customUnitPerTeu:
          type: number
          format: double
          minimum: 0
        containerEmptyWeightInCustomUnits:
          type: number
          format: double
          minimum: 0
      minProperties: 1
    CUSTOM_UNIT:
      title: CUSTOM_UNIT
      type: object
      properties:
        unit:
          type: string
          pattern: ^CUSTOM_UNIT$
          example: CUSTOM_UNIT
          description: >-
            Define a custom unit for your own needs. <br>

            e.g. for long tons / imperial ton set the conversionFactor as shown
            below: <br>

            toUnit: KILOGRAMS <br>

            factor: 1016 <br>

            **note that the property "unit" always has to be set to
            "CUSTOM_UNIT"** <br>

            if you want to add a name (e.g. "longTon") you can do this in the
            optionalDescription property <br>

            the optionalDescription is only for your own information and is not
            evaluated!
        amount:
          type: number
          format: double
          example: 40
          minimum: 0
        optionalDescription:
          type: string
        conversionFactor:
          type: object
          properties:
            toUnit:
              type: string
              enum:
                - TONS
                - KILOGRAMS
            factor:
              type: number
              format: double
              minimum: 0
              example: 0.453592
          required:
            - toUnit
            - factor
        containerInformation:
          $ref: '#/components/schemas/containerInformationCustomUnit'
      required:
        - unit
        - amount
        - conversionFactor
    cargoParent:
      title: cargoParent
      type: object
      oneOf:
        - $ref: '#/components/schemas/TONS'
        - $ref: '#/components/schemas/KILOGRAMS'
        - $ref: '#/components/schemas/TEU'
        - $ref: '#/components/schemas/FEU'
        - $ref: '#/components/schemas/PALLETS'
        - $ref: '#/components/schemas/POUNDS'
        - $ref: '#/components/schemas/CUSTOM_UNIT'
      discriminator:
        propertyName: unit
        mapping:
          TONS: '#/components/schemas/TONS'
          KILOGRAMS: '#/components/schemas/KILOGRAMS'
          TEU: '#/components/schemas/TEU'
          FEU: '#/components/schemas/FEU'
          PALLETS: '#/components/schemas/PALLETS'
          POUNDS: '#/components/schemas/POUNDS'
          CUSTOM_UNIT: '#/components/schemas/CUSTOM_UNIT'
      example:
        unit: TONS
        amount: 42
    airAccounting:
      title: air
      type: object
      properties:
        variant:
          description: >-
            | Option   | Description                                           |

            |----------|-------------------------------------------------------|

            | none     | Belly plane allocation on the base of EN16258(Default)
            |

            | Icao     | Belly plane allocation on the base of ICAO/IATA
            methodology |

            | Skailark | Belly plane allocation on the base of Skailark
            methodology |
          type: string
          enum:
            - NONE
            - ICAO
            - SKAILARK
          default: NONE
      required:
        - variant
      additionalProperties: false
    seaAccounting:
      title: sea
      type: object
      properties:
        variant:
          description: >-
            | Option                       |
            Description                                                        |

            |------------------------------|--------------------------------------------------------------------|

            | none                         | Sea ship calculation on the base of
            the ETW bottom-up methodology           |

            | CLEAN_CARGO_TRADELANE        | Sea ship calculation on the base of
            the Clean Cargo methodology (default) |

            | CLEAN_CARGO_TRADELANE_REEFER | Sea ship calculation on the base of
            the Clean Cargo methodology as reefer container |

            | CLEAN_CARGO_PORTPAIR         | Sea ship calculation on the base of
            the Clean Cargo methodology using port pair|

            | CLEAN_CARGO_PORTPAIR_REEFER  | Sea ship calculation on the base of
            the Clean Cargo methodology as reefer container and using port pair|
          type: string
          enum:
            - NONE
            - CLEAN_CARGO_TRADELANE
            - CLEAN_CARGO_TRADELANE_REEFER
            - CLEAN_CARGO_PORTPAIR
            - CLEAN_CARGO_PORTPAIR_REEFER
          default: CLEAN_CARGO_TRADELANE
          example: CLEAN_CARGO_TRADELANE
        aggregationMethod:
          description: >-
            Defines how to aggregate accounting data for sea transport - per
            tradelane, per vessel size; or only for specified vessel
            (vesselPrecise)
          type: string
          enum:
            - TRADELANE
            - VESSEL_SIZE
            - VESSEL_PRECISE
          example: TRADELANE
        cleanCargoTimeFrame:
          type: string
          description: if not provided last available year is set as default
          example: '2023'
      required:
        - variant
    cooledTransport:
      title: cooledTransport
      description: only for trucks, container trains and Clean Cargo (container ships).
      type: object
      properties:
        value:
          type: boolean
          example: true
      required:
        - value
    accounting:
      title: accounting
      description: >-
        Only available for air, sea and cooled transport (trucks, container
        trains and Clean Cargo container ships)
      properties:
        air:
          $ref: '#/components/schemas/airAccounting'
        sea:
          $ref: '#/components/schemas/seaAccounting'
        cooledTransport:
          $ref: '#/components/schemas/cooledTransport'
      minProperties: 1
    directConnection:
      title: directConnection
      description: >-
        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). |
      type: boolean
      example: false
    maxRoadFeederServiceDistance:
      title: maxRoadFeederServiceDistance
      description: >-
        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.
      type: object
      properties:
        unit:
          type: string
          enum:
            - KILOMETER
          example: KILOMETER
        value:
          type: number
          format: double
          example: 50
          minimum: 0
    WGS84_COORDINATE:
      title: WGS84_COORDINATE
      description: WGS84 latitude and longitude coordinates
      type: object
      properties:
        locationType:
          type: string
          pattern: ^WGS84_COORDINATE$
          example: WGS84_COORDINATE
        latitude:
          type: number
          format: double
          example: 52.38723
          minimum: -90
          maximum: 90
        longitude:
          type: number
          format: double
          example: 9.74021
          minimum: -180
          maximum: 180
        directConnection:
          $ref: '#/components/schemas/directConnection'
        maxRoadFeederServiceDistance:
          $ref: '#/components/schemas/maxRoadFeederServiceDistance'
      required:
        - locationType
        - latitude
        - longitude
    UIC_CODE:
      title: UIC_CODE
      type: object
      properties:
        locationType:
          type: string
          pattern: ^UIC_CODE$
          example: UIC_CODE
        country:
          type: string
          description: uic country-code (two digits - i.e. 80 for Germany)
          example: '80'
        station:
          type: string
          description: >-
            station number (five digits - i.e. 135475 for Hannover Central
            Station in Germany)
          example: '135475'
        directConnection:
          $ref: '#/components/schemas/directConnection'
        maxRoadFeederServiceDistance:
          $ref: '#/components/schemas/maxRoadFeederServiceDistance'
      required:
        - locationType
        - country
        - station
    IATA_CODE:
      title: IATA_CODE
      type: object
      properties:
        locationType:
          type: string
          pattern: ^IATA_CODE$
          example: IATA_CODE
        value:
          type: string
          description: iataCode for airports (three letters)
          example: LAX
        directConnection:
          $ref: '#/components/schemas/directConnection'
        maxRoadFeederServiceDistance:
          $ref: '#/components/schemas/maxRoadFeederServiceDistance'
      required:
        - locationType
        - value
    UN_LOCODE:
      title: UN_LOCODE
      type: object
      properties:
        locationType:
          type: string
          pattern: ^UN_LOCODE$
          example: UN_LOCODE
          description: |-
            United Nations Code for Trade and Transport Locations. <br>
            Use e.g. to specify seaports <br>
        value:
          type: string
          description: >-
            First two letters represent the ISO 3166-1 alpha-2 country code
            (e.g. "DE" for Germany) <br>

            Remaining three letters specify the location in that country <br>

            For example DEHAM for Hamburg Sea Port in Germany <br>
          example: DEHAM
        directConnection:
          $ref: '#/components/schemas/directConnection'
        maxRoadFeederServiceDistance:
          $ref: '#/components/schemas/maxRoadFeederServiceDistance'
      required:
        - locationType
        - value
    ZIP_CODE:
      title: ZIP_CODE
      type: object
      properties:
        locationType:
          type: string
          pattern: ^ZIP_CODE$
          example: ZIP_CODE
        country:
          type: string
          description: ISO 3166-1 ALPHA-2 code of the country (two uppercase letters)
          example: DE
        code:
          type: string
          example: '30167'
        directConnection:
          $ref: '#/components/schemas/directConnection'
        maxRoadFeederServiceDistance:
          $ref: '#/components/schemas/maxRoadFeederServiceDistance'
      required:
        - locationType
        - country
        - code
    NAME:
      title: NAME
      type: object
      properties:
        locationType:
          description: >-
            Can be a city or district name for example. <br>

            **Use NAME with caution!** (city ) names are very ambiguous. <br>

            It is **strongly recommended** to set country in addition to city
            name! <br>

            Also prefer using ZipCodes for more reliable results. <br>

            Avoid adding address and/or additional information to the city name,
            as that will cause an error.
          type: string
          pattern: ^NAME$
          example: NAME
        country:
          type: string
          description: |-
            ISO 3166-1 ALPHA-2 code of the country (**two** uppercase letters)
            For example DE for Germany (DEU is not allowed)
          example: DE
        value:
          type: string
          example: Berlin
        directConnection:
          $ref: '#/components/schemas/directConnection'
        maxRoadFeederServiceDistance:
          $ref: '#/components/schemas/maxRoadFeederServiceDistance'
      required:
        - locationType
        - value
    location:
      title: location
      type: object
      oneOf:
        - $ref: '#/components/schemas/WGS84_COORDINATE'
        - $ref: '#/components/schemas/UIC_CODE'
        - $ref: '#/components/schemas/IATA_CODE'
        - $ref: '#/components/schemas/UN_LOCODE'
        - $ref: '#/components/schemas/ZIP_CODE'
        - $ref: '#/components/schemas/NAME'
      discriminator:
        propertyName: locationType
        mapping:
          WGS84_COORDINATE: '#/components/schemas/WGS84_COORDINATE'
          UIC_CODE: '#/components/schemas/UIC_CODE'
          IATA_CODE: '#/components/schemas/IATA_CODE'
          UN_LOCODE: '#/components/schemas/UN_LOCODE'
          ZIP_CODE: '#/components/schemas/ZIP_CODE'
          CITY_NAME: '#/components/schemas/NAME'
      required:
        - locationType
    energyConsumption:
      title: energyConsumption
      type: object
      properties:
        name:
          type: string
        valuePerTonne:
          type: number
          format: double
        unit:
          type: string
      required:
        - name
        - valuePerTonne
        - unit
    LOGISTIC_HUB:
      title: LOGISTIC_HUB
      properties:
        elementType:
          type: string
          example: LOGISTIC_HUB
          pattern: ^LOGISTIC_HUB$
        customDescription:
          description: >-
            Only Informational. Can be used to tag/describe transport chain
            elements <br>

            The given information is simply passed through to the response as it
            is.
          type: string
        origin:
          description: >-
            List of candidates for origin. <br>

            **The first match in the list will be set as Location** All other
            items will be omitted
          type: array
          items:
            $ref: '#/components/schemas/location'
        destination:
          description: >-
            **Optional**<br>

            List of candidates for destination. <br>

            Use this for Example if your transshipment starts at a train
            terminal and ends at the quay edge of a sea port. <br>

            So destination could be a uicCode and origin a sea port (unLocode)

            **The first match in the list will be set as Location** All other
            items will be omitted
          type: array
          items:
            $ref: '#/components/schemas/location'
        id:
          description: >-
            A logistic hub can be included in the
            calculationComplexTransportRequest within a regular section. <br>

            The user specific logistic hubs can be defined in the REff-Tool from
            Fraunhofer IML,

            see https://reff.iml.fraunhofer.de, and exported in an EcoTransIT
            World compatible format. <br>

            EcoTransIT World offers to store this data on the customers server
            (data should be sent to support@ecotransit.org). <br>

            You can then specify the id to use this data.
          type: integer
          example: 10
        energyConsumptions:
          description: >-
            As an **alternative to specifying the id** you can provide all
            parameters directly via this energyConsumptions List <br>

            **When specifying the parameters directly, the ID is not taken into
            account!**
          type: array
          items:
            $ref: '#/components/schemas/energyConsumption'
      required:
        - origin
        - elementType
    TRANSPORT:
      title: TRANSPORT
      type: object
      properties:
        elementType:
          type: string
          example: TRANSPORT
          pattern: ^TRANSPORT$
        customDescription:
          description: >-
            Only Informational. Can be used to tag/describe transport chain
            elements <br>

            The given information is simply passed through to the response as it
            is.
          type: string
        route:
          $ref: '#/components/schemas/route'
        preCarriage:
          $ref: '#/components/schemas/carriage'
        mainCarriage:
          $ref: '#/components/schemas/carriage'
        postCarriage:
          $ref: '#/components/schemas/carriage'
      required:
        - elementType
        - route
        - mainCarriage
    route:
      title: route
      type: object
      properties:
        origin:
          description: >-
            List of candidates for origin.

            **The first match in the list will be set as origin** All other
            items will be omitted
          type: array
          items:
            $ref: '#/components/schemas/location'
          minItems: 1
        destination:
          description: >-
            List of candidates for destination.

            **The first match in the list will be set as destination** All other
            items will be omitted
          type: array
          items:
            $ref: '#/components/schemas/location'
          minItems: 1
      required:
        - origin
        - destination
    loadFactor:
      title: loadFactor
      description: >-
        transported weight [t] / Maximum Payload of transport  unit [t],
        expressed as percentage
      type: object
      properties:
        unit:
          type: string
          enum:
            - PERCENTAGE
        value:
          type: number
          format: double
          minimum: 0
          maximum: 100
          example: 75
    virtualDistance:
      title: virtualDistance
      description: >-
        disables the routing and overrides the distance used for calculation.
        For truck transports the emission calculation for a motorway is assumed
      type: object
      properties:
        unit:
          type: string
          enum:
            - METER
            - KILOMETER
        value:
          type: number
          format: double
          minimum: 0
      required:
        - unit
        - value
    distanceAdjustmentFactor:
      title: distanceAdjustmentFactor
      description: >-
        Factor for operational derivations in percentage. Increases the overall
        distance. <br>

        E.g.: distanceAdjustmentFactor of 5 increases the calculated distance
        from 100km to 105km <br>

        For sea transports with clean cargo activated the
        distanceAdjustmentFactor is set to 15 by default as suggested by clean
        cargo. <br>

        Providing a custom distanceAdjustmentFactor for clean cargo transports
        will override the default value and is **not recommended!**
      type: object
      properties:
        unit:
          type: string
          enum:
            - PERCENTAGE
        value:
          type: number
          format: double
          minimum: 0
          maximum: 100
          example: 10
    emissionClassRoad:
      title: emissionClassRoad
      description: The emissionClass of the transport vehicle
      type: string
      enum:
        - EU_EURO_1
        - EU_EURO_2
        - EU_EURO_3
        - EU_EURO_4
        - EU_EURO_5
        - EU_EURO_6
        - EU_EURO_6AC
        - EU_EURO_6DE
        - US_EPA_1994
        - US_EPA_1998
        - US_EPA_2004
        - US_EPA_2007
        - US_EPA_2010
        - JP_1994
        - JP_1997
        - JP_2003
        - JP_2005
        - JP_2009
        - JP_2016
        - US_MOVES_1999
        - US_MOVES_2000
        - US_MOVES_2002
        - US_MOVES_2006
        - US_MOVES_2009
        - US_MOVES_2013
        - US_MOVES_2016
        - US_MOVES_2020
        - US_MOVES_2023
      example: EU_EURO_5
    truckType:
      title: truckType
      description: >-
        The truckType used for transportation (e.g. Class40 for truck with max.
        vehicle weight of 40 tons)
      type: string
      enum:
        - CLASS_CAR
        - CLASS_N1_I
        - CLASS_N1_II
        - CLASS_N1_III
        - CLASS_3_5
        - CLASS_7_5
        - CLASS_12
        - CLASS_20
        - CLASS_26
        - CLASS_40
        - CLASS_44
        - CLASS_50
        - CLASS_60
        - CLASS_GT_60
        - CLASS_16KLBS
        - CLASS_26KLBS
        - CLASS_44KLBS
        - CLASS_60KLBS
        - CLASS_80KLBS
        - CLASS_100KLBS
        - CLASS_130KLBS
        - CLASS_GT_100KLBS
        - CLASS_GT_130KLBS
        - CLASS_14KLBS_RIGID
        - CLASS_19_5KLBS_RIGID
        - CLASS_33KLBS_RIGID
        - CLASS_33KLBS_ARTICULATED
        - CLASS_80KLBS_RIGID
        - CLASS_80KLBS_ARTICULATED
        - CLASS_80KLBS_ARTICULATED_GLIDER
      example: CLASS_40
    emptyTripFactor:
      title: emptyTripFactor
      type: object
      properties:
        unit:
          type: string
          enum:
            - PERCENTAGE
        value:
          description: >-
            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). <br>

            **For train calculations:**  <br>

            see schema for trainType  <br>

            **For road calculations:** <br>

            | Truck load | Empty run factor |

            |------------|------------------|

            | FTL        | 20%              |

            | LTL        | 15%              |
          type: number
          format: double
          minimum: 0
          example: 75
    coolingTypeTruck:
      title: coolingTypeTruck
      type: object
      properties:
        value:
          type: string
          description: >-
            | Option   | Description
            (compatibility)                                           |

            |----------|-------------------------------------------------------|

            | AUTO     | Automatically selection (Default) |

            |---|---|

            | COOLED_BOX     | CLASS_N1_III, CLASS_7_5, CLASS_12, CLASS_20,
            CLASS_26, CLASS_40, CLASS_44 <br> |

            |                |CLASS_14KLBS_RIGID, CLASS_19_5KLBS_RIGID,
            CLASS_33KLBS_RIGID, CLASS_33KLBS_ARTICULATED, CLASS_80KLBS_RIGID,
            CLASS_80KLBS_ARTICULATED, CLASS_80KLBS_ARTICULATED_GLIDER|

            |---|---|

            | REEFER_UNREGULATED |  CLASS_44, CLASS_50, CLASS_60, CLASS_GT_60 |

            |---|---|

            | REEFER_REGULATED |  CLASS_44, CLASS_50, CLASS_60, CLASS_GT_60 |
          enum:
            - AUTO
            - COOLED_BOX
            - REEFER_UNREGULATED
            - REEFER_REGULATED
          example: COOLED_BOX
      required:
        - value
    ferryRouting:
      title: ferryRouting
      type: string
      description: |-
        Option | Description |
        ---| ---|
        PREFERRED | Ferry lines will be preferred |
        NORMAL | Normal ferry consideration (default) |
        OBSTRUCT |  Ferry lines will be avoided |
      enum:
        - PREFERRED
        - NORMAL
        - OBSTRUCT
      example: NORMAL
    truckLoadParameters:
      title: truckLoadParameters
      type: object
      description: parameters to further specify the truck Load
      properties:
        loadFactorLTL:
          description: Applied load factor for LTL truck load.
          type: integer
          minimum: 0
          maximum: 100
        autoThresholdLoadFactor:
          description: >-
            If the Auto calculation would determine a load factor below the
            threshold or above 100 percent, a LTL truck load will be applied
            with the corresponding load factor. By default 50% will be applied.
          type: integer
          minimum: 0
          maximum: 100
    truckLoad:
      title: truckLoad
      type: object
      description: >-
        provide instead of loadFactor. Depending on value and parameters
        loadFactor will be calculated automatically <br>

        | 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).
      properties:
        value:
          description: >-
            FTL (full truck load): shipment fills complete truck. LoadFactor is
            calculated as freight weight / Maximum Payload. If LoadFactor is
            greater than 100% LTL is assumed. <br>

            LTL (less then truck load): combining multiple shipments from
            different customers into a single truck. loadFactorLTL is assumed as
            loadFactor." <br>

            FCL (full container load) <br>

            AUTO: Automatic determination of FTL or LTL truck load
          type: string
          enum:
            - FTL
            - LTL
            - FCL
            - AUTO
        parameters:
          $ref: '#/components/schemas/truckLoadParameters'
      required:
        - value
    truckBodyType:
      title: truckBodyType
      type: object
      description: >-
        If Body Type is selected vehicleEmptyWeight is calculated automatically.
        You can not specify truckBodyType and vehicleEmptyWeight.
      properties:
        value:
          type: string
          enum:
            - CLOSED_BOX
            - CURTAINSIDER
            - CARGO_BOX
            - COOLED_BOX
            - TANK
            - CAR
            - CONTAINER
            - CONTAINER_2TEU
      required:
        - value
    vehicleEmptyWeight:
      title: vehicleEmptyWeight
      type: object
      description: >-
        If Body Type is selected vehicleEmptyWeight is calculated automatically.
        You cannot specify truckBodyType and vehicleEmptyWeight.
      properties:
        unit:
          type: string
          enum:
            - TONS
            - KILOGRAMS
            - POUNDS
        value:
          type: number
          format: double
          minimum: 0
      required:
        - unit
        - value
    truckWeight:
      title: truckWeight
      type: object
      description: >-
        Input: Specify either vehicleEmptyWeight directly or truckBodyType which
        then calculates the EmptyWeight automatically. <br>

        If both values are provided the vehicleEmptyWeight will be taken into
        account and the truckBodyType will be ignored.
      properties:
        truckBodyType:
          $ref: '#/components/schemas/truckBodyType'
        vehicleEmptyWeight:
          $ref: '#/components/schemas/vehicleEmptyWeight'
      minProperties: 1
    containerCount:
      title: containerCount
      type: object
      properties:
        value:
          type: integer
          description: 'Number of transported containers on a truck. '
          minimum: 1
          maximum: 3
      required:
        - value
    countryCode:
      title: countryCode
      description: ISO 3166-1 ALPHA-2 code of the country
      type: string
      pattern: ^[A-Z]{2}$
    userSpecificFuelType:
      title: userSpecificFuelType
      type: string
      enum:
        - DIESEL
        - LNG
        - CNG
        - ELECTRICITY
    userSpecificUnitOperational:
      title: userSpecificUnitOperational
      type: string
      enum:
        - LITER_PER_100_KILOMETER
        - LITER_PER_KILOMETER
        - KILOGRAMS_PER_100_KILOMETER
        - KILOGRAMS_PER_KILOMETER
        - MEGAJOULE_PER_100_KILOMETER
        - MEGAJOULE_PER_KILOMETER
        - KILOWATT_HOURS_PER_100_KILOMETER
        - KILOWATT_HOURS_PER_KILOMETER
    specificOperational:
      title: specificOperational
      type: object
      properties:
        country:
          $ref: '#/components/schemas/countryCode'
        fuelType:
          $ref: '#/components/schemas/userSpecificFuelType'
        unit:
          $ref: '#/components/schemas/userSpecificUnitOperational'
        value:
          type: number
          format: double
          minimum: 0
      required:
        - value
        - unit
    userSpecificEmissionType:
      title: userSpecificEmissionType
      type: string
      enum:
        - CO2_EQUIVALENTS
        - NITROGEN_OXIDES
        - NON_METHAN_HYDRO_CARBONS
        - SULFUR_DIOXIDES
        - PARTICLES
    userSpecificEmissionUnit:
      title: userSpecificEmissionUnit
      type: string
      enum:
        - GRAMS_PER_MEGAJOULE
        - GRAMS_PER_TONNE_KILOMETERS
        - PERCENTAGE
    specificTotal:
      title: specificTotal
      type: object
      properties:
        country:
          $ref: '#/components/schemas/countryCode'
        fuelType:
          $ref: '#/components/schemas/userSpecificFuelType'
        emissionType:
          $ref: '#/components/schemas/userSpecificEmissionType'
        unit:
          $ref: '#/components/schemas/userSpecificEmissionUnit'
        value:
          type: number
          format: double
          minimum: 0
      required:
        - emissionType
        - unit
        - value
    specificTotalReduction:
      title: specificTotalReduction
      type: object
      properties:
        country:
          $ref: '#/components/schemas/countryCode'
        fuelType:
          $ref: '#/components/schemas/userSpecificFuelType'
        emissionType:
          $ref: '#/components/schemas/userSpecificEmissionType'
        unit:
          type: string
          enum:
            - PERCENTAGE
        value:
          type: number
          format: double
          minimum: 0
          maximum: 100
      required:
        - emissionType
        - unit
        - value
    userSpecificEmissions:
      title: userSpecificEmissions
      type: object
      properties:
        operational:
          type: array
          items:
            $ref: '#/components/schemas/specificOperational'
          minItems: 1
        provisionPlusOperational:
          type: array
          items:
            $ref: '#/components/schemas/specificTotal'
          minItems: 1
        totalEmissionReduction:
          type: array
          items:
            $ref: '#/components/schemas/specificTotalReduction'
          minItems: 1
      minProperties: 1
    factor:
      title: factor
      type: object
      properties:
        unit:
          type: string
          enum:
            - PERCENTAGE
        value:
          type: number
          format: double
          minimum: 0
          maximum: 100
    shareDiesel:
      title: shareDiesel
      type: object
      description: Note that the sum of all shares must be 100
      properties:
        energyType:
          type: string
          example: DIESEL
          pattern: ^DIESEL$
        productionType:
          type: string
          enum:
            - FOSSIL
          example: FOSSIL
        share:
          $ref: '#/components/schemas/factor'
      required:
        - energyType
        - productionType
        - share
    shareBioDiesel:
      title: shareBioDiesel
      type: object
      description: Note that the sum of all shares must be 100
      properties:
        energyType:
          type: string
          example: BIO_DIESEL
          pattern: ^BIO_DIESEL$
        productionType:
          description: 'please note: RAPESEED_OIL, SOY_OIL, UCO not supported in America'
          type: string
          enum:
            - MIX
            - RAPESEED_OIL
            - SOY_OIL
            - UCO
          example: MIX
        share:
          $ref: '#/components/schemas/factor'
      required:
        - energyType
        - productionType
        - share
    shareRoadGasoline:
      title: shareRoadGasoline
      type: object
      description: Note that the sum of all shares must be 100
      properties:
        energyType:
          type: string
          example: GASOLINE
          pattern: ^GASOLINE$
        productionType:
          type: string
          enum:
            - FOSSIL
          example: FOSSIL
        share:
          $ref: '#/components/schemas/factor'
      required:
        - energyType
        - productionType
        - share
    shareHvo:
      title: shareHvo
      type: object
      description: Note that the sum of all shares must be 100
      properties:
        energyType:
          type: string
          example: HVO
          pattern: ^HVO$
        productionType:
          description: 'please note: RAPESEED_OIL and UCO not supported in America'
          type: string
          enum:
            - MIX
            - RAPESEED_OIL
            - UCO
          example: MIX
        share:
          $ref: '#/components/schemas/factor'
      required:
        - energyType
        - productionType
        - share
    shareRoadBioEthanol:
      title: shareRoadBioEthanol
      type: object
      description: Note that the sum of all shares must be 100
      properties:
        energyType:
          type: string
          example: BIO_ETHANOL
          pattern: ^BIO_ETHANOL$
        productionType:
          type: string
          enum:
            - MIX
          example: MIX
        share:
          $ref: '#/components/schemas/factor'
      required:
        - energyType
        - productionType
        - share
    shareRoadCng:
      title: shareRoadCng
      type: object
      description: Note that the sum of all shares must be 100
      properties:
        energyType:
          type: string
          example: CNG
          pattern: ^CNG$
        productionType:
          type: string
          enum:
            - FOSSIL
          example: FOSSIL
        share:
          $ref: '#/components/schemas/factor'
      required:
        - energyType
        - productionType
        - share
    shareRoadBioCng:
      title: shareRoadBioCng
      type: object
      description: Note that the sum of all shares must be 100
      properties:
        energyType:
          description: please note - BIO_CNG not supported in America
          type: string
          example: BIO_CNG
          pattern: ^BIO_CNG$
        productionType:
          type: string
          enum:
            - MIX
            - MAIZE
            - MANURE
            - BIO_WASTE
          example: MIX
        share:
          $ref: '#/components/schemas/factor'
      required:
        - energyType
        - productionType
        - share
    shareLng:
      title: shareLng
      type: object
      description: Note that the sum of all shares must be 100
      properties:
        energyType:
          type: string
          description: liquid natural gas
          example: LNG
          pattern: ^LNG$
        productionType:
          type: string
          enum:
            - FOSSIL
          example: FOSSIL
        share:
          $ref: '#/components/schemas/factor'
      required:
        - energyType
        - productionType
        - share
    shareRoadBioLng:
      title: shareRoadBioLng
      type: object
      description: Note that the sum of all shares must be 100
      properties:
        energyType:
          type: string
          description: please note that bio lng is not supported in America
          example: BIO_LNG
          pattern: ^BIO_LNG$
        productionType:
          type: string
          enum:
            - MIX
            - MAIZE
            - MANURE
            - BIO_WASTE
          example: MIX
        share:
          $ref: '#/components/schemas/factor'
      required:
        - energyType
        - productionType
        - share
    shareRoadBev:
      title: shareRoadBev
      type: object
      description: Note that the sum of all shares must be 100
      properties:
        energyType:
          type: string
          description: >-
            Battery Electric Vehicles (fully electric vehicles with rechargeable
            batteries and no gasoline/diesel engine)
          example: BEV
          pattern: ^BEV$
        productionType:
          type: string
          enum:
            - COUNTRY_MIX
          example: COUNTRY_MIX
        share:
          $ref: '#/components/schemas/factor'
      required:
        - energyType
        - productionType
        - share
    shareRoadHydrogen:
      title: shareRoadHydrogen
      type: object
      description: Note that the sum of all shares must be 100
      properties:
        energyType:
          type: string
          description: 'please note: green and yellow hydrogen only supported in Europe'
          example: HYDROGEN
          pattern: ^HYDROGEN$
        productionType:
          type: string
          enum:
            - GREY_HYDROGEN
            - GREEN_HYDROGEN
            - YELLOW_HYDROGEN
          example: GREY_HYDROGEN
        share:
          $ref: '#/components/schemas/factor'
      required:
        - energyType
        - productionType
        - share
    roadShares:
      title: roadShares
      type: array
      items:
        oneOf:
          - $ref: '#/components/schemas/shareDiesel'
          - $ref: '#/components/schemas/shareBioDiesel'
          - $ref: '#/components/schemas/shareRoadGasoline'
          - $ref: '#/components/schemas/shareHvo'
          - $ref: '#/components/schemas/shareRoadBioEthanol'
          - $ref: '#/components/schemas/shareRoadCng'
          - $ref: '#/components/schemas/shareRoadBioCng'
          - $ref: '#/components/schemas/shareLng'
          - $ref: '#/components/schemas/shareRoadBioLng'
          - $ref: '#/components/schemas/shareRoadBev'
          - $ref: '#/components/schemas/shareRoadHydrogen'
        discriminator:
          propertyName: energyType
          mapping:
            DIESEL: '#/components/schemas/shareDiesel'
            BIO_DIESEL: '#/components/schemas/shareBioDiesel'
            GASOLINE: '#/components/schemas/shareRoadGasoline'
            HVO: '#/components/schemas/shareHvo'
            BIO_ETHANOL: '#/components/schemas/shareRoadBioEthanol'
            CNG: '#/components/schemas/shareRoadCng'
            BIO_CNG: '#/components/schemas/shareRoadBioCng'
            LNG: '#/components/schemas/shareLng'
            BIO_LNG: '#/components/schemas/shareRoadBioLng'
            BEV: '#/components/schemas/shareRoadBev'
            HYDROGEN: '#/components/schemas/shareRoadHydrogen'
      minItems: 1
    energyCompositionRoad:
      title: energyCompositionRoad
      type: object
      properties:
        shares:
          $ref: '#/components/schemas/roadShares'
      required:
        - shares
    ROAD:
      title: ROAD
      type: object
      properties:
        transportMode:
          type: string
          pattern: ^ROAD$
          example: ROAD
        loadFactor:
          $ref: '#/components/schemas/loadFactor'
        virtualDistance:
          $ref: '#/components/schemas/virtualDistance'
        distanceAdjustmentFactor:
          $ref: '#/components/schemas/distanceAdjustmentFactor'
        emissionClass:
          $ref: '#/components/schemas/emissionClassRoad'
        truckType:
          $ref: '#/components/schemas/truckType'
        emptyTripFactor:
          $ref: '#/components/schemas/emptyTripFactor'
        coolingType:
          $ref: '#/components/schemas/coolingTypeTruck'
        ferryRouting:
          $ref: '#/components/schemas/ferryRouting'
        truckLoad:
          $ref: '#/components/schemas/truckLoad'
        truckWeight:
          $ref: '#/components/schemas/truckWeight'
        containerCount:
          $ref: '#/components/schemas/containerCount'
        userSpecificEmissions:
          $ref: '#/components/schemas/userSpecificEmissions'
        energyComposition:
          $ref: '#/components/schemas/energyCompositionRoad'
      required:
        - transportMode
    trainWeight:
      title: trainWeight
      type: object
      properties:
        unit:
          type: string
          enum:
            - TONS
          example: TONS
        value:
          type: integer
          minimum: 0
          example: 1000
      required:
        - unit
        - value
    tractionType:
      title: tractionType
      type: string
      enum:
        - DIESEL
        - ELECTRICAL
        - DIESEL_AS_ELECTRIC
      example: ELECTRICAL
    trainType:
      title: trainType
      description: >-
        | Option                    |
        Description                                           |

        |---------------------------|-------------------------------------------------------|

        | None                      | Default train (1000t, LF 60%, ETF
        50%)               |

        | Light                     | Light train (500t, LF 60%, ETF
        50%)                  |

        | Average (default)         | Average train (1000t, LF 60%, ETF
        50%)               |

        | Large                     | Large train (1500t, LF 60%, ETF
        50%)                 |

        | Extra-large               | Extra-large train (2000t, LF 60%, ETF
        50%)           |

        | Heavy                     | Heavy train (5000t, LF 60%, ETF
        50%)                 |

        | Car                       | Car train (700t, LF 85%, ETF
        50%)                    |

        | Chemistry                 | Chemistry train (1200t, LF 100%, ETF
        100%)           |

        | Container                 | Container train (1000t, LF 50%, ETF
        20%)             |

        | Coal and Steel            | Coal and steel train (1700t, LF 100%, ETF
        100%)      |

        | Building Materials        | Building materials train (1200t, LF 75%,
        ETF 60%)    |

        | Manufactured Products     | Manufactured products train (1200t, LF
        75%, ETF 60%) |

        | Cereals                   | Cereals train (1300t, LF 100%, ETF
        50%)              |

        | Highspeed                 | Freight on a highspeed train (500t, LF
        60%)          |

        | Double Stack Container    | Double stack container train (1000t, LF
        50%, ETF 20%)|

        | Rolling Road              | Rolling Road Train (1000t, LF 60%, ETF
        50%)          |
      type: string
      enum:
        - LIGHT
        - AVERAGE
        - LARGE
        - EXTRA_LARGE
        - HEAVY
        - CAR
        - CHEMISTRY
        - CONTAINER
        - CONTAINER_COOLED
        - COAL_AND_STEEL
        - BUILDING_MATERIALS
        - MANUFACTURED_PRODUCTS
        - CEREALS
        - HIGHSPEED
        - DOUBLE_STACK_CONTAINER
        - ROLLING_ROAD
      example: AVERAGE
    emissionClassRail:
      title: emissionClassRail
      type: string
      enum:
        - EU_UIC_1
        - EU_UIC_2
        - EU_STAGE_3A
        - EU_STAGE_3BV
        - DB_2016
        - EPA_NR
        - EPA_TIER_0
        - EPA_TIER_1
        - EPA_TIER_2
        - EPA_TIER_3
        - EPA_TIER_4
      example: EU_Stage_3bv
    particleFilterType:
      title: particleFilterType
      type: string
      enum:
        - NONE
        - STANDARD_FILTER
      example: NONE
    vehicleClassRollingRoad:
      title: vehicleClassRollingRoad
      type: string
      enum:
        - TRUCK
        - SEMI_TRAILER
        - NIKRASA_SEMI_TRAILER
        - SWAP_BODY
    rollingRoad:
      title: rollingRoad
      type: object
      properties:
        vehicleClass:
          $ref: '#/components/schemas/vehicleClassRollingRoad'
        loadFactor:
          $ref: '#/components/schemas/factor'
    shareRailElectricity:
      title: shareRailElectricity
      type: object
      description: Note that the sum of all shares must be 100
      properties:
        energyType:
          type: string
          example: ELECTRICITY
          pattern: ^ELECTRICITY$
        productionType:
          type: string
          enum:
            - COUNTRY_MIX
          example: COUNTRY_MIX
        share:
          $ref: '#/components/schemas/factor'
      required:
        - energyType
        - productionType
        - share
    energyCompositionRail:
      title: energyCompositionRail
      type: object
      properties:
        shares:
          type: object
          properties:
            standard:
              description: >-
                Shares for regular Rail Transport. As part of the transport may
                be operated as road transport you may additionally specify
                sharesRoadFallback
              type: array
              items:
                oneOf:
                  - $ref: '#/components/schemas/shareDiesel'
                  - $ref: '#/components/schemas/shareBioDiesel'
                  - $ref: '#/components/schemas/shareHvo'
                  - $ref: '#/components/schemas/shareRailElectricity'
                discriminator:
                  propertyName: energyType
                  mapping:
                    DIESEL: '#/components/schemas/shareDiesel'
                    BIO_DIESEL: '#/components/schemas/shareBioDiesel'
                    HVO: '#/components/schemas/shareHvo'
                    ELECTRICITY: '#/components/schemas/shareRailElectricity'
              minItems: 1
            roadFallback:
              $ref: '#/components/schemas/roadShares'
          required:
            - standard
      required:
        - shares
    RAIL:
      title: RAIL
      type: object
      properties:
        transportMode:
          type: string
          pattern: ^RAIL$
          example: RAIL
        loadFactor:
          $ref: '#/components/schemas/loadFactor'
        virtualDistance:
          $ref: '#/components/schemas/virtualDistance'
        distanceAdjustmentFactor:
          $ref: '#/components/schemas/distanceAdjustmentFactor'
        trainWeight:
          $ref: '#/components/schemas/trainWeight'
        tractionType:
          $ref: '#/components/schemas/tractionType'
        emptyTripFactor:
          $ref: '#/components/schemas/emptyTripFactor'
        ferryRouting:
          $ref: '#/components/schemas/ferryRouting'
        trainType:
          $ref: '#/components/schemas/trainType'
        emissionClass:
          $ref: '#/components/schemas/emissionClassRail'
        particleFilterType:
          $ref: '#/components/schemas/particleFilterType'
        rollingRoad:
          $ref: '#/components/schemas/rollingRoad'
        userSpecificEmissions:
          $ref: '#/components/schemas/userSpecificEmissions'
        energyComposition:
          $ref: '#/components/schemas/energyCompositionRail'
      required:
        - transportMode
    BULK_CARRIER:
      title: BULK_CARRIER
      type: object
      properties:
        value:
          type: string
          pattern: ^BULK_CARRIER$
          example: BULK_CARRIER
      required:
        - value
    CHEMICAL_TANKER:
      title: CHEMICAL_TANKER
      type: object
      properties:
        value:
          type: string
          pattern: ^CHEMICAL_TANKER$
          example: CHEMICAL_TANKER
      required:
        - value
    CONTAINER_VESSEL:
      title: CONTAINER_VESSEL
      type: object
      properties:
        value:
          type: string
          pattern: ^CONTAINER_VESSEL$
          example: CONTAINER_VESSEL
      required:
        - value
    GENERAL_CARGO_VESSEL:
      title: GENERAL_CARGO_VESSEL
      type: object
      properties:
        value:
          type: string
          pattern: ^GENERAL_CARGO_VESSEL$
          example: GENERAL_CARGO_VESSEL
      required:
        - value
    LIQUID_TANKER:
      title: LIQUID_TANKER
      type: object
      properties:
        value:
          type: string
          pattern: ^LIQUID_TANKER$
          example: LIQUID_TANKER
      required:
        - value
    OIL_TANKER:
      title: OIL_TANKER
      type: object
      properties:
        value:
          type: string
          pattern: ^OIL_TANKER$
          example: OIL_TANKER
      required:
        - value
    FERRY:
      title: FERRY
      type: object
      properties:
        value:
          type: string
          pattern: ^FERRY$
          example: FERRY
      required:
        - value
    RORO_VESSEL:
      title: RORO_VESSEL
      type: object
      properties:
        value:
          type: string
          pattern: ^RORO_VESSEL$
          example: RORO_VESSEL
        vehicleClass:
          type: string
          enum:
            - CLASS_3_5
            - CLASS_7_5
            - CLASS_12
            - CLASS_20
            - CLASS_26
            - CLASS_40
            - CLASS_60
            - NONE
            - TRAIN_STANDARD_WAGON
            - TRAILER_ONLY
        loadFactor:
          $ref: '#/components/schemas/factor'
      required:
        - value
    VEHICLE_CARRIER:
      title: VEHICLE_CARRIER
      type: object
      properties:
        value:
          type: string
          pattern: ^VEHICLE_CARRIER$
          example: VEHICLE_CARRIER
      required:
        - value
    seaVesselClass:
      title: seaVesselClass
      type: object
      oneOf:
        - $ref: '#/components/schemas/BULK_CARRIER'
        - $ref: '#/components/schemas/CHEMICAL_TANKER'
        - $ref: '#/components/schemas/CONTAINER_VESSEL'
        - $ref: '#/components/schemas/GENERAL_CARGO_VESSEL'
        - $ref: '#/components/schemas/LIQUID_TANKER'
        - $ref: '#/components/schemas/OIL_TANKER'
        - $ref: '#/components/schemas/FERRY'
        - $ref: '#/components/schemas/RORO_VESSEL'
        - $ref: '#/components/schemas/VEHICLE_CARRIER'
      discriminator:
        propertyName: value
        mapping:
          BULK_CARRIER: '#/components/schemas/BULK_CARRIER'
          CHEMICAL_TANKER: '#/components/schemas/CHEMICAL_TANKER'
          CONTAINER_VESSEL: '#/components/schemas/CONTAINER_VESSEL'
          GENERAL_CARGO_VESSEL: '#/components/schemas/GENERAL_CARGO_VESSEL'
          LIQUID_TANKER: '#/components/schemas/LIQUID_TANKER'
          OIL_TANKER: '#/components/schemas/OIL_TANKER'
          FERRY: '#/components/schemas/FERRY'
          RORO_VESSEL: '#/components/schemas/RORO_VESSEL'
          VEHICLE_CARRIER: '#/components/schemas/VEHICLE_CARRIER'
    seaVesselType:
      title: seaVesselType
      description: >-
        e.g. gc-co-d-5 for GC Coastal (<5k dwt) dry or cc-world-avg for CC
        Global Average World
      type: string
      example: cc-world-avg
    seaVessel:
      title: seaVessel
      type: object
      description: 'Input: Either vessel class or vessel type can be specified'
      properties:
        class:
          $ref: '#/components/schemas/seaVesselClass'
        type:
          $ref: '#/components/schemas/seaVesselType'
      minProperties: 1
      maxProperties: 1
    speedUtilization:
      title: speedUtilization
      type: object
      description: >-
        The speed utilization reduces the usage of the ship engine which
        simulates a reduction of the ship speed.<br>If the clean cargo
        methodology is activated, this value only affects the calculation of the
        exhaust emissions (NOx, SOx, NMHC, PM)
      properties:
        unit:
          type: string
          enum:
            - PERCENTAGE
        value:
          type: number
          format: double
          minimum: 30
          maximum: 100
          example: 75
    routingVariantSea:
      title: routingVariantSea
      description: >-
        Key      | Value |
          ---    | --- |
        NONE | Only the transfer point determination will be based on ais-data
        and the routing don't use ais-based data|

        AIS_BASED | Routing and transfer point determination will be based on
        the ais-data of real vessel trips (Default) |
      type: string
      enum:
        - NONE
        - AIS_BASED
        - DEFAULT
      example: AIS_BASED
    cleanCargoParameters:
      title: cleanCargoParameters
      type: object
      properties:
        tradeLane:
          description: >-
            EcoTransIT World selects the Clean Cargo default values
            automatically, but it is also possible to define the carriage
            parameter user-specific. <br>

            The following trade lane areas can be combined:

            Key       | Emission area |
               ---    | --- |
             AF     | Afrika |
             AS    | Asia South |
             AN    | Asia North |
             CI    | Caribbean |
             EU    | Europe |
             MD    | Mediterranean |
             UE    | North America East Coast |
             UW    | North America West Coast |
             MI    | Middle East |
             OZ    | Oceania |
             OTHER | Global Average |
          type: string
          pattern: ^([A-Za-z]{2}|OTHER|other|Other)-([A-Za-z]{2}|OTHER|other|Other)$
          example: AF-OTHER
        scac:
          description: |-
            | Key  | Value |
            |------|-------|
            | xAVG | CCWG Average values (default) |
            | APLU | APL   |
            | ARKU | Arkas Container Transport S.A.     |
            | CMDU DVRU CNCU | CMA CGM    |
            | COSU COEU | COSCO SHIPPING Lines Co., Ltd.      |
            | CMCU | Crowley      |
            | EGLV | Evergreen Marine Corp. Ltd.      |
            | HLCU UASU | Hapag-Lloyd       |
            | HDMU | Hyundai Merchant Marine Co., Ltd.      |
            | MAEU SUDU | Maersk      |
            | MATS | Matson Navigation Company, Inc.      |
            | MCCQ | MCC Transport Pte. Ltd      |
            | MSCU | Mediterranean Shipping Company (MSC)      |
            | ONEY KKLU NYKS MOLU | Ocean Network Express (ONE Line)      |
            | OOLU | OOCL USA Inc      |
            | UFEE | Unifeeder A/S      |
            | WHLU | Wan Hai Lines      |
            | YMLU | Yang Ming Marine Transport Corporation      |
            | ZIMU | Zim Integrated Shipping Services Ltd. (Zim Line     |
            | 22AA | Wan Hai Lines      |
          type: string
          example: xAVG
    fuelMixSea:
      title: fuelMixSea
      type: object
      properties:
        timeFrame:
          type: string
      required:
        - timeFrame
    shareSeaHfo:
      title: shareSeaHfo
      type: object
      description: Note that the sum of all shares must be 100
      properties:
        energyType:
          type: string
          description: heavy fuel oil
          example: HFO
          pattern: ^HFO$
        productionType:
          type: string
          enum:
            - FOSSIL
          example: FOSSIL
        share:
          $ref: '#/components/schemas/factor'
      required:
        - energyType
        - productionType
        - share
    shareSeaMdo:
      title: shareSeaMdo
      type: object
      description: Note that the sum of all shares must be 100
      properties:
        energyType:
          type: string
          description: marine diesel oil
          example: MDO
          pattern: ^MDO$
        productionType:
          type: string
          enum:
            - FOSSIL
          example: FOSSIL
        share:
          $ref: '#/components/schemas/factor'
      required:
        - energyType
        - productionType
        - share
    shareSeaUlsfo:
      title: shareSeaUlfso
      type: object
      description: Note that the sum of all shares must be 100
      properties:
        energyType:
          type: string
          description: ultra low sulfur fuel oil
          example: ULSFO
          pattern: ^ULSFO$
        productionType:
          type: string
          enum:
            - FOSSIL
          example: FOSSIL
        share:
          $ref: '#/components/schemas/factor'
      required:
        - energyType
        - productionType
        - share
    shareSeaHvo:
      title: shareSeaHvo
      type: object
      description: Note that the sum of all shares must be 100
      properties:
        energyType:
          type: string
          description: Hydrotreated Vegetable Oil
          example: HVO
          pattern: ^HVO$
        productionType:
          type: string
          enum:
            - MIX
          example: MIX
        share:
          $ref: '#/components/schemas/factor'
      required:
        - energyType
        - productionType
        - share
    shareSeaBlends:
      title: shareSeaBlends
      type: object
      description: Note that the sum of all shares must be 100
      properties:
        energyType:
          type: string
          description: Mixture of HFO, ULSFO, LSFO
          example: BLENDS
          pattern: ^BLENDS$
        productionType:
          type: string
          enum:
            - FOSSIL
          example: FOSSIL
        share:
          $ref: '#/components/schemas/factor'
      required:
        - energyType
        - productionType
        - share
    seaShares:
      title: seaShares
      type: array
      items:
        oneOf:
          - $ref: '#/components/schemas/shareSeaHfo'
          - $ref: '#/components/schemas/shareSeaMdo'
          - $ref: '#/components/schemas/shareSeaUlsfo'
          - $ref: '#/components/schemas/shareLng'
          - $ref: '#/components/schemas/shareSeaHvo'
          - $ref: '#/components/schemas/shareSeaBlends'
        discriminator:
          propertyName: energyType
          mapping:
            HFO: '#/components/schemas/shareSeaHfo'
            MDO: '#/components/schemas/shareSeaMdo'
            ULSFO: '#/components/schemas/shareSeaUlsfo'
            LNG: '#/components/schemas/shareLng'
            HVO: '#/components/schemas/shareSeaHvo'
            BLENDS: '#/components/schemas/shareSeaBlends'
      minItems: 1
    energyCompositionSea:
      title: energyCompositionSea
      type: object
      properties:
        fuelMix:
          description: ''
          type: object
          properties:
            eca:
              $ref: '#/components/schemas/fuelMixSea'
            nonEca:
              $ref: '#/components/schemas/fuelMixSea'
        shares:
          description: >-
            You can specify separate energy shares for areas with emission
            control (eca) and standard areas (non-eca). <br>

            You can also specify a single share instead, that will bei applied
            for both: areas with and without emission control (allAreas) <br>

            (If you provide a share for allAreas it will override the shares for
            eca and non-eca.) <br>

            Because part of the transport may be operated as road transport you
            may additionally specify sharesRoadFallback
          type: object
          properties:
            eca:
              $ref: '#/components/schemas/seaShares'
            nonEca:
              $ref: '#/components/schemas/seaShares'
            allAreas:
              $ref: '#/components/schemas/seaShares'
            roadFallback:
              $ref: '#/components/schemas/roadShares'
    timeFrame:
      title: timeFrame
      type: object
      properties:
        direction:
          description: >-
            it is possible to select whether the period should be before or
            after the provided transport date, or whether the transport date
            should be in the middle of the period (default is past)
          type: string
          enum:
            - PAST
            - FUTURE
            - BALANCED
          example: PAST
        days:
          description: >-
            180 Days is default for air (satellite based) while 356 Days is
            default for sea (ais-based)
          type: integer
          enum:
            - 30
            - 90
            - 180
            - 365
          example: 180
      required:
        - days
    aggregation:
      title: aggregation
      description: >-
        It is possible to select whether a share from all matching trips should
        be used or whether a single trip should be used for the calculation <br>

        Key      | Description |
          ---    | --- |
        SHARE | The routing and emission calculations are based on all
        acceptable trips within the timeframe |

        SINGLE_TRIP | The routing and emission calculations are based on the
        single trip closest in time to the transport date |
      type: string
      enum:
        - SHARE
        - SINGLE_TRIP
      example: SHARE
    vesselParameterListItem:
      title: vesselParameterListItem
      type: object
      properties:
        imo:
          description: Prefer using imo over name as it is more accurate
          type: string
        name:
          type: string
    VESSEL:
      title: VESSEL
      type: object
      properties:
        parameterType:
          type: string
          pattern: ^VESSEL$
          example: VESSEL
        aggregateTo:
          type: string
          description: >-
            Option | Description |

            --- | ---|

            VESSEL | Use only trips of the resp. vessel |

            CARRIER | Use all trips of all vessels of the carrier of the resp.
            vessels (vessels wehre carrier is vessel operator; only applicable
            if vessels operator is known) |

            SERVICE (**Default**)| Use all trips of the service of the resp.
            vessel (only applicable if the vessel sails in a service)  |

            ALLIANCE | Use all trips of all services which are in the same
            alliance (only applicable if the vessel sails in a service which is
            part of an alliance)
          enum:
            - ALLIANCE
            - CARRIER
            - SERVICE
            - VESSEL
        parameterList:
          type: array
          items:
            $ref: '#/components/schemas/vesselParameterListItem'
          minItems: 1
      required:
        - parameterType
      minProperties: 2
    carrierParameterListItem:
      title: carrierFilterListItem
      type: object
      properties:
        id:
          description: Prefer using id over name as it is more accurate
          type: string
        name:
          type: string
        scac:
          type: string
    CARRIER:
      title: CARRIER
      type: object
      properties:
        parameterType:
          type: string
          pattern: ^CARRIER$
          example: CARRIER
        aggregateTo:
          description: >-
            Option | Description |

            --- | --- |

            VESSEL | Use all trips of the resp. carrier (only vessels where
            carrier is vessel operator)|

            CARRIER (**Default** ) | Use all trips of resp. carrier (vessels
            where carrier is vessel operator and all services from carriers)
            **Default** |

            SERVICE | Use all trips of all services of the carrier (this
            excludes all vessels which are not sailing within a service) |

            ALLIANCE | Use all trips of all services which are in the same
            alliance (only applicable if the carrier is part of an alliance)
          type: string
          enum:
            - VESSEL
            - CARRIER
            - SERVICE
            - ALLIANCE
        parameterList:
          type: array
          items:
            $ref: '#/components/schemas/carrierParameterListItem'
          minItems: 1
      required:
        - parameterType
      minProperties: 2
    serviceParameterListItem:
      title: serviceParameterListItem
      type: object
      properties:
        id:
          description: Prefer using id over name as it is more accurate
          type: string
        name:
          type: string
    SERVICE:
      title: SERVICE
      type: object
      properties:
        parameterType:
          type: string
          pattern: ^SERVICE$
          example: SERVICE
        aggregateTo:
          type: string
          description: >-
            CARRIER: Use all trips of all services of all carriers of the resp.
            service <br>

            SERVICE: Use only trips of the resp. service **Default** <br>

            ALLIANCE: Use all trips of all services of the alliance of the resp.
            service (only applicable if the service is part of an alliance)
          enum:
            - CARRIER
            - SERVICE
            - ALLIANCE
        parameterList:
          type: array
          items:
            $ref: '#/components/schemas/serviceParameterListItem'
          minItems: 1
      required:
        - parameterType
      minProperties: 2
    allianceParameterListItem:
      title: allianceParameterListItem
      type: object
      properties:
        id:
          description: Prefer using id over name as it is more accurate
          type: string
        name:
          type: string
    ALLIANCE:
      title: ALLIANCE
      type: object
      properties:
        parameterType:
          type: string
          pattern: ^ALLIANCE$
          example: ALLIANCE
        aggregateTo:
          description: >-
            VESSEL: Use all trips of all carriers of resp. alliance (only
            vessels where carrier is vessel operator) <br>

            CARRIER: Use all trips of all carriers from the resp. alliance
            (vessels where carrier is vessel operator and all services from
            carriers) <br>

            ALLIANCE: Use all trips of all services of the alliance **Default**
          type: string
          enum:
            - VESSEL
            - CARRIER
            - ALLIANCE
        parameterList:
          type: array
          items:
            $ref: '#/components/schemas/allianceParameterListItem'
          minItems: 1
      required:
        - parameterType
      minProperties: 2
    shipmentParameter:
      title: shipmentParameter
      type: object
      oneOf:
        - $ref: '#/components/schemas/VESSEL'
        - $ref: '#/components/schemas/CARRIER'
        - $ref: '#/components/schemas/SERVICE'
        - $ref: '#/components/schemas/ALLIANCE'
      discriminator:
        propertyName: parameterType
        mapping:
          VESSEL: '#/components/schemas/VESSEL'
          CARRIER: '#/components/schemas/CARRIER'
          SERVICE: '#/components/schemas/SERVICE'
          ALLIANCE: '#/components/schemas/ALLIANCE'
    realisticRoutesFilter:
      title: realisticRoutesFilter
      type: object
      properties:
        type:
          description: >-
            enables/disables the realistic route filter in the ais-based
            routing.
          type: string
          enum:
            - NONE
            - SHARE_BASED
          example: SHARE_BASED
    routeFilterParameter:
      title: routeFilterParameter
      type: object
      properties:
        realisticRoutesFilter:
          $ref: '#/components/schemas/realisticRoutesFilter'
        minVesselTeu:
          type: integer
          minimum: 0
          example: 1000
        minVesselDwt:
          description: minimum dead weight in tons of the vessel
          type: integer
          minimum: 0
          example: 120000
        onlyServiceVessels:
          description: use only vessels that are part of a service
          type: boolean
          example: false
      minProperties: 1
    primaryDataSettingsSea:
      title: primaryDataSettingsSea
      type: object
      description: >-
        Additional settings can be made for the two routing variants with real
        (primary) data: ais-based and satellite-based. <br>

        Based on the specified transport date, it is possible to specify the
        period within which the data should be aggregated.

        The end of a transport is key when deciding if it should be included
        within the time frame. This is particularly important for sea transports
        (ais-based).

        It is **higly recommened** to provide the transport date (day of
        arrival) while using this setting to ensure that the correct time period
        is being used.
      properties:
        timeFrame:
          $ref: '#/components/schemas/timeFrame'
        aggregation:
          $ref: '#/components/schemas/aggregation'
        shipmentParameterList:
          type: array
          items:
            $ref: '#/components/schemas/shipmentParameter'
        routeFilterParameter:
          $ref: '#/components/schemas/routeFilterParameter'
    SEA:
      title: SEA
      type: object
      properties:
        transportMode:
          type: string
          pattern: ^SEA$
          example: SEA
        loadFactor:
          $ref: '#/components/schemas/loadFactor'
        virtualDistance:
          $ref: '#/components/schemas/virtualDistance'
        distanceAdjustmentFactor:
          $ref: '#/components/schemas/distanceAdjustmentFactor'
        seaVessel:
          $ref: '#/components/schemas/seaVessel'
        speedUtilization:
          $ref: '#/components/schemas/speedUtilization'
        routingVariant:
          $ref: '#/components/schemas/routingVariantSea'
        directSailed:
          description: >-
            By activating the directSailed attribute the routing will be done
            direct (without any transhipment or port-call) from the origin to
            the destination. <br>

            please note: origin and destination have to be a sea ports.
            (default: false)
          type: boolean
          example: false
        cleanCargoParameters:
          $ref: '#/components/schemas/cleanCargoParameters'
        userSpecificEmissions:
          $ref: '#/components/schemas/userSpecificEmissions'
        energyComposition:
          $ref: '#/components/schemas/energyCompositionSea'
        primaryDataSettings:
          $ref: '#/components/schemas/primaryDataSettingsSea'
      required:
        - transportMode
    loadFactorAir:
      title: loadFactorAir
      type: object
      properties:
        freight:
          $ref: '#/components/schemas/loadFactor'
        passenger:
          description: >-
            depends on flight distance class and plane type, only active for
            belly planes
          $ref: '#/components/schemas/loadFactor'
    aircraftClass:
      title: aircraftClass
      type: string
      description: >-
        ALL_CLASSES is equivalent to not specifying aircraftClass at all meaning
        that both FREIGHTER and BELLY_FREIGHT planes are taken into account.
      enum:
        - FREIGHTER
        - BELLY_FREIGHT
        - ALL_CLASSES
      example: BELLY_FREIGHT
    aircraftType:
      title: aircraftType
      description: >-
        e.g. 320 for Airbus A320 (default for Medium Haul) <br>

        **with routing variant = satellite-based it is not possible to specify a
        flightNumber and aircraft type at the same time!** <br>

        See Documentation for all available aircraftTypes
      type: string
      example: 320
    aircraft:
      title: aircraft
      type: object
      description: >-
        Input: Please specify only class or type. If both are provided only type
        will be taken into account.
      properties:
        class:
          $ref: '#/components/schemas/aircraftClass'
        type:
          $ref: '#/components/schemas/aircraftType'
      minProperties: 1
      maxProperties: 1
    carrierCode:
      title: carrierCode
      description: two letter IATA Code for Airlines. **Only uppercase Letters allowed**
      type: string
      pattern: ^[A-Z0-9]{2}$
      example: LH
    flightNumber:
      title: flightNumber
      description: >-
        code for an airline service consisting of two-character carrier Code and
        a 1 to 4 digit number. **Only uppercase Letters allowed**

        <br> **Provide either carrier Code OR flightNumber**

        <br> **with routing variant = satellite-based it is not possible to
        specify a flightNumber and aircraft type at the same time!**
      type: string
      pattern: ^[A-Z0-9]{2}\s?\d{1,4}$
      example: BA 222
    directFlight:
      title: directFlight
      description: >-
        true or false (default), disables the air network routing and calculates
        a direct flight from the origin to the destination airport
      type: boolean
      example: false
    routingVariantAir:
      title: routingVariantAir
      description: >-
        The routing variant defines if the routing or the transfer point
        determination (airport identification) shall be done based on
        satellite-data, which reflects real aircraft trips purchased from
        Skailark, or on scheduled data from the OAG.

        Since January 2025 the default routing variant is satellite-based.

        Please note that with the routing variants satellite-based and
        satellite-based-all-flights it is not possible to specify a flight
        number and an aircraft type at the same time, currently.
      type: string
      enum:
        - DEFAULT
        - SCHEDULED
        - SATELLITE_BASED
        - SATELLITE_BASED_ALL_FLIGHTS
      example: SATELLITE_BASED
    shareKerosene:
      title: shareKerosene
      type: object
      description: Note that the sum of all shares must be 100
      properties:
        energyType:
          type: string
          example: KEROSENE
          pattern: ^KEROSENE$
        productionType:
          type: string
          enum:
            - FOSSIL
          example: FOSSIL
        share:
          $ref: '#/components/schemas/factor'
      required:
        - energyType
        - productionType
        - share
    energyCompositionAir:
      title: energyCompositionAir
      type: object
      properties:
        shares:
          type: object
          properties:
            standard:
              description: >-
                Shares for regular Air Transport. As Transport may be operated
                as road feeder service you may additionally specify
                sharesRoadFallback
              type: array
              items:
                oneOf:
                  - $ref: '#/components/schemas/shareKerosene'
                  - $ref: '#/components/schemas/shareHvo'
                discriminator:
                  propertyName: energyType
                  mapping:
                    KEROSENE: '#/components/schemas/shareKerosene'
                    HVO: '#/components/schemas/shareHvo'
              minItems: 1
            roadFallback:
              $ref: '#/components/schemas/roadShares'
          required:
            - standard
      required:
        - shares
    primaryDataSettingsAir:
      title: primaryDataSettingsAir
      type: object
      description: >-
        Additional settings can be made for the two routing variants with real
        (primary) data: ais-based and satellite-based. <br>

        Based on the specified transport date, it is possible to specify the
        period within which the data should be aggregated.

        The end of a transport is key when deciding if it should be included
        within the time frame. This is particularly important for sea transports
        (ais-based).

        It is **higly recommened** to provide the transport date (day of
        arrival) while using this setting to ensure that the correct time period
        is being used.
      properties:
        timeFrame:
          $ref: '#/components/schemas/timeFrame'
        aggregation:
          $ref: '#/components/schemas/aggregation'
      required:
        - timeFrame
    AIR:
      title: AIR
      type: object
      properties:
        transportMode:
          type: string
          pattern: ^AIR$
          example: AIR
        loadFactor:
          $ref: '#/components/schemas/loadFactorAir'
        virtualDistance:
          $ref: '#/components/schemas/virtualDistance'
        distanceAdjustmentFactor:
          $ref: '#/components/schemas/distanceAdjustmentFactor'
        aircraft:
          $ref: '#/components/schemas/aircraft'
        considerRfiFactor:
          type: boolean
          description: consider Radiative Forcing Index? default is false
          example: false
        carrierCode:
          $ref: '#/components/schemas/carrierCode'
        flightNumber:
          $ref: '#/components/schemas/flightNumber'
        directFlight:
          $ref: '#/components/schemas/directFlight'
        routingVariant:
          $ref: '#/components/schemas/routingVariantAir'
        userSpecificEmissions:
          $ref: '#/components/schemas/userSpecificEmissions'
        energyComposition:
          $ref: '#/components/schemas/energyCompositionAir'
        primaryDataSettings:
          $ref: '#/components/schemas/primaryDataSettingsAir'
      required:
        - transportMode
    inlandVesselType:
      title: inlandShipType
      description: >-
        Key      | Value |
          ---    | --- |
        IB_EU_BU | Euro ship bulk I-IV (0-1500t capacity) |

        IB_GR_BU | Large inland freight vessel bulk V (1500-3000t capacity) |

        IB_JO_BU | Jowi class bulk VI+ (>3000t capacity |

        IB_EU_CT | Euro ship container I-IV (0-1500t capacity) |

        IB_GR_CT | Large inland freight vessel container V (1500-3000t capacity)
        |

        IB_JO_CT | Jowi class container VI+ (>3000t capacity) |

        IB_PC_2X2_BU | PushConvoi 2x2 bulk (approx. 11200t capacity) |

        IB_PC_2X2_CT | PushConvoi 2x2 container (approx. 11200t capacity) |
      type: string
      enum:
        - IB_EU_BU
        - IB_GR_BU
        - IB_JO_BU
        - IB_EU_CT
        - IB_GR_CT
        - IB_JO_CT
        - IB_PC_2X2_BU
        - IB_PC_2X2_CT
    inlandVesselClass:
      title: inlandVesselClass
      type: string
      enum:
        - CONTAINER
        - NON_CONTAINER
    inlandVessel:
      title: inlandVessel
      type: object
      description: >-
        Input: Please specify either type or class. If both are provided only
        type will be taken into account.
      properties:
        type:
          $ref: '#/components/schemas/inlandVesselType'
        class:
          $ref: '#/components/schemas/inlandVesselClass'
      minProperties: 1
      maxProperties: 1
    inlandwatersEmissionStandard:
      title: inlandwatersEmissionStandard
      type: string
      enum:
        - CONV_1970_2002_US_TIER1
        - CCNR1_2002_2006
        - CCNR2_EU3A_US_TIER2_2006
        - EPA_TIER3
        - EPA_TIER4
        - EU_V_GT2019
    energyCompositionInlandwaters:
      title: energyCompositionInlandwaters
      type: object
      properties:
        shares:
          type: object
          properties:
            standard:
              description: >-
                Shares for regular Inlandwaters Transport. As part of the
                transport may be operated as road transport you may additionally
                specify sharesRoadFallback
              type: array
              items:
                oneOf:
                  - $ref: '#/components/schemas/shareDiesel'
                  - $ref: '#/components/schemas/shareBioDiesel'
                  - $ref: '#/components/schemas/shareHvo'
                discriminator:
                  propertyName: energyType
                  mapping:
                    DIESEL: '#/components/schemas/shareDiesel'
                    BIO_DIESEL: '#/components/schemas/shareBioDiesel'
                    HVO: '#/components/schemas/shareHvo'
              minItems: 1
            roadFallback:
              $ref: '#/components/schemas/roadShares'
          required:
            - standard
      required:
        - shares
    INLANDWATERS:
      title: INLANDWATERS
      type: object
      properties:
        transportMode:
          type: string
          pattern: ^INLANDWATERS$
          example: INLANDWATERS
        loadFactor:
          $ref: '#/components/schemas/loadFactor'
        virtualDistance:
          $ref: '#/components/schemas/virtualDistance'
        distanceAdjustmentFactor:
          $ref: '#/components/schemas/distanceAdjustmentFactor'
        inlandVessel:
          $ref: '#/components/schemas/inlandVessel'
        inlandwatersEmissionStandard:
          $ref: '#/components/schemas/inlandwatersEmissionStandard'
        userSpecificEmissions:
          $ref: '#/components/schemas/userSpecificEmissions'
        energyComposition:
          $ref: '#/components/schemas/energyCompositionInlandwaters'
      required:
        - transportMode
    carriage:
      title: carriage
      oneOf:
        - $ref: '#/components/schemas/ROAD'
        - $ref: '#/components/schemas/RAIL'
        - $ref: '#/components/schemas/SEA'
        - $ref: '#/components/schemas/AIR'
        - $ref: '#/components/schemas/INLANDWATERS'
      discriminator:
        propertyName: transportMode
        mapping:
          ROAD: '#/components/schemas/ROAD'
          RAIL: '#/components/schemas/RAIL'
          SEA: '#/components/schemas/SEA'
          AIR: '#/components/schemas/AIR'
          INLANDWATERS: '#/components/schemas/INLANDWATERS'
    transportChainElement:
      title: transportChainElement
      description: >-
        can be either a transport Element with route and Carriage (including
        Transport Mode) or a logistic Hub
      oneOf:
        - $ref: '#/components/schemas/TRANSPORT'
        - $ref: '#/components/schemas/LOGISTIC_HUB'
      discriminator:
        propertyName: elementType
        mapping:
          TRANSPORT: '#/components/schemas/TRANSPORT'
          LOGISTIC_HUB: '#/components/schemas/LOGISTIC_HUB'
    automaticTranshipmentDetection:
      title: automaticTranshipmentDetection
      type: object
      description: >-
        It is possible to activate the automatic detection and calculation of
        the emissions

        associated to transhipment activities. <br>

        Although this is mandatory as per the ISO 14083, it is not calculated by
        default

        on the EcoTransIT World and has to be activated explicitly by the user
      properties:
        handlingType:
          description: |-
            Key      | Description |
              ---    | --- |
            DRY | Dry Bulk |
            LIQUID | Liquid Bulk |
            PIECE | Piece goods / Break Bulk |
            PALLET | Freight on pallets |
            CONTAINER | Freight in containers |
            RORO | Vehicle based Roll-On Roll-Off |
          type: string
          enum:
            - DRY
            - LIQUID
            - PIECE
            - PALLET
            - CONTAINER
            - RORO
          example: CONTAINER
        mode:
          description: |-
            Key      | Description |
              ---    | --- |
            DISABLED | Transhipments are not considered (default) |
            ALWAYS | All potential transhipments are considered |
            INTERMODAL_CHANGE | Only intermodal transhipments are considered |
          type: string
          enum:
            - DISABLED
            - ALWAYS
            - INTERMODAL_CHANGE
          example: DISABLED
      required:
        - handlingType
        - mode
    blockingList:
      title: blockingList
      type: object
      properties:
        canals:
          type: array
          items:
            type: string
            description: >-
              Individual canals can be excluded from routing for sea transports.
              This is possible for Suez canal, Panama canal and Kiel canal. This
              feature can be applied independently of the routing variant
              selected.
            enum:
              - KIEL
              - SUEZ
              - PANAMA
    skipFaultySection:
      title: skipFaultySection
      description: >-
        The skipFaultySection attribute enables an automatically skip of a
        section (transport chain element) if there was an

        issue, like a wrong locode. This can be useful, if the input data often
        has issues within the

        pre-carriage but the main carriage (e.g. as second section) can be
        calculated. In this case the

        skipFaultySection disables the respective section but calculates the
        rest of the transport chain <br>

        | Keys   | Values |

        | ---    | ---    |

        | FIRST  | Skips only the first section if it creates an issue |

        | LAST   | Skips only the last section if it creates an issue. |

        | BOTH   | Skips the first and/or last section if it creates an issue |
      type: string
      enum:
        - FIRST
        - LAST
        - BOTH
      example: BOTH
    splitCarriage:
      title: splitCarriage
      type: object
      description: >-
        Every change within one of the criteria creates an additional
        mainCarriage leg in the transport chain element of the response.
      properties:
        frontiers:
          description: Splits the carriage when crossing country borders.
          type: boolean
          example: false
        rail:
          type: object
          properties:
            traction:
              description: >-
                Splits the carriage on railTraction change. For example if part
                of the track is not electrified. It is recommended to set this
                to true
              type: boolean
              example: true
          required:
            - traction
        sea:
          type: object
          properties:
            emissionControlArea:
              description: >-
                Splits the carriage when entering or leaving an ECA (Emission
                Control Area)
              type: boolean
              example: false
          required:
            - emissionControlArea
    createKml:
      title: createKml
      description: >-
        If true, the response will include a Url to a KML file. The KML file
        will contain the route of the transport chain elements. <br>

        The route can then be displayed for example in google earth. The shown
        routing is simplified, while for the calculation the proper routing has
        been used.
      type: boolean
      default: false
      example: false
    output:
      title: output
      type: object
      properties:
        infoLevel:
          type: string
          enum:
            - STANDARD
            - DETAILED
        splitCarriage:
          $ref: '#/components/schemas/splitCarriage'
        createKml:
          $ref: '#/components/schemas/createKml'
    errorHandling:
      type: object
      title: errorHandling
      description: >-
        Map/dictionary to specify how EcotransIT World should handle errors.
        <br>

        The key of the map specifies the problem, e.g. "NotMatchingFlightNumber"
        <br>

        Via option you can specify how to handle the problem.
      additionalProperties:
        type: object
        properties:
          option:
            type: string
            description: >-
              option    | meaning |
                ---     | --- |
              ERROR     | Throw an Error and terminate calculation. |

              IGNORE    | Ignores inconsistent or bad input and let EcotransIT
              World make the most reasonable assumption to resolve the conflict
              and give a response with proper emissions |

              CUSTOM    | Further define how ecotransit should handle the
              Problem by setting the "customValue" |
            enum:
              - ERROR
              - IGNORE
              - CUSTOM
            example: ERROR
          customValue:
            description: >-
              Further define how EcotransIT World should handle the Problem.
              Only for option "CUSTOM" - otherwise customValue will be ignored.
            type: string
            example: UseCarrierCode
        required:
          - option
        example:
          NotMatchingFlightNumber:
            option: CUSTOM
            customValue: UseCarrierCode
    settings:
      title: settings
      type: object
      properties:
        automaticTranshipmentDetection:
          $ref: '#/components/schemas/automaticTranshipmentDetection'
        useLocationAliasTable:
          description: >-
            Defines whether a previously uploaded alias table for locations
            should be used  **(default = false)**
          type: boolean
          example: false
        blockingList:
          $ref: '#/components/schemas/blockingList'
        skipFaultySection:
          $ref: '#/components/schemas/skipFaultySection'
        output:
          $ref: '#/components/schemas/output'
        errorHandling:
          $ref: '#/components/schemas/errorHandling'
    notification:
      title: notification
      type: object
      properties:
        key:
          type: string
        level:
          type: string
          enum:
            - INFO
            - WARNING
        category:
          type: string
          enum:
            - LOCATION
            - PARAMETER
            - INTERNAL
            - ROUTING
            - ERROR_HANDLING
            - CONFIGURATION
        message:
          type: string
          example: Flight number(s) LH123 are related to origin location airport:MUC.
        action:
          type: string
        values:
          description: map with values to make message more machine readable
          type: object
          additionalProperties:
            type: string
          example:
            flightNumber: LH123
            originLocation: MUC
      required:
        - key
        - message
    TRANSPORT_RESULT:
      title: TRANSPORT_RESULT
      type: object
      properties:
        resultType:
          type: string
          example: TRANSPORT_RESULT
          pattern: ^TRANSPORT_RESULT$
        notifications:
          type: array
          items:
            $ref: '#/components/schemas/notification'
        route:
          $ref: '#/components/schemas/routeResponse'
        emissions:
          $ref: '#/components/schemas/emissions'
        userSpecificEmissions:
          $ref: '#/components/schemas/emissions'
        carriageParameters:
          $ref: '#/components/schemas/carriageParametersResponse'
        primaryDataParameters:
          $ref: '#/components/schemas/primaryDataParameters'
        energyCarriers:
          type: array
          items:
            $ref: '#/components/schemas/energyCarrier'
          minItems: 1
      required:
        - resultType
        - route
        - emissions
        - carriageParameters
        - energyCarriers
    LOGISTIC_HUB_RESULT:
      title: LOGISTIC_HUB_RESULT
      type: object
      properties:
        resultType:
          type: string
          example: LOGISTIC_HUB_RESULT
          pattern: ^LOGISTIC_HUB_RESULT$
        origin:
          $ref: '#/components/schemas/locationResponse'
        destination:
          $ref: '#/components/schemas/locationResponse'
        emissions:
          $ref: '#/components/schemas/emissions'
        energyConsumptions:
          type: array
          items:
            $ref: '#/components/schemas/energyConsumption'
      required:
        - resultType
        - origin
        - emissions
        - energyConsumptions
    wgs84CoordinateResponse:
      title: wgs84CoordinateResponse
      type: object
      properties:
        latitude:
          type: number
          format: double
          example: 52.38723
          minimum: -90
          maximum: 90
        longitude:
          type: number
          format: double
          example: 9.74021
          minimum: -180
          maximum: 180
      required:
        - latitude
        - longitude
    locationResponse:
      title: locationResponse
      type: object
      description: in the Response location is always a wgs84Coordinate
      properties:
        notifications:
          type: array
          items:
            $ref: '#/components/schemas/notification'
        wgs84Coordinate:
          $ref: '#/components/schemas/wgs84CoordinateResponse'
        name:
          type: string
        codeType:
          type: string
          enum:
            - ZIP_CODE
            - UN_LOCODE
            - IATA_CODE
            - UIC_CODE
            - NAME
        countryCode:
          $ref: '#/components/schemas/countryCode'
        code:
          type: string
        transportModeChange:
          type: string
          enum:
            - ROAD
            - RAIL
            - SEA
            - AIR
            - INLANDWATERS
            - LOGISTIC_HUB
        carriageChange:
          type: string
          enum:
            - PRE_CARRIAGE
            - MAIN_CARRIAGE
            - POST_CARRIAGE
        railTractionTypeChange:
          $ref: '#/components/schemas/tractionType'
      required:
        - wgs84Coordinate
    routeResponse:
      title: routeResponse
      type: object
      properties:
        origin:
          $ref: '#/components/schemas/locationResponse'
        destination:
          $ref: '#/components/schemas/locationResponse'
      required:
        - origin
        - destination
    emissionsInMJ:
      title: emissionsInMJ
      type: object
      properties:
        unit:
          type: string
          enum:
            - MEGAJOULE
        energyProvision:
          description: >-
            Upstream energy consumption and upstream emissions (= energy
            provision, production and distribution)
          type: number
          format: double
        operational:
          description: Final energy consumption and vehicle emissions (tank to wheel ttw)
          type: number
          format: double
        total:
          description: >-
            Total energy consumption and total emissions - Sum of operation and
            upstream figures (well to wheel wtw)
          type: number
          format: double
      required:
        - unit
        - energyProvision
        - operational
        - total
    emissionsInTons:
      title: emissionsInTons
      type: object
      properties:
        unit:
          type: string
          enum:
            - TONS
        energyProvision:
          description: >-
            Upstream energy consumption and upstream emissions (= energy
            provision, production and distribution)
          type: number
          format: double
        operational:
          description: Final energy consumption and vehicle emissions (tank to wheel ttw)
          type: number
          format: double
        total:
          description: >-
            Total energy consumption and total emissions - Sum of operation and
            upstream figures (well to wheel wtw)
          type: number
          format: double
      required:
        - unit
        - energyProvision
        - operational
        - total
    emissionsInKg:
      title: emissionsInKg
      type: object
      properties:
        unit:
          type: string
          enum:
            - KILOGRAMS
        energyProvision:
          description: >-
            Upstream energy consumption and upstream emissions (= energy
            provision, production and distribution)
          type: number
          format: double
        operational:
          description: Final energy consumption and vehicle emissions (tank to wheel ttw)
          type: number
          format: double
        total:
          description: >-
            Total energy consumption and total emissions - Sum of operation and
            upstream figures (well to wheel wtw)
          type: number
          format: double
      required:
        - unit
        - energyProvision
        - operational
        - total
    emissionsInKilometer:
      title: emissionsInKilometer
      type: object
      properties:
        unit:
          type: string
          enum:
            - KILOMETER
        total:
          type: number
          format: double
      required:
        - unit
        - total
    emissionsInTonneKilometers:
      title: emissionsInTonneKilometers
      type: object
      properties:
        unit:
          type: string
          enum:
            - TONNE_KILOMETERS
        total:
          type: number
          format: double
      required:
        - unit
        - total
    emissionsInGramsPerTonneKilometers:
      title: emissionsInGramsPerTonneKilometers
      type: object
      properties:
        unit:
          type: string
          enum:
            - GRAMS_PER_TONNE_KILOMETERS
        energyProvision:
          description: >-
            Upstream energy consumption and upstream emissions (= energy
            provision, production and distribution)
          type: number
          format: double
        operational:
          description: Final energy consumption and vehicle emissions (tank to wheel ttw)
          type: number
          format: double
        total:
          description: >-
            Total energy consumption and total emissions - Sum of operation and
            upstream figures (well to wheel wtw)
          type: number
          format: double
      required:
        - unit
        - energyProvision
        - operational
        - total
    dieselFuelConsumption:
      title: dieselFuelConsumption
      type: object
      deprecated: true
      description: >-
        displays consumption of vehicle in liter per 100 km. **deprecated** <br>
        will soon be fully replaced by energyCarrier output
      properties:
        unit:
          type: string
          enum:
            - LITER_PER_100_KILOMETER
        energyProvision:
          description: >-
            Upstream energy consumption and upstream emissions (= energy
            provision, production and distribution)
          type: number
          format: double
        operational:
          description: Final energy consumption and vehicle emissions (tank to wheel ttw)
          type: number
          format: double
        total:
          description: >-
            Total energy consumption and total emissions - Sum of operation and
            upstream figures (well to wheel wtw)
          type: number
          format: double
      required:
        - unit
        - energyProvision
        - operational
        - total
    emissionCostsInEuro:
      title: extCostsInEuro
      type: object
      properties:
        unit:
          type: string
          enum:
            - EURO
        energyProvision:
          description: >-
            Upstream energy consumption and upstream emissions (= energy
            provision, production and distribution)
          type: number
          format: double
        operational:
          description: Final energy consumption and vehicle emissions (tank to wheel ttw)
          type: number
          format: double
        total:
          description: >-
            Total energy consumption and total emissions - Sum of operation and
            upstream figures (well to wheel wtw)
          type: number
          format: double
      required:
        - unit
        - energyProvision
        - operational
        - total
    emissionCosts:
      title: emissionCosts
      type: object
      properties:
        nitrogenOxidesExtCosts:
          $ref: '#/components/schemas/emissionCostsInEuro'
        sulfurDioxidesExtCosts:
          $ref: '#/components/schemas/emissionCostsInEuro'
        nonMethanHydroCarbonsExtCosts:
          $ref: '#/components/schemas/emissionCostsInEuro'
        particlesExtCosts:
          $ref: '#/components/schemas/emissionCostsInEuro'
        co2EquivalentsExtCosts:
          $ref: '#/components/schemas/emissionCostsInEuro'
      required:
        - nitrogenOxidesExtCosts
        - sulfurDioxidesExtCosts
        - nonMethanHydroCarbonsExtCosts
        - particlesExtCosts
        - co2EquivalentsExtCosts
    costsInEuro:
      title: costsInEuro
      type: object
      properties:
        unit:
          type: string
          enum:
            - EURO
        value:
          type: number
          format: double
      required:
        - unit
        - value
    externalCosts:
      title: externalCosts
      type: object
      properties:
        emissionCosts:
          $ref: '#/components/schemas/emissionCosts'
        accidentCosts:
          $ref: '#/components/schemas/costsInEuro'
        noiseCosts:
          $ref: '#/components/schemas/costsInEuro'
        totalCosts:
          $ref: '#/components/schemas/costsInEuro'
      required:
        - emissionCosts
        - accidentCosts
        - noiseCosts
        - totalCosts
    emissions:
      title: emissions
      type: object
      properties:
        primaryEnergy:
          $ref: '#/components/schemas/emissionsInMJ'
        carbonDioxide:
          $ref: '#/components/schemas/emissionsInTons'
        nitrogenOxides:
          $ref: '#/components/schemas/emissionsInKg'
        sulfurDioxides:
          $ref: '#/components/schemas/emissionsInKg'
        nonMethaneHydroCarbons:
          $ref: '#/components/schemas/emissionsInKg'
        particles:
          $ref: '#/components/schemas/emissionsInKg'
        co2Equivalents:
          $ref: '#/components/schemas/emissionsInTons'
        distance:
          $ref: '#/components/schemas/emissionsInKilometer'
        transportActivity:
          $ref: '#/components/schemas/emissionsInTonneKilometers'
        co2EquivalentsIntensity:
          $ref: '#/components/schemas/emissionsInGramsPerTonneKilometers'
        dieselFuelConsumption:
          $ref: '#/components/schemas/dieselFuelConsumption'
        externalCosts:
          $ref: '#/components/schemas/externalCosts'
      required:
        - primaryEnergy
        - carbonDioxide
        - nitrogenOxides
        - sulfurDioxides
        - co2Equivalents
        - distance
        - specificEmissions
        - externalCosts
    energyCompositionShareResponse:
      title: energyCompositionShareResponse
      type: object
      properties:
        energyType:
          type: string
          enum:
            - GASOLINE
            - BIO_ETHANOL
            - DIESEL
            - BIO_DIESEL
            - HVO
            - CNG
            - BIO_CNG
            - LNG
            - BIO_LNG
            - KEROSENE
            - ELECTRICITY
            - HYDROGEN
            - PHEV
            - HFO
            - MDO
            - ULSFO
            - BLENDS
            - LPG
          example: BIO_DIESEL
        productionType:
          type: string
          enum:
            - FOSSIL
            - COUNTRY_MIX
            - MIX
            - RAPESEED_OIL
            - SOY_OIL
            - UCO
            - MAIZE
            - MANURE
            - BIO_WASTE
            - GREY_HYDROGEN
            - GREEN_HYDROGEN
            - YELLOW_HYDROGEN
          example: FOSSIL
        share:
          $ref: '#/components/schemas/factor'
      required:
        - energyType
        - productionType
        - share
    energyCompositionResponse:
      title: energyCompositionResponse
      type: object
      properties:
        shares:
          type: array
          items:
            $ref: '#/components/schemas/energyCompositionShareResponse'
      required:
        - shares
    ROAD_RESPONSE:
      title: ROAD_RESPONSE
      type: object
      properties:
        transportMode:
          type: string
          pattern: ^ROAD$
          example: ROAD
        loadFactor:
          $ref: '#/components/schemas/loadFactor'
        distanceAdjustmentFactor:
          $ref: '#/components/schemas/distanceAdjustmentFactor'
        emissionClass:
          $ref: '#/components/schemas/emissionClassRoad'
        truckType:
          $ref: '#/components/schemas/truckType'
        emptyTripFactor:
          $ref: '#/components/schemas/emptyTripFactor'
        coolingType:
          $ref: '#/components/schemas/coolingTypeTruck'
        ferryRouting:
          $ref: '#/components/schemas/ferryRouting'
        truckLoad:
          $ref: '#/components/schemas/truckLoad'
        truckWeight:
          $ref: '#/components/schemas/truckWeight'
        containerCount:
          $ref: '#/components/schemas/containerCount'
        energyComposition:
          $ref: '#/components/schemas/energyCompositionResponse'
      required:
        - transportMode
        - loadFactor
        - emissionClass
        - emptyTripFactor
        - ferryRouting
    RAIL_RESPONSE:
      title: RAIL_RESPONSE
      type: object
      properties:
        transportMode:
          type: string
          pattern: ^RAIL$
          example: RAIL
        loadFactor:
          $ref: '#/components/schemas/loadFactor'
        distanceAdjustmentFactor:
          $ref: '#/components/schemas/distanceAdjustmentFactor'
        trainWeight:
          $ref: '#/components/schemas/trainWeight'
        tractionType:
          $ref: '#/components/schemas/tractionType'
        emptyTripFactor:
          $ref: '#/components/schemas/emptyTripFactor'
        ferryRouting:
          $ref: '#/components/schemas/ferryRouting'
        trainType:
          $ref: '#/components/schemas/trainType'
        emissionClass:
          $ref: '#/components/schemas/emissionClassRail'
        particleFilterType:
          $ref: '#/components/schemas/particleFilterType'
        energyComposition:
          $ref: '#/components/schemas/energyCompositionResponse'
      required:
        - transportMode
        - loadFactor
        - trainWeight
        - tractionType
        - emptyTripFactor
    energyCompositionResponseSea:
      title: energyCompositionResponseSea
      type: object
      properties:
        shares:
          type: object
          title: sharesSea
          properties:
            eca:
              type: array
              items:
                $ref: '#/components/schemas/energyCompositionShareResponse'
            nonEca:
              type: array
              items:
                $ref: '#/components/schemas/energyCompositionShareResponse'
      required:
        - shares
    SEA_RESPONSE:
      title: SEA_RESPONSE
      type: object
      properties:
        transportMode:
          type: string
          pattern: ^SEA$
          example: SEA
        loadFactor:
          $ref: '#/components/schemas/loadFactor'
        distanceAdjustmentFactor:
          $ref: '#/components/schemas/distanceAdjustmentFactor'
        seaVessel:
          $ref: '#/components/schemas/seaVessel'
        speedUtilization:
          $ref: '#/components/schemas/speedUtilization'
        routingVariant:
          $ref: '#/components/schemas/routingVariantSea'
        cleanCargoParameters:
          $ref: '#/components/schemas/cleanCargoParameters'
        seaShipShare:
          type: string
        energyComposition:
          $ref: '#/components/schemas/energyCompositionResponseSea'
      required:
        - transportMode
    AIR_RESPONSE:
      title: AIR_RESPONSE
      type: object
      properties:
        transportMode:
          type: string
          pattern: ^AIR$
          example: AIR
        loadFactor:
          $ref: '#/components/schemas/loadFactorAir'
        distanceAdjustmentFactor:
          $ref: '#/components/schemas/distanceAdjustmentFactor'
        aircraft:
          $ref: '#/components/schemas/aircraft'
        considerRfiFactor:
          type: boolean
          example: false
        carrierCode:
          $ref: '#/components/schemas/carrierCode'
        flightNumber:
          $ref: '#/components/schemas/flightNumber'
        directFlight:
          $ref: '#/components/schemas/directFlight'
        routingVariant:
          $ref: '#/components/schemas/routingVariantAir'
        aircraftShare:
          type: string
        distanceClass:
          type: string
        energyComposition:
          $ref: '#/components/schemas/energyCompositionResponse'
      required:
        - transportMode
    INLANDWATERS_RESPONSE:
      title: INLANDWATERS_RESPONSE
      type: object
      properties:
        transportMode:
          type: string
          pattern: ^INLANDWATERS$
          example: INLANDWATERS
        loadFactor:
          $ref: '#/components/schemas/loadFactor'
        distanceAdjustmentFactor:
          $ref: '#/components/schemas/distanceAdjustmentFactor'
        inlandVessel:
          $ref: '#/components/schemas/inlandVessel'
        inlandwatersEmissionStandard:
          $ref: '#/components/schemas/inlandwatersEmissionStandard'
        energyComposition:
          $ref: '#/components/schemas/energyCompositionResponse'
      required:
        - transportMode
    carriageParametersResponse:
      title: carriageParametersResponse
      oneOf:
        - $ref: '#/components/schemas/ROAD_RESPONSE'
        - $ref: '#/components/schemas/RAIL_RESPONSE'
        - $ref: '#/components/schemas/SEA_RESPONSE'
        - $ref: '#/components/schemas/AIR_RESPONSE'
        - $ref: '#/components/schemas/INLANDWATERS_RESPONSE'
      discriminator:
        propertyName: transportMode
        mapping:
          ROAD: '#/components/schemas/ROAD_RESPONSE'
          RAIL: '#/components/schemas/RAIL_RESPONSE'
          SEA: '#/components/schemas/SEA_RESPONSE'
          AIR: '#/components/schemas/AIR_RESPONSE'
          INLANDWATERS: '#/components/schemas/INLANDWATERS_RESPONSE'
    primaryDataParameters:
      title: primaryDataParameters
      type: object
      description: currently not available
      additionalProperties:
        type: object
        additionalProperties:
          type: string
    consumptionUnits:
      title: consumptionUnits
      type: object
      properties:
        unit:
          type: string
          description: liter, kg, kWh, or megajoule
          enum:
            - LITER
            - KILOGRAMS
            - KILOWATT_HOUR
            - MEGAJOULE
        value:
          type: number
          format: double
          minimum: 0
    energyCarrierEmission:
      title: energyCarrierEmission
      type: object
      properties:
        type:
          type: string
          enum:
            - CO2_EQUIVALENTS
        unit:
          type: string
          enum:
            - PERCENTAGE
        value:
          type: number
          format: double
      required:
        - category
        - unit
        - value
    energyCarrier:
      title: energyCarrier
      type: object
      properties:
        energyType:
          type: string
          enum:
            - GASOLINE
            - BIO_ETHANOL
            - DIESEL
            - BIO_DIESEL
            - HVO
            - CNG
            - BIO_CNG
            - LNG
            - BIO_LNG
            - KEROSENE
            - ELECTRICITY
            - HYDROGEN
            - PHEV
            - HFO
            - MDO
            - ULSFO
            - BLENDS
            - LPG
        productionType:
          type: string
          enum:
            - FOSSIL
            - COUNTRY_MIX
            - MIX
            - RAPESEED_OIL
            - SOY_OIL
            - UCO
            - MAIZE
            - MANURE
            - BIOWASTE
            - GREY_HYDROGEN
            - GREEN_HYDROGEN
            - YELLOW_HYDROGEN
        consumption:
          description: displays consumption in multiple units
          type: array
          items:
            $ref: '#/components/schemas/consumptionUnits'
          minItems: 1
        emissions:
          type: array
          items:
            $ref: '#/components/schemas/energyCarrierEmission'
          minItems: 1
    carriageResult:
      title: carriageResult
      description: >-
        can be either a result for a regular transport chain element with route
        and Carriage (including Transport Type) or a logistic Hub
      oneOf:
        - $ref: '#/components/schemas/TRANSPORT_RESULT'
        - $ref: '#/components/schemas/LOGISTIC_HUB_RESULT'
      discriminator:
        propertyName: resultType
        mapping:
          TRANSPORT_RESULT: '#/components/schemas/TRANSPORT_RESULT'
          LOGISTIC_HUB_RESULT: '#/components/schemas/LOGISTIC_HUB_RESULT'
    carriageResults:
      title: carriageResults
      type: array
      description: >-
        one transportChainElement may have several pre/post/mainCarriageResults,
        e.g. when a flight requires stopovers
      items:
        $ref: '#/components/schemas/carriageResult'
      minItems: 1
    tceResult:
      title: tceResult
      type: object
      properties:
        numberOfTransportChainElement:
          description: >-
            indicating the number of the transport chain element (tce), if there
            is more than one
          type: string
          example: tce 1 of 3
        customDescription:
          description: Informational data as provided in the request by the user.
          type: string
        notifications:
          type: array
          items:
            $ref: '#/components/schemas/notification'
        preCarriageResults:
          $ref: '#/components/schemas/carriageResults'
        mainCarriageResults:
          $ref: '#/components/schemas/carriageResults'
        postCarriageResults:
          $ref: '#/components/schemas/carriageResults'
      required:
        - mainCarriageResults
    distributionLoad:
      title: distributionLoad
      type: object
      properties:
        cargo:
          $ref: '#/components/schemas/cargoParent'
        freightUnitIdentifier:
          type: string
          description: >-
            Only Informational. Will also occur in Response. Use this to
            identify/tag/descripe your Loads/Unloads <br>

            FreightUnitIdentifier is optional but it is strongly recommended to
            use the value to identify your Loads/Unloads in the response.
        listEmissionsInResponse:
          type: boolean
          description: >-
            If set to false the emissions for this load/unload will not be shown
            in the response
      required:
        - cargo
    transportChainElementCollectionAndDelivery:
      title: transportChainElement
      type: object
      description: >-
        *location* <br>

        represents the start location of this transportChainElement. <br>

        *load* <br>

        represents the cargo to be loaded at the location specified in *this*
        transportChainElement <br>

        *unload* <br>

        represents the cargo to be unloaded at the location specified in *this*
        transportChainElement <br>

        *carriageParameters* <br>

        represents the carriage parameters for the route from the location
        specified in this transportChainElement

        to the location specified in the next transportChainElement.
      properties:
        location:
          $ref: '#/components/schemas/location'
        load:
          type: array
          items:
            $ref: '#/components/schemas/distributionLoad'
        unload:
          type: array
          items:
            $ref: '#/components/schemas/distributionLoad'
        carriageParameters:
          $ref: '#/components/schemas/ROAD'
    settingsCollectionAndDelivery:
      title: settings
      type: object
      properties:
        showRoute:
          type: boolean
          description: >-
            Defines whether the transport emission for each leg shall be shown
            in the response in addition to the total emissions.  
        createKml:
          $ref: '#/components/schemas/createKml'
        closedTour:
          type: boolean
          description: >-
            **true:** first specified location is start and end point of a
            closed round trip (default). An empty trip between the last location
            and the starting location is added automatically <br>

            **false**: last specified location is end point of the trip.
          example: true
        useLocationAliasTable:
          description: >-
            Defines whether a previously uploaded alias table for locations
            should be used  **(default = false)**
          type: boolean
          example: false
    linearDistance:
      title: linearDistance
      description: straight line distance between two locations as the crow flies
      type: object
      properties:
        unit:
          type: string
          enum:
            - KILOMETER
        value:
          type: number
          format: double
      required:
        - unit
        - value
    freightUnitResult:
      title: freightUnitResult
      type: object
      properties:
        freightUnitIdentifier:
          type: string
          description: identifier as specified in the original request
        emissionPercentage:
          type: number
          format: double
          description: >-
            Percentage of the calculated total emission of the whole round trip.
            0.75 means 75 % of the total emissions.
        linearDistance:
          $ref: '#/components/schemas/linearDistance'
        location:
          type: string
          description: >-
            short description of the location where the freight unit was
            loaded/unloaded
        load:
          $ref: '#/components/schemas/distributionLoad'
        unload:
          $ref: '#/components/schemas/distributionLoad'
        emissions:
          $ref: '#/components/schemas/emissions'
    tceDistributionResult:
      title: tceDistributionResult
      type: object
      properties:
        information:
          type: object
          properties:
            numberOfTransportChainElement:
              description: >-
                indicating the number of the transport chain element (tce), if
                there is more than one
              type: string
              example: tce 1 of 3
            cargo:
              type: string
              description: cargo transportet in this leg
              example: Cargo 20.0 ton
          required:
            - numberOfTransportChainElement
            - cargo
        route:
          $ref: '#/components/schemas/routeResponse'
        emissions:
          $ref: '#/components/schemas/emissions'
        userSpecificEmissions:
          $ref: '#/components/schemas/emissions'
        carriageParameters:
          $ref: '#/components/schemas/carriageParametersResponse'
        energyCarriers:
          type: array
          items:
            $ref: '#/components/schemas/energyCarrier'
          minItems: 1
      required:
        - information
        - route
        - emissions
        - carriageParameters
        - energyCarriers
  securitySchemes:
    oAuth2AuthorizationCode:
      type: oauth2
      description: This API uses OAuth 2 with the Authorization Code flow.
      flows:
        authorizationCode:
          authorizationUrl: >-
            https://customer-name.ecotransit.org/realms/ETW/protocol/openid-connect/auth
          tokenUrl: >-
            https://customer-name.ecotransit.org/realms/ETW/protocol/openid-connect/token
          refreshUrl: >-
            https://customer-name.ecotransit.org/realms/ETW/protocol/openid-connect/token
          scopes:
            openid: add Description
            offline_access: OpenID Connect built-in scope
