MarineTraffic Passage Plans API

The Passage Plans API from MarineTraffic — 1 operation(s) for passage plans.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

marine-traffic-passage-plans-api-openapi.yml Raw ↑
openapi: 3.0.2
info:
  title: MarineTraffic Events AIS API Passage Plans API
  version: 1.0.0
  description: Port calls, berth calls, and event timelines for single vessels and entire ports — surfacing every arrival, departure, and berth touch detected by the global AIS network.
  contact:
    name: MarineTraffic
    url: https://www.marinetraffic.com/
servers:
- url: https://services.marinetraffic.com/api
tags:
- name: Passage Plans
paths:
  /import-passage-plan/{api_key}:
    post:
      tags:
      - Passage Plans
      summary: Import Passage Plan
      description: "Import a passage plan for one of your managed vessels. </br></br> <b>Notes</b> <ul>\n    <li>Passage plans can only be imported for vessels that belong to user's managed vessels (see <a href=\"https://www.marinetraffic.com/en/online-services/plans/fleet-ops\">Fleet Operations</a> solution for more info)</li>\n    <li>Accepted file formats are CSV, RTZ or RT3</li>\n    <li>Maximum file size supported is 20MB</li>\n    <li>File should contain at least 2 waypoints</li>\n    <li>Imported passage plans overwrite previously imported ones for the provided api_key and IMO combination</li>\n    <li>The <b>frequency of allowed API calls</b> is specific to your API key and is detailed in your contract as a number of successful calls per time period. For example “2 calls per minute”. </br>Regardless of this agreed limit, each API key is technically restricted to a maximum of 100 total (including successful and unsuccessful) requests per minute to ensure system stability.</li>\n</ul>"
      operationId: import-passage-plan
      parameters:
      - $ref: '#/components/parameters/api_key'
      - $ref: '#/components/parameters/content_type_pu06'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/pu06_request_body'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/200_pu06_default'
            application/xml:
              schema:
                $ref: '#/components/schemas/200_pu06_default'
              examples:
                Default:
                  summary: Simple
                  value: "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<RESPONSE>\n     <STATUS>\n         <SUCCESS>CODE=\"s8\" DESCRIPTION=\"PASSAGE PLAN IMPORTED\"/>\n     </STATUS>\n</RESPONSE>"
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400_pu06_vessel_not_found'
            application/xml:
              schema:
                $ref: '#/components/schemas/400_pu06_vessel_not_found'
              examples:
                Vessel not found:
                  summary: Vessel not found
                  value: "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<RESPONSE>\n    <STATUS>\n        <ERROR CODE=\"2a11\" DESCRIPTION=\"VESSEL NOT FOUND\"/>\n    </STATUS>\n</RESPONSE>"
components:
  schemas:
    pu06_request_body:
      title: Request Body
      type: array
      items:
        type: object
        properties:
          imo:
            type: integer
            description: The International Maritime Organization (IMO) number of the vessel you wish to import the passage plan for
          file:
            type: object
            description: 'Input file that contains an ECDIS passage plan. Accepted formats are: CSV, RTZ and RT3'
          protocol:
            type: string
            description: 'Response type. Use one of the following: xml, csv, json, jsono (object)'
      example:
      - imo: 9750701
        file: your_file.rtz
        suez: jsono
    200_pu06_default:
      title: Simple
      type: object
      properties:
        status:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: Success Code Status
              description:
                type: string
                description: Success Code Description
      example:
        status:
        - code: s8
          description: PASSAGE PLAN IMPORTED
    400_pu06_vessel_not_found:
      title: Vessel not found
      type: object
      properties:
        error:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: Error code
              description:
                type: string
                description: Error message
      example:
        error:
        - code: 2a11
          description: VESSEL NOT FOUND
  parameters:
    api_key:
      name: api_key
      in: path
      description: 'API key: 40-character hexadecimal number'
      required: true
      schema:
        type: string
    content_type_pu06:
      name: Content-Type
      in: header
      description: Request's Content-Type
      required: true
      schema:
        type: string
        default: multipart/form-data