{
 "openapi": "3.0.3",
 "info": {
  "title": "MariTrace API (legacy)",
  "version": "legacy",
  "description": "The original MariTrace vessel-position feed at `https://api.maritrace.com`. Sign in once with `POST /registration` (HTTP Basic) to get a token, then send it in the `token` header. A token lasts 75 minutes.\n\n`GET /vesselpositions` returns every subscribed vessel whose position changed since your previous successful call, then moves your cursor on: call it on a schedule, and never in parallel.\n\nCalls from this page are **real**: they sign in as you, come from your own IP address, and count towards your rate limits (and, where it applies, usage billing) exactly as calls from your systems do."
 },
 "servers": [
  {
   "url": "https://api.maritrace.com"
  }
 ],
 "components": {
  "securitySchemes": {
   "basic": {
    "type": "http",
    "scheme": "basic"
   },
   "token": {
    "type": "apiKey",
    "in": "header",
    "name": "token"
   }
  },
  "schemas": {
   "VesselPosition": {
    "type": "object",
    "properties": {
     "vesselimo": {
      "type": "string"
     },
     "vesselname": {
      "type": "string"
     },
     "vesselmmsi": {
      "type": "integer"
     },
     "vesselcallsign": {
      "type": "string"
     },
     "subscriptiontype": {
      "type": "string"
     },
     "fleetname": {
      "type": "string"
     },
     "datereceived": {
      "type": "string"
     },
     "latitude": {
      "type": "number"
     },
     "longitude": {
      "type": "number"
     },
     "navigationstatus": {
      "type": "string"
     },
     "rateofturn": {
      "type": "integer"
     },
     "speedoverground": {
      "type": "string"
     },
     "courseoverground": {
      "type": "string"
     },
     "trueheading": {
      "type": "integer"
     },
     "shiptype": {
      "type": "string"
     },
     "dimensiontobow": {
      "type": "integer"
     },
     "dimensiontostern": {
      "type": "integer"
     },
     "dimensiontoport": {
      "type": "integer"
     },
     "dimensiontostarboard": {
      "type": "integer"
     },
     "eta": {
      "type": "string"
     },
     "draught": {
      "type": "number"
     },
     "destination": {
      "type": "string"
     },
     "messagetype": {
      "type": "integer"
     },
     "notes": {
      "type": "string"
     },
     "datereceived_static": {
      "type": "string"
     }
    }
   }
  }
 },
 "tags": [
  {
   "name": "Sign in"
  },
  {
   "name": "Positions"
  },
  {
   "name": "Subscribed vessels"
  }
 ],
 "paths": {
  "/registration": {
   "post": {
    "tags": [
     "Sign in"
    ],
    "summary": "Get a token",
    "security": [
     {
      "basic": []
     }
    ],
    "description": "HTTP Basic with your API username and password. The token goes in the `token` header of every other call.",
    "responses": {
     "200": {
      "description": "A token and its expiry (UTC)",
      "content": {
       "application/json": {
        "example": {
         "token": "0f3J…64 base64 characters…Q=",
         "expirydate": "2026-11-11T12:00:00"
        }
       }
      }
     },
     "401": {
      "description": "Unknown user, wrong password, or not granted this API"
     }
    }
   }
  },
  "/vesselpositions": {
   "get": {
    "tags": [
     "Positions"
    ],
    "summary": "Positions changed since your last call",
    "security": [
     {
      "token": []
     }
    ],
    "parameters": [
     {
      "name": "subscriptiontype",
      "in": "query",
      "required": true,
      "description": "all or latestPosition (test, with fleetname=test, returns sample data)",
      "schema": {
       "type": "string"
      },
      "example": "test"
     },
     {
      "name": "fleetname",
      "in": "query",
      "required": true,
      "description": "Your fleet name (test, with subscriptiontype=test, returns sample data)",
      "schema": {
       "type": "string"
      },
      "example": "test"
     }
    ],
    "description": "Every subscribed vessel whose position changed since your previous call.\n\n**From this page this call is a preview:** you get the real answer, but nothing changes: no cursor moves and no vessel is added or removed. Call it from your own systems to change your list.",
    "responses": {
     "200": {
      "description": "The changed positions",
      "content": {
       "application/json": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/VesselPosition"
         }
        },
        "example": [
         {
          "vesselimo": "1234560",
          "vesselname": "My vessel name 1",
          "vesselmmsi": 123456780,
          "vesselcallsign": "My call sign 1",
          "subscriptiontype": "My subscription type 1",
          "fleetname": "My fleet name 1",
          "datereceived": "2026-11-11T10:43:01.736673+00:00",
          "latitude": 51.485948,
          "longitude": -0.60776,
          "navigationstatus": "0",
          "rateofturn": 0,
          "speedoverground": "15",
          "courseoverground": "0",
          "trueheading": 0,
          "shiptype": "60",
          "dimensiontobow": 10,
          "dimensiontostern": 10,
          "dimensiontoport": 10,
          "dimensiontostarboard": 10,
          "eta": "11/11/2026 10:43:01",
          "draught": 10.0,
          "destination": "WINDSOR, UK 1",
          "messagetype": 5,
          "notes": "Sample test data 1",
          "datereceived_static": "2026-11-11T10:43:01.7371028+00:00"
         },
         {
          "vesselimo": "1234561",
          "vesselname": "My vessel name 2",
          "vesselmmsi": 123456781,
          "vesselcallsign": "My call sign 2",
          "subscriptiontype": "My subscription type 2",
          "fleetname": "My fleet name 2",
          "datereceived": "2026-11-11T10:43:01.7374943+00:00",
          "latitude": 51.485948,
          "longitude": -0.60776,
          "navigationstatus": "1",
          "rateofturn": 1,
          "speedoverground": "16",
          "courseoverground": "1",
          "trueheading": 1,
          "shiptype": "60",
          "dimensiontobow": 11,
          "dimensiontostern": 11,
          "dimensiontoport": 11,
          "dimensiontostarboard": 11,
          "eta": "11/11/2026 10:43:01",
          "draught": 11.0,
          "destination": "WINDSOR, UK 2",
          "messagetype": 5,
          "notes": "Sample test data 2",
          "datereceived_static": "2026-11-11T10:43:01.7375678+00:00"
         }
        ]
       }
      }
     }
    }
   }
  },
  "/vesselpositions_subscribedvessels": {
   "get": {
    "tags": [
     "Subscribed vessels"
    ],
    "summary": "Your subscribed vessels",
    "security": [
     {
      "token": []
     }
    ],
    "parameters": [
     {
      "name": "subscriptiontype",
      "in": "query",
      "required": true,
      "description": "all or latestPosition",
      "schema": {
       "type": "string"
      },
      "example": "all"
     },
     {
      "name": "fleetname",
      "in": "query",
      "required": true,
      "description": "Your fleet name",
      "schema": {
       "type": "string"
      },
      "example": "myfleet"
     }
    ],
    "description": "The vessels on your list, with their latest positions.",
    "responses": {
     "200": {
      "description": "Your list",
      "content": {
       "application/json": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/VesselPosition"
         }
        }
       }
      }
     },
     "400": {
      "description": "Unknown subscriptiontype"
     },
     "401": {
      "description": "Missing, expired or unknown token"
     }
    }
   },
   "post": {
    "tags": [
     "Subscribed vessels"
    ],
    "summary": "Add a vessel",
    "security": [
     {
      "token": []
     }
    ],
    "parameters": [
     {
      "name": "imonumber",
      "in": "query",
      "required": true,
      "description": "IMO (7 digits) or MMSI (9 digits)",
      "schema": {
       "type": "string"
      },
      "example": "test"
     },
     {
      "name": "subscriptiontype",
      "in": "query",
      "required": true,
      "description": "all or latestPosition (test, with fleetname=test, returns sample data)",
      "schema": {
       "type": "string"
      },
      "example": "test"
     },
     {
      "name": "fleetname",
      "in": "query",
      "required": true,
      "description": "Your fleet name (test, with subscriptiontype=test, returns sample data)",
      "schema": {
       "type": "string"
      },
      "example": "test"
     }
    ],
    "description": "Adds a vessel to your list.\n\n**From this page this call is a preview:** you get the real answer, but nothing changes: no cursor moves and no vessel is added or removed. Call it from your own systems to change your list.",
    "responses": {
     "200": {
      "description": "Added (or already listed): the vessel's latest position"
     },
     "400": {
      "description": "Bad IMO/MMSI, subscriptiontype or fleetname"
     },
     "401": {
      "description": "Bad token, or a vessel you may not add"
     },
     "404": {
      "description": "No such vessel, or too few positions"
     }
    }
   },
   "delete": {
    "tags": [
     "Subscribed vessels"
    ],
    "summary": "Remove a vessel",
    "security": [
     {
      "token": []
     }
    ],
    "parameters": [
     {
      "name": "imonumber",
      "in": "query",
      "required": true,
      "description": "IMO (7 digits) or MMSI (9 digits)",
      "schema": {
       "type": "string"
      },
      "example": "test"
     },
     {
      "name": "subscriptiontype",
      "in": "query",
      "required": true,
      "description": "all or latestPosition (test, with fleetname=test, returns sample data)",
      "schema": {
       "type": "string"
      },
      "example": "test"
     },
     {
      "name": "fleetname",
      "in": "query",
      "required": true,
      "description": "Your fleet name (test, with subscriptiontype=test, returns sample data)",
      "schema": {
       "type": "string"
      },
      "example": "test"
     }
    ],
    "description": "Removes a vessel from your list.\n\n**From this page this call is a preview:** you get the real answer, but nothing changes: no cursor moves and no vessel is added or removed. Call it from your own systems to change your list.",
    "responses": {
     "200": {
      "description": "Removed"
     },
     "401": {
      "description": "Bad token"
     }
    }
   }
  }
 }
}