{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/digitraffic-fi/json-schema/digitraffic-fi-vessel-details-schema.json",
  "title": "VesselDetails",
  "description": "Vessel details",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/digitraffic-fi-port-call-v1-api-openapi.yml#/components/schemas/VesselDetails",
  "type": "object",
  "properties": {
    "vesselId": {
      "type": "integer",
      "format": "int64"
    },
    "mmsi": {
      "type": "integer",
      "description": "Ship MMSI (Maritime Mobile Service Identity)",
      "format": "int32"
    },
    "name": {
      "type": "string",
      "description": "Vessel name"
    },
    "namePrefix": {
      "type": "string",
      "description": "Vessel name prefix"
    },
    "imoLloyds": {
      "type": "integer",
      "description": "Ship IMO / Lloyds",
      "format": "int32"
    },
    "radioCallSign": {
      "type": "string",
      "description": "Ship radio call sign"
    },
    "radioCallSignType": {
      "type": "string",
      "description": "Ship radio call sign type"
    },
    "updateTimestamp": {
      "type": "string",
      "description": "Timestamp of last vessel metadata update",
      "format": "date-time"
    },
    "dataSource": {
      "type": "string",
      "description": "Data source"
    },
    "vesselConstruction": {
      "$ref": "#/$defs/VesselConstruction"
    },
    "vesselDimensions": {
      "$ref": "#/$defs/VesselDimensions"
    },
    "vesselRegistration": {
      "$ref": "#/$defs/VesselRegistration"
    },
    "vesselSystem": {
      "$ref": "#/$defs/VesselSystem"
    }
  },
  "$defs": {
    "ConstructionData": {
      "type": "object",
      "properties": {
        "vesselTypeCode": {
          "type": "integer"
        },
        "vesselTypeName": {
          "type": "string"
        },
        "iceClassCode": {
          "type": "string",
          "enum": [
            "IAS",
            "IA",
            "IB",
            "IC",
            "II",
            "III",
            "UNKNOWN"
          ]
        },
        "iceClassIssueDate": {
          "type": "string",
          "format": "date-time"
        },
        "iceClassIssuePlace": {
          "type": "string"
        },
        "iceClassEndDate": {
          "type": "string",
          "format": "date-time"
        },
        "classificationSociety": {
          "type": "string"
        },
        "doubleBottom": {
          "type": "boolean"
        },
        "inertGasSystem": {
          "type": "boolean"
        },
        "ballastTank": {
          "type": "boolean"
        }
      }
    },
    "Dimensions": {
      "type": "object",
      "properties": {
        "tonnageCertificateIssuer": {
          "type": "string"
        },
        "dateOfIssue": {
          "type": "string",
          "format": "date-time"
        },
        "grossTonnage": {
          "type": "integer"
        },
        "netTonnage": {
          "type": "integer"
        },
        "deathWeight": {
          "type": "integer"
        },
        "length": {
          "type": "number"
        },
        "overallLength": {
          "type": "number"
        },
        "height": {
          "type": "number"
        },
        "breadth": {
          "type": "number"
        },
        "draught": {
          "type": "number"
        },
        "maxSpeed": {
          "type": "number"
        },
        "enginePower": {
          "type": "string"
        },
        "totalPower": {
          "type": "integer"
        },
        "maxPersons": {
          "type": "integer"
        },
        "maxPassengers": {
          "type": "integer"
        },
        "keelDate": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "RegistrationData": {
      "type": "object",
      "properties": {
        "nationality": {
          "type": "string"
        },
        "portOfRegistry": {
          "type": "string"
        },
        "domicile": {
          "type": "string"
        }
      }
    },
    "System": {
      "type": "object",
      "properties": {
        "shipOwner": {
          "type": "string"
        },
        "shipTelephone1": {
          "type": "string"
        },
        "shipTelephone2": {
          "type": "string"
        },
        "shipFax": {
          "type": "string"
        },
        "shipEmail": {
          "type": "string"
        },
        "shipVerifier": {
          "type": "string"
        }
      }
    },
    "VesselConstruction": {
      "type": "object",
      "properties": {
        "vesselTypeCode": {
          "type": "integer",
          "description": "Ship Vessel Type Code",
          "format": "int32"
        },
        "vesselTypeName": {
          "type": "string",
          "description": "Ship Vessel Type Name"
        },
        "iceClassCode": {
          "type": "string",
          "description": "Ship ice class code"
        },
        "iceClassIssueDate": {
          "type": "string",
          "description": "Date when ice class endorsement was issued",
          "format": "date-time"
        },
        "iceClassIssuePlace": {
          "type": "string",
          "description": "Place where ice class endorsement was issued"
        },
        "iceClassEndDate": {
          "type": "string",
          "description": "Date when ice class endorsement ends",
          "format": "date-time"
        },
        "doubleBottom": {
          "type": "boolean",
          "description": "Tells whether vessel has a double bottom"
        },
        "inertGasSystem": {
          "type": "boolean",
          "description": "Tells whether vessel has an Inert gas system"
        },
        "ballastTank": {
          "type": "boolean",
          "description": "Tells whether vessel has a ballast tank"
        },
        "all": {
          "$ref": "#/$defs/ConstructionData"
        }
      },
      "description": "Vessel construction"
    },
    "VesselDimensions": {
      "type": "object",
      "properties": {
        "tonnageCertificateIssuer": {
          "type": "string",
          "description": "Tonnage certificate issuer"
        },
        "dateOfIssue": {
          "type": "string",
          "description": "Date when tonnage certificate was issued",
          "format": "date-time"
        },
        "grossTonnage": {
          "type": "integer",
          "description": "Ship gross tonnage",
          "format": "int32"
        },
        "netTonnage": {
          "type": "integer",
          "description": "Ship net tonnage",
          "format": "int32"
        },
        "deathWeight": {
          "type": "integer",
          "description": "Ship death weight",
          "format": "int32"
        },
        "length": {
          "type": "number",
          "description": "Ship length",
          "format": "double"
        },
        "overallLength": {
          "type": "number",
          "description": "Ship overall length",
          "format": "double"
        },
        "height": {
          "type": "number",
          "description": "Ship height",
          "format": "double"
        },
        "breadth": {
          "type": "number",
          "description": "Ship breadth",
          "format": "double"
        },
        "draught": {
          "type": "number",
          "description": "Ship draught",
          "format": "double"
        },
        "maxSpeed": {
          "type": "number",
          "description": "Ship max speed",
          "format": "double"
        },
        "enginePower": {
          "type": "string",
          "description": "Ship engine power"
        },
        "all": {
          "$ref": "#/$defs/Dimensions"
        }
      },
      "description": "Vessel dimensions"
    },
    "VesselRegistration": {
      "type": "object",
      "properties": {
        "nationality": {
          "type": "string",
          "description": "Ship nationality"
        },
        "portOfRegistry": {
          "type": "string",
          "description": "Ship home city"
        },
        "all": {
          "$ref": "#/$defs/RegistrationData"
        }
      },
      "description": "Vessel registration"
    },
    "VesselSystem": {
      "type": "object",
      "properties": {
        "shipOwner": {
          "type": "string",
          "description": "Ship owner name"
        },
        "shipTelephone1": {
          "type": "string",
          "description": "Ship telephone"
        },
        "shipEmail": {
          "type": "string",
          "description": "Ship email address"
        },
        "shipVerifier": {
          "type": "string",
          "description": "Ship verifier"
        },
        "all": {
          "$ref": "#/$defs/System"
        }
      },
      "description": "Vessel system"
    }
  }
}