openapi: 3.0.1 info: title: Routescanner OpenAPI Definition version: "1.0" description: $ref: "./docs/introduction.md" x-topics: - title: Api-key content: $ref: "./docs/api-key.md" - title: Credits content: $ref: "./docs/credits.md" - title: Base Url content: $ref: "./docs/base-url.md" - title: Error Codes content: $ref: "./docs/errors.md" servers: - url: https://connect.routescanner.com/route-information description: Generated server url paths: /api/terminals: get: tags: - terminal-search-rest-controller summary: Search for terminals in the routescanner system for use in distance and/or emissions queries. operationId: search parameters: - name: terminalLocode in: query description: Locode where terminal is located. required: true schema: type: string - name: terminalName in: query description: Name of terminal. We will try to match it with names found in our system. If left empty, will return all terminals under locode. required: false schema: type: string responses: '200': description: Found terminals content: application/json: schema: type: array items: $ref: '#/components/schemas/TerminalSearchRestResponse' '204': description: No terminals were found. '400': description: Bad request, query parameters were wrong '500': description: Something went wrong on our side. /api/emissions: get: tags: - emissions-rest-controller summary: Get emissions between two points using the given modality. operationId: getEmissions parameters: - name: origin in: query description: Origin of voyage. Can be a locode or a lat,long required: true schema: type: string - name: destination in: query description: Destination of voyage. Can be a locode or a lat,long required: true schema: type: string - name: modality in: query description: Modality of voyage. Can be DEEPSEA, SHORTSEA, BARGE, RAIL or TRUCK required: true schema: type: string responses: '200': description: Calculated the emissions in CO2eTeu, C02eTon and the distance in meters content: application/json: schema: $ref: '#/components/schemas/EmissionsRestResponse' '204': description: The emissions couldn't be calculated because a route could not be found '400': description: Bad request, query parameters were wrong '500': description: Something went wrong on our side. /api/distance: get: tags: - distance-rest-controller summary: Get distance between two points using the given modality. operationId: getDistance parameters: - name: origin in: query description: Origin of voyage. Can be a locode, a terminal UUID, or a lat,long required: true schema: type: string - name: destination in: query description: Destination of voyage. Can be a locode, a terminal UUID, or a lat,long required: true schema: type: string - name: modality in: query description: Modality of voyage. Can be DEEPSEA, SHORTSEA, BARGE, RAIL or TRUCK required: true schema: type: string responses: '200': description: Calculated the distance in meters content: application/json: schema: $ref: '#/components/schemas/DistanceRestResponse' '204': description: The distance couldn't be calculated because a route could not be found '400': description: Bad request, query parameters were wrong '500': description: Something went wrong on our side. components: schemas: TerminalSearchRestResponse: required: - id - locode - name type: object properties: id: type: string format: uuid name: type: string locode: type: string EmissionsRestResponse: required: - co2eTeu - co2eTon - distance type: object properties: co2eTeu: type: number format: double co2eTon: type: number format: double distance: type: integer format: int32 DistanceRestResponse: required: - distance type: object properties: distance: type: integer format: int32