> ## Documentation Index
> Fetch the complete documentation index at: https://docs.terratwin.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List calculation results

> Returns a paginated list of stored calculations matching any supplied `created_from` and `created_to` filters, up to the requested `limit`. Items are returned in descending order of creation, with the latest results first.   

Each item includes the calculation ID originally provided in the request and the date-time when the calculation was created.  Use the `cursor` query parameter to request the next page of calculations by passing the `nextCursor` value from the previous response.




## OpenAPI

````yaml /openapi.yaml get /
openapi: 3.1.0
info:
  title: Calculation API
  version: 1.0.0
  description: >
    **Overview**  

    The Calculation API provides methods for estimating greenhouse gas emissions

    from transporting cargo and retrieving stored calculation results. Use the

    calculate endpoint to create a new calculation, retrieve a calculation
    result

    by client provided ID, or browse stored calculation results using a
    filtered, 

    paginated list method.


    **Base URL**  

    https://api.terratwin.com/api/v1/transportation/emissions


    **Authentication**  

    Every request to this API requires authentication with an API key. 

    Add your key to the `x-api-key` header to identify and authorize your
    account.

    API keys can be obtained from your account dashboard at
    https://www.terratwin.com/account/settings/api-key-manager


    **Rate limits**  

    Each account is limited to 5 requests per second.

    Requests exceeding this threshold may be temporarily rejected with a `429
    Too Many Requests` response. 

    You can retry after a short delay.


    **Cost**  

    The API uses a credit-based billing model.

    Each transport operation processed counts as 1 credit, including connector
    segments such as first-mile and last-mile road operations.

    Weighted-mode operations may expand into multiple component operations; in
    these cases, each child operation is charged as a separate credit.

    Air transport operations are billed as a single credit, even when the model
    inserts multiple stopovers automatically.

    Road sub-operations occurring as part of roll-on/roll-off ferry or train
    movements are included at no extra cost.

    Emissions associated with logistics hubs don’t incur any credit charges.
servers:
  - url: https://api.terratwin.com/api/v1/transportation/emissions
security: []
paths:
  /:
    get:
      summary: List calculation results
      description: >
        Returns a paginated list of stored calculations matching any supplied
        `created_from` and `created_to` filters, up to the requested `limit`.
        Items are returned in descending order of creation, with the latest
        results first.   


        Each item includes the calculation ID originally provided in the request
        and the date-time when the calculation was created.  Use the `cursor`
        query parameter to request the next page of calculations by passing the
        `nextCursor` value from the previous response.
      operationId: listCalculationResults
      parameters:
        - name: created_from
          in: query
          required: false
          description: >-
            Filters results to calculations created at or after this ISO 8601
            date-time.
          schema:
            type: string
            format: date-time
          example: '2026-02-01T00:00:00Z'
        - name: created_to
          in: query
          required: false
          description: >-
            Filters results to calculations created before this ISO 8601
            date-time.
          schema:
            type: string
            format: date-time
          example: '2026-03-01T00:00:00Z'
        - name: limit
          in: query
          required: false
          description: Maximum number of results to return.
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
          example: 50
        - name: cursor
          in: query
          required: false
          description: >-
            Cursor returned by a previous request, used to retrieve the next
            page of results.
          schema:
            type: string
          example: >-
            eyJDcmVhdGVkQXQiOiIyMDI2LTA1LTIwVDE2OjE0OjUyLjUxMDU2OSswMDowMCIsIklkIjoiMWViYWY3MjUtMzhkYS00YTgxLThlMGItNGIxNmE1MjYwN2YwIn0
      responses:
        '200':
          description: >
            Returns stored calculations matching the supplied filters, up to the
            requested limit.  Each item includes the user provided calculation
            ID and the date-time when the calculation was created.   


            The `hasMore` property is included with a value of `true` when there
            are further pages of stored calculations to retrieve.  When
            `hasMore` is `true`, the nextCursor property is also provided.  Pass
            its value as the `cursor` query parameter in a subsequent request to
            retrieve the next page of stored calculation IDs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCalculationResultsResponse'
              examples:
                paginatedResults:
                  summary: Page of stored calculation results
                  value:
                    items:
                      - id: '123456789'
                        createdAt: '2026-02-03T09:51:38.473461+00:00'
                      - id: '234567890'
                        createdAt: '2026-02-03T09:51:38.468912+00:00'
                      - id: '345678901'
                        createdAt: '2026-02-03T09:51:38.462308+00:00'
                      - id: '456789012'
                        createdAt: '2026-02-03T09:51:38.455104+00:00'
                      - id: '567890123'
                        createdAt: '2026-02-03T09:51:38.447829+00:00'
                      - id: '678901234'
                        createdAt: '2026-02-03T09:51:38.441216+00:00'
                      - id: '789012345'
                        createdAt: '2026-02-03T09:51:38.436503+00:00'
                      - id: '890123456'
                        createdAt: '2026-02-03T09:51:38.429874+00:00'
                      - id: '901234567'
                        createdAt: '2026-02-03T09:51:38.423109+00:00'
                      - id: '112233445'
                        createdAt: '2026-02-03T09:51:38.417692+00:00'
                    hasMore: true
                    nextCursor: >-
                      eyJDcmVhdGVkQXQiOiIyMDI2LTAyLTAzVDA5OjUxOjM4LjQxNzY5MiswMDowMCIsIklkIjoiMTEyMjMzNDQ1In0
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                title: API key invalid
                status: 401
                code: 41
                details:
                  - '''...'' is not a valid API key'
                instance: /api/v1/transportation/emissions
                recommendation: >-
                  Provide a valid API key. If you don’t have one, then apply to
                  TerraTwin
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                title: Rate limit exceeded
                status: 429
                code: 45
                details:
                  - Too many requests. The limit is 5 requests per second
                instance: /api/v1/transportation/emissions
                recommendation: Reduce your request rate to ≤ 5 requests/second
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ListCalculationResultsResponse:
      type: object
      required:
        - items
        - hasMore
      properties:
        items:
          type: array
          description: >
            A list of up to `limit` stored calculation result identifiers and
            creation times
             falling within the `created_from` and `created_to` date filters. Results are ordered by
            `created_at` in descending order.
          maxItems: 100
          items:
            $ref: '#/components/schemas/ListCalculationResultsItem'
        hasMore:
          type: boolean
          description: Whether or not more items are available after this page.
        nextCursor:
          type: string
          description: >
            Cursor for retrieving the next page of results. When provided, pass
            this value as the `cursor` query parameter in a subsequent list
            request to fetch earlier-created calculation result IDs. Omitted
            when there are no more results.            
    ErrorResponse:
      type: object
      required:
        - title
        - status
        - code
        - details
        - instance
        - recommendation
      properties:
        title:
          type: string
          description: Short, human readable summary of the error.
        status:
          type: number
          format: integer
          description: >-
            HTTP status code associated with the error, indicating the type of
            failure.
        code:
          type: number
          description: >
            Application-specific numeric error code that identifies the exact
            error condition. Error codes 10000 and above represent internal
            errors.

              | Code | Description                                        |
              |------|----------------------------------------------------|
              | 1    | API key missing                                    |
              | 2    | Invalid JSON                                       |
              | 3    | API property missing                               |
              | 4    | Invalid weight                                     |
              | 5    | Invalid property value                             |
              | 6    | Invalid transport chain element JSON               |
              | 7    | Insufficient location information                  |
              | 8    | Unknown airport IATA code                          |
              | 9    | Missing coordinate                                 |
              | 10   | Invalid coordinate                                 |
              | 11   | Coordinates outside country borders                |
              | 12   | Invalid country code                               |
              | 13   | Unknown UN/LOCODE                                  |
              | 14   | Invalid UN/LOCODE                                  |
              | 15   | Missing country code with address                  |
              | 16   | Unresolvable location                              |
              | 17   | Missing location                                   |
              | 18   | Missing hub                                        |
              | 19   | Invalid volume                                     |
              | 20   | Invalid container count                            |
              | 21   | Incompatible capacity unit for water vessel        |
              | 22   | Invalid load factor percentage                     |
              | 23   | Invalid empty running percentage                   |
              | 24   | Invalid energy consumption                         |
              | 25   | Invalid date/time                                  |
              | 26   | Invalid container type code                        |
              | 27   | Unknown aircraft identifier                        |
              | 28   | Location not routable to airport                   |
              | 29   | Location not routable to rail yard                 |
              | 30   | Location not routable to harbor                    |
              | 31   | No rail system in country                          |
              | 32   | Not routable by air                                |
              | 33   | Not routable by rail                               |
              | 34   | Not routable by road                               |
              | 35   | Unknown rail yard identifier                       |
              | 36   | Fallback transport modes routing failure           |
              | 37   | Invalid percentage                                 |
              | 38   | Invalid percentage summation                       |
              | 39   | Energy type incompatible with consumption unit     |
              | 40   | Energy type not supported for road transport       |
              | 41   | Invalid API key                                    |
              | 42   | Insufficient credits                               |
              | 43   | Account not found                                  |
              | 44   | Service unavailable                                |
              | 45   | Rate limit exceeded                                |
              | 46   | Payload too large                                  |
              | 47   | Invalid HTTP request                               |
              | 48   | Missing request id                                 |
              | 49   | Invalid cursor                                     |
              | 50   | Emissions result not found                         |
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
            - 10
            - 11
            - 12
            - 13
            - 14
            - 15
            - 16
            - 17
            - 18
            - 19
            - 20
            - 21
            - 22
            - 23
            - 24
            - 25
            - 26
            - 27
            - 28
            - 29
            - 30
            - 31
            - 32
            - 33
            - 34
            - 35
            - 36
            - 37
            - 38
            - 39
            - 40
            - 41
            - 42
            - 43
            - 44
            - 45
            - 46
            - 47
            - 48
            - 49
            - 50
        details:
          type: array
          description: >
            One or more strings providing additional details about the error. 
            For internal errors (error codes 10000 and above), this includes a
            tracking code that users can provide to  TerraTwin tech support for
            diagnosis and resolution.
          items:
            type: string
        instance:
          type: string
          description: Path of the API endpoint where the error occurred.
        recommendation:
          type: string
          description: Guidance on how to resolve the error.
    ListCalculationResultsItem:
      type: object
      required:
        - id
        - createdAt
      properties:
        id:
          type: string
          description: >-
            The top-level `id` value submitted with the original calculation
            request.
        createdAt:
          type: string
          format: date-time
          description: >-
            UTC ISO 8601 date-time indicating when the original calculation
            request was stored.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authenticating requests. Include this header in all calls.

````