{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/terminal49/json-schema/terminal49-vessel-schema.json",
  "title": "vessel",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/terminal49-vessels-api-openapi.yml#/components/schemas/vessel",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "type": {
      "type": "string",
      "enum": [
        "vessel"
      ]
    },
    "attributes": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the ship or vessel"
        },
        "imo": {
          "type": [
            "string",
            "null"
          ],
          "description": "International Maritime Organization (IMO) number"
        },
        "mmsi": {
          "type": [
            "string",
            "null"
          ],
          "description": "Maritime Mobile Service Identity (MMSI)"
        },
        "latitude": {
          "type": [
            "number",
            "null"
          ],
          "description": "The current latitude position of the vessel"
        },
        "longitude": {
          "type": [
            "number",
            "null"
          ],
          "description": "The current longitude position of the vessel"
        },
        "nautical_speed_knots": {
          "type": [
            "number",
            "null"
          ],
          "description": "The current speed of the ship in knots (nautical miles per hour)"
        },
        "navigational_heading_degrees": {
          "type": [
            "number",
            "null"
          ],
          "description": "The current heading of the ship in degrees, where 0 is North, 90 is East, 180 is South, and 270 is West"
        },
        "position_timestamp": {
          "type": [
            "string",
            "null"
          ],
          "description": "The timestamp of when the ship's position was last recorded, in ISO 8601 date and time format"
        },
        "positions": {
          "type": [
            "array",
            "null"
          ],
          "description": "An array of historical position data for the vessel. Only included if `show_positions` is true.",
          "items": {
            "type": "object",
            "properties": {
              "latitude": {
                "type": "number"
              },
              "longitude": {
                "type": "number"
              },
              "heading": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "timestamp": {
                "type": "string",
                "format": "date-time"
              },
              "estimated": {
                "type": "boolean"
              }
            }
          }
        }
      }
    }
  }
}