{
  "openapi": "3.1.0",
  "info": {
    "title": "waykite API",
    "description": "Ports, airports and other trade and transport locations, and the terminals in their ports. Plain HTTP GET requests answered with JSON. Every request needs an organization's API key.",
    "version": "1"
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API key from the dashboard: a secret key (`wk_sk_`) from servers, or a publishable key (`wk_pk_`) from the origins listed on it. A workload can send its token in place of a secret key. See [Authentication](https://waykite.com/docs/api/authentication)."
      }
    },
    "schemas": {
      "Location": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The UN/LOCODE: `country` followed by `location`.",
            "example": "USNYC"
          },
          "country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code.",
            "example": "US"
          },
          "location": {
            "type": "string",
            "description": "The three characters after the country.",
            "example": "NYC"
          },
          "name": {
            "type": "string",
            "description": "The name without diacritics.",
            "example": "Kobenhavn"
          },
          "name_native": {
            "description": "The name with its diacritics, when it differs from `name`.",
            "example": "København",
            "type": "string"
          },
          "display_name": {
            "type": "string",
            "description": "The name with the English country name, ready to show people. A city state is not repeated: `Singapore`.",
            "example": "Rotterdam, Netherlands"
          },
          "subdivision": {
            "type": "string",
            "description": "ISO 3166-2 subdivision code without the country, or an empty string.",
            "example": "NY"
          },
          "regions": {
            "description": "The M49 codes of the regions its country is in, broadest first: region, sub-region, then the intermediate region where there is one. Left out for a place in no region: Antarctica, or `XZ` (international waters). See [Regions and sea areas](https://waykite.com/docs/guides/regions-and-sea-areas).",
            "example": [
              "150",
              "155"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "functions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "port",
                "rail_terminal",
                "road_terminal",
                "airport",
                "postal_exchange",
                "multimodal",
                "fixed_transport",
                "border_crossing"
              ]
            },
            "description": "What the location handles. Empty when that is not known. See [Function codes](https://waykite.com/docs/guides/function-codes)."
          },
          "status": {
            "type": "string",
            "enum": [
              "AA",
              "AC",
              "AF",
              "AI",
              "AM",
              "AQ",
              "AS",
              "RL",
              "RN",
              "RQ",
              "RR",
              "QQ",
              "UR",
              "XX"
            ],
            "description": "How far the entry has been checked or approved. See [Status codes](https://waykite.com/docs/guides/status-codes)."
          },
          "iata": {
            "description": "The IATA location code, when it differs from `location`, e.g. `QAJ` for `AEAJM`. See [UN/LOCODE vs IATA vs ICAO](https://waykite.com/docs/guides/unlocode-iata-icao).",
            "example": "QAJ",
            "type": "string"
          },
          "exonyms": {
            "description": "Other names the place is known by.",
            "example": [
              "Copenhagen"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "coordinates": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "lat": {
                    "type": "number",
                    "description": "Latitude, in decimal degrees."
                  },
                  "lon": {
                    "type": "number",
                    "description": "Longitude, in decimal degrees."
                  }
                },
                "required": [
                  "lat",
                  "lon"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "The position in decimal degrees, or `null` when it is not known.",
            "example": {
              "lat": 40.7,
              "lon": -74
            }
          },
          "timezone": {
            "description": "The time zone it keeps, by its IANA name, such as `Europe/Amsterdam`, which `Intl.DateTimeFormat` and date libraries take. Left out when it is not known: for a place without coordinates in a country with several zones, or in international waters.",
            "example": "Europe/Amsterdam",
            "type": "string"
          },
          "modalities": {
            "description": "Details for some functions: `port` and `airport`. Unknown values are left out rather than sent as `false` or `0`.",
            "type": "object",
            "properties": {
              "port": {
                "description": "Port details, for a location that is a port.",
                "type": "object",
                "properties": {
                  "wpi_numbers": {
                    "description": "The port's index numbers. When several ports share the location's code, the details come from the first.",
                    "example": [
                      36990
                    ],
                    "type": "array",
                    "items": {
                      "type": "number"
                    }
                  },
                  "type": {
                    "description": "What kind of port it is.",
                    "type": "string",
                    "enum": [
                      "seaport",
                      "river_port",
                      "lake_port",
                      "dry_port",
                      "offshore_terminal"
                    ]
                  },
                  "harbor": {
                    "description": "The harbour: its size, type, use and shelter.",
                    "type": "object",
                    "properties": {
                      "size": {
                        "description": "How big the harbour is.",
                        "type": "string",
                        "enum": [
                          "very_small",
                          "small",
                          "medium",
                          "large"
                        ]
                      },
                      "type": {
                        "description": "How the harbour is formed.",
                        "type": "string",
                        "enum": [
                          "coastal_natural",
                          "coastal_breakwater",
                          "coastal_tide_gates",
                          "river_natural",
                          "river_basins",
                          "river_tide_gates",
                          "canal_or_lake",
                          "open_roadstead",
                          "typhoon_harbor"
                        ]
                      },
                      "use": {
                        "description": "What the harbour is mainly used for.",
                        "type": "string",
                        "enum": [
                          "cargo",
                          "military",
                          "fishing",
                          "marina",
                          "passenger",
                          "ferry"
                        ]
                      },
                      "shelter": {
                        "description": "How well the harbour shelters vessels.",
                        "type": "string",
                        "enum": [
                          "excellent",
                          "good",
                          "fair",
                          "poor",
                          "none"
                        ]
                      }
                    },
                    "additionalProperties": false
                  },
                  "region": {
                    "description": "The coastal region the port is in.",
                    "example": "Netherlands",
                    "type": "string"
                  },
                  "navigation_area": {
                    "description": "The NAVAREA for navigational warnings, as a Roman numeral.",
                    "example": "I",
                    "type": "string"
                  },
                  "sea_area": {
                    "description": "The sea area the port is on, by its S-23 code. Left out for a port inland or far up a river. See [Regions and sea areas](https://waykite.com/docs/guides/regions-and-sea-areas).",
                    "example": "4",
                    "type": "string"
                  },
                  "first_port_of_entry": {
                    "description": "Whether vessels arriving from abroad can clear in here.",
                    "type": "boolean"
                  },
                  "repair_capability": {
                    "description": "What repairs the port can carry out.",
                    "type": "string",
                    "enum": [
                      "none",
                      "emergency_only",
                      "limited",
                      "moderate",
                      "major"
                    ]
                  },
                  "tidal_range_meters": {
                    "description": "The usual tidal range, in metres.",
                    "type": "number"
                  },
                  "depths": {
                    "description": "Water depths, in metres.",
                    "type": "object",
                    "properties": {
                      "channel_meters": {
                        "description": "Depth in the entrance channel, in metres.",
                        "type": "number"
                      },
                      "anchorage_meters": {
                        "description": "Depth at the anchorage, in metres.",
                        "type": "number"
                      },
                      "cargo_handling_meters": {
                        "description": "Depth alongside the cargo quays, in metres.",
                        "type": "number"
                      }
                    },
                    "additionalProperties": false
                  },
                  "max_vessel": {
                    "description": "The largest vessel the port takes.",
                    "type": "object",
                    "properties": {
                      "length_meters": {
                        "description": "Length overall, in metres.",
                        "type": "number"
                      },
                      "beam_meters": {
                        "description": "Beam, in metres.",
                        "type": "number"
                      },
                      "draft_meters": {
                        "description": "Draft, in metres.",
                        "type": "number"
                      }
                    },
                    "additionalProperties": false
                  },
                  "terminals": {
                    "description": "The kinds of cargo terminal the port has.",
                    "type": "object",
                    "properties": {
                      "container": {
                        "description": "Whether the port has a container terminal.",
                        "type": "boolean"
                      },
                      "ro_ro": {
                        "description": "Whether the port has a roll-on/roll-off terminal.",
                        "type": "boolean"
                      },
                      "solid_bulk": {
                        "description": "Whether the port has a solid bulk terminal.",
                        "type": "boolean"
                      },
                      "liquid_bulk": {
                        "description": "Whether the port has a liquid bulk terminal.",
                        "type": "boolean"
                      },
                      "oil": {
                        "description": "Whether the port has an oil terminal.",
                        "type": "boolean"
                      },
                      "lng": {
                        "description": "Whether the port has an LNG terminal.",
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  },
                  "facilities": {
                    "description": "Services and facilities at the port.",
                    "type": "object",
                    "properties": {
                      "drydock": {
                        "description": "Whether the port has a dry dock.",
                        "type": "boolean"
                      },
                      "medical": {
                        "description": "Whether the port has medical facilities.",
                        "type": "boolean"
                      },
                      "garbage_disposal": {
                        "description": "Whether the port has garbage disposal.",
                        "type": "boolean"
                      },
                      "bunker_fuel": {
                        "description": "Whether the port has bunker fuel.",
                        "type": "boolean"
                      },
                      "diesel": {
                        "description": "Whether the port has diesel.",
                        "type": "boolean"
                      },
                      "water": {
                        "description": "Whether the port has fresh water.",
                        "type": "boolean"
                      },
                      "tugs": {
                        "description": "Whether the port has tugs.",
                        "type": "boolean"
                      },
                      "pilotage_available": {
                        "description": "Whether the port has pilots available.",
                        "type": "boolean"
                      },
                      "pilotage_compulsory": {
                        "description": "Whether taking a pilot is compulsory.",
                        "type": "boolean"
                      },
                      "port_security": {
                        "description": "Whether the port has port security.",
                        "type": "boolean"
                      },
                      "vessel_traffic_service": {
                        "description": "Whether the port has a vessel traffic service.",
                        "type": "boolean"
                      },
                      "traffic_separation_scheme": {
                        "description": "Whether the port has a traffic separation scheme in its approaches.",
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  },
                  "container_terminals": {
                    "description": "The port's container terminals, by name.",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The terminal's name.",
                          "example": "EUROGATE CONTAINER TERMINAL HAMBURG"
                        },
                        "operator": {
                          "description": "The company that runs it.",
                          "type": "string"
                        },
                        "smdg_code": {
                          "type": "string",
                          "description": "Its terminal code, unique together with the port code. See [Terminal codes](https://waykite.com/docs/guides/terminal-codes).",
                          "example": "EGH"
                        },
                        "listed_under": {
                          "description": "The port code that goes with `smdg_code`, when it is not this location's own.",
                          "example": "CNNBO",
                          "type": "string"
                        },
                        "coordinates": {
                          "type": "object",
                          "properties": {
                            "lat": {
                              "type": "number",
                              "description": "Latitude, in decimal degrees."
                            },
                            "lon": {
                              "type": "number",
                              "description": "Longitude, in decimal degrees."
                            }
                          },
                          "required": [
                            "lat",
                            "lon"
                          ],
                          "additionalProperties": false,
                          "description": "A point on the terminal in decimal degrees, close to the quay."
                        },
                        "website": {
                          "description": "The terminal's website.",
                          "type": "string"
                        },
                        "address": {
                          "description": "Its gate or visiting address.",
                          "type": "string"
                        },
                        "notes": {
                          "description": "Remarks, such as which berths it covers.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "smdg_code",
                        "coordinates"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false
              },
              "airport": {
                "description": "Airport details, for a location that is an airport.",
                "type": "object",
                "properties": {
                  "name": {
                    "description": "The airport's name.",
                    "example": "Amsterdam Airport Schiphol",
                    "type": "string"
                  },
                  "icao": {
                    "description": "The airport's ICAO code. See [UN/LOCODE vs IATA vs ICAO](https://waykite.com/docs/guides/unlocode-iata-icao).",
                    "example": "EHAM",
                    "type": "string"
                  },
                  "type": {
                    "description": "How big the airport is, or what kind.",
                    "type": "string",
                    "enum": [
                      "large",
                      "medium",
                      "small",
                      "heliport",
                      "seaplane_base"
                    ]
                  },
                  "scheduled_service": {
                    "description": "Whether airlines fly scheduled services to it.",
                    "type": "boolean"
                  },
                  "elevation_meters": {
                    "description": "Elevation above sea level, in metres.",
                    "type": "number"
                  },
                  "runways_summary": {
                    "description": "The open runways at a glance.",
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "number",
                        "description": "How many runways are open."
                      },
                      "longest_meters": {
                        "description": "The longest open runway, in metres.",
                        "type": "number"
                      },
                      "longest_paved": {
                        "description": "Whether the longest open runway is paved.",
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "count"
                    ],
                    "additionalProperties": false
                  },
                  "runways": {
                    "description": "The open runways, longest first.",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "designator": {
                          "type": "string",
                          "description": "The runway's designator: its two ends, by heading.",
                          "example": "18R/36L"
                        },
                        "length_meters": {
                          "description": "Length, in metres.",
                          "type": "number"
                        },
                        "width_meters": {
                          "description": "Width, in metres.",
                          "type": "number"
                        },
                        "surface": {
                          "description": "What the runway is surfaced with.",
                          "type": "string",
                          "enum": [
                            "asphalt",
                            "concrete",
                            "grass",
                            "gravel",
                            "dirt",
                            "sand",
                            "water",
                            "snow",
                            "other"
                          ]
                        },
                        "paved": {
                          "description": "Whether the surface is paved, from `surface`.",
                          "type": "boolean"
                        },
                        "lighted": {
                          "description": "Whether the runway is lit.",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "designator"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "code",
          "country",
          "location",
          "name",
          "display_name",
          "subdivision",
          "functions",
          "status",
          "coordinates"
        ],
        "additionalProperties": false,
        "description": "A location. Search and nearby return locations in the same shape. Fields that do not apply are left out, not sent as `null`, except `coordinates`."
      },
      "Error": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": false
          },
          "error": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "What went wrong, e.g. `InvalidApiKey`."
              },
              "message": {
                "type": "string",
                "description": "What went wrong, in words."
              }
            },
            "required": [
              "name",
              "message"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "success",
          "error"
        ],
        "additionalProperties": false
      },
      "NearbyLocation": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The UN/LOCODE: `country` followed by `location`.",
            "example": "USNYC"
          },
          "country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code.",
            "example": "US"
          },
          "location": {
            "type": "string",
            "description": "The three characters after the country.",
            "example": "NYC"
          },
          "name": {
            "type": "string",
            "description": "The name without diacritics.",
            "example": "Kobenhavn"
          },
          "name_native": {
            "description": "The name with its diacritics, when it differs from `name`.",
            "example": "København",
            "type": "string"
          },
          "display_name": {
            "type": "string",
            "description": "The name with the English country name, ready to show people. A city state is not repeated: `Singapore`.",
            "example": "Rotterdam, Netherlands"
          },
          "subdivision": {
            "type": "string",
            "description": "ISO 3166-2 subdivision code without the country, or an empty string.",
            "example": "NY"
          },
          "regions": {
            "description": "The M49 codes of the regions its country is in, broadest first: region, sub-region, then the intermediate region where there is one. Left out for a place in no region: Antarctica, or `XZ` (international waters). See [Regions and sea areas](https://waykite.com/docs/guides/regions-and-sea-areas).",
            "example": [
              "150",
              "155"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "functions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "port",
                "rail_terminal",
                "road_terminal",
                "airport",
                "postal_exchange",
                "multimodal",
                "fixed_transport",
                "border_crossing"
              ]
            },
            "description": "What the location handles. Empty when that is not known. See [Function codes](https://waykite.com/docs/guides/function-codes)."
          },
          "status": {
            "type": "string",
            "enum": [
              "AA",
              "AC",
              "AF",
              "AI",
              "AM",
              "AQ",
              "AS",
              "RL",
              "RN",
              "RQ",
              "RR",
              "QQ",
              "UR",
              "XX"
            ],
            "description": "How far the entry has been checked or approved. See [Status codes](https://waykite.com/docs/guides/status-codes)."
          },
          "iata": {
            "description": "The IATA location code, when it differs from `location`, e.g. `QAJ` for `AEAJM`. See [UN/LOCODE vs IATA vs ICAO](https://waykite.com/docs/guides/unlocode-iata-icao).",
            "example": "QAJ",
            "type": "string"
          },
          "exonyms": {
            "description": "Other names the place is known by.",
            "example": [
              "Copenhagen"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "coordinates": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "lat": {
                    "type": "number",
                    "description": "Latitude, in decimal degrees."
                  },
                  "lon": {
                    "type": "number",
                    "description": "Longitude, in decimal degrees."
                  }
                },
                "required": [
                  "lat",
                  "lon"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "The position in decimal degrees, or `null` when it is not known.",
            "example": {
              "lat": 40.7,
              "lon": -74
            }
          },
          "timezone": {
            "description": "The time zone it keeps, by its IANA name, such as `Europe/Amsterdam`, which `Intl.DateTimeFormat` and date libraries take. Left out when it is not known: for a place without coordinates in a country with several zones, or in international waters.",
            "example": "Europe/Amsterdam",
            "type": "string"
          },
          "modalities": {
            "description": "Details for some functions: `port` and `airport`. Unknown values are left out rather than sent as `false` or `0`.",
            "type": "object",
            "properties": {
              "port": {
                "description": "Port details, for a location that is a port.",
                "type": "object",
                "properties": {
                  "wpi_numbers": {
                    "description": "The port's index numbers. When several ports share the location's code, the details come from the first.",
                    "example": [
                      36990
                    ],
                    "type": "array",
                    "items": {
                      "type": "number"
                    }
                  },
                  "type": {
                    "description": "What kind of port it is.",
                    "type": "string",
                    "enum": [
                      "seaport",
                      "river_port",
                      "lake_port",
                      "dry_port",
                      "offshore_terminal"
                    ]
                  },
                  "harbor": {
                    "description": "The harbour: its size, type, use and shelter.",
                    "type": "object",
                    "properties": {
                      "size": {
                        "description": "How big the harbour is.",
                        "type": "string",
                        "enum": [
                          "very_small",
                          "small",
                          "medium",
                          "large"
                        ]
                      },
                      "type": {
                        "description": "How the harbour is formed.",
                        "type": "string",
                        "enum": [
                          "coastal_natural",
                          "coastal_breakwater",
                          "coastal_tide_gates",
                          "river_natural",
                          "river_basins",
                          "river_tide_gates",
                          "canal_or_lake",
                          "open_roadstead",
                          "typhoon_harbor"
                        ]
                      },
                      "use": {
                        "description": "What the harbour is mainly used for.",
                        "type": "string",
                        "enum": [
                          "cargo",
                          "military",
                          "fishing",
                          "marina",
                          "passenger",
                          "ferry"
                        ]
                      },
                      "shelter": {
                        "description": "How well the harbour shelters vessels.",
                        "type": "string",
                        "enum": [
                          "excellent",
                          "good",
                          "fair",
                          "poor",
                          "none"
                        ]
                      }
                    },
                    "additionalProperties": false
                  },
                  "region": {
                    "description": "The coastal region the port is in.",
                    "example": "Netherlands",
                    "type": "string"
                  },
                  "navigation_area": {
                    "description": "The NAVAREA for navigational warnings, as a Roman numeral.",
                    "example": "I",
                    "type": "string"
                  },
                  "sea_area": {
                    "description": "The sea area the port is on, by its S-23 code. Left out for a port inland or far up a river. See [Regions and sea areas](https://waykite.com/docs/guides/regions-and-sea-areas).",
                    "example": "4",
                    "type": "string"
                  },
                  "first_port_of_entry": {
                    "description": "Whether vessels arriving from abroad can clear in here.",
                    "type": "boolean"
                  },
                  "repair_capability": {
                    "description": "What repairs the port can carry out.",
                    "type": "string",
                    "enum": [
                      "none",
                      "emergency_only",
                      "limited",
                      "moderate",
                      "major"
                    ]
                  },
                  "tidal_range_meters": {
                    "description": "The usual tidal range, in metres.",
                    "type": "number"
                  },
                  "depths": {
                    "description": "Water depths, in metres.",
                    "type": "object",
                    "properties": {
                      "channel_meters": {
                        "description": "Depth in the entrance channel, in metres.",
                        "type": "number"
                      },
                      "anchorage_meters": {
                        "description": "Depth at the anchorage, in metres.",
                        "type": "number"
                      },
                      "cargo_handling_meters": {
                        "description": "Depth alongside the cargo quays, in metres.",
                        "type": "number"
                      }
                    },
                    "additionalProperties": false
                  },
                  "max_vessel": {
                    "description": "The largest vessel the port takes.",
                    "type": "object",
                    "properties": {
                      "length_meters": {
                        "description": "Length overall, in metres.",
                        "type": "number"
                      },
                      "beam_meters": {
                        "description": "Beam, in metres.",
                        "type": "number"
                      },
                      "draft_meters": {
                        "description": "Draft, in metres.",
                        "type": "number"
                      }
                    },
                    "additionalProperties": false
                  },
                  "terminals": {
                    "description": "The kinds of cargo terminal the port has.",
                    "type": "object",
                    "properties": {
                      "container": {
                        "description": "Whether the port has a container terminal.",
                        "type": "boolean"
                      },
                      "ro_ro": {
                        "description": "Whether the port has a roll-on/roll-off terminal.",
                        "type": "boolean"
                      },
                      "solid_bulk": {
                        "description": "Whether the port has a solid bulk terminal.",
                        "type": "boolean"
                      },
                      "liquid_bulk": {
                        "description": "Whether the port has a liquid bulk terminal.",
                        "type": "boolean"
                      },
                      "oil": {
                        "description": "Whether the port has an oil terminal.",
                        "type": "boolean"
                      },
                      "lng": {
                        "description": "Whether the port has an LNG terminal.",
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  },
                  "facilities": {
                    "description": "Services and facilities at the port.",
                    "type": "object",
                    "properties": {
                      "drydock": {
                        "description": "Whether the port has a dry dock.",
                        "type": "boolean"
                      },
                      "medical": {
                        "description": "Whether the port has medical facilities.",
                        "type": "boolean"
                      },
                      "garbage_disposal": {
                        "description": "Whether the port has garbage disposal.",
                        "type": "boolean"
                      },
                      "bunker_fuel": {
                        "description": "Whether the port has bunker fuel.",
                        "type": "boolean"
                      },
                      "diesel": {
                        "description": "Whether the port has diesel.",
                        "type": "boolean"
                      },
                      "water": {
                        "description": "Whether the port has fresh water.",
                        "type": "boolean"
                      },
                      "tugs": {
                        "description": "Whether the port has tugs.",
                        "type": "boolean"
                      },
                      "pilotage_available": {
                        "description": "Whether the port has pilots available.",
                        "type": "boolean"
                      },
                      "pilotage_compulsory": {
                        "description": "Whether taking a pilot is compulsory.",
                        "type": "boolean"
                      },
                      "port_security": {
                        "description": "Whether the port has port security.",
                        "type": "boolean"
                      },
                      "vessel_traffic_service": {
                        "description": "Whether the port has a vessel traffic service.",
                        "type": "boolean"
                      },
                      "traffic_separation_scheme": {
                        "description": "Whether the port has a traffic separation scheme in its approaches.",
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  },
                  "container_terminals": {
                    "description": "The port's container terminals, by name.",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The terminal's name.",
                          "example": "EUROGATE CONTAINER TERMINAL HAMBURG"
                        },
                        "operator": {
                          "description": "The company that runs it.",
                          "type": "string"
                        },
                        "smdg_code": {
                          "type": "string",
                          "description": "Its terminal code, unique together with the port code. See [Terminal codes](https://waykite.com/docs/guides/terminal-codes).",
                          "example": "EGH"
                        },
                        "listed_under": {
                          "description": "The port code that goes with `smdg_code`, when it is not this location's own.",
                          "example": "CNNBO",
                          "type": "string"
                        },
                        "coordinates": {
                          "type": "object",
                          "properties": {
                            "lat": {
                              "type": "number",
                              "description": "Latitude, in decimal degrees."
                            },
                            "lon": {
                              "type": "number",
                              "description": "Longitude, in decimal degrees."
                            }
                          },
                          "required": [
                            "lat",
                            "lon"
                          ],
                          "additionalProperties": false,
                          "description": "A point on the terminal in decimal degrees, close to the quay."
                        },
                        "website": {
                          "description": "The terminal's website.",
                          "type": "string"
                        },
                        "address": {
                          "description": "Its gate or visiting address.",
                          "type": "string"
                        },
                        "notes": {
                          "description": "Remarks, such as which berths it covers.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "smdg_code",
                        "coordinates"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false
              },
              "airport": {
                "description": "Airport details, for a location that is an airport.",
                "type": "object",
                "properties": {
                  "name": {
                    "description": "The airport's name.",
                    "example": "Amsterdam Airport Schiphol",
                    "type": "string"
                  },
                  "icao": {
                    "description": "The airport's ICAO code. See [UN/LOCODE vs IATA vs ICAO](https://waykite.com/docs/guides/unlocode-iata-icao).",
                    "example": "EHAM",
                    "type": "string"
                  },
                  "type": {
                    "description": "How big the airport is, or what kind.",
                    "type": "string",
                    "enum": [
                      "large",
                      "medium",
                      "small",
                      "heliport",
                      "seaplane_base"
                    ]
                  },
                  "scheduled_service": {
                    "description": "Whether airlines fly scheduled services to it.",
                    "type": "boolean"
                  },
                  "elevation_meters": {
                    "description": "Elevation above sea level, in metres.",
                    "type": "number"
                  },
                  "runways_summary": {
                    "description": "The open runways at a glance.",
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "number",
                        "description": "How many runways are open."
                      },
                      "longest_meters": {
                        "description": "The longest open runway, in metres.",
                        "type": "number"
                      },
                      "longest_paved": {
                        "description": "Whether the longest open runway is paved.",
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "count"
                    ],
                    "additionalProperties": false
                  },
                  "runways": {
                    "description": "The open runways, longest first.",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "designator": {
                          "type": "string",
                          "description": "The runway's designator: its two ends, by heading.",
                          "example": "18R/36L"
                        },
                        "length_meters": {
                          "description": "Length, in metres.",
                          "type": "number"
                        },
                        "width_meters": {
                          "description": "Width, in metres.",
                          "type": "number"
                        },
                        "surface": {
                          "description": "What the runway is surfaced with.",
                          "type": "string",
                          "enum": [
                            "asphalt",
                            "concrete",
                            "grass",
                            "gravel",
                            "dirt",
                            "sand",
                            "water",
                            "snow",
                            "other"
                          ]
                        },
                        "paved": {
                          "description": "Whether the surface is paved, from `surface`.",
                          "type": "boolean"
                        },
                        "lighted": {
                          "description": "Whether the runway is lit.",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "designator"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          "distance_km": {
            "type": "number",
            "description": "How far away it is, in kilometres."
          }
        },
        "required": [
          "code",
          "country",
          "location",
          "name",
          "display_name",
          "subdivision",
          "functions",
          "status",
          "coordinates",
          "distance_km"
        ],
        "additionalProperties": false
      },
      "Photo": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "The photo, about 1280 pixels wide."
          },
          "width": {
            "type": "integer",
            "description": "Its width at that address, in pixels."
          },
          "height": {
            "type": "integer",
            "description": "Its height at that address, in pixels."
          },
          "credit": {
            "type": "string",
            "description": "Who took it, to be named beside it."
          },
          "license": {
            "type": "string",
            "enum": [
              "CC-BY-2.0",
              "CC-BY-2.5",
              "CC-BY-3.0",
              "CC-BY-4.0",
              "CC-BY-SA-2.0",
              "CC-BY-SA-2.5",
              "CC-BY-SA-3.0",
              "CC-BY-SA-4.0",
              "CC0-1.0",
              "public-domain"
            ],
            "description": "Its licence, by SPDX identifier, or `public-domain`. Show it cropped or edited only as the licence allows: a share-alike one carries over to the changed photo."
          },
          "source": {
            "type": "string",
            "description": "The page the photo is published on, to be linked beside it."
          }
        },
        "required": [
          "url",
          "width",
          "height",
          "credit",
          "license",
          "source"
        ],
        "additionalProperties": false
      },
      "FacilitySummary": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The facility's code, unique on its own: a container terminal's UN/LOCODE and terminal code together (`DEHAMEGH`), a code starting with `LNG` or `COAL` for an LNG or coal terminal, or with `FERRY` for a ferry terminal.",
            "example": "DEHAMEGH"
          },
          "type": {
            "type": "string",
            "enum": [
              "container_terminal",
              "lng_terminal",
              "coal_terminal",
              "oil_terminal",
              "bulk_terminal",
              "ferry_terminal",
              "terminal",
              "anchorage",
              "sts_area"
            ],
            "description": "The kind of facility."
          },
          "status": {
            "type": "string",
            "enum": [
              "operating",
              "construction",
              "idle",
              "proposed",
              "shelved",
              "retired"
            ],
            "description": "Where it stands: `operating`, `construction`, `idle` (out of use, but could run again), `proposed`, `shelved` (a proposal on hold) or `retired`."
          },
          "unlocode": {
            "description": "The UN/LOCODE of the location the facility is part of, such as its port. Left out for a facility that is not part of one, such as a terminal far offshore.",
            "example": "DEHAM",
            "type": "string"
          },
          "smdg_code": {
            "description": "A container terminal's terminal code, unique together with `unlocode`: the pair EDI messages carry. See [Terminal codes](https://waykite.com/docs/guides/terminal-codes).",
            "example": "EGH",
            "type": "string"
          },
          "alternative_unlocode": {
            "description": "Another port code the industry uses for the facility, e.g. `CNNBG` beside `CNNBO`. Searching by either finds it.",
            "example": "CNNBG",
            "type": "string"
          },
          "country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code.",
            "example": "DE"
          },
          "regions": {
            "description": "The M49 codes of the regions its country is in, broadest first: region, sub-region, then the intermediate region where there is one. Left out for a place in no region: Antarctica, or `XZ` (international waters). See [Regions and sea areas](https://waykite.com/docs/guides/regions-and-sea-areas).",
            "example": [
              "150",
              "155"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "name": {
            "type": "string",
            "description": "The facility's name.",
            "example": "EUROGATE CONTAINER TERMINAL HAMBURG"
          },
          "display_name": {
            "type": "string",
            "description": "The name for reading, with acronyms kept.",
            "example": "Eurogate Container Terminal Hamburg"
          },
          "operator": {
            "description": "The company that runs it.",
            "type": "string"
          },
          "cargo": {
            "description": "The kinds of cargo it handles: `crude_oil`, `petroleum_products`, `chemicals`, `liquefied_gas` (LNG, LPG, ammonia), `dry_bulk`, `general_cargo`, `containers`, `vehicles` or `passengers`. Left out when not known.",
            "example": [
              "containers"
            ],
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "crude_oil",
                "petroleum_products",
                "chemicals",
                "liquefied_gas",
                "dry_bulk",
                "general_cargo",
                "containers",
                "vehicles",
                "passengers"
              ]
            }
          },
          "depth_m": {
            "description": "The greatest depth of water alongside, in metres. Left out when not known.",
            "example": 12.2,
            "type": "number"
          },
          "directions": {
            "description": "Which way its cargo moves: `import`, `export` or `domestic`, one or more. Left out when not known.",
            "example": [
              "import"
            ],
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "import",
                "export",
                "domestic"
              ]
            }
          },
          "capacity_mtpa": {
            "description": "How much it can handle, in million tonnes a year: for one in operation, its running units; for one planned, what is planned. Left out when not known.",
            "example": 5,
            "type": "number"
          },
          "floating": {
            "description": "Present (`true`) for a floating unit, such as a floating storage and regasification unit (FSRU).",
            "type": "boolean"
          },
          "offshore": {
            "description": "Present (`true`) for a facility offshore.",
            "type": "boolean"
          },
          "coordinates": {
            "type": "object",
            "properties": {
              "lat": {
                "type": "number",
                "description": "Latitude, in decimal degrees."
              },
              "lon": {
                "type": "number",
                "description": "Longitude, in decimal degrees."
              }
            },
            "required": [
              "lat",
              "lon"
            ],
            "additionalProperties": false,
            "description": "A point on the facility in decimal degrees: close to the quay for a terminal, the middle of an area for an anchorage.",
            "example": {
              "lat": 53.53,
              "lon": 9.92
            }
          },
          "timezone": {
            "description": "The time zone it keeps, by its IANA name, such as `Europe/Amsterdam`, which `Intl.DateTimeFormat` and date libraries take. Left out when it is not known: for a place without coordinates in a country with several zones, or in international waters.",
            "example": "Europe/Amsterdam",
            "type": "string"
          },
          "sea_area": {
            "description": "The sea area it is on, by its S-23 code. Left out for one inland or far up a river. See [Regions and sea areas](https://waykite.com/docs/guides/regions-and-sea-areas).",
            "example": "4",
            "type": "string"
          },
          "nearest_port": {
            "type": "object",
            "properties": {
              "unlocode": {
                "type": "string",
                "description": "The port's UN/LOCODE.",
                "example": "DEHAM"
              },
              "distance_km": {
                "type": "number",
                "description": "How far the port is from the facility, in kilometres.",
                "example": 2.4
              }
            },
            "required": [
              "unlocode",
              "distance_km"
            ],
            "additionalProperties": false,
            "description": "The nearest UN/LOCODE location with the port function, preferring one in the facility's own country within 50 km. It can be far away, or differ from `unlocode`."
          },
          "website": {
            "description": "The facility's website.",
            "type": "string"
          },
          "address": {
            "description": "Its gate or visiting address.",
            "type": "string"
          },
          "notes": {
            "description": "Remarks, such as which berths it covers.",
            "type": "string"
          }
        },
        "required": [
          "code",
          "type",
          "status",
          "country",
          "name",
          "display_name",
          "coordinates",
          "nearest_port"
        ],
        "additionalProperties": false,
        "description": "A facility as search and nearby return it: every field of a [facility](https://waykite.com/docs/api/facilities/get) but `area`, which can run to thousands of positions. Get the facility by its code for its area."
      },
      "NearbyFacility": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The facility's code, unique on its own: a container terminal's UN/LOCODE and terminal code together (`DEHAMEGH`), a code starting with `LNG` or `COAL` for an LNG or coal terminal, or with `FERRY` for a ferry terminal.",
            "example": "DEHAMEGH"
          },
          "type": {
            "type": "string",
            "enum": [
              "container_terminal",
              "lng_terminal",
              "coal_terminal",
              "oil_terminal",
              "bulk_terminal",
              "ferry_terminal",
              "terminal",
              "anchorage",
              "sts_area"
            ],
            "description": "The kind of facility."
          },
          "status": {
            "type": "string",
            "enum": [
              "operating",
              "construction",
              "idle",
              "proposed",
              "shelved",
              "retired"
            ],
            "description": "Where it stands: `operating`, `construction`, `idle` (out of use, but could run again), `proposed`, `shelved` (a proposal on hold) or `retired`."
          },
          "unlocode": {
            "description": "The UN/LOCODE of the location the facility is part of, such as its port. Left out for a facility that is not part of one, such as a terminal far offshore.",
            "example": "DEHAM",
            "type": "string"
          },
          "smdg_code": {
            "description": "A container terminal's terminal code, unique together with `unlocode`: the pair EDI messages carry. See [Terminal codes](https://waykite.com/docs/guides/terminal-codes).",
            "example": "EGH",
            "type": "string"
          },
          "alternative_unlocode": {
            "description": "Another port code the industry uses for the facility, e.g. `CNNBG` beside `CNNBO`. Searching by either finds it.",
            "example": "CNNBG",
            "type": "string"
          },
          "country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code.",
            "example": "DE"
          },
          "regions": {
            "description": "The M49 codes of the regions its country is in, broadest first: region, sub-region, then the intermediate region where there is one. Left out for a place in no region: Antarctica, or `XZ` (international waters). See [Regions and sea areas](https://waykite.com/docs/guides/regions-and-sea-areas).",
            "example": [
              "150",
              "155"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "name": {
            "type": "string",
            "description": "The facility's name.",
            "example": "EUROGATE CONTAINER TERMINAL HAMBURG"
          },
          "display_name": {
            "type": "string",
            "description": "The name for reading, with acronyms kept.",
            "example": "Eurogate Container Terminal Hamburg"
          },
          "operator": {
            "description": "The company that runs it.",
            "type": "string"
          },
          "cargo": {
            "description": "The kinds of cargo it handles: `crude_oil`, `petroleum_products`, `chemicals`, `liquefied_gas` (LNG, LPG, ammonia), `dry_bulk`, `general_cargo`, `containers`, `vehicles` or `passengers`. Left out when not known.",
            "example": [
              "containers"
            ],
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "crude_oil",
                "petroleum_products",
                "chemicals",
                "liquefied_gas",
                "dry_bulk",
                "general_cargo",
                "containers",
                "vehicles",
                "passengers"
              ]
            }
          },
          "depth_m": {
            "description": "The greatest depth of water alongside, in metres. Left out when not known.",
            "example": 12.2,
            "type": "number"
          },
          "directions": {
            "description": "Which way its cargo moves: `import`, `export` or `domestic`, one or more. Left out when not known.",
            "example": [
              "import"
            ],
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "import",
                "export",
                "domestic"
              ]
            }
          },
          "capacity_mtpa": {
            "description": "How much it can handle, in million tonnes a year: for one in operation, its running units; for one planned, what is planned. Left out when not known.",
            "example": 5,
            "type": "number"
          },
          "floating": {
            "description": "Present (`true`) for a floating unit, such as a floating storage and regasification unit (FSRU).",
            "type": "boolean"
          },
          "offshore": {
            "description": "Present (`true`) for a facility offshore.",
            "type": "boolean"
          },
          "coordinates": {
            "type": "object",
            "properties": {
              "lat": {
                "type": "number",
                "description": "Latitude, in decimal degrees."
              },
              "lon": {
                "type": "number",
                "description": "Longitude, in decimal degrees."
              }
            },
            "required": [
              "lat",
              "lon"
            ],
            "additionalProperties": false,
            "description": "A point on the facility in decimal degrees: close to the quay for a terminal, the middle of an area for an anchorage.",
            "example": {
              "lat": 53.53,
              "lon": 9.92
            }
          },
          "timezone": {
            "description": "The time zone it keeps, by its IANA name, such as `Europe/Amsterdam`, which `Intl.DateTimeFormat` and date libraries take. Left out when it is not known: for a place without coordinates in a country with several zones, or in international waters.",
            "example": "Europe/Amsterdam",
            "type": "string"
          },
          "sea_area": {
            "description": "The sea area it is on, by its S-23 code. Left out for one inland or far up a river. See [Regions and sea areas](https://waykite.com/docs/guides/regions-and-sea-areas).",
            "example": "4",
            "type": "string"
          },
          "nearest_port": {
            "type": "object",
            "properties": {
              "unlocode": {
                "type": "string",
                "description": "The port's UN/LOCODE.",
                "example": "DEHAM"
              },
              "distance_km": {
                "type": "number",
                "description": "How far the port is from the facility, in kilometres.",
                "example": 2.4
              }
            },
            "required": [
              "unlocode",
              "distance_km"
            ],
            "additionalProperties": false,
            "description": "The nearest UN/LOCODE location with the port function, preferring one in the facility's own country within 50 km. It can be far away, or differ from `unlocode`."
          },
          "website": {
            "description": "The facility's website.",
            "type": "string"
          },
          "address": {
            "description": "Its gate or visiting address.",
            "type": "string"
          },
          "notes": {
            "description": "Remarks, such as which berths it covers.",
            "type": "string"
          },
          "distance_km": {
            "type": "number",
            "description": "How far away it is, in kilometres."
          }
        },
        "required": [
          "code",
          "type",
          "status",
          "country",
          "name",
          "display_name",
          "coordinates",
          "nearest_port",
          "distance_km"
        ],
        "additionalProperties": false
      },
      "Facility": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The facility's code, unique on its own: a container terminal's UN/LOCODE and terminal code together (`DEHAMEGH`), a code starting with `LNG` or `COAL` for an LNG or coal terminal, or with `FERRY` for a ferry terminal.",
            "example": "DEHAMEGH"
          },
          "type": {
            "type": "string",
            "enum": [
              "container_terminal",
              "lng_terminal",
              "coal_terminal",
              "oil_terminal",
              "bulk_terminal",
              "ferry_terminal",
              "terminal",
              "anchorage",
              "sts_area"
            ],
            "description": "The kind of facility."
          },
          "status": {
            "type": "string",
            "enum": [
              "operating",
              "construction",
              "idle",
              "proposed",
              "shelved",
              "retired"
            ],
            "description": "Where it stands: `operating`, `construction`, `idle` (out of use, but could run again), `proposed`, `shelved` (a proposal on hold) or `retired`."
          },
          "unlocode": {
            "description": "The UN/LOCODE of the location the facility is part of, such as its port. Left out for a facility that is not part of one, such as a terminal far offshore.",
            "example": "DEHAM",
            "type": "string"
          },
          "smdg_code": {
            "description": "A container terminal's terminal code, unique together with `unlocode`: the pair EDI messages carry. See [Terminal codes](https://waykite.com/docs/guides/terminal-codes).",
            "example": "EGH",
            "type": "string"
          },
          "alternative_unlocode": {
            "description": "Another port code the industry uses for the facility, e.g. `CNNBG` beside `CNNBO`. Searching by either finds it.",
            "example": "CNNBG",
            "type": "string"
          },
          "country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code.",
            "example": "DE"
          },
          "regions": {
            "description": "The M49 codes of the regions its country is in, broadest first: region, sub-region, then the intermediate region where there is one. Left out for a place in no region: Antarctica, or `XZ` (international waters). See [Regions and sea areas](https://waykite.com/docs/guides/regions-and-sea-areas).",
            "example": [
              "150",
              "155"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "name": {
            "type": "string",
            "description": "The facility's name.",
            "example": "EUROGATE CONTAINER TERMINAL HAMBURG"
          },
          "display_name": {
            "type": "string",
            "description": "The name for reading, with acronyms kept.",
            "example": "Eurogate Container Terminal Hamburg"
          },
          "operator": {
            "description": "The company that runs it.",
            "type": "string"
          },
          "cargo": {
            "description": "The kinds of cargo it handles: `crude_oil`, `petroleum_products`, `chemicals`, `liquefied_gas` (LNG, LPG, ammonia), `dry_bulk`, `general_cargo`, `containers`, `vehicles` or `passengers`. Left out when not known.",
            "example": [
              "containers"
            ],
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "crude_oil",
                "petroleum_products",
                "chemicals",
                "liquefied_gas",
                "dry_bulk",
                "general_cargo",
                "containers",
                "vehicles",
                "passengers"
              ]
            }
          },
          "depth_m": {
            "description": "The greatest depth of water alongside, in metres. Left out when not known.",
            "example": 12.2,
            "type": "number"
          },
          "directions": {
            "description": "Which way its cargo moves: `import`, `export` or `domestic`, one or more. Left out when not known.",
            "example": [
              "import"
            ],
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "import",
                "export",
                "domestic"
              ]
            }
          },
          "capacity_mtpa": {
            "description": "How much it can handle, in million tonnes a year: for one in operation, its running units; for one planned, what is planned. Left out when not known.",
            "example": 5,
            "type": "number"
          },
          "floating": {
            "description": "Present (`true`) for a floating unit, such as a floating storage and regasification unit (FSRU).",
            "type": "boolean"
          },
          "offshore": {
            "description": "Present (`true`) for a facility offshore.",
            "type": "boolean"
          },
          "coordinates": {
            "type": "object",
            "properties": {
              "lat": {
                "type": "number",
                "description": "Latitude, in decimal degrees."
              },
              "lon": {
                "type": "number",
                "description": "Longitude, in decimal degrees."
              }
            },
            "required": [
              "lat",
              "lon"
            ],
            "additionalProperties": false,
            "description": "A point on the facility in decimal degrees: close to the quay for a terminal, the middle of an area for an anchorage.",
            "example": {
              "lat": 53.53,
              "lon": 9.92
            }
          },
          "timezone": {
            "description": "The time zone it keeps, by its IANA name, such as `Europe/Amsterdam`, which `Intl.DateTimeFormat` and date libraries take. Left out when it is not known: for a place without coordinates in a country with several zones, or in international waters.",
            "example": "Europe/Amsterdam",
            "type": "string"
          },
          "area": {
            "description": "For a facility that covers water rather than standing at a point, such as an anchorage or STS area: its outline as a GeoJSON MultiPolygon, `[lon, lat]` positions, simplified to about 20 m.",
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "MultiPolygon"
              },
              "coordinates": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "number"
                      }
                    }
                  }
                }
              }
            },
            "required": [
              "type",
              "coordinates"
            ],
            "additionalProperties": false
          },
          "sea_area": {
            "description": "The sea area it is on, by its S-23 code. Left out for one inland or far up a river. See [Regions and sea areas](https://waykite.com/docs/guides/regions-and-sea-areas).",
            "example": "4",
            "type": "string"
          },
          "nearest_port": {
            "type": "object",
            "properties": {
              "unlocode": {
                "type": "string",
                "description": "The port's UN/LOCODE.",
                "example": "DEHAM"
              },
              "distance_km": {
                "type": "number",
                "description": "How far the port is from the facility, in kilometres.",
                "example": 2.4
              }
            },
            "required": [
              "unlocode",
              "distance_km"
            ],
            "additionalProperties": false,
            "description": "The nearest UN/LOCODE location with the port function, preferring one in the facility's own country within 50 km. It can be far away, or differ from `unlocode`."
          },
          "website": {
            "description": "The facility's website.",
            "type": "string"
          },
          "address": {
            "description": "Its gate or visiting address.",
            "type": "string"
          },
          "notes": {
            "description": "Remarks, such as which berths it covers.",
            "type": "string"
          }
        },
        "required": [
          "code",
          "type",
          "status",
          "country",
          "name",
          "display_name",
          "coordinates",
          "nearest_port"
        ],
        "additionalProperties": false,
        "description": "A facility, such as a terminal in a port, an anchorage or one offshore. Search and nearby return facilities in the same shape less `area`. Fields without a value are left out. A location's container terminals also come with the location itself, under `modalities.port.container_terminals` in [Get a location](https://waykite.com/docs/api/locations/get)."
      },
      "NavigationAid": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The aid, by an identifier that does not change.",
            "example": "aid_5d1c2f0e8b3a4c7d9e6f1a2b"
          },
          "kind": {
            "type": "string",
            "enum": [
              "light",
              "buoy",
              "beacon",
              "racon",
              "fog_signal",
              "virtual",
              "radio_beacon",
              "dgps",
              "drilling_unit"
            ],
            "description": "The kind of aid: `light`, a lighthouse or other fixed light; `buoy`, lit or not; `beacon`, a fixed mark without a light; `racon`, a radar beacon on its own; `fog_signal`, a sound signal on its own; `virtual`, a mark broadcast over AIS where there is nothing to see; `radio_beacon`, a radio direction-finding beacon; `dgps`, a station broadcasting GPS corrections; or `drilling_unit`, a mobile offshore drilling unit, which moves."
          },
          "name": {
            "type": "string",
            "description": "Its name, with the place it belongs to where it is part of one."
          },
          "international_number": {
            "description": "Its number in the international list of lights, where it has one, such as 'A1871'.",
            "type": "string"
          },
          "country": {
            "type": "string",
            "description": "The country of its nearest port, ISO 3166-1 alpha-2."
          },
          "coordinates": {
            "type": "object",
            "properties": {
              "lat": {
                "type": "number",
                "description": "Latitude, in decimal degrees."
              },
              "lon": {
                "type": "number",
                "description": "Longitude, in decimal degrees."
              }
            },
            "required": [
              "lat",
              "lon"
            ],
            "additionalProperties": false
          },
          "timezone": {
            "description": "The time zone it keeps, by its IANA name, such as `Europe/Amsterdam`, which `Intl.DateTimeFormat` and date libraries take. Left out when it is not known: for a place without coordinates in a country with several zones, or in international waters.",
            "example": "Europe/Amsterdam",
            "type": "string"
          },
          "characteristics": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "How it shows itself, as charts abbreviate it: its light, such as `Fl.(2)W. period 10s`, and any radar beacon (`RACON`) on it; and a radio beacon's identifier, which it sends in Morse.",
            "example": [
              "Fl.(2)W. period 10s fl. 0.1s, ec. 2.4s fl. 0.1s, ec. 7.4s"
            ]
          },
          "height_m": {
            "description": "The height of its light above the water, in metres.",
            "type": "number"
          },
          "range_nm": {
            "description": "How far its light is seen, in nautical miles: the furthest of its colours. For a radio beacon or a DGPS station, how far its signal reaches.",
            "type": "number"
          },
          "frequency_khz": {
            "description": "The frequency a radio beacon or a DGPS station broadcasts on, in kilohertz.",
            "example": 294.5,
            "type": "number"
          },
          "reported_on": {
            "description": "For a drilling unit: the day its position was last reported, as YYYY-MM-DD.",
            "example": "2026-10-28",
            "type": "string"
          },
          "structure": {
            "description": "What it stands on or looks like by day.",
            "type": "string"
          },
          "remarks": {
            "description": "Its sectors, other lights on it and other notes.",
            "type": "string"
          },
          "nearest_port": {
            "type": "object",
            "properties": {
              "unlocode": {
                "type": "string",
                "description": "The port's UN/LOCODE.",
                "example": "DEHAM"
              },
              "distance_km": {
                "type": "number",
                "description": "How far the port is from the facility, in kilometres.",
                "example": 2.4
              }
            },
            "required": [
              "unlocode",
              "distance_km"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "kind",
          "name",
          "country",
          "coordinates",
          "characteristics",
          "nearest_port"
        ],
        "additionalProperties": false,
        "description": "An aid to navigation, such as a lighthouse or a lit buoy. Fields without a value are left out."
      },
      "NearbyNavigationAid": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The aid, by an identifier that does not change.",
            "example": "aid_5d1c2f0e8b3a4c7d9e6f1a2b"
          },
          "kind": {
            "type": "string",
            "enum": [
              "light",
              "buoy",
              "beacon",
              "racon",
              "fog_signal",
              "virtual",
              "radio_beacon",
              "dgps",
              "drilling_unit"
            ],
            "description": "The kind of aid: `light`, a lighthouse or other fixed light; `buoy`, lit or not; `beacon`, a fixed mark without a light; `racon`, a radar beacon on its own; `fog_signal`, a sound signal on its own; `virtual`, a mark broadcast over AIS where there is nothing to see; `radio_beacon`, a radio direction-finding beacon; `dgps`, a station broadcasting GPS corrections; or `drilling_unit`, a mobile offshore drilling unit, which moves."
          },
          "name": {
            "type": "string",
            "description": "Its name, with the place it belongs to where it is part of one."
          },
          "international_number": {
            "description": "Its number in the international list of lights, where it has one, such as 'A1871'.",
            "type": "string"
          },
          "country": {
            "type": "string",
            "description": "The country of its nearest port, ISO 3166-1 alpha-2."
          },
          "coordinates": {
            "type": "object",
            "properties": {
              "lat": {
                "type": "number",
                "description": "Latitude, in decimal degrees."
              },
              "lon": {
                "type": "number",
                "description": "Longitude, in decimal degrees."
              }
            },
            "required": [
              "lat",
              "lon"
            ],
            "additionalProperties": false
          },
          "timezone": {
            "description": "The time zone it keeps, by its IANA name, such as `Europe/Amsterdam`, which `Intl.DateTimeFormat` and date libraries take. Left out when it is not known: for a place without coordinates in a country with several zones, or in international waters.",
            "example": "Europe/Amsterdam",
            "type": "string"
          },
          "characteristics": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "How it shows itself, as charts abbreviate it: its light, such as `Fl.(2)W. period 10s`, and any radar beacon (`RACON`) on it; and a radio beacon's identifier, which it sends in Morse.",
            "example": [
              "Fl.(2)W. period 10s fl. 0.1s, ec. 2.4s fl. 0.1s, ec. 7.4s"
            ]
          },
          "height_m": {
            "description": "The height of its light above the water, in metres.",
            "type": "number"
          },
          "range_nm": {
            "description": "How far its light is seen, in nautical miles: the furthest of its colours. For a radio beacon or a DGPS station, how far its signal reaches.",
            "type": "number"
          },
          "frequency_khz": {
            "description": "The frequency a radio beacon or a DGPS station broadcasts on, in kilohertz.",
            "example": 294.5,
            "type": "number"
          },
          "reported_on": {
            "description": "For a drilling unit: the day its position was last reported, as YYYY-MM-DD.",
            "example": "2026-10-28",
            "type": "string"
          },
          "structure": {
            "description": "What it stands on or looks like by day.",
            "type": "string"
          },
          "remarks": {
            "description": "Its sectors, other lights on it and other notes.",
            "type": "string"
          },
          "nearest_port": {
            "type": "object",
            "properties": {
              "unlocode": {
                "type": "string",
                "description": "The port's UN/LOCODE.",
                "example": "DEHAM"
              },
              "distance_km": {
                "type": "number",
                "description": "How far the port is from the facility, in kilometres.",
                "example": 2.4
              }
            },
            "required": [
              "unlocode",
              "distance_km"
            ],
            "additionalProperties": false
          },
          "distance_km": {
            "type": "number",
            "description": "How far away it is, in kilometres."
          }
        },
        "required": [
          "id",
          "kind",
          "name",
          "country",
          "coordinates",
          "characteristics",
          "nearest_port",
          "distance_km"
        ],
        "additionalProperties": false
      },
      "Region": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Its M49 code, three digits.",
            "example": "155"
          },
          "name": {
            "type": "string",
            "description": "Its English name.",
            "example": "Western Europe"
          },
          "level": {
            "type": "string",
            "enum": [
              "region",
              "sub_region",
              "intermediate_region"
            ],
            "description": "How broad it is: a `region` (`150` Europe), a `sub_region` of one (`155` Western Europe) or an `intermediate_region` within a sub-region (`005` South America)."
          },
          "parent": {
            "description": "The code of the region it is part of. Left out for a region at the broadest level.",
            "example": "150",
            "type": "string"
          },
          "countries": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The ISO 3166-1 alpha-2 codes of the countries in it, at any level.",
            "example": [
              "AT",
              "BE",
              "CH",
              "DE",
              "FR",
              "LI",
              "LU",
              "MC",
              "NL"
            ]
          }
        },
        "required": [
          "code",
          "name",
          "level",
          "countries"
        ],
        "additionalProperties": false,
        "description": "An M49 region, with the countries in it."
      },
      "SeaArea": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Its number in S-23. Case matters: `28A` is the Western Basin of the Mediterranean, `28a` the Strait of Gibraltar.",
            "example": "4"
          },
          "name": {
            "type": "string",
            "description": "Its name, as S-23 gives it.",
            "example": "North Sea"
          }
        },
        "required": [
          "code",
          "name"
        ],
        "additionalProperties": false,
        "description": "An S-23 sea area."
      },
      "PortArrival": {
        "type": "object",
        "properties": {
          "mmsi": {
            "type": "number",
            "description": "The ship's MMSI, the number it broadcasts under."
          },
          "imo": {
            "description": "The ship's IMO number, when it sends a valid one.",
            "type": [
              "number",
              "null"
            ]
          },
          "name": {
            "description": "The ship's name, as it broadcasts it.",
            "type": [
              "string",
              "null"
            ]
          },
          "ship_type": {
            "description": "The ship type it broadcasts, e.g. 70 for cargo.",
            "type": [
              "number",
              "null"
            ]
          },
          "ship_category": {
            "type": "string",
            "enum": [
              "passenger",
              "cargo",
              "tanker",
              "service",
              "fishing",
              "other"
            ],
            "description": "The kind of ship, from its type: `passenger` (60-69), `cargo` (70-79), `tanker` (80-89), `service` (50-59: pilots, rescue, tugs, port tenders and the like), `fishing` (30), or `other`, ships that never sent their type included."
          },
          "destination_raw": {
            "description": "The destination as the crew typed it.",
            "type": [
              "string",
              "null"
            ]
          },
          "probability": {
            "type": "number",
            "description": "How likely the ship calls here next, from 0 to 1: how well the destination the crew typed matches the port, and how often ships like it were right that far ahead; or, by `history`, how often it or ships like it went here from the port it left."
          },
          "basis": {
            "type": "string",
            "enum": [
              "destination",
              "history"
            ],
            "description": "What says the ship is bound here: `destination`, the destination the crew typed; `history`, where that names no port but the one it left, where it and ships like it went from there before."
          },
          "eta": {
            "type": "string",
            "description": "When we expect the ship, ISO 8601."
          },
          "eta_range": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "earliest": {
                    "type": "string"
                  },
                  "latest": {
                    "type": "string"
                  }
                },
                "required": [
                  "earliest",
                  "latest"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "The earliest and latest the ship is likely to arrive, ISO 8601: eight in ten arrive within it. `null` where `eta` is the crew’s own, which we cannot vouch for."
          },
          "reported_eta": {
            "description": "The crew's ETA as broadcast, ISO 8601.",
            "type": [
              "string",
              "null"
            ]
          },
          "predicted_at": {
            "type": "string",
            "description": "When the estimate was made, ISO 8601."
          },
          "waiting": {
            "type": "boolean",
            "description": "Stopped or at anchor near the port and heard lately: waiting its turn to come in, so its turn, not `eta`, says when it arrives."
          },
          "overdue": {
            "type": "boolean",
            "description": "Past its estimate and not heard from since: it may have reached port out of range. Such a ship stays listed for a while, until it is heard arriving."
          },
          "position": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "at": {
                    "type": "string"
                  },
                  "lat": {
                    "type": "number"
                  },
                  "lon": {
                    "type": "number"
                  },
                  "speed_kn": {
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "required": [
                  "at",
                  "lat",
                  "lon",
                  "speed_kn"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "Where the ship was, and how fast it went in knots, when the estimate was made."
          }
        },
        "required": [
          "mmsi",
          "imo",
          "name",
          "ship_type",
          "ship_category",
          "destination_raw",
          "probability",
          "basis",
          "eta",
          "eta_range",
          "reported_eta",
          "predicted_at",
          "waiting",
          "overdue",
          "position"
        ],
        "additionalProperties": false,
        "description": "A ship expected at a port: when, how likely, and where it was when the estimate was made."
      },
      "PortCongestion": {
        "type": "object",
        "properties": {
          "unlocode": {
            "type": "string",
            "description": "The code asked for."
          },
          "port": {
            "type": "string",
            "description": "The port that answered: the code asked for, or the larger port it is part of, such as a terminal's."
          },
          "days": {
            "type": "integer",
            "description": "How many days back the calls go."
          },
          "cargo": {
            "type": "object",
            "properties": {
              "waiting_now": {
                "type": "integer",
                "description": "The ships waiting now: stopped off the port for it, or at anchor in it, and not yet berthed."
              },
              "calls": {
                "type": "integer",
                "description": "The calls of the period that reached a berth, which the hours are of."
              },
              "waiting_h": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "median": {
                        "type": "number",
                        "description": "Half the calls took less, half more, in hours."
                      },
                      "p75": {
                        "type": "number",
                        "description": "Three calls in four took less, in hours."
                      }
                    },
                    "required": [
                      "median",
                      "p75"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "How long ships waited before their first berth: off the port and at anchor in it. A ship that came straight in waited none. `null` when too few calls to tell."
              },
              "at_berth_h": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "median": {
                        "type": "number",
                        "description": "Half the calls took less, half more, in hours."
                      },
                      "p75": {
                        "type": "number",
                        "description": "Three calls in four took less, in hours."
                      }
                    },
                    "required": [
                      "median",
                      "p75"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "How long ships stayed at their berths, for the calls that ended. `null` when too few calls to tell."
              }
            },
            "required": [
              "waiting_now",
              "calls",
              "waiting_h",
              "at_berth_h"
            ],
            "additionalProperties": false,
            "description": "Seagoing cargo ships."
          },
          "tanker": {
            "type": "object",
            "properties": {
              "waiting_now": {
                "type": "integer",
                "description": "The ships waiting now: stopped off the port for it, or at anchor in it, and not yet berthed."
              },
              "calls": {
                "type": "integer",
                "description": "The calls of the period that reached a berth, which the hours are of."
              },
              "waiting_h": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "median": {
                        "type": "number",
                        "description": "Half the calls took less, half more, in hours."
                      },
                      "p75": {
                        "type": "number",
                        "description": "Three calls in four took less, in hours."
                      }
                    },
                    "required": [
                      "median",
                      "p75"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "How long ships waited before their first berth: off the port and at anchor in it. A ship that came straight in waited none. `null` when too few calls to tell."
              },
              "at_berth_h": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "median": {
                        "type": "number",
                        "description": "Half the calls took less, half more, in hours."
                      },
                      "p75": {
                        "type": "number",
                        "description": "Three calls in four took less, in hours."
                      }
                    },
                    "required": [
                      "median",
                      "p75"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "How long ships stayed at their berths, for the calls that ended. `null` when too few calls to tell."
              }
            },
            "required": [
              "waiting_now",
              "calls",
              "waiting_h",
              "at_berth_h"
            ],
            "additionalProperties": false,
            "description": "Seagoing tankers."
          }
        },
        "required": [
          "unlocode",
          "port",
          "days",
          "cargo",
          "tanker"
        ],
        "additionalProperties": false,
        "description": "How long cargo ships and tankers waited for a berth at a port lately, and how long they stayed at it."
      },
      "PortCall": {
        "type": "object",
        "properties": {
          "mmsi": {
            "type": "number",
            "description": "The ship's MMSI, the number it broadcasts under."
          },
          "imo": {
            "description": "The ship's IMO number, when it sends a valid one.",
            "type": [
              "number",
              "null"
            ]
          },
          "name": {
            "description": "The ship's name, as it broadcasts it.",
            "type": [
              "string",
              "null"
            ]
          },
          "ship_type": {
            "description": "The ship type it broadcasts, e.g. 70 for cargo.",
            "type": [
              "number",
              "null"
            ]
          },
          "ship_category": {
            "type": "string",
            "enum": [
              "passenger",
              "cargo",
              "tanker",
              "service",
              "fishing",
              "other"
            ],
            "description": "The kind of ship, from its type: `passenger` (60-69), `cargo` (70-79), `tanker` (80-89), `service` (50-59: pilots, rescue, tugs, port tenders and the like), `fishing` (30), or `other`, ships that never sent their type included."
          },
          "destination_raw": {
            "description": "The destination as the crew typed it.",
            "type": [
              "string",
              "null"
            ]
          },
          "arrived_at": {
            "type": "string",
            "description": "When the ship entered the port, or was first seen in it, ISO 8601."
          },
          "departed_at": {
            "description": "When it left, ISO 8601; `null` while it is still there.",
            "type": [
              "string",
              "null"
            ]
          },
          "arrival_seen": {
            "type": "boolean",
            "description": "Whether the ship was seen coming in, not first seen already in port."
          },
          "gap": {
            "type": "boolean",
            "description": "Whether the ship went unheard for a while during the call."
          },
          "waited_from": {
            "description": "When the ship stopped off the port to wait for it, before it came in, ISO 8601; `null` when it came straight in.",
            "type": [
              "string",
              "null"
            ]
          },
          "stops": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "anchored",
                    "berthed"
                  ]
                },
                "area": {
                  "description": "The terminal or anchorage it stopped in, by its code.",
                  "type": "string"
                },
                "area_name": {
                  "description": "That terminal's or anchorage's name.",
                  "type": "string"
                },
                "start": {
                  "type": "string"
                },
                "end": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "kind",
                "start",
                "end"
              ],
              "additionalProperties": false
            },
            "description": "Where the ship stopped in the port, at anchor or at a berth, in order."
          }
        },
        "required": [
          "mmsi",
          "imo",
          "name",
          "ship_type",
          "ship_category",
          "destination_raw",
          "arrived_at",
          "departed_at",
          "arrival_seen",
          "gap",
          "waited_from",
          "stops"
        ],
        "additionalProperties": false,
        "description": "A call at a port: when the ship came and went, and where it stopped in between."
      },
      "VesselSanction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The sanction, by an identifier that does not change.",
            "example": "sanc_5d2f7a9c1e3b4d6f8a0c2e4b6d8f0a1c"
          },
          "imo": {
            "type": "number",
            "description": "The ship's IMO number."
          },
          "authority": {
            "type": "string",
            "enum": [
              "un",
              "eu",
              "us",
              "gb",
              "paris_mou"
            ],
            "description": "Who imposed it: `un` (the UN Security Council), `eu`, `us` or `gb`, which sanction the ship, or `paris_mou`, whose port States refuse it access to every port and anchorage in their region."
          },
          "country": {
            "description": "For `paris_mou`, the member State that issued the order, ISO 3166-1 alpha-2.",
            "type": "string"
          },
          "programmes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The sanctions programmes or regimes it falls under, as the authority names them; empty for `paris_mou`.",
            "example": [
              "Russia"
            ]
          },
          "measures": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "asset_freeze",
                "port_entry_ban",
                "services_ban",
                "deregistration",
                "seizure"
              ]
            },
            "description": "What it does to the ship: `asset_freeze` (the ship is blocked property), `port_entry_ban`, `services_ban` (no services, such as insurance, chartering or bunkering, may be provided to it), `deregistration` (its flag is to be withdrawn) or `seizure`."
          },
          "listed_on": {
            "type": "string",
            "description": "When the ship was listed, YYYY-MM-DD."
          },
          "delisted_on": {
            "description": "When the ship was taken off the list, YYYY-MM-DD, to within a day; left out while it is in force. Recorded from November 2026.",
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "The ship as the listing names it."
          },
          "flag": {
            "description": "Its flag as the listing gives it, ISO 3166-1 alpha-2.",
            "type": "string"
          },
          "reason": {
            "description": "Why it was listed, where the authority says.",
            "type": "string"
          },
          "occurrence": {
            "description": "For `paris_mou`, which refusal of access this is for the ship: 1 for its first.",
            "type": "integer"
          },
          "minimum_months": {
            "description": "For `paris_mou`, the least time the refusal lasts, in months; left out for one that lasts until the conditions for lifting it are met.",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "imo",
          "authority",
          "programmes",
          "measures",
          "listed_on",
          "name"
        ],
        "additionalProperties": false,
        "description": "A sanction on a ship, or an order refusing it access to a region's ports, while it is in force."
      },
      "SanctionedVessels": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VesselSanction"
            }
          },
          "total": {
            "type": "integer",
            "description": "How many sanctions match, across all pages."
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          }
        },
        "required": [
          "results",
          "total",
          "limit",
          "offset"
        ],
        "additionalProperties": false,
        "description": "A page of the sanctions and port bans in force on all ships."
      },
      "VesselSummary": {
        "type": "object",
        "properties": {
          "imo": {
            "type": "number",
            "description": "The ship's IMO number."
          },
          "mmsi": {
            "description": "The MMSI it broadcasts under, as recorded in the last year.",
            "type": [
              "number",
              "null"
            ]
          },
          "name": {
            "description": "Its name, as recorded in the last year.",
            "type": [
              "string",
              "null"
            ]
          },
          "call_sign": {
            "description": "Its radio call sign, as recorded in the last year.",
            "type": [
              "string",
              "null"
            ]
          },
          "flag": {
            "description": "Its flag, ISO 3166-1 alpha-2, as recorded in the last year.",
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "cargo_ship",
                  "general_cargo",
                  "heavy_lift",
                  "bulk_carrier",
                  "ore_carrier",
                  "cement_carrier",
                  "woodchip_carrier",
                  "combination_carrier",
                  "container_ship",
                  "ro_ro_cargo",
                  "vehicle_carrier",
                  "container_ro_ro",
                  "refrigerated_cargo",
                  "livestock_carrier",
                  "barge",
                  "tanker",
                  "oil_tanker",
                  "shuttle_tanker",
                  "chemical_tanker",
                  "oil_chemical_tanker",
                  "gas_carrier",
                  "lng_carrier",
                  "lpg_carrier",
                  "bitumen_tanker",
                  "bunkering_tanker",
                  "passenger_ship",
                  "cruise_ship",
                  "ferry",
                  "ro_ro_passenger",
                  "high_speed_craft",
                  "fishing_vessel",
                  "fish_factory",
                  "fish_carrier",
                  "offshore_vessel",
                  "offshore_supply",
                  "anchor_handling",
                  "crew_transfer",
                  "offshore_unit",
                  "drillship",
                  "jack_up_rig",
                  "semi_submersible_rig",
                  "floating_production",
                  "offshore_platform",
                  "crane_vessel",
                  "pipe_layer",
                  "cable_layer",
                  "tug",
                  "pilot_vessel",
                  "dredger",
                  "icebreaker",
                  "research_vessel",
                  "search_and_rescue",
                  "patrol_vessel",
                  "pollution_control",
                  "buoy_tender",
                  "salvage_vessel",
                  "training_ship",
                  "utility_vessel",
                  "naval_vessel",
                  "yacht",
                  "sailing_ship",
                  "special_purpose"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The type of ship, from a fixed list, e.g. `bulk_carrier`, `lng_carrier` or `drillship`; null when its recorded type names none on the list, or it has none. More may be added.",
            "example": "container_ship"
          },
          "type_raw": {
            "description": "Its type as recorded, e.g. `Bulk carrier` or `Ultra large container ship`.",
            "type": [
              "string",
              "null"
            ]
          },
          "gross_tonnage": {
            "description": "Its gross tonnage.",
            "type": [
              "number",
              "null"
            ]
          },
          "deadweight": {
            "description": "Its deadweight, in tonnes.",
            "type": [
              "number",
              "null"
            ]
          },
          "year_built": {
            "description": "The year it was built.",
            "type": [
              "number",
              "null"
            ]
          },
          "ship_category": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "passenger",
                  "cargo",
                  "tanker",
                  "service",
                  "fishing",
                  "other"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The kind of ship its type is, in the categories of AIS ship types: `passenger`, `cargo`, `tanker`, `service` (tugs, pilots, supply and research ships and the like), `fishing` or `other`; `null` when its type is not known."
          },
          "former_name": {
            "description": "The name it had before that the query matched, when the query matched that rather than its name; `null` otherwise.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "imo",
          "mmsi",
          "name",
          "call_sign",
          "flag",
          "type",
          "type_raw",
          "gross_tonnage",
          "deadweight",
          "year_built",
          "ship_category",
          "former_name"
        ],
        "additionalProperties": false,
        "description": "A ship a search found: who it is and what kind of ship, from its particulars."
      },
      "VesselSearchResult": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VesselSummary"
            }
          },
          "total": {
            "type": "integer",
            "description": "How many ships match, across all pages."
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          }
        },
        "required": [
          "results",
          "total",
          "limit",
          "offset"
        ],
        "additionalProperties": false,
        "description": "A page of the ships a search found."
      },
      "VesselPosition": {
        "type": "object",
        "properties": {
          "mmsi": {
            "type": "number",
            "description": "The ship's MMSI, the number it broadcasts under."
          },
          "imo": {
            "description": "The ship's IMO number, when it sends a valid one.",
            "type": [
              "number",
              "null"
            ]
          },
          "at": {
            "type": "string",
            "description": "When the ship was heard there, ISO 8601. A ship that goes unheard keeps the position it was last heard at."
          },
          "lat": {
            "type": "number"
          },
          "lon": {
            "type": "number"
          },
          "speed_kn": {
            "description": "Its speed over the ground, in knots.",
            "type": [
              "number",
              "null"
            ]
          },
          "course_deg": {
            "description": "Its course over the ground, in degrees.",
            "type": [
              "number",
              "null"
            ]
          },
          "heading_deg": {
            "description": "Where its bow points, in degrees.",
            "type": [
              "number",
              "null"
            ]
          },
          "nav_status": {
            "description": "Its navigational status as broadcast, e.g. 0 under way, 1 at anchor, 5 moored.",
            "type": [
              "number",
              "null"
            ]
          },
          "in_port": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "unlocode": {
                    "type": "string"
                  },
                  "arrived_at": {
                    "type": "string"
                  }
                },
                "required": [
                  "unlocode",
                  "arrived_at"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "The port it is in, and since when."
          }
        },
        "required": [
          "mmsi",
          "imo",
          "at",
          "lat",
          "lon",
          "speed_kn",
          "course_deg",
          "heading_deg",
          "nav_status",
          "in_port"
        ],
        "additionalProperties": false,
        "description": "Where a ship was last heard, and the port it is in."
      },
      "NearbyVessel": {
        "type": "object",
        "properties": {
          "mmsi": {
            "type": "number",
            "description": "The ship's MMSI, the number it broadcasts under."
          },
          "imo": {
            "description": "The ship's IMO number, when it sends a valid one.",
            "type": [
              "number",
              "null"
            ]
          },
          "name": {
            "description": "The ship's name, as it broadcasts it.",
            "type": [
              "string",
              "null"
            ]
          },
          "ship_category": {
            "type": "string",
            "enum": [
              "passenger",
              "cargo",
              "tanker",
              "service",
              "fishing",
              "other"
            ],
            "description": "The kind of ship, from its type: `passenger` (60-69), `cargo` (70-79), `tanker` (80-89), `service` (50-59: pilots, rescue, tugs, port tenders and the like), `fishing` (30), or `other`, ships that never sent their type included."
          },
          "position": {
            "type": "object",
            "properties": {
              "at": {
                "type": "string",
                "description": "When the ship was heard there, ISO 8601. A ship that goes unheard keeps the position it was last heard at."
              },
              "lat": {
                "type": "number"
              },
              "lon": {
                "type": "number"
              },
              "speed_kn": {
                "description": "Its speed over the ground, in knots.",
                "type": [
                  "number",
                  "null"
                ]
              },
              "course_deg": {
                "description": "Its course over the ground, in degrees.",
                "type": [
                  "number",
                  "null"
                ]
              },
              "heading_deg": {
                "description": "Where its bow points, in degrees.",
                "type": [
                  "number",
                  "null"
                ]
              },
              "nav_status": {
                "description": "Its navigational status as broadcast, e.g. 0 under way, 1 at anchor, 5 moored.",
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "at",
              "lat",
              "lon",
              "speed_kn",
              "course_deg",
              "heading_deg",
              "nav_status"
            ],
            "additionalProperties": false,
            "description": "Where it was last heard. A moving ship has its position kept every half hour or so."
          },
          "state": {
            "type": "string",
            "enum": [
              "in_port",
              "stopped",
              "under_way"
            ],
            "description": "`in_port` while it is in a call at a port; else `stopped`, at anchor or drifting, or `under_way`."
          },
          "in_port": {
            "description": "The port it is in, by UN/LOCODE.",
            "type": [
              "string",
              "null"
            ]
          },
          "distance_km": {
            "type": "number",
            "description": "Its distance from the point, in kilometres, rounded to 0.1 km."
          }
        },
        "required": [
          "mmsi",
          "imo",
          "name",
          "ship_category",
          "position",
          "state",
          "in_port",
          "distance_km"
        ],
        "additionalProperties": false
      },
      "VesselInArea": {
        "type": "object",
        "properties": {
          "mmsi": {
            "type": "number",
            "description": "The ship's MMSI, the number it broadcasts under."
          },
          "imo": {
            "description": "The ship's IMO number, when it sends a valid one.",
            "type": [
              "number",
              "null"
            ]
          },
          "name": {
            "description": "The ship's name, as it broadcasts it.",
            "type": [
              "string",
              "null"
            ]
          },
          "ship_category": {
            "type": "string",
            "enum": [
              "passenger",
              "cargo",
              "tanker",
              "service",
              "fishing",
              "other"
            ],
            "description": "The kind of ship, from its type: `passenger` (60-69), `cargo` (70-79), `tanker` (80-89), `service` (50-59: pilots, rescue, tugs, port tenders and the like), `fishing` (30), or `other`, ships that never sent their type included."
          },
          "position": {
            "type": "object",
            "properties": {
              "at": {
                "type": "string",
                "description": "When the ship was heard there, ISO 8601. A ship that goes unheard keeps the position it was last heard at."
              },
              "lat": {
                "type": "number"
              },
              "lon": {
                "type": "number"
              },
              "speed_kn": {
                "description": "Its speed over the ground, in knots.",
                "type": [
                  "number",
                  "null"
                ]
              },
              "course_deg": {
                "description": "Its course over the ground, in degrees.",
                "type": [
                  "number",
                  "null"
                ]
              },
              "heading_deg": {
                "description": "Where its bow points, in degrees.",
                "type": [
                  "number",
                  "null"
                ]
              },
              "nav_status": {
                "description": "Its navigational status as broadcast, e.g. 0 under way, 1 at anchor, 5 moored.",
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "at",
              "lat",
              "lon",
              "speed_kn",
              "course_deg",
              "heading_deg",
              "nav_status"
            ],
            "additionalProperties": false,
            "description": "Where it was last heard. A moving ship has its position kept every half hour or so."
          },
          "state": {
            "type": "string",
            "enum": [
              "in_port",
              "stopped",
              "under_way"
            ],
            "description": "`in_port` while it is in a call at a port; else `stopped`, at anchor or drifting, or `under_way`."
          },
          "in_port": {
            "description": "The port it is in, by UN/LOCODE.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "mmsi",
          "imo",
          "name",
          "ship_category",
          "position",
          "state",
          "in_port"
        ],
        "additionalProperties": false,
        "description": "A ship in an area, where it was last heard."
      },
      "Vessel": {
        "type": "object",
        "properties": {
          "mmsi": {
            "type": "number",
            "description": "The ship's MMSI, the number it broadcasts under."
          },
          "imo": {
            "description": "The ship's IMO number, when it sends a valid one.",
            "type": [
              "number",
              "null"
            ]
          },
          "name": {
            "description": "The ship's name, as it broadcasts it.",
            "type": [
              "string",
              "null"
            ]
          },
          "ship_type": {
            "description": "The ship type it broadcasts, e.g. 70 for cargo.",
            "type": [
              "number",
              "null"
            ]
          },
          "ship_category": {
            "type": "string",
            "enum": [
              "passenger",
              "cargo",
              "tanker",
              "service",
              "fishing",
              "other"
            ],
            "description": "The kind of ship, from its type: `passenger` (60-69), `cargo` (70-79), `tanker` (80-89), `service` (50-59: pilots, rescue, tugs, port tenders and the like), `fishing` (30), or `other`, ships that never sent their type included."
          },
          "call_sign": {
            "description": "The ship's radio call sign.",
            "type": [
              "string",
              "null"
            ]
          },
          "length_m": {
            "description": "Its length overall, in metres.",
            "type": [
              "number",
              "null"
            ]
          },
          "beam_m": {
            "description": "Its beam, in metres.",
            "type": [
              "number",
              "null"
            ]
          },
          "photos": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "description": "The photo, about 1280 pixels wide."
                },
                "width": {
                  "type": "integer",
                  "description": "Its width at that address, in pixels."
                },
                "height": {
                  "type": "integer",
                  "description": "Its height at that address, in pixels."
                },
                "credit": {
                  "type": "string",
                  "description": "Who took it, to be named beside it."
                },
                "license": {
                  "type": "string",
                  "enum": [
                    "CC-BY-2.0",
                    "CC-BY-2.5",
                    "CC-BY-3.0",
                    "CC-BY-4.0",
                    "CC-BY-SA-2.0",
                    "CC-BY-SA-2.5",
                    "CC-BY-SA-3.0",
                    "CC-BY-SA-4.0",
                    "CC0-1.0",
                    "public-domain"
                  ],
                  "description": "Its licence, by SPDX identifier, or `public-domain`. Show it cropped or edited only as the licence allows: a share-alike one carries over to the changed photo."
                },
                "source": {
                  "type": "string",
                  "description": "The page the photo is published on, to be linked beside it."
                }
              },
              "required": [
                "url",
                "width",
                "height",
                "credit",
                "license",
                "source"
              ],
              "additionalProperties": false
            },
            "description": "Photos of the ship published under a free licence, the best first; empty when there are none. Show each with its credit, its licence and a link to its source, as the licence asks."
          }
        },
        "required": [
          "mmsi",
          "imo",
          "name",
          "ship_type",
          "ship_category",
          "call_sign",
          "length_m",
          "beam_m",
          "photos"
        ],
        "additionalProperties": false,
        "description": "A ship: who it is."
      },
      "VesselVoyage": {
        "type": "object",
        "properties": {
          "mmsi": {
            "type": "number",
            "description": "The ship's MMSI, the number it broadcasts under."
          },
          "imo": {
            "description": "The ship's IMO number, when it sends a valid one.",
            "type": [
              "number",
              "null"
            ]
          },
          "destination_raw": {
            "description": "The destination as the crew typed it.",
            "type": [
              "string",
              "null"
            ]
          },
          "reported_eta": {
            "description": "The crew's ETA as broadcast, ISO 8601.",
            "type": [
              "string",
              "null"
            ]
          },
          "draught_m": {
            "description": "Its draught as the crew last set it, in metres.",
            "type": [
              "number",
              "null"
            ]
          },
          "next_port": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "unlocode": {
                    "type": "string"
                  },
                  "probability": {
                    "type": "number"
                  },
                  "eta": {
                    "type": "string"
                  },
                  "predicted_at": {
                    "type": "string"
                  }
                },
                "required": [
                  "unlocode",
                  "probability",
                  "eta",
                  "predicted_at"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "The port its destination most likely means, how likely it calls there next, and when we expect it there, while a cargo ship or tanker is at sea."
          }
        },
        "required": [
          "mmsi",
          "imo",
          "destination_raw",
          "reported_eta",
          "draught_m",
          "next_port"
        ],
        "additionalProperties": false,
        "description": "Where a ship is going, and when: as its crew reports it, and as we expect it."
      },
      "VesselCalls": {
        "type": "object",
        "properties": {
          "mmsi": {
            "type": "number",
            "description": "The ship's MMSI, the number it broadcasts under."
          },
          "imo": {
            "description": "The ship's IMO number, when it sends a valid one.",
            "type": [
              "number",
              "null"
            ]
          },
          "calls": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "arrived_at": {
                  "type": "string",
                  "description": "When the ship entered the port, or was first seen in it, ISO 8601."
                },
                "departed_at": {
                  "description": "When it left, ISO 8601; `null` while it is still there.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "arrival_seen": {
                  "type": "boolean",
                  "description": "Whether the ship was seen coming in, not first seen already in port."
                },
                "gap": {
                  "type": "boolean",
                  "description": "Whether the ship went unheard for a while during the call."
                },
                "waited_from": {
                  "description": "When the ship stopped off the port to wait for it, before it came in, ISO 8601; `null` when it came straight in.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "stops": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "anchored",
                          "berthed"
                        ]
                      },
                      "area": {
                        "description": "The terminal or anchorage it stopped in, by its code.",
                        "type": "string"
                      },
                      "area_name": {
                        "description": "That terminal's or anchorage's name.",
                        "type": "string"
                      },
                      "start": {
                        "type": "string"
                      },
                      "end": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "kind",
                      "start",
                      "end"
                    ],
                    "additionalProperties": false
                  },
                  "description": "Where the ship stopped in the port, at anchor or at a berth, in order."
                },
                "unlocode": {
                  "type": "string",
                  "description": "The port it called at, by UN/LOCODE."
                }
              },
              "required": [
                "arrived_at",
                "departed_at",
                "arrival_seen",
                "gap",
                "waited_from",
                "stops",
                "unlocode"
              ],
              "additionalProperties": false
            },
            "description": "Its calls still open and those of the last 90 days, latest arrival first."
          }
        },
        "required": [
          "mmsi",
          "imo",
          "calls"
        ],
        "additionalProperties": false,
        "description": "A ship's calls at ports, latest first."
      },
      "VesselParticulars": {
        "type": "object",
        "properties": {
          "imo": {
            "type": "number",
            "description": "The ship's IMO number."
          },
          "mmsi": {
            "description": "The MMSI it broadcasts under, when it has been heard lately.",
            "type": [
              "number",
              "null"
            ]
          },
          "name": {
            "description": "Its name, as broadcast or as recorded in the last year.",
            "type": [
              "string",
              "null"
            ]
          },
          "call_sign": {
            "description": "Its radio call sign, when it has been heard lately.",
            "type": [
              "string",
              "null"
            ]
          },
          "flag": {
            "description": "Its flag, ISO 3166-1 alpha-2: from the MMSI it broadcasts under, or as recorded in the last year.",
            "type": [
              "string",
              "null"
            ]
          },
          "former_names": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The name.",
                      "example": "MAERSK ESSEN"
                    },
                    "from": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "When it took it, as recorded, YYYY-MM-DD."
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When it took it, YYYY-MM-DD, as recorded; null for the earliest on record, which it had before then."
                    },
                    "to": {
                      "type": "string",
                      "description": "When it took the one after, as recorded, YYYY-MM-DD."
                    }
                  },
                  "required": [
                    "name",
                    "from",
                    "to"
                  ],
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "The names its port state control inspections recorded before the latest, newest first: empty when they record one name, null when it has none on record. Since 2018."
          },
          "former_flags": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "flag": {
                      "type": "string",
                      "description": "The flag, ISO 3166-1 alpha-2.",
                      "example": "DK"
                    },
                    "from": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "When it took it, as recorded, YYYY-MM-DD."
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When it took it, YYYY-MM-DD, as recorded; null for the earliest on record, which it had before then."
                    },
                    "to": {
                      "type": "string",
                      "description": "When it took the one after, as recorded, YYYY-MM-DD."
                    }
                  },
                  "required": [
                    "flag",
                    "from",
                    "to"
                  ],
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "The flags its port state control inspections recorded before the latest, newest first: empty when they record one flag, null when it has none on record. Since 2018."
          },
          "class_societies": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "The societies that class it, as recorded in the last year."
          },
          "former_classes": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "class_societies": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The societies it was in class with, more than one for a ship classed by two.",
                      "example": [
                        "DNV"
                      ]
                    },
                    "from": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "When it took them, as recorded, YYYY-MM-DD."
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When it took them, YYYY-MM-DD, as recorded; null for the earliest on record, which it had before then."
                    },
                    "to": {
                      "type": "string",
                      "description": "When it took the ones after, as recorded, YYYY-MM-DD."
                    }
                  },
                  "required": [
                    "class_societies",
                    "from",
                    "to"
                  ],
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "The class societies its port state control inspections recorded it in class with before the latest, newest first: empty when they record one, null when it has none on record. Since 2018."
          },
          "classification": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "society": {
                      "type": "string",
                      "description": "The classification society.",
                      "example": "DNV"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "in_class",
                        "suspended",
                        "withdrawn"
                      ],
                      "description": "`in_class`; `suspended`, still classed with the society but not in class until it is reinstated; or `withdrawn`, no longer classed with it."
                    },
                    "status_date": {
                      "description": "When it took this status with the society, YYYY-MM-DD.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status_reason": {
                      "description": "Why it was suspended or withdrawn, as the society gives it, e.g. `Survey overdue`.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "last_survey": {
                      "description": "When its last class renewal survey was held, YYYY-MM-DD.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "next_survey": {
                      "description": "When its next class renewal survey is due, YYYY-MM-DD, as the society last reported it; a date already past can mean the survey was postponed.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "notation": {
                      "description": "Its class notation, as the society's register gives it, e.g. `+1A Tanker for oil ESP CSR`; null where not on record.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "register_url": {
                      "description": "Where to look the ship up in the society's own register, which also holds its class notations: the ship itself where the register allows, otherwise its search.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "society",
                    "status",
                    "status_date",
                    "status_reason",
                    "last_survey",
                    "next_survey",
                    "notation",
                    "register_url"
                  ],
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Its class with each society it is classed or suspended with, in class first; for a ship classed with none, the society that last withdrew its class. Null when not on record."
          },
          "certificates": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "cargo_ship_safety",
                        "cargo_ship_safety_construction",
                        "cargo_ship_safety_equipment",
                        "cargo_ship_safety_radio",
                        "passenger_ship_safety",
                        "special_purpose_ship_safety",
                        "high_speed_craft_safety",
                        "mobile_offshore_drilling_unit_safety",
                        "polar_ship",
                        "industrial_personnel_safety",
                        "load_line",
                        "tonnage",
                        "minimum_safe_manning",
                        "document_of_compliance",
                        "safety_management",
                        "ship_security",
                        "continuous_synopsis_record",
                        "maritime_labour",
                        "document_of_compliance_dangerous_goods",
                        "fitness_bch",
                        "fitness_ibc",
                        "fitness_gc",
                        "fitness_igc",
                        "fitness_inf",
                        "oil_pollution_prevention",
                        "noxious_liquid_substances_pollution_prevention",
                        "sewage_pollution_prevention",
                        "air_pollution_prevention",
                        "engine_air_pollution_prevention",
                        "energy_efficiency",
                        "anti_fouling_system",
                        "ballast_water_management",
                        "inventory_of_hazardous_materials",
                        "ready_for_recycling",
                        "oil_pollution_liability",
                        "bunker_oil_pollution_liability",
                        "passenger_liability",
                        "wreck_removal_liability"
                      ],
                      "description": "Which certificate it is, by the convention or code it is issued under. `fitness_*` are certificates of fitness for the code named: `bch` and `ibc` for chemicals in bulk, `gc` and `igc` for liquefied gases, `inf` for nuclear fuel cargo. More may be added.",
                      "example": "safety_management"
                    },
                    "issuer": {
                      "description": "Who issued it: the flag State, ISO 3166-1 alpha-2, or the recognized organization acting for it, such as a classification society; null where not on record.",
                      "example": "DNV",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "issuer_kind": {
                      "type": "string",
                      "enum": [
                        "flag_state",
                        "recognized_organization"
                      ],
                      "description": "`flag_state` for a certificate the flag State issued itself, `recognized_organization` for one issued on its behalf."
                    },
                    "issued": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "When it was issued, YYYY-MM-DD."
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When it was issued, YYYY-MM-DD; null where not on record."
                    },
                    "expires": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "When it expires, YYYY-MM-DD."
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When it expires, YYYY-MM-DD; null where not on record or for a certificate that does not expire."
                    },
                    "as_of": {
                      "type": "string",
                      "description": "When an inspection last saw it, YYYY-MM-DD."
                    }
                  },
                  "required": [
                    "type",
                    "issuer",
                    "issuer_kind",
                    "issued",
                    "expires",
                    "as_of"
                  ],
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Its statutory certificates and who issued each, as seen at its latest port state control inspection in the last year; null when none is on record."
          },
          "ice_class": {
            "description": "Its ice class, e.g. `IA Super`, `IC` or `PC7`, when it has one on record.",
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "cargo_ship",
                  "general_cargo",
                  "heavy_lift",
                  "bulk_carrier",
                  "ore_carrier",
                  "cement_carrier",
                  "woodchip_carrier",
                  "combination_carrier",
                  "container_ship",
                  "ro_ro_cargo",
                  "vehicle_carrier",
                  "container_ro_ro",
                  "refrigerated_cargo",
                  "livestock_carrier",
                  "barge",
                  "tanker",
                  "oil_tanker",
                  "shuttle_tanker",
                  "chemical_tanker",
                  "oil_chemical_tanker",
                  "gas_carrier",
                  "lng_carrier",
                  "lpg_carrier",
                  "bitumen_tanker",
                  "bunkering_tanker",
                  "passenger_ship",
                  "cruise_ship",
                  "ferry",
                  "ro_ro_passenger",
                  "high_speed_craft",
                  "fishing_vessel",
                  "fish_factory",
                  "fish_carrier",
                  "offshore_vessel",
                  "offshore_supply",
                  "anchor_handling",
                  "crew_transfer",
                  "offshore_unit",
                  "drillship",
                  "jack_up_rig",
                  "semi_submersible_rig",
                  "floating_production",
                  "offshore_platform",
                  "crane_vessel",
                  "pipe_layer",
                  "cable_layer",
                  "tug",
                  "pilot_vessel",
                  "dredger",
                  "icebreaker",
                  "research_vessel",
                  "search_and_rescue",
                  "patrol_vessel",
                  "pollution_control",
                  "buoy_tender",
                  "salvage_vessel",
                  "training_ship",
                  "utility_vessel",
                  "naval_vessel",
                  "yacht",
                  "sailing_ship",
                  "special_purpose"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The type of ship, from a fixed list, e.g. `bulk_carrier`, `lng_carrier` or `drillship`; null when its recorded type names none on the list, or it has none. More may be added.",
            "example": "container_ship"
          },
          "type_raw": {
            "description": "Its type as recorded, e.g. `Bulk carrier` or `Ultra large container ship`.",
            "type": [
              "string",
              "null"
            ]
          },
          "gross_tonnage": {
            "description": "Its gross tonnage.",
            "type": [
              "number",
              "null"
            ]
          },
          "deadweight": {
            "description": "Its deadweight, in tonnes.",
            "type": [
              "number",
              "null"
            ]
          },
          "length_m": {
            "description": "Its length overall, in metres.",
            "type": [
              "number",
              "null"
            ]
          },
          "beam_m": {
            "description": "Its beam, in metres.",
            "type": [
              "number",
              "null"
            ]
          },
          "year_built": {
            "description": "The year it was built.",
            "type": [
              "number",
              "null"
            ]
          },
          "builder": {
            "description": "The yard that built it.",
            "type": [
              "string",
              "null"
            ]
          },
          "recycled": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "year": {
                    "type": "integer",
                    "description": "The year it was broken up.",
                    "example": 2021
                  },
                  "country": {
                    "description": "The country it was broken up in, ISO 3166-1 alpha-2; null where not known.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "year",
                  "country"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "When and where it was broken up for recycling; null for a ship not on record as broken up, or seen at work since."
          }
        },
        "required": [
          "imo",
          "mmsi",
          "name",
          "call_sign",
          "flag",
          "former_names",
          "former_flags",
          "class_societies",
          "former_classes",
          "classification",
          "certificates",
          "ice_class",
          "type",
          "type_raw",
          "gross_tonnage",
          "deadweight",
          "length_m",
          "beam_m",
          "year_built",
          "builder",
          "recycled"
        ],
        "additionalProperties": false,
        "description": "A ship's particulars: who it is now, and what kind of ship it is."
      },
      "VesselManagement": {
        "type": "object",
        "properties": {
          "imo": {
            "type": "number",
            "description": "The ship's IMO number."
          },
          "companies": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The company's name, as recorded."
                },
                "roles": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "registered_owner",
                      "operator",
                      "doc_company",
                      "technical_manager",
                      "p_and_i_club"
                    ]
                  },
                  "description": "What it does for the ship: `registered_owner`, the owner in its register; `operator`, the company running it or answering for it to port authorities; `doc_company`, the company holding the Document of Compliance under the ISM Code, which answers for its safe management, also called the ISM manager; `technical_manager`, the company maintaining and crewing it; `p_and_i_club`, its protection and indemnity insurer."
                },
                "identifiers": {
                  "type": "object",
                  "properties": {
                    "imo": {
                      "description": "The company's IMO number, as recorded with its leading zeros.",
                      "type": "string"
                    },
                    "lei": {
                      "description": "Its Legal Entity Identifier (ISO 17442), given only when one registered entity has its name: a company without one may still share its name with one that has.",
                      "type": "string"
                    },
                    "registration": {
                      "type": "object",
                      "properties": {
                        "number": {
                          "type": "string",
                          "description": "Its number in the register it is incorporated in."
                        },
                        "jurisdiction": {
                          "type": "string",
                          "description": "Where it is incorporated, ISO 3166-1 alpha-2 or ISO 3166-2, e.g. `HK` or `US-DE`."
                        }
                      },
                      "required": [
                        "number",
                        "jurisdiction"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false,
                  "description": "The identifiers known for it; each is left out when not known."
                },
                "country": {
                  "description": "The country it is based in, ISO 3166-1 alpha-2, as port state control records it; left out when not known.",
                  "type": "string"
                },
                "address": {
                  "description": "Its address on one line, with its town, as port state control records it; left out when not known.",
                  "example": "12 Harbour Road, 18535, Piraeus",
                  "type": "string"
                },
                "website": {
                  "description": "Its official website, known only for a company with an LEI and left out otherwise. A company without one may still be part of a group that has one, under `parents`.",
                  "type": "string"
                },
                "email": {
                  "description": "An email address for the company, such as its general mailbox, as its register gives it; known only for some companies with an LEI and left out otherwise.",
                  "type": "string"
                },
                "parents": {
                  "description": "The companies it belongs to, as its LEI registration reports them, where they have LEIs of their own. Left out when none is known: a company may still have a parent without an LEI, or be owned by people.",
                  "type": "object",
                  "properties": {
                    "direct": {
                      "description": "The entity consolidating it in its accounts directly.",
                      "type": "object",
                      "properties": {
                        "lei": {
                          "type": "string",
                          "description": "Its Legal Entity Identifier (ISO 17442)."
                        },
                        "name": {
                          "type": "string",
                          "description": "Its legal name; for one not written in Latin script, its legal name in English or its preferred transliteration, where it has one."
                        },
                        "website": {
                          "description": "Its official website, left out when not known.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "lei",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "ultimate": {
                      "description": "The entity at the top of its group, consolidating it in its accounts; the same as `direct` when nothing is above that.",
                      "type": "object",
                      "properties": {
                        "lei": {
                          "type": "string",
                          "description": "Its Legal Entity Identifier (ISO 17442)."
                        },
                        "name": {
                          "type": "string",
                          "description": "Its legal name; for one not written in Latin script, its legal name in English or its preferred transliteration, where it has one."
                        },
                        "website": {
                          "description": "Its official website, left out when not known.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "lei",
                        "name"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                },
                "as_of": {
                  "type": "string",
                  "description": "When the newest of its roles was recorded, YYYY-MM-DD."
                }
              },
              "required": [
                "name",
                "roles",
                "identifiers",
                "as_of"
              ],
              "additionalProperties": false
            },
            "description": "The companies recorded for the ship in the last year, newest first."
          },
          "charterers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The charterer's name, as recorded."
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "time",
                    "voyage",
                    "bareboat"
                  ],
                  "description": "How it charters the ship: `time`, for a period, with the owner crewing and running it; `voyage`, for a voyage or a few; `bareboat`, taking the ship over and crewing it itself (a demise charter)."
                },
                "country": {
                  "description": "The country it is based in, ISO 3166-1 alpha-2; left out when not known.",
                  "type": "string"
                },
                "address": {
                  "description": "Its address on one line, with its town; left out when not known.",
                  "example": "8 Quay Street, 10431, Hamburg",
                  "type": "string"
                },
                "as_of": {
                  "type": "string",
                  "description": "The day of the inspection that recorded it, YYYY-MM-DD."
                }
              },
              "required": [
                "name",
                "type",
                "as_of"
              ],
              "additionalProperties": false
            },
            "description": "The companies chartering the ship at its latest port state inspection, when that was in the last year; empty when it recorded none. A voyage charter may be over well before a year is out."
          }
        },
        "required": [
          "imo",
          "companies",
          "charterers"
        ],
        "additionalProperties": false,
        "description": "The companies behind a ship, each with its roles and identifiers."
      },
      "VesselEmissions": {
        "type": "object",
        "properties": {
          "imo": {
            "type": "number",
            "description": "The IMO number the reports are filed under."
          },
          "reports": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "year": {
                  "type": "integer",
                  "description": "The year the report is for.",
                  "example": 2024
                },
                "period": {
                  "type": "object",
                  "properties": {
                    "from": {
                      "type": "string",
                      "description": "The first day it covers, YYYY-MM-DD.",
                      "example": "2024-01-01"
                    },
                    "to": {
                      "type": "string",
                      "description": "The last day it covers, YYYY-MM-DD.",
                      "example": "2024-12-31"
                    }
                  },
                  "required": [
                    "from",
                    "to"
                  ],
                  "additionalProperties": false,
                  "description": "The days it covers: the whole year, or part of it for a partial report."
                },
                "partial": {
                  "type": "boolean",
                  "description": "Whether it covers only part of the year, as when the ship changed hands or left EU trade."
                },
                "name": {
                  "type": "string",
                  "description": "The ship's name in the report.",
                  "example": "EVER GIVEN"
                },
                "ship_type": {
                  "type": "string",
                  "description": "Its type as reported.",
                  "example": "Container ship"
                },
                "technical_efficiency": {
                  "description": "Its design energy efficiency.",
                  "type": "object",
                  "properties": {
                    "index": {
                      "type": "string",
                      "description": "Which index: `EEDI`, `EEXI` or `EIV`.",
                      "example": "EEDI"
                    },
                    "value": {
                      "type": "number",
                      "description": "Its value, in grams of CO₂ per tonne-mile.",
                      "example": 4.12
                    }
                  },
                  "required": [
                    "index",
                    "value"
                  ],
                  "additionalProperties": false
                },
                "port_of_registry": {
                  "description": "Its port of registry.",
                  "type": "string"
                },
                "home_port": {
                  "description": "Its home port.",
                  "type": "string"
                },
                "ice_class": {
                  "description": "Its ice class.",
                  "type": "string"
                },
                "company": {
                  "description": "The company responsible for the ship over the period (reported from 2024).",
                  "type": "object",
                  "properties": {
                    "imo": {
                      "description": "The company's IMO number.",
                      "type": "string"
                    },
                    "name": {
                      "type": "string",
                      "description": "The company's name."
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "additionalProperties": false
                },
                "fuel": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "description": "All fuel burned, in tonnes.",
                      "type": "number"
                    },
                    "on_laden": {
                      "description": "Burned on voyages with cargo aboard, in tonnes.",
                      "type": "number"
                    },
                    "cargo_heating": {
                      "description": "Burned to heat cargo (reported from 2024), in tonnes.",
                      "type": "number"
                    },
                    "dynamic_positioning": {
                      "description": "Burned holding position (reported from 2024), in tonnes.",
                      "type": "number"
                    }
                  },
                  "additionalProperties": false,
                  "description": "The fuel it burned, in tonnes."
                },
                "co2": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "description": "All of it, in tonnes.",
                      "type": "number"
                    },
                    "between_ports": {
                      "description": "On voyages between two EU or EEA ports, in tonnes.",
                      "type": "number"
                    },
                    "departing": {
                      "description": "On voyages from an EU or EEA port to a port elsewhere, in tonnes.",
                      "type": "number"
                    },
                    "arriving": {
                      "description": "On voyages to an EU or EEA port from a port elsewhere, in tonnes.",
                      "type": "number"
                    },
                    "at_berth": {
                      "description": "At berth in EU or EEA ports, in tonnes.",
                      "type": "number"
                    },
                    "in_port": {
                      "description": "Within EU or EEA ports, at berth or moving (reported from 2024), in tonnes.",
                      "type": "number"
                    },
                    "on_laden": {
                      "description": "On voyages with cargo aboard, in tonnes.",
                      "type": "number"
                    },
                    "passenger_transport": {
                      "description": "Assigned to carrying passengers, for a ship that carries both, in tonnes.",
                      "type": "number"
                    },
                    "freight_transport": {
                      "description": "Assigned to carrying freight, for a ship that carries both, in tonnes.",
                      "type": "number"
                    },
                    "emissions_trading": {
                      "description": "The part counted for the EU's emissions trading system (reported from 2024), in tonnes.",
                      "type": "number"
                    }
                  },
                  "additionalProperties": false,
                  "description": "Carbon dioxide."
                },
                "ch4": {
                  "description": "Methane (reported from 2024).",
                  "type": "object",
                  "properties": {
                    "total": {
                      "description": "All of it, in tonnes.",
                      "type": "number"
                    },
                    "between_ports": {
                      "description": "On voyages between two EU or EEA ports, in tonnes.",
                      "type": "number"
                    },
                    "departing": {
                      "description": "On voyages from an EU or EEA port to a port elsewhere, in tonnes.",
                      "type": "number"
                    },
                    "arriving": {
                      "description": "On voyages to an EU or EEA port from a port elsewhere, in tonnes.",
                      "type": "number"
                    },
                    "at_berth": {
                      "description": "At berth in EU or EEA ports, in tonnes.",
                      "type": "number"
                    },
                    "in_port": {
                      "description": "Within EU or EEA ports, at berth or moving (reported from 2024), in tonnes.",
                      "type": "number"
                    },
                    "on_laden": {
                      "description": "On voyages with cargo aboard, in tonnes.",
                      "type": "number"
                    },
                    "passenger_transport": {
                      "description": "Assigned to carrying passengers, for a ship that carries both, in tonnes.",
                      "type": "number"
                    },
                    "freight_transport": {
                      "description": "Assigned to carrying freight, for a ship that carries both, in tonnes.",
                      "type": "number"
                    },
                    "emissions_trading": {
                      "description": "The part counted for the EU's emissions trading system (reported from 2024), in tonnes.",
                      "type": "number"
                    }
                  },
                  "additionalProperties": false
                },
                "n2o": {
                  "description": "Nitrous oxide (reported from 2024).",
                  "type": "object",
                  "properties": {
                    "total": {
                      "description": "All of it, in tonnes.",
                      "type": "number"
                    },
                    "between_ports": {
                      "description": "On voyages between two EU or EEA ports, in tonnes.",
                      "type": "number"
                    },
                    "departing": {
                      "description": "On voyages from an EU or EEA port to a port elsewhere, in tonnes.",
                      "type": "number"
                    },
                    "arriving": {
                      "description": "On voyages to an EU or EEA port from a port elsewhere, in tonnes.",
                      "type": "number"
                    },
                    "at_berth": {
                      "description": "At berth in EU or EEA ports, in tonnes.",
                      "type": "number"
                    },
                    "in_port": {
                      "description": "Within EU or EEA ports, at berth or moving (reported from 2024), in tonnes.",
                      "type": "number"
                    },
                    "on_laden": {
                      "description": "On voyages with cargo aboard, in tonnes.",
                      "type": "number"
                    },
                    "passenger_transport": {
                      "description": "Assigned to carrying passengers, for a ship that carries both, in tonnes.",
                      "type": "number"
                    },
                    "freight_transport": {
                      "description": "Assigned to carrying freight, for a ship that carries both, in tonnes.",
                      "type": "number"
                    },
                    "emissions_trading": {
                      "description": "The part counted for the EU's emissions trading system (reported from 2024), in tonnes.",
                      "type": "number"
                    }
                  },
                  "additionalProperties": false
                },
                "co2eq": {
                  "description": "All three as CO₂-equivalent, weighted by how much each warms (reported from 2024).",
                  "type": "object",
                  "properties": {
                    "total": {
                      "description": "All of it, in tonnes.",
                      "type": "number"
                    },
                    "between_ports": {
                      "description": "On voyages between two EU or EEA ports, in tonnes.",
                      "type": "number"
                    },
                    "departing": {
                      "description": "On voyages from an EU or EEA port to a port elsewhere, in tonnes.",
                      "type": "number"
                    },
                    "arriving": {
                      "description": "On voyages to an EU or EEA port from a port elsewhere, in tonnes.",
                      "type": "number"
                    },
                    "at_berth": {
                      "description": "At berth in EU or EEA ports, in tonnes.",
                      "type": "number"
                    },
                    "in_port": {
                      "description": "Within EU or EEA ports, at berth or moving (reported from 2024), in tonnes.",
                      "type": "number"
                    },
                    "on_laden": {
                      "description": "On voyages with cargo aboard, in tonnes.",
                      "type": "number"
                    },
                    "passenger_transport": {
                      "description": "Assigned to carrying passengers, for a ship that carries both, in tonnes.",
                      "type": "number"
                    },
                    "freight_transport": {
                      "description": "Assigned to carrying freight, for a ship that carries both, in tonnes.",
                      "type": "number"
                    },
                    "emissions_trading": {
                      "description": "The part counted for the EU's emissions trading system (reported from 2024), in tonnes.",
                      "type": "number"
                    }
                  },
                  "additionalProperties": false
                },
                "hours_at_sea": {
                  "description": "Hours it spent at sea.",
                  "type": "number"
                },
                "hours_at_sea_in_ice": {
                  "description": "Hours of those it spent sailing through ice.",
                  "type": "number"
                },
                "miles_in_ice": {
                  "description": "Nautical miles it sailed through ice.",
                  "type": "number"
                },
                "fuel_efficiency": {
                  "type": "object",
                  "properties": {
                    "per_distance": {
                      "description": "Per nautical mile, in kilograms.",
                      "type": "number"
                    },
                    "per_tonne_mile": {
                      "description": "Per tonne of cargo carried a nautical mile, in grams.",
                      "type": "number"
                    },
                    "per_cubic_metre_mile": {
                      "description": "Per cubic metre of cargo carried a nautical mile, in grams.",
                      "type": "number"
                    },
                    "per_dwt_mile": {
                      "description": "Per tonne of deadweight carried a nautical mile, in grams.",
                      "type": "number"
                    },
                    "per_passenger_mile": {
                      "description": "Per passenger carried a nautical mile, in grams.",
                      "type": "number"
                    },
                    "per_freight_tonne_mile": {
                      "description": "Per tonne of freight carried a nautical mile, in grams.",
                      "type": "number"
                    },
                    "per_hour_at_sea": {
                      "description": "Per hour at sea, in tonnes (reported from 2024).",
                      "type": "number"
                    },
                    "laden": {
                      "description": "The same measures over voyages with cargo aboard only.",
                      "type": "object",
                      "properties": {
                        "per_distance": {
                          "description": "Per nautical mile, in kilograms.",
                          "type": "number"
                        },
                        "per_tonne_mile": {
                          "description": "Per tonne of cargo carried a nautical mile, in grams.",
                          "type": "number"
                        },
                        "per_cubic_metre_mile": {
                          "description": "Per cubic metre of cargo carried a nautical mile, in grams.",
                          "type": "number"
                        },
                        "per_dwt_mile": {
                          "description": "Per tonne of deadweight carried a nautical mile, in grams.",
                          "type": "number"
                        },
                        "per_passenger_mile": {
                          "description": "Per passenger carried a nautical mile, in grams.",
                          "type": "number"
                        },
                        "per_freight_tonne_mile": {
                          "description": "Per tonne of freight carried a nautical mile, in grams.",
                          "type": "number"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false,
                  "description": "Fuel burned for the work it did."
                },
                "co2_efficiency": {
                  "type": "object",
                  "properties": {
                    "per_distance": {
                      "description": "Per nautical mile, in kilograms.",
                      "type": "number"
                    },
                    "per_tonne_mile": {
                      "description": "Per tonne of cargo carried a nautical mile, in grams.",
                      "type": "number"
                    },
                    "per_cubic_metre_mile": {
                      "description": "Per cubic metre of cargo carried a nautical mile, in grams.",
                      "type": "number"
                    },
                    "per_dwt_mile": {
                      "description": "Per tonne of deadweight carried a nautical mile, in grams.",
                      "type": "number"
                    },
                    "per_passenger_mile": {
                      "description": "Per passenger carried a nautical mile, in grams.",
                      "type": "number"
                    },
                    "per_freight_tonne_mile": {
                      "description": "Per tonne of freight carried a nautical mile, in grams.",
                      "type": "number"
                    },
                    "per_hour_at_sea": {
                      "description": "Per hour at sea, in tonnes (reported from 2024).",
                      "type": "number"
                    },
                    "laden": {
                      "description": "The same measures over voyages with cargo aboard only.",
                      "type": "object",
                      "properties": {
                        "per_distance": {
                          "description": "Per nautical mile, in kilograms.",
                          "type": "number"
                        },
                        "per_tonne_mile": {
                          "description": "Per tonne of cargo carried a nautical mile, in grams.",
                          "type": "number"
                        },
                        "per_cubic_metre_mile": {
                          "description": "Per cubic metre of cargo carried a nautical mile, in grams.",
                          "type": "number"
                        },
                        "per_dwt_mile": {
                          "description": "Per tonne of deadweight carried a nautical mile, in grams.",
                          "type": "number"
                        },
                        "per_passenger_mile": {
                          "description": "Per passenger carried a nautical mile, in grams.",
                          "type": "number"
                        },
                        "per_freight_tonne_mile": {
                          "description": "Per tonne of freight carried a nautical mile, in grams.",
                          "type": "number"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false,
                  "description": "CO₂ emitted for the work it did."
                },
                "co2eq_efficiency": {
                  "description": "CO₂-equivalent emitted for the work it did (reported from 2024).",
                  "type": "object",
                  "properties": {
                    "per_distance": {
                      "description": "Per nautical mile, in kilograms.",
                      "type": "number"
                    },
                    "per_tonne_mile": {
                      "description": "Per tonne of cargo carried a nautical mile, in grams.",
                      "type": "number"
                    },
                    "per_cubic_metre_mile": {
                      "description": "Per cubic metre of cargo carried a nautical mile, in grams.",
                      "type": "number"
                    },
                    "per_dwt_mile": {
                      "description": "Per tonne of deadweight carried a nautical mile, in grams.",
                      "type": "number"
                    },
                    "per_passenger_mile": {
                      "description": "Per passenger carried a nautical mile, in grams.",
                      "type": "number"
                    },
                    "per_freight_tonne_mile": {
                      "description": "Per tonne of freight carried a nautical mile, in grams.",
                      "type": "number"
                    },
                    "per_hour_at_sea": {
                      "description": "Per hour at sea, in tonnes (reported from 2024).",
                      "type": "number"
                    },
                    "laden": {
                      "description": "The same measures over voyages with cargo aboard only.",
                      "type": "object",
                      "properties": {
                        "per_distance": {
                          "description": "Per nautical mile, in kilograms.",
                          "type": "number"
                        },
                        "per_tonne_mile": {
                          "description": "Per tonne of cargo carried a nautical mile, in grams.",
                          "type": "number"
                        },
                        "per_cubic_metre_mile": {
                          "description": "Per cubic metre of cargo carried a nautical mile, in grams.",
                          "type": "number"
                        },
                        "per_dwt_mile": {
                          "description": "Per tonne of deadweight carried a nautical mile, in grams.",
                          "type": "number"
                        },
                        "per_passenger_mile": {
                          "description": "Per passenger carried a nautical mile, in grams.",
                          "type": "number"
                        },
                        "per_freight_tonne_mile": {
                          "description": "Per tonne of freight carried a nautical mile, in grams.",
                          "type": "number"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              },
              "required": [
                "year",
                "period",
                "partial",
                "name",
                "ship_type",
                "fuel",
                "co2",
                "fuel_efficiency",
                "co2_efficiency"
              ],
              "additionalProperties": false
            },
            "description": "Its reports, newest first. Empty for a ship that has not reported."
          }
        },
        "required": [
          "imo",
          "reports"
        ],
        "additionalProperties": false,
        "description": "A ship's yearly reports of the fuel it burned and the greenhouse gases it emitted."
      },
      "VesselInspections": {
        "type": "object",
        "properties": {
          "imo": {
            "type": "number",
            "description": "The IMO number the inspections are recorded under."
          },
          "inspections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The inspection, by an identifier that does not change.",
                  "example": "insp_3f1c9a7be2d04c6f8a51d2e07b9c4e18"
                },
                "imo": {
                  "type": "number",
                  "description": "The ship's IMO number."
                },
                "date": {
                  "type": "string",
                  "description": "When it took place, YYYY-MM-DD."
                },
                "country": {
                  "type": "string",
                  "description": "The country whose authorities inspected the ship, ISO 3166-1 alpha-2."
                },
                "port": {
                  "description": "The port it took place in, by UN/LOCODE, where known.",
                  "type": "string"
                },
                "office": {
                  "description": "The office of the authorities that carried it out.",
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "port_state",
                    "flag_state"
                  ],
                  "description": "`port_state` for a ship under another flag, inspected as it called, and `flag_state` for one under the country's own flag."
                },
                "types": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The examinations carried out, as the authorities name them. Empty for a detention known only from the list of detained ships a port State publishes.",
                  "example": [
                    "PSC B",
                    "Deficiency Check"
                  ]
                },
                "ship": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "flag": {
                      "description": "Its flag, ISO 3166-1 alpha-2.",
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "class_societies": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The societies that classed it, if any are on record."
                    }
                  },
                  "required": [
                    "name",
                    "class_societies"
                  ],
                  "additionalProperties": false,
                  "description": "The ship as it was at the inspection."
                },
                "detained": {
                  "type": "boolean",
                  "description": "Whether the inspection led to the ship being detained."
                },
                "controls": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "The measure.",
                        "example": "IMO Related Detention"
                      },
                      "category": {
                        "description": "What it protects.",
                        "example": "Safety",
                        "type": "string"
                      },
                      "reason": {
                        "description": "Why it was imposed.",
                        "type": "string"
                      },
                      "detention": {
                        "type": "boolean",
                        "description": "Whether the ship was held in port."
                      },
                      "imposed": {
                        "type": "string",
                        "description": "When it was imposed, YYYY-MM-DD."
                      },
                      "lifted": {
                        "type": "string",
                        "description": "When it was lifted, left out while it stands or when no lifting is on record, YYYY-MM-DD."
                      }
                    },
                    "required": [
                      "type",
                      "detention",
                      "imposed"
                    ],
                    "additionalProperties": false
                  },
                  "description": "The measures it led to, if any."
                },
                "deficiencies": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "description": "Its code in the deficiency list port States share.",
                        "example": "01104"
                      },
                      "area": {
                        "type": "string",
                        "description": "What it concerns.",
                        "example": "Certificates & Documentation"
                      },
                      "item": {
                        "type": "string",
                        "description": "The certificate, equipment or practice at fault.",
                        "example": "Medical certificate"
                      },
                      "description": {
                        "description": "What the inspector found, in their words.",
                        "type": "string"
                      },
                      "action": {
                        "description": "What was asked of the ship.",
                        "example": "Rectify deficiencies within 14 days",
                        "type": "string"
                      },
                      "resolution": {
                        "description": "How it was put right, in the inspector's words.",
                        "type": "string"
                      },
                      "issued": {
                        "type": "string",
                        "description": "When it was found, YYYY-MM-DD."
                      },
                      "due": {
                        "type": "string",
                        "description": "When it was to be put right by, YYYY-MM-DD."
                      },
                      "resolved": {
                        "type": "string",
                        "description": "When it was put right, YYYY-MM-DD."
                      }
                    },
                    "required": [
                      "code",
                      "area",
                      "item",
                      "issued"
                    ],
                    "additionalProperties": false
                  },
                  "description": "What was found wanting, if anything."
                }
              },
              "required": [
                "id",
                "imo",
                "date",
                "country",
                "kind",
                "types",
                "ship",
                "detained",
                "controls",
                "deficiencies"
              ],
              "additionalProperties": false
            },
            "description": "Its inspections, newest first. Empty for a ship with none on record."
          }
        },
        "required": [
          "imo",
          "inspections"
        ],
        "additionalProperties": false,
        "description": "A ship's inspections by port and flag States, and what they found."
      },
      "VesselSanctions": {
        "type": "object",
        "properties": {
          "imo": {
            "type": "number",
            "description": "The IMO number the sanctions are recorded under."
          },
          "sanctions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VesselSanction"
            },
            "description": "Its sanctions in force, newest first. Empty for a ship on none of the lists."
          }
        },
        "required": [
          "imo",
          "sanctions"
        ],
        "additionalProperties": false,
        "description": "The sanctions and port bans in force on a ship."
      },
      "Watch": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "port": {
            "description": "The port watched, by UN/LOCODE: for one that is part of a larger port, that port.",
            "type": [
              "string",
              "null"
            ]
          },
          "vessel": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^imo:\\d{7}$"
              },
              {
                "type": "string",
                "pattern": "^mmsi:\\d{9}$"
              },
              {
                "type": "null"
              }
            ],
            "description": "The ship watched, by the identifier it was added by: `imo:` or `mmsi:`."
          },
          "name": {
            "description": "The port's name, or the ship's as it broadcasts it.",
            "type": [
              "string",
              "null"
            ]
          },
          "topics": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "ais",
                "inspections",
                "sanctions"
              ]
            },
            "description": "What of it the webhook endpoints hear about."
          },
          "created_at": {
            "type": "string",
            "description": "ISO 8601."
          }
        },
        "required": [
          "id",
          "port",
          "vessel",
          "name",
          "topics",
          "created_at"
        ],
        "additionalProperties": false,
        "description": "A port or ship the organization watches: `port` or `vessel` is set, never both."
      },
      "WebhookEndpoint": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "description": "Where events are sent: https, or http to localhost for trying a receiver."
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "port.arrival.expected",
                "port.call.arrived",
                "port.call.departed",
                "vessel.arrival.expected",
                "vessel.call.arrived",
                "vessel.call.departed",
                "vessel.inspection.recorded",
                "vessel.inspection.updated",
                "vessel.inspection.withdrawn",
                "vessel.sanction.listed",
                "vessel.sanction.delisted",
                "watch.created",
                "watch.updated",
                "watch.deleted"
              ]
            },
            "description": "The events it is sent."
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "failing",
              "off"
            ],
            "description": "`failing` from its first failure after a success, `off` once turned off, by you or after five days without a success."
          },
          "failing_since": {
            "description": "ISO 8601.",
            "type": [
              "string",
              "null"
            ]
          },
          "disabled_at": {
            "description": "When it was turned off, ISO 8601.",
            "type": [
              "string",
              "null"
            ]
          },
          "previous_secret_until": {
            "description": "After a roll, until when requests carry the previous secret's signature too, ISO 8601.",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "description": "ISO 8601."
          }
        },
        "required": [
          "id",
          "url",
          "description",
          "events",
          "state",
          "failing_since",
          "disabled_at",
          "previous_secret_until",
          "created_at"
        ],
        "additionalProperties": false,
        "description": "An endpoint events are sent to."
      },
      "WebhookSecret": {
        "type": "object",
        "properties": {
          "secret": {
            "type": "string",
            "description": "The signing secret, `whsec_` and base64."
          },
          "previous": {
            "description": "The previous secret, while it still signs after a roll.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "secret",
          "previous"
        ],
        "additionalProperties": false
      },
      "WebhookDelivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The `webhook-id` header sent with it."
          },
          "endpoint_id": {
            "type": "string"
          },
          "event_type": {
            "type": "string",
            "description": "An event type, or `webhook.test`."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "delivered",
              "failed"
            ],
            "description": "`pending` until it is delivered, or until its last retry fails."
          },
          "attempts": {
            "type": "integer"
          },
          "next_attempt_at": {
            "description": "When it is tried next, ISO 8601.",
            "type": [
              "string",
              "null"
            ]
          },
          "last_attempt_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The endpoint's last HTTP status, if it answered."
          },
          "last_error": {
            "description": "Why the last try got no answer, such as a timeout.",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "description": "ISO 8601."
          }
        },
        "required": [
          "id",
          "endpoint_id",
          "event_type",
          "status",
          "attempts",
          "next_attempt_at",
          "last_attempt_at",
          "last_status",
          "last_error",
          "created_at"
        ],
        "additionalProperties": false,
        "description": "An event on its way to an endpoint: one however many tries it takes."
      }
    }
  },
  "security": [
    {
      "apiKey": []
    }
  ],
  "servers": [
    {
      "url": "https://waykite.com"
    }
  ],
  "tags": [
    {
      "name": "Locations",
      "description": "Locations by UN/LOCODE: search, look up, find the nearest."
    },
    {
      "name": "Facilities",
      "description": "Terminals, anchorages and other places ships call at."
    },
    {
      "name": "Watchlist",
      "description": "The ports and ships an organization watches, which its webhook endpoints hear about. See [Webhooks](https://waykite.com/docs/guides/webhooks)."
    },
    {
      "name": "Webhooks",
      "description": "Endpoints events are sent to, and their deliveries. See [Webhooks](https://waykite.com/docs/guides/webhooks)."
    }
  ],
  "webhooks": {
    "port.arrival.expected": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "port.arrival.expected",
        "description": "A ship is first expected at a port you watch.",
        "security": [],
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "The delivery's id, the same on every retry: use it to drop repeats.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "msg_7707d6db627a4f6a9abf5a698b33f9f4"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "When this attempt was sent, in seconds since 1970.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "1793011725"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "`v1,` and the signature; two of them, space apart, while the secret is rolled.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "v1,YyiID3fAXRrLtAO4SsJPjLeJZXQ/r0VtLQBLYohf8W4="
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "port.arrival.expected"
                  },
                  "timestamp": {
                    "type": "string",
                    "description": "When it happened, ISO 8601."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "mmsi": {
                        "type": "number",
                        "description": "The ship's MMSI, the number it broadcasts under."
                      },
                      "imo": {
                        "description": "The ship's IMO number, when it sends a valid one.",
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "name": {
                        "description": "The ship's name, as it broadcasts it.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "ship_type": {
                        "description": "The ship type it broadcasts, e.g. 70 for cargo.",
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "ship_category": {
                        "type": "string",
                        "enum": [
                          "passenger",
                          "cargo",
                          "tanker",
                          "service",
                          "fishing",
                          "other"
                        ],
                        "description": "The kind of ship, from its type: `passenger` (60-69), `cargo` (70-79), `tanker` (80-89), `service` (50-59: pilots, rescue, tugs, port tenders and the like), `fishing` (30), or `other`, ships that never sent their type included."
                      },
                      "destination_raw": {
                        "description": "The destination as the crew typed it.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "probability": {
                        "type": "number",
                        "description": "How likely the ship calls here next, from 0 to 1: how well the destination the crew typed matches the port, and how often ships like it were right that far ahead; or, by `history`, how often it or ships like it went here from the port it left."
                      },
                      "basis": {
                        "type": "string",
                        "enum": [
                          "destination",
                          "history"
                        ],
                        "description": "What says the ship is bound here: `destination`, the destination the crew typed; `history`, where that names no port but the one it left, where it and ships like it went from there before."
                      },
                      "eta": {
                        "type": "string",
                        "description": "When we expect the ship, ISO 8601."
                      },
                      "eta_range": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "earliest": {
                                "type": "string"
                              },
                              "latest": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "earliest",
                              "latest"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The earliest and latest the ship is likely to arrive, ISO 8601: eight in ten arrive within it. `null` where `eta` is the crew’s own, which we cannot vouch for."
                      },
                      "reported_eta": {
                        "description": "The crew's ETA as broadcast, ISO 8601.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "predicted_at": {
                        "type": "string",
                        "description": "When the estimate was made, ISO 8601."
                      },
                      "waiting": {
                        "type": "boolean",
                        "description": "Stopped or at anchor near the port and heard lately: waiting its turn to come in, so its turn, not `eta`, says when it arrives."
                      },
                      "overdue": {
                        "type": "boolean",
                        "description": "Past its estimate and not heard from since: it may have reached port out of range. Such a ship stays listed for a while, until it is heard arriving."
                      },
                      "position": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "at": {
                                "type": "string"
                              },
                              "lat": {
                                "type": "number"
                              },
                              "lon": {
                                "type": "number"
                              },
                              "speed_kn": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "at",
                              "lat",
                              "lon",
                              "speed_kn"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "Where the ship was, and how fast it went in knots, when the estimate was made."
                      },
                      "port": {
                        "type": "string",
                        "description": "The port watched: for a terminal or harbour that is part of a larger port, that port."
                      }
                    },
                    "required": [
                      "mmsi",
                      "imo",
                      "name",
                      "ship_type",
                      "ship_category",
                      "destination_raw",
                      "probability",
                      "basis",
                      "eta",
                      "eta_range",
                      "reported_eta",
                      "predicted_at",
                      "waiting",
                      "overdue",
                      "position",
                      "port"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "timestamp",
                  "data"
                ],
                "additionalProperties": false
              },
              "example": {
                "type": "port.arrival.expected",
                "timestamp": "2026-10-26T11:08:43.505Z",
                "data": {
                  "port": "NLRTM",
                  "mmsi": 563254200,
                  "imo": 9987196,
                  "name": "CMA CGM SEINE",
                  "ship_type": 71,
                  "ship_category": "cargo",
                  "destination_raw": "NLRTM",
                  "probability": 0.95,
                  "basis": "destination",
                  "eta": "2026-10-26T17:23:45.042Z",
                  "eta_range": {
                    "earliest": "2026-10-26T15:23:45.042Z",
                    "latest": "2026-10-28T04:23:45.042Z"
                  },
                  "reported_eta": null,
                  "predicted_at": "2026-10-26T11:08:43.505Z",
                  "overdue": false,
                  "waiting": false,
                  "position": {
                    "at": "2026-10-26T11:08:43.505Z",
                    "lat": 51.89073166666667,
                    "lon": 3.417578333333333,
                    "speed_kn": 5.9
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 15 seconds; anything else is retried."
          }
        }
      }
    },
    "port.call.arrived": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "port.call.arrived",
        "description": "A ship arrives at a port you watch.",
        "security": [],
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "The delivery's id, the same on every retry: use it to drop repeats.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "msg_7707d6db627a4f6a9abf5a698b33f9f4"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "When this attempt was sent, in seconds since 1970.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "1793011725"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "`v1,` and the signature; two of them, space apart, while the secret is rolled.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "v1,YyiID3fAXRrLtAO4SsJPjLeJZXQ/r0VtLQBLYohf8W4="
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "port.call.arrived"
                  },
                  "timestamp": {
                    "type": "string",
                    "description": "When it happened, ISO 8601."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "mmsi": {
                        "type": "number",
                        "description": "The ship's MMSI, the number it broadcasts under."
                      },
                      "imo": {
                        "description": "The ship's IMO number, when it sends a valid one.",
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "name": {
                        "description": "The ship's name, as it broadcasts it.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "ship_type": {
                        "description": "The ship type it broadcasts, e.g. 70 for cargo.",
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "ship_category": {
                        "type": "string",
                        "enum": [
                          "passenger",
                          "cargo",
                          "tanker",
                          "service",
                          "fishing",
                          "other"
                        ],
                        "description": "The kind of ship, from its type: `passenger` (60-69), `cargo` (70-79), `tanker` (80-89), `service` (50-59: pilots, rescue, tugs, port tenders and the like), `fishing` (30), or `other`, ships that never sent their type included."
                      },
                      "destination_raw": {
                        "description": "The destination as the crew typed it.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "arrived_at": {
                        "type": "string",
                        "description": "When the ship entered the port, or was first seen in it, ISO 8601."
                      },
                      "departed_at": {
                        "description": "When it left, ISO 8601; `null` while it is still there.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "arrival_seen": {
                        "type": "boolean",
                        "description": "Whether the ship was seen coming in, not first seen already in port."
                      },
                      "gap": {
                        "type": "boolean",
                        "description": "Whether the ship went unheard for a while during the call."
                      },
                      "waited_from": {
                        "description": "When the ship stopped off the port to wait for it, before it came in, ISO 8601; `null` when it came straight in.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "stops": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "anchored",
                                "berthed"
                              ]
                            },
                            "area": {
                              "description": "The terminal or anchorage it stopped in, by its code.",
                              "type": "string"
                            },
                            "area_name": {
                              "description": "That terminal's or anchorage's name.",
                              "type": "string"
                            },
                            "start": {
                              "type": "string"
                            },
                            "end": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "start",
                            "end"
                          ],
                          "additionalProperties": false
                        },
                        "description": "Where the ship stopped in the port, at anchor or at a berth, in order."
                      },
                      "port": {
                        "type": "string",
                        "description": "The port watched: for a terminal or harbour that is part of a larger port, that port."
                      }
                    },
                    "required": [
                      "mmsi",
                      "imo",
                      "name",
                      "ship_type",
                      "ship_category",
                      "destination_raw",
                      "arrived_at",
                      "departed_at",
                      "arrival_seen",
                      "gap",
                      "waited_from",
                      "stops",
                      "port"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "timestamp",
                  "data"
                ],
                "additionalProperties": false
              },
              "example": {
                "type": "port.call.arrived",
                "timestamp": "2026-10-26T15:48:58.414Z",
                "data": {
                  "port": "NLRTM",
                  "mmsi": 636026002,
                  "imo": 1016721,
                  "name": "MSC MIGSAN",
                  "ship_type": 71,
                  "ship_category": "cargo",
                  "destination_raw": "NLRTM",
                  "arrived_at": "2026-10-26T15:48:58.414Z",
                  "departed_at": null,
                  "arrival_seen": false,
                  "gap": false,
                  "waited_from": null,
                  "stops": [
                    {
                      "kind": "berthed",
                      "area": "NLRTMDDN",
                      "area_name": "ECT Delta Dedicated North (DDN)",
                      "start": "2026-10-26T16:11:35.204Z",
                      "end": null
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 15 seconds; anything else is retried."
          }
        }
      }
    },
    "port.call.departed": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "port.call.departed",
        "description": "A ship leaves a port you watch.",
        "security": [],
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "The delivery's id, the same on every retry: use it to drop repeats.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "msg_7707d6db627a4f6a9abf5a698b33f9f4"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "When this attempt was sent, in seconds since 1970.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "1793011725"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "`v1,` and the signature; two of them, space apart, while the secret is rolled.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "v1,YyiID3fAXRrLtAO4SsJPjLeJZXQ/r0VtLQBLYohf8W4="
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "port.call.departed"
                  },
                  "timestamp": {
                    "type": "string",
                    "description": "When it happened, ISO 8601."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "mmsi": {
                        "type": "number",
                        "description": "The ship's MMSI, the number it broadcasts under."
                      },
                      "imo": {
                        "description": "The ship's IMO number, when it sends a valid one.",
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "name": {
                        "description": "The ship's name, as it broadcasts it.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "ship_type": {
                        "description": "The ship type it broadcasts, e.g. 70 for cargo.",
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "ship_category": {
                        "type": "string",
                        "enum": [
                          "passenger",
                          "cargo",
                          "tanker",
                          "service",
                          "fishing",
                          "other"
                        ],
                        "description": "The kind of ship, from its type: `passenger` (60-69), `cargo` (70-79), `tanker` (80-89), `service` (50-59: pilots, rescue, tugs, port tenders and the like), `fishing` (30), or `other`, ships that never sent their type included."
                      },
                      "destination_raw": {
                        "description": "The destination as the crew typed it.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "arrived_at": {
                        "type": "string",
                        "description": "When the ship entered the port, or was first seen in it, ISO 8601."
                      },
                      "departed_at": {
                        "description": "When it left, ISO 8601; `null` while it is still there.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "arrival_seen": {
                        "type": "boolean",
                        "description": "Whether the ship was seen coming in, not first seen already in port."
                      },
                      "gap": {
                        "type": "boolean",
                        "description": "Whether the ship went unheard for a while during the call."
                      },
                      "waited_from": {
                        "description": "When the ship stopped off the port to wait for it, before it came in, ISO 8601; `null` when it came straight in.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "stops": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "anchored",
                                "berthed"
                              ]
                            },
                            "area": {
                              "description": "The terminal or anchorage it stopped in, by its code.",
                              "type": "string"
                            },
                            "area_name": {
                              "description": "That terminal's or anchorage's name.",
                              "type": "string"
                            },
                            "start": {
                              "type": "string"
                            },
                            "end": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "start",
                            "end"
                          ],
                          "additionalProperties": false
                        },
                        "description": "Where the ship stopped in the port, at anchor or at a berth, in order."
                      },
                      "port": {
                        "type": "string",
                        "description": "The port watched: for a terminal or harbour that is part of a larger port, that port."
                      }
                    },
                    "required": [
                      "mmsi",
                      "imo",
                      "name",
                      "ship_type",
                      "ship_category",
                      "destination_raw",
                      "arrived_at",
                      "departed_at",
                      "arrival_seen",
                      "gap",
                      "waited_from",
                      "stops",
                      "port"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "timestamp",
                  "data"
                ],
                "additionalProperties": false
              },
              "example": {
                "type": "port.call.departed",
                "timestamp": "2026-10-27T10:31:55.000Z",
                "data": {
                  "port": "NLRTM",
                  "mmsi": 636026002,
                  "imo": 1016721,
                  "name": "MSC MIGSAN",
                  "ship_type": 71,
                  "ship_category": "cargo",
                  "destination_raw": "NLRTM",
                  "arrived_at": "2026-10-26T15:48:58.414Z",
                  "departed_at": "2026-10-27T10:31:55.000Z",
                  "arrival_seen": false,
                  "gap": false,
                  "waited_from": null,
                  "stops": [
                    {
                      "kind": "berthed",
                      "area": "NLRTMDDN",
                      "area_name": "ECT Delta Dedicated North (DDN)",
                      "start": "2026-10-26T16:11:35.204Z",
                      "end": "2026-10-27T09:40:12.000Z"
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 15 seconds; anything else is retried."
          }
        }
      }
    },
    "vessel.arrival.expected": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "vessel.arrival.expected",
        "description": "A ship you watch is first expected at a port.",
        "security": [],
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "The delivery's id, the same on every retry: use it to drop repeats.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "msg_7707d6db627a4f6a9abf5a698b33f9f4"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "When this attempt was sent, in seconds since 1970.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "1793011725"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "`v1,` and the signature; two of them, space apart, while the secret is rolled.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "v1,YyiID3fAXRrLtAO4SsJPjLeJZXQ/r0VtLQBLYohf8W4="
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "vessel.arrival.expected"
                  },
                  "timestamp": {
                    "type": "string",
                    "description": "When it happened, ISO 8601."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "mmsi": {
                        "type": "number",
                        "description": "The ship's MMSI, the number it broadcasts under."
                      },
                      "imo": {
                        "description": "The ship's IMO number, when it sends a valid one.",
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "name": {
                        "description": "The ship's name, as it broadcasts it.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "ship_type": {
                        "description": "The ship type it broadcasts, e.g. 70 for cargo.",
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "ship_category": {
                        "type": "string",
                        "enum": [
                          "passenger",
                          "cargo",
                          "tanker",
                          "service",
                          "fishing",
                          "other"
                        ],
                        "description": "The kind of ship, from its type: `passenger` (60-69), `cargo` (70-79), `tanker` (80-89), `service` (50-59: pilots, rescue, tugs, port tenders and the like), `fishing` (30), or `other`, ships that never sent their type included."
                      },
                      "destination_raw": {
                        "description": "The destination as the crew typed it.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "probability": {
                        "type": "number",
                        "description": "How likely the ship calls here next, from 0 to 1: how well the destination the crew typed matches the port, and how often ships like it were right that far ahead; or, by `history`, how often it or ships like it went here from the port it left."
                      },
                      "basis": {
                        "type": "string",
                        "enum": [
                          "destination",
                          "history"
                        ],
                        "description": "What says the ship is bound here: `destination`, the destination the crew typed; `history`, where that names no port but the one it left, where it and ships like it went from there before."
                      },
                      "eta": {
                        "type": "string",
                        "description": "When we expect the ship, ISO 8601."
                      },
                      "eta_range": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "earliest": {
                                "type": "string"
                              },
                              "latest": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "earliest",
                              "latest"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The earliest and latest the ship is likely to arrive, ISO 8601: eight in ten arrive within it. `null` where `eta` is the crew’s own, which we cannot vouch for."
                      },
                      "reported_eta": {
                        "description": "The crew's ETA as broadcast, ISO 8601.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "predicted_at": {
                        "type": "string",
                        "description": "When the estimate was made, ISO 8601."
                      },
                      "waiting": {
                        "type": "boolean",
                        "description": "Stopped or at anchor near the port and heard lately: waiting its turn to come in, so its turn, not `eta`, says when it arrives."
                      },
                      "overdue": {
                        "type": "boolean",
                        "description": "Past its estimate and not heard from since: it may have reached port out of range. Such a ship stays listed for a while, until it is heard arriving."
                      },
                      "position": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "at": {
                                "type": "string"
                              },
                              "lat": {
                                "type": "number"
                              },
                              "lon": {
                                "type": "number"
                              },
                              "speed_kn": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "at",
                              "lat",
                              "lon",
                              "speed_kn"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "Where the ship was, and how fast it went in knots, when the estimate was made."
                      },
                      "port": {
                        "type": "string",
                        "description": "The port: for a terminal or harbour that is part of a larger port, that port."
                      }
                    },
                    "required": [
                      "mmsi",
                      "imo",
                      "name",
                      "ship_type",
                      "ship_category",
                      "destination_raw",
                      "probability",
                      "basis",
                      "eta",
                      "eta_range",
                      "reported_eta",
                      "predicted_at",
                      "waiting",
                      "overdue",
                      "position",
                      "port"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "timestamp",
                  "data"
                ],
                "additionalProperties": false
              },
              "example": {
                "type": "vessel.arrival.expected",
                "timestamp": "2026-10-26T11:08:43.505Z",
                "data": {
                  "port": "NLRTM",
                  "mmsi": 563254200,
                  "imo": 9987196,
                  "name": "CMA CGM SEINE",
                  "ship_type": 71,
                  "ship_category": "cargo",
                  "destination_raw": "NLRTM",
                  "probability": 0.95,
                  "basis": "destination",
                  "eta": "2026-10-26T17:23:45.042Z",
                  "eta_range": {
                    "earliest": "2026-10-26T15:23:45.042Z",
                    "latest": "2026-10-28T04:23:45.042Z"
                  },
                  "reported_eta": null,
                  "predicted_at": "2026-10-26T11:08:43.505Z",
                  "overdue": false,
                  "waiting": false,
                  "position": {
                    "at": "2026-10-26T11:08:43.505Z",
                    "lat": 51.89073166666667,
                    "lon": 3.417578333333333,
                    "speed_kn": 5.9
                  }
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 15 seconds; anything else is retried."
          }
        }
      }
    },
    "vessel.call.arrived": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "vessel.call.arrived",
        "description": "A ship you watch arrives at a port.",
        "security": [],
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "The delivery's id, the same on every retry: use it to drop repeats.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "msg_7707d6db627a4f6a9abf5a698b33f9f4"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "When this attempt was sent, in seconds since 1970.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "1793011725"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "`v1,` and the signature; two of them, space apart, while the secret is rolled.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "v1,YyiID3fAXRrLtAO4SsJPjLeJZXQ/r0VtLQBLYohf8W4="
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "vessel.call.arrived"
                  },
                  "timestamp": {
                    "type": "string",
                    "description": "When it happened, ISO 8601."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "mmsi": {
                        "type": "number",
                        "description": "The ship's MMSI, the number it broadcasts under."
                      },
                      "imo": {
                        "description": "The ship's IMO number, when it sends a valid one.",
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "name": {
                        "description": "The ship's name, as it broadcasts it.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "ship_type": {
                        "description": "The ship type it broadcasts, e.g. 70 for cargo.",
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "ship_category": {
                        "type": "string",
                        "enum": [
                          "passenger",
                          "cargo",
                          "tanker",
                          "service",
                          "fishing",
                          "other"
                        ],
                        "description": "The kind of ship, from its type: `passenger` (60-69), `cargo` (70-79), `tanker` (80-89), `service` (50-59: pilots, rescue, tugs, port tenders and the like), `fishing` (30), or `other`, ships that never sent their type included."
                      },
                      "destination_raw": {
                        "description": "The destination as the crew typed it.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "arrived_at": {
                        "type": "string",
                        "description": "When the ship entered the port, or was first seen in it, ISO 8601."
                      },
                      "departed_at": {
                        "description": "When it left, ISO 8601; `null` while it is still there.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "arrival_seen": {
                        "type": "boolean",
                        "description": "Whether the ship was seen coming in, not first seen already in port."
                      },
                      "gap": {
                        "type": "boolean",
                        "description": "Whether the ship went unheard for a while during the call."
                      },
                      "waited_from": {
                        "description": "When the ship stopped off the port to wait for it, before it came in, ISO 8601; `null` when it came straight in.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "stops": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "anchored",
                                "berthed"
                              ]
                            },
                            "area": {
                              "description": "The terminal or anchorage it stopped in, by its code.",
                              "type": "string"
                            },
                            "area_name": {
                              "description": "That terminal's or anchorage's name.",
                              "type": "string"
                            },
                            "start": {
                              "type": "string"
                            },
                            "end": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "start",
                            "end"
                          ],
                          "additionalProperties": false
                        },
                        "description": "Where the ship stopped in the port, at anchor or at a berth, in order."
                      },
                      "port": {
                        "type": "string",
                        "description": "The port: for a terminal or harbour that is part of a larger port, that port."
                      }
                    },
                    "required": [
                      "mmsi",
                      "imo",
                      "name",
                      "ship_type",
                      "ship_category",
                      "destination_raw",
                      "arrived_at",
                      "departed_at",
                      "arrival_seen",
                      "gap",
                      "waited_from",
                      "stops",
                      "port"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "timestamp",
                  "data"
                ],
                "additionalProperties": false
              },
              "example": {
                "type": "vessel.call.arrived",
                "timestamp": "2026-10-26T15:48:58.414Z",
                "data": {
                  "port": "NLRTM",
                  "mmsi": 636026002,
                  "imo": 1016721,
                  "name": "MSC MIGSAN",
                  "ship_type": 71,
                  "ship_category": "cargo",
                  "destination_raw": "NLRTM",
                  "arrived_at": "2026-10-26T15:48:58.414Z",
                  "departed_at": null,
                  "arrival_seen": false,
                  "gap": false,
                  "waited_from": null,
                  "stops": [
                    {
                      "kind": "berthed",
                      "area": "NLRTMDDN",
                      "area_name": "ECT Delta Dedicated North (DDN)",
                      "start": "2026-10-26T16:11:35.204Z",
                      "end": null
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 15 seconds; anything else is retried."
          }
        }
      }
    },
    "vessel.call.departed": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "vessel.call.departed",
        "description": "A ship you watch leaves a port.",
        "security": [],
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "The delivery's id, the same on every retry: use it to drop repeats.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "msg_7707d6db627a4f6a9abf5a698b33f9f4"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "When this attempt was sent, in seconds since 1970.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "1793011725"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "`v1,` and the signature; two of them, space apart, while the secret is rolled.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "v1,YyiID3fAXRrLtAO4SsJPjLeJZXQ/r0VtLQBLYohf8W4="
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "vessel.call.departed"
                  },
                  "timestamp": {
                    "type": "string",
                    "description": "When it happened, ISO 8601."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "mmsi": {
                        "type": "number",
                        "description": "The ship's MMSI, the number it broadcasts under."
                      },
                      "imo": {
                        "description": "The ship's IMO number, when it sends a valid one.",
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "name": {
                        "description": "The ship's name, as it broadcasts it.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "ship_type": {
                        "description": "The ship type it broadcasts, e.g. 70 for cargo.",
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "ship_category": {
                        "type": "string",
                        "enum": [
                          "passenger",
                          "cargo",
                          "tanker",
                          "service",
                          "fishing",
                          "other"
                        ],
                        "description": "The kind of ship, from its type: `passenger` (60-69), `cargo` (70-79), `tanker` (80-89), `service` (50-59: pilots, rescue, tugs, port tenders and the like), `fishing` (30), or `other`, ships that never sent their type included."
                      },
                      "destination_raw": {
                        "description": "The destination as the crew typed it.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "arrived_at": {
                        "type": "string",
                        "description": "When the ship entered the port, or was first seen in it, ISO 8601."
                      },
                      "departed_at": {
                        "description": "When it left, ISO 8601; `null` while it is still there.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "arrival_seen": {
                        "type": "boolean",
                        "description": "Whether the ship was seen coming in, not first seen already in port."
                      },
                      "gap": {
                        "type": "boolean",
                        "description": "Whether the ship went unheard for a while during the call."
                      },
                      "waited_from": {
                        "description": "When the ship stopped off the port to wait for it, before it came in, ISO 8601; `null` when it came straight in.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "stops": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "anchored",
                                "berthed"
                              ]
                            },
                            "area": {
                              "description": "The terminal or anchorage it stopped in, by its code.",
                              "type": "string"
                            },
                            "area_name": {
                              "description": "That terminal's or anchorage's name.",
                              "type": "string"
                            },
                            "start": {
                              "type": "string"
                            },
                            "end": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "start",
                            "end"
                          ],
                          "additionalProperties": false
                        },
                        "description": "Where the ship stopped in the port, at anchor or at a berth, in order."
                      },
                      "port": {
                        "type": "string",
                        "description": "The port: for a terminal or harbour that is part of a larger port, that port."
                      }
                    },
                    "required": [
                      "mmsi",
                      "imo",
                      "name",
                      "ship_type",
                      "ship_category",
                      "destination_raw",
                      "arrived_at",
                      "departed_at",
                      "arrival_seen",
                      "gap",
                      "waited_from",
                      "stops",
                      "port"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "timestamp",
                  "data"
                ],
                "additionalProperties": false
              },
              "example": {
                "type": "vessel.call.departed",
                "timestamp": "2026-10-27T10:31:55.000Z",
                "data": {
                  "port": "NLRTM",
                  "mmsi": 636026002,
                  "imo": 1016721,
                  "name": "MSC MIGSAN",
                  "ship_type": 71,
                  "ship_category": "cargo",
                  "destination_raw": "NLRTM",
                  "arrived_at": "2026-10-26T15:48:58.414Z",
                  "departed_at": "2026-10-27T10:31:55.000Z",
                  "arrival_seen": false,
                  "gap": false,
                  "waited_from": null,
                  "stops": [
                    {
                      "kind": "berthed",
                      "area": "NLRTMDDN",
                      "area_name": "ECT Delta Dedicated North (DDN)",
                      "start": "2026-10-26T16:11:35.204Z",
                      "end": "2026-10-27T09:40:12.000Z"
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 15 seconds; anything else is retried."
          }
        }
      }
    },
    "vessel.inspection.recorded": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "vessel.inspection.recorded",
        "description": "An inspection of a ship you watch is recorded.",
        "security": [],
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "The delivery's id, the same on every retry: use it to drop repeats.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "msg_7707d6db627a4f6a9abf5a698b33f9f4"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "When this attempt was sent, in seconds since 1970.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "1793011725"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "`v1,` and the signature; two of them, space apart, while the secret is rolled.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "v1,YyiID3fAXRrLtAO4SsJPjLeJZXQ/r0VtLQBLYohf8W4="
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "vessel.inspection.recorded"
                  },
                  "timestamp": {
                    "type": "string",
                    "description": "When it happened, ISO 8601."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "The inspection, by an identifier that does not change.",
                        "example": "insp_3f1c9a7be2d04c6f8a51d2e07b9c4e18"
                      },
                      "imo": {
                        "type": "number",
                        "description": "The ship's IMO number."
                      },
                      "date": {
                        "type": "string",
                        "description": "When it took place, YYYY-MM-DD."
                      },
                      "country": {
                        "type": "string",
                        "description": "The country whose authorities inspected the ship, ISO 3166-1 alpha-2."
                      },
                      "port": {
                        "description": "The port it took place in, by UN/LOCODE, where known.",
                        "type": "string"
                      },
                      "office": {
                        "description": "The office of the authorities that carried it out.",
                        "type": "string"
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "port_state",
                          "flag_state"
                        ],
                        "description": "`port_state` for a ship under another flag, inspected as it called, and `flag_state` for one under the country's own flag."
                      },
                      "types": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The examinations carried out, as the authorities name them. Empty for a detention known only from the list of detained ships a port State publishes.",
                        "example": [
                          "PSC B",
                          "Deficiency Check"
                        ]
                      },
                      "ship": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "flag": {
                            "description": "Its flag, ISO 3166-1 alpha-2.",
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "class_societies": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The societies that classed it, if any are on record."
                          }
                        },
                        "required": [
                          "name",
                          "class_societies"
                        ],
                        "additionalProperties": false,
                        "description": "The ship as it was at the inspection."
                      },
                      "detained": {
                        "type": "boolean",
                        "description": "Whether the inspection led to the ship being detained."
                      },
                      "controls": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "description": "The measure.",
                              "example": "IMO Related Detention"
                            },
                            "category": {
                              "description": "What it protects.",
                              "example": "Safety",
                              "type": "string"
                            },
                            "reason": {
                              "description": "Why it was imposed.",
                              "type": "string"
                            },
                            "detention": {
                              "type": "boolean",
                              "description": "Whether the ship was held in port."
                            },
                            "imposed": {
                              "type": "string",
                              "description": "When it was imposed, YYYY-MM-DD."
                            },
                            "lifted": {
                              "type": "string",
                              "description": "When it was lifted, left out while it stands or when no lifting is on record, YYYY-MM-DD."
                            }
                          },
                          "required": [
                            "type",
                            "detention",
                            "imposed"
                          ],
                          "additionalProperties": false
                        },
                        "description": "The measures it led to, if any."
                      },
                      "deficiencies": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "description": "Its code in the deficiency list port States share.",
                              "example": "01104"
                            },
                            "area": {
                              "type": "string",
                              "description": "What it concerns.",
                              "example": "Certificates & Documentation"
                            },
                            "item": {
                              "type": "string",
                              "description": "The certificate, equipment or practice at fault.",
                              "example": "Medical certificate"
                            },
                            "description": {
                              "description": "What the inspector found, in their words.",
                              "type": "string"
                            },
                            "action": {
                              "description": "What was asked of the ship.",
                              "example": "Rectify deficiencies within 14 days",
                              "type": "string"
                            },
                            "resolution": {
                              "description": "How it was put right, in the inspector's words.",
                              "type": "string"
                            },
                            "issued": {
                              "type": "string",
                              "description": "When it was found, YYYY-MM-DD."
                            },
                            "due": {
                              "type": "string",
                              "description": "When it was to be put right by, YYYY-MM-DD."
                            },
                            "resolved": {
                              "type": "string",
                              "description": "When it was put right, YYYY-MM-DD."
                            }
                          },
                          "required": [
                            "code",
                            "area",
                            "item",
                            "issued"
                          ],
                          "additionalProperties": false
                        },
                        "description": "What was found wanting, if anything."
                      }
                    },
                    "required": [
                      "id",
                      "imo",
                      "date",
                      "country",
                      "kind",
                      "types",
                      "ship",
                      "detained",
                      "controls",
                      "deficiencies"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "timestamp",
                  "data"
                ],
                "additionalProperties": false
              },
              "example": {
                "type": "vessel.inspection.recorded",
                "timestamp": "2026-10-28T12:35:04.118Z",
                "data": {
                  "id": "insp_babcf0ace16d2dd1dcf28266587844a5",
                  "imo": 9955894,
                  "date": "2026-02-27",
                  "country": "US",
                  "office": "Sector New Orleans",
                  "kind": "port_state",
                  "types": [
                    "PSC A"
                  ],
                  "ship": {
                    "name": "ROSTRUM HEDONIST",
                    "flag": "LR",
                    "type": "Bulk Carrier",
                    "class_societies": [
                      "LLOYD'S REGISTER"
                    ]
                  },
                  "detained": true,
                  "controls": [
                    {
                      "type": "IMO Related Detention",
                      "category": "Safety",
                      "reason": "Identified Hazardous/Unsafe Operation",
                      "detention": true,
                      "imposed": "2026-02-27",
                      "lifted": "2026-03-02"
                    }
                  ],
                  "deficiencies": [
                    {
                      "code": "06199",
                      "area": "Cargo Operations Including Equipment",
                      "item": "Other (cargo)",
                      "description": "Vessel is currently loaded with Ammonium Nitrate Based Fertilizer (UN 2067). PSCO identified that vessel's crew has not maintained records of cargo temperature in accordance with IMSBC carriage requirements.",
                      "action": "Ship detained",
                      "resolution": "Training for crew conducted to satisfaction of Flag/Class; copy of new cargo temperature log provided.",
                      "issued": "2026-02-27",
                      "resolved": "2026-03-02"
                    },
                    {
                      "code": "15109",
                      "area": "Safety Management Systems (ISM)",
                      "item": "Maintenance of the ship and equipment",
                      "description": "The operational nature of deficiency number 1 provides objective evidence of a serious failure of the implementation of the ISM Code. An external audit report must be submitted prior to clearance of this deficiency.",
                      "action": "Ship detained",
                      "resolution": "Received SMS audit results; SMS updated for UN 2067.",
                      "issued": "2026-02-27",
                      "resolved": "2026-03-02"
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 15 seconds; anything else is retried."
          }
        }
      }
    },
    "vessel.inspection.updated": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "vessel.inspection.updated",
        "description": "An inspection of a ship you watch is corrected or brought up to date.",
        "security": [],
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "The delivery's id, the same on every retry: use it to drop repeats.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "msg_7707d6db627a4f6a9abf5a698b33f9f4"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "When this attempt was sent, in seconds since 1970.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "1793011725"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "`v1,` and the signature; two of them, space apart, while the secret is rolled.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "v1,YyiID3fAXRrLtAO4SsJPjLeJZXQ/r0VtLQBLYohf8W4="
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "vessel.inspection.updated"
                  },
                  "timestamp": {
                    "type": "string",
                    "description": "When it happened, ISO 8601."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "The inspection, by an identifier that does not change.",
                        "example": "insp_3f1c9a7be2d04c6f8a51d2e07b9c4e18"
                      },
                      "imo": {
                        "type": "number",
                        "description": "The ship's IMO number."
                      },
                      "date": {
                        "type": "string",
                        "description": "When it took place, YYYY-MM-DD."
                      },
                      "country": {
                        "type": "string",
                        "description": "The country whose authorities inspected the ship, ISO 3166-1 alpha-2."
                      },
                      "port": {
                        "description": "The port it took place in, by UN/LOCODE, where known.",
                        "type": "string"
                      },
                      "office": {
                        "description": "The office of the authorities that carried it out.",
                        "type": "string"
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "port_state",
                          "flag_state"
                        ],
                        "description": "`port_state` for a ship under another flag, inspected as it called, and `flag_state` for one under the country's own flag."
                      },
                      "types": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The examinations carried out, as the authorities name them. Empty for a detention known only from the list of detained ships a port State publishes.",
                        "example": [
                          "PSC B",
                          "Deficiency Check"
                        ]
                      },
                      "ship": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "flag": {
                            "description": "Its flag, ISO 3166-1 alpha-2.",
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "class_societies": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The societies that classed it, if any are on record."
                          }
                        },
                        "required": [
                          "name",
                          "class_societies"
                        ],
                        "additionalProperties": false,
                        "description": "The ship as it was at the inspection."
                      },
                      "detained": {
                        "type": "boolean",
                        "description": "Whether the inspection led to the ship being detained."
                      },
                      "controls": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "description": "The measure.",
                              "example": "IMO Related Detention"
                            },
                            "category": {
                              "description": "What it protects.",
                              "example": "Safety",
                              "type": "string"
                            },
                            "reason": {
                              "description": "Why it was imposed.",
                              "type": "string"
                            },
                            "detention": {
                              "type": "boolean",
                              "description": "Whether the ship was held in port."
                            },
                            "imposed": {
                              "type": "string",
                              "description": "When it was imposed, YYYY-MM-DD."
                            },
                            "lifted": {
                              "type": "string",
                              "description": "When it was lifted, left out while it stands or when no lifting is on record, YYYY-MM-DD."
                            }
                          },
                          "required": [
                            "type",
                            "detention",
                            "imposed"
                          ],
                          "additionalProperties": false
                        },
                        "description": "The measures it led to, if any."
                      },
                      "deficiencies": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "description": "Its code in the deficiency list port States share.",
                              "example": "01104"
                            },
                            "area": {
                              "type": "string",
                              "description": "What it concerns.",
                              "example": "Certificates & Documentation"
                            },
                            "item": {
                              "type": "string",
                              "description": "The certificate, equipment or practice at fault.",
                              "example": "Medical certificate"
                            },
                            "description": {
                              "description": "What the inspector found, in their words.",
                              "type": "string"
                            },
                            "action": {
                              "description": "What was asked of the ship.",
                              "example": "Rectify deficiencies within 14 days",
                              "type": "string"
                            },
                            "resolution": {
                              "description": "How it was put right, in the inspector's words.",
                              "type": "string"
                            },
                            "issued": {
                              "type": "string",
                              "description": "When it was found, YYYY-MM-DD."
                            },
                            "due": {
                              "type": "string",
                              "description": "When it was to be put right by, YYYY-MM-DD."
                            },
                            "resolved": {
                              "type": "string",
                              "description": "When it was put right, YYYY-MM-DD."
                            }
                          },
                          "required": [
                            "code",
                            "area",
                            "item",
                            "issued"
                          ],
                          "additionalProperties": false
                        },
                        "description": "What was found wanting, if anything."
                      }
                    },
                    "required": [
                      "id",
                      "imo",
                      "date",
                      "country",
                      "kind",
                      "types",
                      "ship",
                      "detained",
                      "controls",
                      "deficiencies"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "timestamp",
                  "data"
                ],
                "additionalProperties": false
              },
              "example": {
                "type": "vessel.inspection.updated",
                "timestamp": "2026-11-20T04:35:02.731Z",
                "data": {
                  "id": "insp_babcf0ace16d2dd1dcf28266587844a5",
                  "imo": 9955894,
                  "date": "2026-02-27",
                  "country": "US",
                  "office": "Sector New Orleans",
                  "kind": "port_state",
                  "types": [
                    "PSC A"
                  ],
                  "ship": {
                    "name": "ROSTRUM HEDONIST",
                    "flag": "LR",
                    "type": "Bulk Carrier",
                    "class_societies": [
                      "LLOYD'S REGISTER"
                    ]
                  },
                  "detained": true,
                  "controls": [
                    {
                      "type": "IMO Related Detention",
                      "category": "Safety",
                      "reason": "Identified Hazardous/Unsafe Operation",
                      "detention": true,
                      "imposed": "2026-02-27",
                      "lifted": "2026-03-02"
                    }
                  ],
                  "deficiencies": [
                    {
                      "code": "06199",
                      "area": "Cargo Operations Including Equipment",
                      "item": "Other (cargo)",
                      "description": "Vessel is currently loaded with Ammonium Nitrate Based Fertilizer (UN 2067). PSCO identified that vessel's crew has not maintained records of cargo temperature in accordance with IMSBC carriage requirements.",
                      "action": "Ship detained",
                      "resolution": "Training for crew conducted to satisfaction of Flag/Class; copy of new cargo temperature log provided.",
                      "issued": "2026-02-27",
                      "resolved": "2026-03-02"
                    },
                    {
                      "code": "15109",
                      "area": "Safety Management Systems (ISM)",
                      "item": "Maintenance of the ship and equipment",
                      "description": "The operational nature of deficiency number 1 provides objective evidence of a serious failure of the implementation of the ISM Code. An external audit report must be submitted prior to clearance of this deficiency.",
                      "action": "Ship detained",
                      "resolution": "Received SMS audit results; SMS updated for UN 2067.",
                      "issued": "2026-02-27",
                      "resolved": "2026-03-02"
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 15 seconds; anything else is retried."
          }
        }
      }
    },
    "vessel.inspection.withdrawn": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "vessel.inspection.withdrawn",
        "description": "An inspection of a ship you watch is withdrawn from the record.",
        "security": [],
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "The delivery's id, the same on every retry: use it to drop repeats.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "msg_7707d6db627a4f6a9abf5a698b33f9f4"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "When this attempt was sent, in seconds since 1970.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "1793011725"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "`v1,` and the signature; two of them, space apart, while the secret is rolled.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "v1,YyiID3fAXRrLtAO4SsJPjLeJZXQ/r0VtLQBLYohf8W4="
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "vessel.inspection.withdrawn"
                  },
                  "timestamp": {
                    "type": "string",
                    "description": "When it happened, ISO 8601."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "The inspection, by an identifier that does not change.",
                        "example": "insp_3f1c9a7be2d04c6f8a51d2e07b9c4e18"
                      },
                      "imo": {
                        "type": "number",
                        "description": "The ship's IMO number."
                      },
                      "date": {
                        "type": "string",
                        "description": "When it took place, YYYY-MM-DD."
                      },
                      "country": {
                        "type": "string",
                        "description": "The country whose authorities inspected the ship, ISO 3166-1 alpha-2."
                      },
                      "port": {
                        "description": "The port it took place in, by UN/LOCODE, where known.",
                        "type": "string"
                      },
                      "office": {
                        "description": "The office of the authorities that carried it out.",
                        "type": "string"
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "port_state",
                          "flag_state"
                        ],
                        "description": "`port_state` for a ship under another flag, inspected as it called, and `flag_state` for one under the country's own flag."
                      },
                      "types": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The examinations carried out, as the authorities name them. Empty for a detention known only from the list of detained ships a port State publishes.",
                        "example": [
                          "PSC B",
                          "Deficiency Check"
                        ]
                      },
                      "ship": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "flag": {
                            "description": "Its flag, ISO 3166-1 alpha-2.",
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "class_societies": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The societies that classed it, if any are on record."
                          }
                        },
                        "required": [
                          "name",
                          "class_societies"
                        ],
                        "additionalProperties": false,
                        "description": "The ship as it was at the inspection."
                      },
                      "detained": {
                        "type": "boolean",
                        "description": "Whether the inspection led to the ship being detained."
                      },
                      "controls": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "description": "The measure.",
                              "example": "IMO Related Detention"
                            },
                            "category": {
                              "description": "What it protects.",
                              "example": "Safety",
                              "type": "string"
                            },
                            "reason": {
                              "description": "Why it was imposed.",
                              "type": "string"
                            },
                            "detention": {
                              "type": "boolean",
                              "description": "Whether the ship was held in port."
                            },
                            "imposed": {
                              "type": "string",
                              "description": "When it was imposed, YYYY-MM-DD."
                            },
                            "lifted": {
                              "type": "string",
                              "description": "When it was lifted, left out while it stands or when no lifting is on record, YYYY-MM-DD."
                            }
                          },
                          "required": [
                            "type",
                            "detention",
                            "imposed"
                          ],
                          "additionalProperties": false
                        },
                        "description": "The measures it led to, if any."
                      },
                      "deficiencies": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "description": "Its code in the deficiency list port States share.",
                              "example": "01104"
                            },
                            "area": {
                              "type": "string",
                              "description": "What it concerns.",
                              "example": "Certificates & Documentation"
                            },
                            "item": {
                              "type": "string",
                              "description": "The certificate, equipment or practice at fault.",
                              "example": "Medical certificate"
                            },
                            "description": {
                              "description": "What the inspector found, in their words.",
                              "type": "string"
                            },
                            "action": {
                              "description": "What was asked of the ship.",
                              "example": "Rectify deficiencies within 14 days",
                              "type": "string"
                            },
                            "resolution": {
                              "description": "How it was put right, in the inspector's words.",
                              "type": "string"
                            },
                            "issued": {
                              "type": "string",
                              "description": "When it was found, YYYY-MM-DD."
                            },
                            "due": {
                              "type": "string",
                              "description": "When it was to be put right by, YYYY-MM-DD."
                            },
                            "resolved": {
                              "type": "string",
                              "description": "When it was put right, YYYY-MM-DD."
                            }
                          },
                          "required": [
                            "code",
                            "area",
                            "item",
                            "issued"
                          ],
                          "additionalProperties": false
                        },
                        "description": "What was found wanting, if anything."
                      }
                    },
                    "required": [
                      "id",
                      "imo",
                      "date",
                      "country",
                      "kind",
                      "types",
                      "ship",
                      "detained",
                      "controls",
                      "deficiencies"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "timestamp",
                  "data"
                ],
                "additionalProperties": false
              },
              "example": {
                "type": "vessel.inspection.withdrawn",
                "timestamp": "2026-11-21T04:35:03.208Z",
                "data": {
                  "id": "insp_babcf0ace16d2dd1dcf28266587844a5",
                  "imo": 9955894,
                  "date": "2026-02-27",
                  "country": "US",
                  "office": "Sector New Orleans",
                  "kind": "port_state",
                  "types": [
                    "PSC A"
                  ],
                  "ship": {
                    "name": "ROSTRUM HEDONIST",
                    "flag": "LR",
                    "type": "Bulk Carrier",
                    "class_societies": [
                      "LLOYD'S REGISTER"
                    ]
                  },
                  "detained": true,
                  "controls": [
                    {
                      "type": "IMO Related Detention",
                      "category": "Safety",
                      "reason": "Identified Hazardous/Unsafe Operation",
                      "detention": true,
                      "imposed": "2026-02-27",
                      "lifted": "2026-03-02"
                    }
                  ],
                  "deficiencies": [
                    {
                      "code": "06199",
                      "area": "Cargo Operations Including Equipment",
                      "item": "Other (cargo)",
                      "description": "Vessel is currently loaded with Ammonium Nitrate Based Fertilizer (UN 2067). PSCO identified that vessel's crew has not maintained records of cargo temperature in accordance with IMSBC carriage requirements.",
                      "action": "Ship detained",
                      "resolution": "Training for crew conducted to satisfaction of Flag/Class; copy of new cargo temperature log provided.",
                      "issued": "2026-02-27",
                      "resolved": "2026-03-02"
                    },
                    {
                      "code": "15109",
                      "area": "Safety Management Systems (ISM)",
                      "item": "Maintenance of the ship and equipment",
                      "description": "The operational nature of deficiency number 1 provides objective evidence of a serious failure of the implementation of the ISM Code. An external audit report must be submitted prior to clearance of this deficiency.",
                      "action": "Ship detained",
                      "resolution": "Received SMS audit results; SMS updated for UN 2067.",
                      "issued": "2026-02-27",
                      "resolved": "2026-03-02"
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 15 seconds; anything else is retried."
          }
        }
      }
    },
    "vessel.sanction.listed": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "vessel.sanction.listed",
        "description": "A ship you watch is sanctioned, or refused access to a region's ports.",
        "security": [],
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "The delivery's id, the same on every retry: use it to drop repeats.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "msg_7707d6db627a4f6a9abf5a698b33f9f4"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "When this attempt was sent, in seconds since 1970.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "1793011725"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "`v1,` and the signature; two of them, space apart, while the secret is rolled.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "v1,YyiID3fAXRrLtAO4SsJPjLeJZXQ/r0VtLQBLYohf8W4="
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "vessel.sanction.listed"
                  },
                  "timestamp": {
                    "type": "string",
                    "description": "When it happened, ISO 8601."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "The sanction, by an identifier that does not change.",
                        "example": "sanc_5d2f7a9c1e3b4d6f8a0c2e4b6d8f0a1c"
                      },
                      "imo": {
                        "type": "number",
                        "description": "The ship's IMO number."
                      },
                      "authority": {
                        "type": "string",
                        "enum": [
                          "un",
                          "eu",
                          "us",
                          "gb",
                          "paris_mou"
                        ],
                        "description": "Who imposed it: `un` (the UN Security Council), `eu`, `us` or `gb`, which sanction the ship, or `paris_mou`, whose port States refuse it access to every port and anchorage in their region."
                      },
                      "country": {
                        "description": "For `paris_mou`, the member State that issued the order, ISO 3166-1 alpha-2.",
                        "type": "string"
                      },
                      "programmes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The sanctions programmes or regimes it falls under, as the authority names them; empty for `paris_mou`.",
                        "example": [
                          "Russia"
                        ]
                      },
                      "measures": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "asset_freeze",
                            "port_entry_ban",
                            "services_ban",
                            "deregistration",
                            "seizure"
                          ]
                        },
                        "description": "What it does to the ship: `asset_freeze` (the ship is blocked property), `port_entry_ban`, `services_ban` (no services, such as insurance, chartering or bunkering, may be provided to it), `deregistration` (its flag is to be withdrawn) or `seizure`."
                      },
                      "listed_on": {
                        "type": "string",
                        "description": "When the ship was listed, YYYY-MM-DD."
                      },
                      "delisted_on": {
                        "description": "When the ship was taken off the list, YYYY-MM-DD, to within a day; left out while it is in force. Recorded from November 2026.",
                        "type": "string"
                      },
                      "name": {
                        "type": "string",
                        "description": "The ship as the listing names it."
                      },
                      "flag": {
                        "description": "Its flag as the listing gives it, ISO 3166-1 alpha-2.",
                        "type": "string"
                      },
                      "reason": {
                        "description": "Why it was listed, where the authority says.",
                        "type": "string"
                      },
                      "occurrence": {
                        "description": "For `paris_mou`, which refusal of access this is for the ship: 1 for its first.",
                        "type": "integer"
                      },
                      "minimum_months": {
                        "description": "For `paris_mou`, the least time the refusal lasts, in months; left out for one that lasts until the conditions for lifting it are met.",
                        "type": "integer"
                      }
                    },
                    "required": [
                      "id",
                      "imo",
                      "authority",
                      "programmes",
                      "measures",
                      "listed_on",
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "timestamp",
                  "data"
                ],
                "additionalProperties": false
              },
              "example": {
                "type": "vessel.sanction.listed",
                "timestamp": "2026-10-08T14:35:02.517Z",
                "data": {
                  "id": "sanc_b7e27af418ec2eba01ef8f6a9489a808",
                  "imo": 9243320,
                  "authority": "gb",
                  "programmes": [
                    "Russia"
                  ],
                  "measures": [
                    "deregistration",
                    "port_entry_ban",
                    "services_ban"
                  ],
                  "listed_on": "2026-10-08",
                  "name": "YEHOPE",
                  "flag": "BB",
                  "reason": "The Secretary of State considers that there are reasonable grounds to suspect that IMO 9243320 (\"YEHOPE\") is, has been or is likely to be involved in activity whose object or effect is to destabilise Ukraine or undermine or threaten the territorial integrity, sovereignty or independence of Ukraine or to obtain a benefit from or support the Government of Russia. Namely, 9243320 is involved in carrying oil or oil products that originated in Russia from Russia to a third country."
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 15 seconds; anything else is retried."
          }
        }
      }
    },
    "vessel.sanction.delisted": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "vessel.sanction.delisted",
        "description": "A sanction or port ban on a ship you watch is lifted.",
        "security": [],
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "The delivery's id, the same on every retry: use it to drop repeats.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "msg_7707d6db627a4f6a9abf5a698b33f9f4"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "When this attempt was sent, in seconds since 1970.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "1793011725"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "`v1,` and the signature; two of them, space apart, while the secret is rolled.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "v1,YyiID3fAXRrLtAO4SsJPjLeJZXQ/r0VtLQBLYohf8W4="
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "vessel.sanction.delisted"
                  },
                  "timestamp": {
                    "type": "string",
                    "description": "When it happened, ISO 8601."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "The sanction, by an identifier that does not change.",
                        "example": "sanc_5d2f7a9c1e3b4d6f8a0c2e4b6d8f0a1c"
                      },
                      "imo": {
                        "type": "number",
                        "description": "The ship's IMO number."
                      },
                      "authority": {
                        "type": "string",
                        "enum": [
                          "un",
                          "eu",
                          "us",
                          "gb",
                          "paris_mou"
                        ],
                        "description": "Who imposed it: `un` (the UN Security Council), `eu`, `us` or `gb`, which sanction the ship, or `paris_mou`, whose port States refuse it access to every port and anchorage in their region."
                      },
                      "country": {
                        "description": "For `paris_mou`, the member State that issued the order, ISO 3166-1 alpha-2.",
                        "type": "string"
                      },
                      "programmes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The sanctions programmes or regimes it falls under, as the authority names them; empty for `paris_mou`.",
                        "example": [
                          "Russia"
                        ]
                      },
                      "measures": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "asset_freeze",
                            "port_entry_ban",
                            "services_ban",
                            "deregistration",
                            "seizure"
                          ]
                        },
                        "description": "What it does to the ship: `asset_freeze` (the ship is blocked property), `port_entry_ban`, `services_ban` (no services, such as insurance, chartering or bunkering, may be provided to it), `deregistration` (its flag is to be withdrawn) or `seizure`."
                      },
                      "listed_on": {
                        "type": "string",
                        "description": "When the ship was listed, YYYY-MM-DD."
                      },
                      "delisted_on": {
                        "description": "When the ship was taken off the list, YYYY-MM-DD, to within a day; left out while it is in force. Recorded from November 2026.",
                        "type": "string"
                      },
                      "name": {
                        "type": "string",
                        "description": "The ship as the listing names it."
                      },
                      "flag": {
                        "description": "Its flag as the listing gives it, ISO 3166-1 alpha-2.",
                        "type": "string"
                      },
                      "reason": {
                        "description": "Why it was listed, where the authority says.",
                        "type": "string"
                      },
                      "occurrence": {
                        "description": "For `paris_mou`, which refusal of access this is for the ship: 1 for its first.",
                        "type": "integer"
                      },
                      "minimum_months": {
                        "description": "For `paris_mou`, the least time the refusal lasts, in months; left out for one that lasts until the conditions for lifting it are met.",
                        "type": "integer"
                      }
                    },
                    "required": [
                      "id",
                      "imo",
                      "authority",
                      "programmes",
                      "measures",
                      "listed_on",
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "timestamp",
                  "data"
                ],
                "additionalProperties": false
              },
              "example": {
                "type": "vessel.sanction.delisted",
                "timestamp": "2026-11-06T05:35:01.904Z",
                "data": {
                  "id": "sanc_6fc4cd5b88eeb47510f891f3b1e19740",
                  "imo": 8128858,
                  "authority": "paris_mou",
                  "country": "GR",
                  "programmes": [],
                  "measures": [
                    "port_entry_ban"
                  ],
                  "listed_on": "2026-04-06",
                  "name": "DIEVA",
                  "flag": "CM",
                  "reason": "Multiple detentions",
                  "occurrence": 1,
                  "minimum_months": 3,
                  "delisted_on": "2026-11-06"
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 15 seconds; anything else is retried."
          }
        }
      }
    },
    "watch.created": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "watch.created",
        "description": "A port or ship is added to your watchlist.",
        "security": [],
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "The delivery's id, the same on every retry: use it to drop repeats.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "msg_7707d6db627a4f6a9abf5a698b33f9f4"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "When this attempt was sent, in seconds since 1970.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "1793011725"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "`v1,` and the signature; two of them, space apart, while the secret is rolled.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "v1,YyiID3fAXRrLtAO4SsJPjLeJZXQ/r0VtLQBLYohf8W4="
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "watch.created"
                  },
                  "timestamp": {
                    "type": "string",
                    "description": "When it happened, ISO 8601."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "port": {
                        "description": "The port watched, by UN/LOCODE: for one that is part of a larger port, that port.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "vessel": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^imo:\\d{7}$"
                              },
                              {
                                "type": "string",
                                "pattern": "^mmsi:\\d{9}$"
                              }
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The ship watched, by the identifier it was added by: `imo:` or `mmsi:`."
                      },
                      "name": {
                        "description": "The port's name, or the ship's as it broadcasts it.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "topics": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "ais",
                            "inspections",
                            "sanctions"
                          ]
                        },
                        "description": "What of it the webhook endpoints hear about."
                      },
                      "created_at": {
                        "type": "string",
                        "description": "ISO 8601."
                      }
                    },
                    "required": [
                      "id",
                      "port",
                      "vessel",
                      "name",
                      "topics",
                      "created_at"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "timestamp",
                  "data"
                ],
                "additionalProperties": false
              },
              "example": {
                "type": "watch.created",
                "timestamp": "2026-10-26T09:21:05.230Z",
                "data": {
                  "id": "6a2d8f41-c3b7-4e09-8f15-d97e0b4c2a68",
                  "port": null,
                  "vessel": "imo:9987196",
                  "name": "CMA CGM SEINE",
                  "topics": [
                    "ais",
                    "inspections",
                    "sanctions"
                  ],
                  "created_at": "2026-10-26T09:21:05.230Z"
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 15 seconds; anything else is retried."
          }
        }
      }
    },
    "watch.updated": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "watch.updated",
        "description": "What your organization hears about a port or ship it watches changes.",
        "security": [],
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "The delivery's id, the same on every retry: use it to drop repeats.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "msg_7707d6db627a4f6a9abf5a698b33f9f4"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "When this attempt was sent, in seconds since 1970.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "1793011725"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "`v1,` and the signature; two of them, space apart, while the secret is rolled.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "v1,YyiID3fAXRrLtAO4SsJPjLeJZXQ/r0VtLQBLYohf8W4="
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "watch.updated"
                  },
                  "timestamp": {
                    "type": "string",
                    "description": "When it happened, ISO 8601."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "port": {
                        "description": "The port watched, by UN/LOCODE: for one that is part of a larger port, that port.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "vessel": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^imo:\\d{7}$"
                              },
                              {
                                "type": "string",
                                "pattern": "^mmsi:\\d{9}$"
                              }
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The ship watched, by the identifier it was added by: `imo:` or `mmsi:`."
                      },
                      "name": {
                        "description": "The port's name, or the ship's as it broadcasts it.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "topics": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "ais",
                            "inspections",
                            "sanctions"
                          ]
                        },
                        "description": "What of it the webhook endpoints hear about."
                      },
                      "created_at": {
                        "type": "string",
                        "description": "ISO 8601."
                      }
                    },
                    "required": [
                      "id",
                      "port",
                      "vessel",
                      "name",
                      "topics",
                      "created_at"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "timestamp",
                  "data"
                ],
                "additionalProperties": false
              },
              "example": {
                "type": "watch.updated",
                "timestamp": "2026-10-27T08:14:52.006Z",
                "data": {
                  "id": "6a2d8f41-c3b7-4e09-8f15-d97e0b4c2a68",
                  "port": null,
                  "vessel": "imo:9987196",
                  "name": "CMA CGM SEINE",
                  "topics": [
                    "ais",
                    "inspections",
                    "sanctions"
                  ],
                  "created_at": "2026-10-26T09:21:05.230Z"
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 15 seconds; anything else is retried."
          }
        }
      }
    },
    "watch.deleted": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "watch.deleted",
        "description": "A port or ship is taken off your watchlist.",
        "security": [],
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "The delivery's id, the same on every retry: use it to drop repeats.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "msg_7707d6db627a4f6a9abf5a698b33f9f4"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "When this attempt was sent, in seconds since 1970.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "1793011725"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "`v1,` and the signature; two of them, space apart, while the secret is rolled.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "v1,YyiID3fAXRrLtAO4SsJPjLeJZXQ/r0VtLQBLYohf8W4="
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "watch.deleted"
                  },
                  "timestamp": {
                    "type": "string",
                    "description": "When it happened, ISO 8601."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "port": {
                        "description": "The port watched, by UN/LOCODE: for one that is part of a larger port, that port.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "vessel": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^imo:\\d{7}$"
                              },
                              {
                                "type": "string",
                                "pattern": "^mmsi:\\d{9}$"
                              }
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The ship watched, by the identifier it was added by: `imo:` or `mmsi:`."
                      },
                      "name": {
                        "description": "The port's name, or the ship's as it broadcasts it.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "topics": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "ais",
                            "inspections",
                            "sanctions"
                          ]
                        },
                        "description": "What of it the webhook endpoints hear about."
                      },
                      "created_at": {
                        "type": "string",
                        "description": "ISO 8601."
                      }
                    },
                    "required": [
                      "id",
                      "port",
                      "vessel",
                      "name",
                      "topics",
                      "created_at"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "timestamp",
                  "data"
                ],
                "additionalProperties": false
              },
              "example": {
                "type": "watch.deleted",
                "timestamp": "2026-10-28T16:03:12.905Z",
                "data": {
                  "id": "6a2d8f41-c3b7-4e09-8f15-d97e0b4c2a68",
                  "port": null,
                  "vessel": "imo:9987196",
                  "name": "CMA CGM SEINE",
                  "topics": [
                    "ais",
                    "inspections",
                    "sanctions"
                  ],
                  "created_at": "2026-10-26T09:21:05.230Z"
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 15 seconds; anything else is retried."
          }
        }
      }
    },
    "webhook.test": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "webhook.test",
        "description": "Sent from the dashboard to try an endpoint.",
        "security": [],
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "description": "The delivery's id, the same on every retry: use it to drop repeats.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "msg_7707d6db627a4f6a9abf5a698b33f9f4"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "description": "When this attempt was sent, in seconds since 1970.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "1793011725"
              ]
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "description": "`v1,` and the signature; two of them, space apart, while the secret is rolled.",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "v1,YyiID3fAXRrLtAO4SsJPjLeJZXQ/r0VtLQBLYohf8W4="
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "webhook.test"
                  },
                  "timestamp": {
                    "type": "string",
                    "description": "When it happened, ISO 8601."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "endpoint_id": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "endpoint_id",
                      "message"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "timestamp",
                  "data"
                ],
                "additionalProperties": false
              },
              "example": {
                "type": "webhook.test",
                "timestamp": "2026-10-26T09:13:02.114Z",
                "data": {
                  "endpoint_id": "555cd35b-636b-4109-a621-6fcacbd296a8",
                  "message": "A test event from waykite."
                }
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Answer within 15 seconds; anything else is retried."
          }
        }
      }
    }
  },
  "paths": {
    "/api/v1/locations/search": {
      "get": {
        "operationId": "searchLocations",
        "summary": "Search locations",
        "description": "Find locations by name or code, optionally filtered by country, region or sea area, and by what they handle.\n\nMatching is case-insensitive and finds the text anywhere in a location's name, its other names, its code (`NLRTM` or just `RTM`) and its IATA code, and in the names of the container terminals in its port. A container terminal's code matches only in full. Names written with other spaces, punctuation or accents match too, when `q` holds punctuation or finds nothing as written: `el arish` and `elarish` find El'Arish. With `q`, results come best match first: an exact code, then an exact name, then names that start with the text, then the rest, with bigger ports and airports ahead within each. Without it they come in code order. Either way they come a page at a time.",
        "tags": [
          "Locations"
        ],
        "responses": {
          "200": {
            "description": "A page of matching locations, best match first. When `offset + limit` is less than `total`, there are more pages.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Location"
                      }
                    },
                    "total": {
                      "type": "integer",
                      "description": "How many locations match, across all pages."
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "results",
                    "total",
                    "limit",
                    "offset"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "results": [
                    {
                      "code": "NLRTM",
                      "country": "NL",
                      "location": "RTM",
                      "name": "Rotterdam",
                      "subdivision": "ZH",
                      "regions": [
                        "150",
                        "155"
                      ],
                      "functions": [
                        "port",
                        "rail_terminal",
                        "road_terminal",
                        "airport",
                        "postal_exchange"
                      ],
                      "status": "AF",
                      "coordinates": {
                        "lat": 51.916667,
                        "lon": 4.5
                      },
                      "timezone": "Europe/Amsterdam",
                      "modalities": {
                        "port": {
                          "wpi_numbers": [
                            31140
                          ],
                          "type": "river_port",
                          "harbor": {
                            "size": "large",
                            "type": "river_basins",
                            "shelter": "fair"
                          },
                          "region": "Netherlands",
                          "navigation_area": "I",
                          "sea_area": "4",
                          "first_port_of_entry": true,
                          "repair_capability": "major",
                          "tidal_range_meters": 1,
                          "depths": {
                            "channel_meters": 11,
                            "anchorage_meters": 11,
                            "cargo_handling_meters": 6.4
                          },
                          "facilities": {
                            "drydock": true,
                            "medical": true,
                            "garbage_disposal": true,
                            "bunker_fuel": true,
                            "diesel": true,
                            "water": true,
                            "tugs": true,
                            "pilotage_available": true,
                            "pilotage_compulsory": true
                          },
                          "container_terminals": [
                            {
                              "name": "APM TERMINALS ROTTERDAM MAASVLAKTE 2",
                              "operator": "APM TERMINALS",
                              "smdg_code": "NLMVII",
                              "coordinates": {
                                "lat": 51.954167,
                                "lon": 4.003333
                              },
                              "website": "https://www.apmterminals.com/en/maasvlakte",
                              "address": "Europaweg 910, Port number 8410, 3199 LC Maasvlakte Rotterdam, The Netherlands"
                            }
                          ]
                        },
                        "airport": {
                          "name": "Rotterdam The Hague Airport",
                          "icao": "EHRD",
                          "type": "large",
                          "scheduled_service": true,
                          "elevation_meters": -4.6,
                          "runways_summary": {
                            "count": 1,
                            "longest_meters": 2200,
                            "longest_paved": true
                          },
                          "runways": [
                            {
                              "designator": "06/24",
                              "length_meters": 2200,
                              "width_meters": 45,
                              "surface": "asphalt",
                              "paved": true,
                              "lighted": true
                            }
                          ]
                        }
                      },
                      "display_name": "Rotterdam, Netherlands"
                    }
                  ],
                  "total": 3,
                  "limit": 1,
                  "offset": 0
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used from an origin that is not on its list. `error.name` is `OriginNotAllowed`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "OriginNotAllowed",
                    "message": "This publishable key doesn't work from this origin. Add the origin to the key, or use a secret key from a server."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "description": "Results per page."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0
            },
            "description": "How many results to skip, for the next page."
          },
          {
            "in": "query",
            "name": "q",
            "schema": {
              "default": "",
              "example": "rotterdam",
              "type": "string"
            },
            "description": "Text to look for. Leave it out to list every location that passes the filters."
          },
          {
            "in": "query",
            "name": "country",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              }
            },
            "description": "ISO 3166-1 alpha-2 country code in capitals, e.g. `NL`. Repeat it for several countries: `country=US&country=CA`."
          },
          {
            "in": "query",
            "name": "region",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^\\d{3}$"
              }
            },
            "description": "Only those in this region, by its M49 code, at any level: `150` for Europe, `155` for Western Europe. Repeat it for several. See [Regions and sea areas](https://waykite.com/docs/guides/regions-and-sea-areas)."
          },
          {
            "in": "query",
            "name": "sea_area",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^\\d{1,2}[A-Za-z]?$"
              }
            },
            "description": "Only those on this sea area, by its S-23 code, e.g. `4` for the North Sea. Case matters: `28A` is the Western Basin of the Mediterranean, `28a` the Strait of Gibraltar. Repeat it for several."
          },
          {
            "in": "query",
            "name": "function",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "port",
                  "rail_terminal",
                  "road_terminal",
                  "airport",
                  "postal_exchange",
                  "multimodal",
                  "fixed_transport",
                  "border_crossing"
                ]
              }
            },
            "description": "Only locations with any of these functions, e.g. `function=port`. Repeat it for several."
          }
        ]
      }
    },
    "/api/v1/locations/nearby": {
      "get": {
        "operationId": "findNearbyLocations",
        "summary": "Nearby locations",
        "description": "Find the locations closest to a point, nearest first.\n\nUseful for anything with a position and no code of its own: a terminal, a jetty or an offshore unit and the port it belongs to, or a point on a map. Distances are great-circle distances in kilometres, rounded to 0.1 km. Locations without coordinates are never returned.",
        "tags": [
          "Locations"
        ],
        "responses": {
          "200": {
            "description": "The nearest locations, closest first, each with its distance. There is no `total` or `offset`: ask for a larger `limit` to see more.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/NearbyLocation"
                      }
                    },
                    "limit": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "results",
                    "limit"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "results": [
                    {
                      "code": "NLRTM",
                      "country": "NL",
                      "location": "RTM",
                      "name": "Rotterdam",
                      "subdivision": "ZH",
                      "regions": [
                        "150",
                        "155"
                      ],
                      "functions": [
                        "port",
                        "rail_terminal",
                        "road_terminal",
                        "airport",
                        "postal_exchange"
                      ],
                      "status": "AF",
                      "coordinates": {
                        "lat": 51.916667,
                        "lon": 4.5
                      },
                      "timezone": "Europe/Amsterdam",
                      "modalities": {
                        "port": {
                          "wpi_numbers": [
                            31140
                          ],
                          "type": "river_port",
                          "harbor": {
                            "size": "large",
                            "type": "river_basins",
                            "shelter": "fair"
                          },
                          "region": "Netherlands",
                          "navigation_area": "I",
                          "sea_area": "4",
                          "first_port_of_entry": true,
                          "repair_capability": "major",
                          "tidal_range_meters": 1,
                          "depths": {
                            "channel_meters": 11,
                            "anchorage_meters": 11,
                            "cargo_handling_meters": 6.4
                          },
                          "facilities": {
                            "drydock": true,
                            "medical": true,
                            "garbage_disposal": true,
                            "bunker_fuel": true,
                            "diesel": true,
                            "water": true,
                            "tugs": true,
                            "pilotage_available": true,
                            "pilotage_compulsory": true
                          },
                          "container_terminals": [
                            {
                              "name": "APM TERMINALS ROTTERDAM MAASVLAKTE 2",
                              "operator": "APM TERMINALS",
                              "smdg_code": "NLMVII",
                              "coordinates": {
                                "lat": 51.954167,
                                "lon": 4.003333
                              },
                              "website": "https://www.apmterminals.com/en/maasvlakte",
                              "address": "Europaweg 910, Port number 8410, 3199 LC Maasvlakte Rotterdam, The Netherlands"
                            }
                          ]
                        },
                        "airport": {
                          "name": "Rotterdam The Hague Airport",
                          "icao": "EHRD",
                          "type": "large",
                          "scheduled_service": true,
                          "elevation_meters": -4.6,
                          "runways_summary": {
                            "count": 1,
                            "longest_meters": 2200,
                            "longest_paved": true
                          },
                          "runways": [
                            {
                              "designator": "06/24",
                              "length_meters": 2200,
                              "width_meters": 45,
                              "surface": "asphalt",
                              "paved": true,
                              "lighted": true
                            }
                          ]
                        }
                      },
                      "display_name": "Rotterdam, Netherlands",
                      "distance_km": 1.9
                    }
                  ],
                  "limit": 1
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used from an origin that is not on its list. `error.name` is `OriginNotAllowed`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "OriginNotAllowed",
                    "message": "This publishable key doesn't work from this origin. Add the origin to the key, or use a secret key from a server."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "lat",
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90,
              "example": 51.9
            },
            "required": true,
            "description": "Latitude in decimal degrees."
          },
          {
            "in": "query",
            "name": "lon",
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180,
              "example": 4.5
            },
            "required": true,
            "description": "Longitude in decimal degrees."
          },
          {
            "in": "query",
            "name": "country",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              }
            },
            "description": "ISO 3166-1 alpha-2 country code in capitals, e.g. `NL`. Repeat it for several countries: `country=US&country=CA`."
          },
          {
            "in": "query",
            "name": "max_distance_km",
            "schema": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "description": "Leave out anything further away than this, in kilometres."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 10,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "How many to return."
          },
          {
            "in": "query",
            "name": "region",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^\\d{3}$"
              }
            },
            "description": "Only those in this region, by its M49 code, at any level: `150` for Europe, `155` for Western Europe. Repeat it for several. See [Regions and sea areas](https://waykite.com/docs/guides/regions-and-sea-areas)."
          },
          {
            "in": "query",
            "name": "function",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "port",
                  "rail_terminal",
                  "road_terminal",
                  "airport",
                  "postal_exchange",
                  "multimodal",
                  "fixed_transport",
                  "border_crossing"
                ]
              }
            },
            "description": "Only locations with any of these functions, e.g. `function=port`. Repeat it for several."
          }
        ]
      }
    },
    "/api/v1/locations/{code}/photos": {
      "get": {
        "operationId": "getLocationPhotos",
        "summary": "Get photos of a location",
        "description": "Photos of one location published under a free licence, the best first: of its port, or of the place where its port has none, then of its airport. Each is served from waykite.com, with its credit, its licence and the page it is published on, which the licence asks to be shown beside it.\n\nWhen no location has the code, the response is `204 No Content`, with an empty body.",
        "tags": [
          "Locations"
        ],
        "responses": {
          "200": {
            "description": "The location's photos, the best first.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Photo"
                  }
                },
                "example": [
                  {
                    "url": "https://waykite.com/view/locations/NLRTM/photos/123456789",
                    "width": 1280,
                    "height": 853,
                    "credit": "A. Photographer",
                    "license": "CC-BY-4.0",
                    "source": "https://commons.wikimedia.org/wiki/File:Port_of_Rotterdam.jpg"
                  }
                ]
              }
            }
          },
          "204": {
            "description": "No location has this code. The body is empty."
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used from an origin that is not on its list. `error.name` is `OriginNotAllowed`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "OriginNotAllowed",
                    "message": "This publishable key doesn't work from this origin. Add the origin to the key, or use a secret key from a server."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "code",
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "NLRTM"
            },
            "required": true,
            "description": "The location's code, e.g. `NLRTM`."
          }
        ]
      }
    },
    "/api/v1/locations/{code}": {
      "get": {
        "operationId": "getLocation",
        "summary": "Get a location",
        "description": "Look up one location by its code.\n\nThe code is the location's five-character UN/LOCODE: the country's two letters, then three letters or digits, e.g. `USNYC` or `SGSIN`. Case does not matter. When no location has the code, the response is `204 No Content`, with an empty body.",
        "tags": [
          "Locations"
        ],
        "responses": {
          "200": {
            "description": "The location.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Location"
                },
                "example": {
                  "code": "NLRTM",
                  "country": "NL",
                  "location": "RTM",
                  "name": "Rotterdam",
                  "subdivision": "ZH",
                  "regions": [
                    "150",
                    "155"
                  ],
                  "functions": [
                    "port",
                    "rail_terminal",
                    "road_terminal",
                    "airport",
                    "postal_exchange"
                  ],
                  "status": "AF",
                  "coordinates": {
                    "lat": 51.916667,
                    "lon": 4.5
                  },
                  "timezone": "Europe/Amsterdam",
                  "modalities": {
                    "port": {
                      "wpi_numbers": [
                        31140
                      ],
                      "type": "river_port",
                      "harbor": {
                        "size": "large",
                        "type": "river_basins",
                        "shelter": "fair"
                      },
                      "region": "Netherlands",
                      "navigation_area": "I",
                      "sea_area": "4",
                      "first_port_of_entry": true,
                      "repair_capability": "major",
                      "tidal_range_meters": 1,
                      "depths": {
                        "channel_meters": 11,
                        "anchorage_meters": 11,
                        "cargo_handling_meters": 6.4
                      },
                      "facilities": {
                        "drydock": true,
                        "medical": true,
                        "garbage_disposal": true,
                        "bunker_fuel": true,
                        "diesel": true,
                        "water": true,
                        "tugs": true,
                        "pilotage_available": true,
                        "pilotage_compulsory": true
                      },
                      "container_terminals": [
                        {
                          "name": "APM TERMINALS ROTTERDAM MAASVLAKTE 2",
                          "operator": "APM TERMINALS",
                          "smdg_code": "NLMVII",
                          "coordinates": {
                            "lat": 51.954167,
                            "lon": 4.003333
                          },
                          "website": "https://www.apmterminals.com/en/maasvlakte",
                          "address": "Europaweg 910, Port number 8410, 3199 LC Maasvlakte Rotterdam, The Netherlands"
                        },
                        {
                          "name": "BARGE CENTER WAALHAVEN (BCW)",
                          "operator": "WAALHAVEN GROUP",
                          "smdg_code": "RTMB",
                          "coordinates": {
                            "lat": 51.881667,
                            "lon": 4.435556
                          },
                          "website": "https://www.bargecenterwaalhaven.nl",
                          "address": "Waalhaven West Zijde 62, Port number 2503, 3089 KR Rotterdam, The Netherlands"
                        }
                      ]
                    },
                    "airport": {
                      "name": "Rotterdam The Hague Airport",
                      "icao": "EHRD",
                      "type": "large",
                      "scheduled_service": true,
                      "elevation_meters": -4.6,
                      "runways_summary": {
                        "count": 1,
                        "longest_meters": 2200,
                        "longest_paved": true
                      },
                      "runways": [
                        {
                          "designator": "06/24",
                          "length_meters": 2200,
                          "width_meters": 45,
                          "surface": "asphalt",
                          "paved": true,
                          "lighted": true
                        }
                      ]
                    }
                  },
                  "display_name": "Rotterdam, Netherlands"
                }
              }
            }
          },
          "204": {
            "description": "No location has this code. The body is empty."
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used from an origin that is not on its list. `error.name` is `OriginNotAllowed`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "OriginNotAllowed",
                    "message": "This publishable key doesn't work from this origin. Add the origin to the key, or use a secret key from a server."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "code",
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "USNYC"
            },
            "required": true,
            "description": "The location's code, e.g. `USNYC`."
          }
        ]
      }
    },
    "/api/v1/facilities/search": {
      "get": {
        "operationId": "searchFacilities",
        "summary": "Search facilities",
        "description": "Find terminals, anchorages and other facilities by name, operator or code.\n\nEvery facility has a code of its own. A container terminal's is its port's UN/LOCODE and its [terminal code](https://waykite.com/docs/guides/terminal-codes) together, the pair EDI messages carry (`DEHAMEGH`); an LNG or coal terminal's starts with `LNG` or `COAL`. Facilities in every status are returned unless `status` says otherwise.\n\nMatching is case-insensitive: `q` finds text anywhere in a facility's name or operator, or matches its code, terminal code or UN/LOCODE exactly. Short codes like `CT1` are too common to match in part. Names written with other spaces, punctuation or accents match too, when `q` holds punctuation or finds nothing as written: `ectdelta` finds ECT Delta.",
        "tags": [
          "Facilities"
        ],
        "responses": {
          "200": {
            "description": "A page of matching facilities. When `offset + limit` is less than `total`, there are more pages.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FacilitySummary"
                      }
                    },
                    "total": {
                      "type": "integer",
                      "description": "How many facilities match, across all pages."
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "results",
                    "total",
                    "limit",
                    "offset"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "results": [
                    {
                      "code": "NLRTM5049",
                      "type": "container_terminal",
                      "status": "operating",
                      "unlocode": "NLRTM",
                      "smdg_code": "5049",
                      "country": "NL",
                      "regions": [
                        "150",
                        "155"
                      ],
                      "name": "WAALHAVEN BOTLEK TERMINAL (WBT)",
                      "operator": "WAALHAVEN GROUP",
                      "cargo": [
                        "containers"
                      ],
                      "coordinates": {
                        "lat": 51.879722,
                        "lon": 4.239722
                      },
                      "timezone": "Europe/Amsterdam",
                      "website": "https://www.waalhavenbotlekterminal.nl/terminal/",
                      "address": "Nieuwesluisweg 268, Port number 5049, 3197 KV Rotterdam, The Netherlands",
                      "sea_area": "4",
                      "nearest_port": {
                        "unlocode": "NLBOT",
                        "distance_km": 3
                      },
                      "display_name": "Waalhaven Botlek Terminal (WBT)"
                    },
                    {
                      "code": "NLRTMBDP",
                      "type": "container_terminal",
                      "status": "operating",
                      "unlocode": "NLRTM",
                      "smdg_code": "BDP",
                      "country": "NL",
                      "regions": [
                        "150",
                        "155"
                      ],
                      "name": "BROEKMAN DISTRIPORT",
                      "operator": "BROEKMAN DISTRIPORT BV",
                      "cargo": [
                        "containers"
                      ],
                      "coordinates": {
                        "lat": 51.894444,
                        "lon": 4.236111
                      },
                      "timezone": "Europe/Amsterdam",
                      "website": "https://www.broekmanlogistics.com/en/offices/rotterdam-broekman-distriport",
                      "address": "Mannheimweg 3, 3197 LR Botlek Rotterdam, The Netherlands",
                      "sea_area": "4",
                      "nearest_port": {
                        "unlocode": "NLMSL",
                        "distance_km": 2.6
                      },
                      "display_name": "Broekman Distriport"
                    }
                  ],
                  "total": 20,
                  "limit": 2,
                  "offset": 0
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used from an origin that is not on its list. `error.name` is `OriginNotAllowed`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "OriginNotAllowed",
                    "message": "This publishable key doesn't work from this origin. Add the origin to the key, or use a secret key from a server."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "description": "Results per page."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0
            },
            "description": "How many results to skip, for the next page."
          },
          {
            "in": "query",
            "name": "q",
            "schema": {
              "default": "",
              "example": "eurogate",
              "type": "string"
            },
            "description": "Text to look for. Leave it out to list every facility that passes the filters."
          },
          {
            "in": "query",
            "name": "country",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              }
            },
            "description": "ISO 3166-1 alpha-2 country code in capitals, e.g. `NL`. Repeat it for several countries: `country=US&country=CA`."
          },
          {
            "in": "query",
            "name": "region",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^\\d{3}$"
              }
            },
            "description": "Only those in this region, by its M49 code, at any level: `150` for Europe, `155` for Western Europe. Repeat it for several. See [Regions and sea areas](https://waykite.com/docs/guides/regions-and-sea-areas)."
          },
          {
            "in": "query",
            "name": "sea_area",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^\\d{1,2}[A-Za-z]?$"
              }
            },
            "description": "Only those on this sea area, by its S-23 code, e.g. `4` for the North Sea. Case matters: `28A` is the Western Basin of the Mediterranean, `28a` the Strait of Gibraltar. Repeat it for several."
          },
          {
            "in": "query",
            "name": "unlocode",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^[A-Z]{2}[A-Z0-9]{3}$"
              }
            },
            "description": "Only facilities that are part of this location, by its code or an alternative one, e.g. `DEHAM`. Repeat it for several."
          },
          {
            "in": "query",
            "name": "type",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "container_terminal",
                  "lng_terminal",
                  "coal_terminal",
                  "oil_terminal",
                  "bulk_terminal",
                  "ferry_terminal",
                  "terminal",
                  "anchorage",
                  "sts_area"
                ]
              }
            },
            "description": "Only facilities of these kinds: `container_terminal`, `lng_terminal`, `coal_terminal`, `oil_terminal`, `bulk_terminal`, `ferry_terminal` (ferries and ro-ro ships), `terminal` (any other, or more than one kind of cargo), `anchorage` or `sts_area` (ship-to-ship transfer and lightering)."
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "operating",
                  "construction",
                  "idle",
                  "proposed",
                  "shelved",
                  "retired"
                ]
              }
            },
            "description": "Only facilities in these statuses: `operating`, `construction`, `idle`, `proposed`, `shelved` or `retired`. Leave it out for all of them."
          },
          {
            "in": "query",
            "name": "cargo",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "crude_oil",
                  "petroleum_products",
                  "chemicals",
                  "liquefied_gas",
                  "dry_bulk",
                  "general_cargo",
                  "containers",
                  "vehicles",
                  "passengers"
                ]
              }
            },
            "description": "Only facilities handling any of these kinds of cargo: `crude_oil`, `petroleum_products`, `chemicals`, `liquefied_gas`, `dry_bulk`, `general_cargo`, `containers`, `vehicles` or `passengers`. Facilities whose cargo is not known never match."
          }
        ]
      }
    },
    "/api/v1/facilities/nearby": {
      "get": {
        "operationId": "findNearbyFacilities",
        "summary": "Nearby facilities",
        "description": "Find the facilities closest to a point, nearest first.\n\nFor example, the terminal a vessel or a truck is at. Distances are great-circle distances in kilometres, rounded to 0.1 km.",
        "tags": [
          "Facilities"
        ],
        "responses": {
          "200": {
            "description": "The nearest facilities, closest first, each with its distance. There is no `total` or `offset`: ask for a larger `limit` to see more.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/NearbyFacility"
                      }
                    },
                    "limit": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "results",
                    "limit"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "results": [
                    {
                      "code": "NLRTMHPD2",
                      "type": "container_terminal",
                      "status": "operating",
                      "unlocode": "NLRTM",
                      "smdg_code": "HPD2",
                      "country": "NL",
                      "regions": [
                        "150",
                        "155"
                      ],
                      "name": "HUTCHISON DELTA II ROTTERDAM",
                      "operator": "HUTCHISON PORTS DELTA II",
                      "cargo": [
                        "containers"
                      ],
                      "coordinates": {
                        "lat": 51.9575,
                        "lon": 4.045833
                      },
                      "timezone": "Europe/Amsterdam",
                      "website": "https://www.hutchisonportsdelta2.com/",
                      "address": "Coloradoweg 50, Port number 8203, 3199 LA Maasvlakte Rotterdam, The Netherlands",
                      "notes": "APM Terminals Rotterdam until 2021-05-31.",
                      "sea_area": "4",
                      "nearest_port": {
                        "unlocode": "NLMSV",
                        "distance_km": 0.6
                      },
                      "display_name": "Hutchison Delta II Rotterdam",
                      "distance_km": 0.9
                    },
                    {
                      "code": "NLRTMDDE",
                      "type": "container_terminal",
                      "status": "operating",
                      "unlocode": "NLRTM",
                      "smdg_code": "DDE",
                      "country": "NL",
                      "regions": [
                        "150",
                        "155"
                      ],
                      "name": "ECT DELTA DEDICATED EAST (DDE)",
                      "operator": "HUTCHISON PORTS ECT ROTTERDAM",
                      "cargo": [
                        "containers"
                      ],
                      "coordinates": {
                        "lat": 51.950278,
                        "lon": 4.064167
                      },
                      "timezone": "Europe/Amsterdam",
                      "website": "https://www.ect.nl",
                      "address": "Europaweg 875, Port number 8200, 3199 LD Maasvlakte Rotterdam, The Netherlands",
                      "sea_area": "4",
                      "nearest_port": {
                        "unlocode": "NLMSV",
                        "distance_km": 1.2
                      },
                      "display_name": "ECT Delta Dedicated East (DDE)",
                      "distance_km": 1
                    }
                  ],
                  "limit": 2
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used from an origin that is not on its list. `error.name` is `OriginNotAllowed`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "OriginNotAllowed",
                    "message": "This publishable key doesn't work from this origin. Add the origin to the key, or use a secret key from a server."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "lat",
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90,
              "example": 51.9
            },
            "required": true,
            "description": "Latitude in decimal degrees."
          },
          {
            "in": "query",
            "name": "lon",
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180,
              "example": 4.5
            },
            "required": true,
            "description": "Longitude in decimal degrees."
          },
          {
            "in": "query",
            "name": "country",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              }
            },
            "description": "ISO 3166-1 alpha-2 country code in capitals, e.g. `NL`. Repeat it for several countries: `country=US&country=CA`."
          },
          {
            "in": "query",
            "name": "max_distance_km",
            "schema": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "description": "Leave out anything further away than this, in kilometres."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 10,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "How many to return."
          },
          {
            "in": "query",
            "name": "region",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^\\d{3}$"
              }
            },
            "description": "Only those in this region, by its M49 code, at any level: `150` for Europe, `155` for Western Europe. Repeat it for several. See [Regions and sea areas](https://waykite.com/docs/guides/regions-and-sea-areas)."
          },
          {
            "in": "query",
            "name": "type",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "container_terminal",
                  "lng_terminal",
                  "coal_terminal",
                  "oil_terminal",
                  "bulk_terminal",
                  "ferry_terminal",
                  "terminal",
                  "anchorage",
                  "sts_area"
                ]
              }
            },
            "description": "Only facilities of these kinds: `container_terminal`, `lng_terminal`, `coal_terminal`, `oil_terminal`, `bulk_terminal`, `ferry_terminal` (ferries and ro-ro ships), `terminal` (any other, or more than one kind of cargo), `anchorage` or `sts_area` (ship-to-ship transfer and lightering)."
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "operating",
                  "construction",
                  "idle",
                  "proposed",
                  "shelved",
                  "retired"
                ]
              }
            },
            "description": "Only facilities in these statuses: `operating`, `construction`, `idle`, `proposed`, `shelved` or `retired`. Leave it out for all of them."
          },
          {
            "in": "query",
            "name": "cargo",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "crude_oil",
                  "petroleum_products",
                  "chemicals",
                  "liquefied_gas",
                  "dry_bulk",
                  "general_cargo",
                  "containers",
                  "vehicles",
                  "passengers"
                ]
              }
            },
            "description": "Only facilities handling any of these kinds of cargo: `crude_oil`, `petroleum_products`, `chemicals`, `liquefied_gas`, `dry_bulk`, `general_cargo`, `containers`, `vehicles` or `passengers`. Facilities whose cargo is not known never match."
          }
        ]
      }
    },
    "/api/v1/facilities/{code}": {
      "get": {
        "operationId": "getFacility",
        "summary": "Get a facility",
        "description": "Look up one facility by its code.\n\nA container terminal's code is its port's UN/LOCODE followed by its [terminal code](https://waykite.com/docs/guides/terminal-codes), so the pair an EDI message carries finds it: `DEHAM` and `EGH` make `DEHAMEGH`. Case does not matter. When no facility matches, the response is `204 No Content`, with an empty body.",
        "tags": [
          "Facilities"
        ],
        "responses": {
          "200": {
            "description": "The facility.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Facility"
                },
                "example": {
                  "code": "NLRTMDDN",
                  "type": "container_terminal",
                  "status": "operating",
                  "unlocode": "NLRTM",
                  "smdg_code": "DDN",
                  "country": "NL",
                  "regions": [
                    "150",
                    "155"
                  ],
                  "name": "ECT DELTA DEDICATED NORTH (DDN)",
                  "operator": "HUTCHISON PORTS ECT ROTTERDAM",
                  "cargo": [
                    "containers"
                  ],
                  "coordinates": {
                    "lat": 51.958889,
                    "lon": 4.064722
                  },
                  "timezone": "Europe/Amsterdam",
                  "website": "https://www.ect.nl",
                  "address": "Europaweg 875, Port number 8200, 3199 LD Maasvlakte Rotterdam, The Netherlands",
                  "sea_area": "4",
                  "nearest_port": {
                    "unlocode": "NLMSV",
                    "distance_km": 1.4
                  },
                  "display_name": "ECT Delta Dedicated North (DDN)"
                }
              }
            }
          },
          "204": {
            "description": "No facility has these codes. The body is empty."
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used from an origin that is not on its list. `error.name` is `OriginNotAllowed`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "OriginNotAllowed",
                    "message": "This publishable key doesn't work from this origin. Add the origin to the key, or use a secret key from a server."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "code",
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "DEHAMEGH"
            },
            "required": true,
            "description": "The facility's code: for a container terminal, its port's UN/LOCODE and its [terminal code](https://waykite.com/docs/guides/terminal-codes) together; for an LNG or coal terminal, a code starting with `LNG` or `COAL`."
          }
        ]
      }
    },
    "/api/v1/navigation/aids/search": {
      "get": {
        "operationId": "searchNavigationAids",
        "summary": "Search navigation aids",
        "description": "Find lighthouses, buoys, beacons and other aids by name.\n\nMatching is case-insensitive and finds the text anywhere in an aid's name, which includes the place it belongs to where it is part of one: `rotterdam` finds the lights of Rotterdam's breakwaters. Names written with other spaces, punctuation or accents match too, when `q` holds punctuation or finds nothing as written.",
        "tags": [
          "Navigation"
        ],
        "responses": {
          "200": {
            "description": "A page of matching aids, by name. When `offset + limit` is less than `total`, there are more pages.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/NavigationAid"
                      }
                    },
                    "total": {
                      "type": "integer",
                      "description": "How many aids match, across all pages."
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "results",
                    "total",
                    "limit",
                    "offset"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "results": [
                    {
                      "id": "aid_0c1c9b4c42a7ee54fe722dd8",
                      "kind": "light",
                      "name": "Raffles",
                      "international_number": "F1693",
                      "country": "SG",
                      "coordinates": {
                        "lat": 1.160222,
                        "lon": 103.740775
                      },
                      "timezone": "Asia/Singapore",
                      "characteristics": [
                        "Fl.(3)W. period 20s",
                        "RACON O(- - - )"
                      ],
                      "height_m": 32,
                      "range_nm": 20,
                      "structure": "White round tower",
                      "remarks": "AIS (MMSI No 005631114). Radar Reflector. DGPS Station",
                      "nearest_port": {
                        "unlocode": "SGSEB",
                        "distance_km": 7.9
                      }
                    }
                  ],
                  "total": 1,
                  "limit": 50,
                  "offset": 0
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used from an origin that is not on its list. `error.name` is `OriginNotAllowed`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "OriginNotAllowed",
                    "message": "This publishable key doesn't work from this origin. Add the origin to the key, or use a secret key from a server."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "description": "Results per page."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0
            },
            "description": "How many results to skip, for the next page."
          },
          {
            "in": "query",
            "name": "q",
            "schema": {
              "default": "",
              "example": "raffles",
              "type": "string"
            },
            "description": "Text to look for. Leave it out to list every aid that passes the filters."
          },
          {
            "in": "query",
            "name": "country",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              }
            },
            "description": "ISO 3166-1 alpha-2 country code in capitals, e.g. `NL`. Repeat it for several countries: `country=US&country=CA`."
          },
          {
            "in": "query",
            "name": "kind",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "light",
                  "buoy",
                  "beacon",
                  "racon",
                  "fog_signal",
                  "virtual",
                  "radio_beacon",
                  "dgps",
                  "drilling_unit"
                ]
              }
            },
            "description": "Only aids of these kinds: `light`, `buoy`, `beacon`, `racon`, `fog_signal`, `virtual`, `radio_beacon`, `dgps` or `drilling_unit`. Leave it out for all of them."
          }
        ]
      }
    },
    "/api/v1/navigation/aids/nearby": {
      "get": {
        "operationId": "findNearbyNavigationAids",
        "summary": "Nearby navigation aids",
        "description": "Find the aids closest to a point, nearest first.\n\nFor example, the lights a ship passes on its way into port. Distances are great-circle distances in kilometres, rounded to 0.1 km.",
        "tags": [
          "Navigation"
        ],
        "responses": {
          "200": {
            "description": "The nearest aids, closest first, each with its distance. There is no `total` or `offset`: ask for a larger `limit` to see more.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/NearbyNavigationAid"
                      }
                    },
                    "limit": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "results",
                    "limit"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "results": [
                    {
                      "id": "aid_0c1c9b4c42a7ee54fe722dd8",
                      "kind": "light",
                      "name": "Raffles",
                      "international_number": "F1693",
                      "country": "SG",
                      "coordinates": {
                        "lat": 1.160222,
                        "lon": 103.740775
                      },
                      "timezone": "Asia/Singapore",
                      "characteristics": [
                        "Fl.(3)W. period 20s",
                        "RACON O(- - - )"
                      ],
                      "height_m": 32,
                      "range_nm": 20,
                      "structure": "White round tower",
                      "remarks": "AIS (MMSI No 005631114). Radar Reflector. DGPS Station",
                      "nearest_port": {
                        "unlocode": "SGSEB",
                        "distance_km": 7.9
                      },
                      "distance_km": 3.2
                    }
                  ],
                  "limit": 1
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used from an origin that is not on its list. `error.name` is `OriginNotAllowed`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "OriginNotAllowed",
                    "message": "This publishable key doesn't work from this origin. Add the origin to the key, or use a secret key from a server."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "lat",
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90,
              "example": 51.9
            },
            "required": true,
            "description": "Latitude in decimal degrees."
          },
          {
            "in": "query",
            "name": "lon",
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180,
              "example": 4.5
            },
            "required": true,
            "description": "Longitude in decimal degrees."
          },
          {
            "in": "query",
            "name": "country",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              }
            },
            "description": "ISO 3166-1 alpha-2 country code in capitals, e.g. `NL`. Repeat it for several countries: `country=US&country=CA`."
          },
          {
            "in": "query",
            "name": "max_distance_km",
            "schema": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "description": "Leave out anything further away than this, in kilometres."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 10,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "How many to return."
          },
          {
            "in": "query",
            "name": "kind",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "light",
                  "buoy",
                  "beacon",
                  "racon",
                  "fog_signal",
                  "virtual",
                  "radio_beacon",
                  "dgps",
                  "drilling_unit"
                ]
              }
            },
            "description": "Only aids of these kinds: `light`, `buoy`, `beacon`, `racon`, `fog_signal`, `virtual`, `radio_beacon`, `dgps` or `drilling_unit`. Leave it out for all of them."
          }
        ]
      }
    },
    "/api/v1/navigation/aids/within": {
      "get": {
        "operationId": "listNavigationAidsWithin",
        "summary": "Navigation aids in an area",
        "description": "List the aids in a box, by its edges in decimal degrees: everything a map shows, for example.\n\nA box whose west edge is east of its east edge crosses the antimeridian. At most 500 aids are returned; `truncated` says when there were more, and a smaller box shows them all.",
        "tags": [
          "Navigation"
        ],
        "responses": {
          "200": {
            "description": "The aids in the box.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/NavigationAid"
                      }
                    },
                    "truncated": {
                      "type": "boolean",
                      "description": "Whether the box holds more than 500."
                    }
                  },
                  "required": [
                    "results",
                    "truncated"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "results": [
                    {
                      "id": "aid_0c1c9b4c42a7ee54fe722dd8",
                      "kind": "light",
                      "name": "Raffles",
                      "international_number": "F1693",
                      "country": "SG",
                      "coordinates": {
                        "lat": 1.160222,
                        "lon": 103.740775
                      },
                      "timezone": "Asia/Singapore",
                      "characteristics": [
                        "Fl.(3)W. period 20s",
                        "RACON O(- - - )"
                      ],
                      "height_m": 32,
                      "range_nm": 20,
                      "structure": "White round tower",
                      "remarks": "AIS (MMSI No 005631114). Radar Reflector. DGPS Station",
                      "nearest_port": {
                        "unlocode": "SGSEB",
                        "distance_km": 7.9
                      }
                    }
                  ],
                  "truncated": false
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used from an origin that is not on its list. `error.name` is `OriginNotAllowed`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "OriginNotAllowed",
                    "message": "This publishable key doesn't work from this origin. Add the origin to the key, or use a secret key from a server."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "south",
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90,
              "example": 1.1
            },
            "required": true,
            "description": "The southern edge."
          },
          {
            "in": "query",
            "name": "west",
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180,
              "example": 103.6
            },
            "required": true,
            "description": "The western edge."
          },
          {
            "in": "query",
            "name": "north",
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90,
              "example": 1.4
            },
            "required": true,
            "description": "The northern edge."
          },
          {
            "in": "query",
            "name": "east",
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180,
              "example": 104.1
            },
            "required": true,
            "description": "The eastern edge."
          },
          {
            "in": "query",
            "name": "country",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              }
            },
            "description": "ISO 3166-1 alpha-2 country code in capitals, e.g. `NL`. Repeat it for several countries: `country=US&country=CA`."
          },
          {
            "in": "query",
            "name": "kind",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "light",
                  "buoy",
                  "beacon",
                  "racon",
                  "fog_signal",
                  "virtual",
                  "radio_beacon",
                  "dgps",
                  "drilling_unit"
                ]
              }
            },
            "description": "Only aids of these kinds: `light`, `buoy`, `beacon`, `racon`, `fog_signal`, `virtual`, `radio_beacon`, `dgps` or `drilling_unit`. Leave it out for all of them."
          }
        ]
      }
    },
    "/api/v1/navigation/aids/{id}": {
      "get": {
        "operationId": "getNavigationAid",
        "summary": "Get a navigation aid",
        "description": "Look up one aid by its `id`. When there is none, the response is `204 No Content`, with an empty body.",
        "tags": [
          "Navigation"
        ],
        "responses": {
          "200": {
            "description": "The aid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NavigationAid"
                },
                "example": {
                  "id": "aid_0c1c9b4c42a7ee54fe722dd8",
                  "kind": "light",
                  "name": "Raffles",
                  "international_number": "F1693",
                  "country": "SG",
                  "coordinates": {
                    "lat": 1.160222,
                    "lon": 103.740775
                  },
                  "timezone": "Asia/Singapore",
                  "characteristics": [
                    "Fl.(3)W. period 20s",
                    "RACON O(- - - )"
                  ],
                  "height_m": 32,
                  "range_nm": 20,
                  "structure": "White round tower",
                  "remarks": "AIS (MMSI No 005631114). Radar Reflector. DGPS Station",
                  "nearest_port": {
                    "unlocode": "SGSEB",
                    "distance_km": 7.9
                  }
                }
              }
            }
          },
          "204": {
            "description": "No aid has this id. The body is empty."
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used from an origin that is not on its list. `error.name` is `OriginNotAllowed`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "OriginNotAllowed",
                    "message": "This publishable key doesn't work from this origin. Add the origin to the key, or use a secret key from a server."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "aid_0c1c9b4c42a7ee54fe722dd8"
            },
            "required": true,
            "description": "The aid's id."
          }
        ]
      }
    },
    "/api/v1/regions": {
      "get": {
        "operationId": "listRegions",
        "summary": "List regions",
        "description": "Every M49 region, with the countries in each.\n\nLocations and facilities carry their country's region codes in `regions`, and search and nearby take `region` to keep to one. See [Regions and sea areas](https://waykite.com/docs/guides/regions-and-sea-areas).",
        "tags": [
          "Regions"
        ],
        "responses": {
          "200": {
            "description": "A page of regions, by code. When `offset + limit` is less than `total`, there are more pages.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Region"
                      }
                    },
                    "total": {
                      "type": "integer",
                      "description": "How many regions there are, across all pages."
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "results",
                    "total",
                    "limit",
                    "offset"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "results": [
                    {
                      "code": "150",
                      "name": "Europe",
                      "level": "region",
                      "countries": [
                        "AD",
                        "AL",
                        "AT",
                        "AX",
                        "BA",
                        "BE",
                        "BG",
                        "BY",
                        "CH",
                        "CZ",
                        "DE",
                        "DK",
                        "EE",
                        "ES",
                        "FI",
                        "FO",
                        "FR"
                      ]
                    },
                    {
                      "code": "155",
                      "name": "Western Europe",
                      "level": "sub_region",
                      "parent": "150",
                      "countries": [
                        "AT",
                        "BE",
                        "CH",
                        "DE",
                        "FR",
                        "LI",
                        "LU",
                        "MC",
                        "NL"
                      ]
                    }
                  ],
                  "total": 29,
                  "limit": 50,
                  "offset": 0
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used from an origin that is not on its list. `error.name` is `OriginNotAllowed`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "OriginNotAllowed",
                    "message": "This publishable key doesn't work from this origin. Add the origin to the key, or use a secret key from a server."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "description": "Results per page."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0
            },
            "description": "How many results to skip, for the next page."
          }
        ]
      }
    },
    "/api/v1/regions/{code}": {
      "get": {
        "operationId": "getRegion",
        "summary": "Get a region",
        "description": "Look up one region by its M49 code, e.g. `155` for Western Europe.\n\nWhen no region has the code, the response is `204 No Content`, with an empty body.",
        "tags": [
          "Regions"
        ],
        "responses": {
          "200": {
            "description": "The region.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Region"
                },
                "example": {
                  "code": "155",
                  "name": "Western Europe",
                  "level": "sub_region",
                  "parent": "150",
                  "countries": [
                    "AT",
                    "BE",
                    "CH",
                    "DE",
                    "FR",
                    "LI",
                    "LU",
                    "MC",
                    "NL"
                  ]
                }
              }
            }
          },
          "204": {
            "description": "No region has this code. The body is empty."
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used from an origin that is not on its list. `error.name` is `OriginNotAllowed`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "OriginNotAllowed",
                    "message": "This publishable key doesn't work from this origin. Add the origin to the key, or use a secret key from a server."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "code",
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "155"
            },
            "required": true,
            "description": "The region's M49 code, e.g. `155`."
          }
        ]
      }
    },
    "/api/v1/sea-areas": {
      "get": {
        "operationId": "listSeaAreas",
        "summary": "List sea areas",
        "description": "Every S-23 sea area, such as the North Sea or the Persian Gulf.\n\nPorts carry the sea area they are on in `modalities.port.sea_area`, and facilities in `sea_area`; search takes `sea_area` to keep to one. See [Regions and sea areas](https://waykite.com/docs/guides/regions-and-sea-areas).",
        "tags": [
          "Sea areas"
        ],
        "responses": {
          "200": {
            "description": "A page of sea areas, by code. When `offset + limit` is less than `total`, there are more pages.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SeaArea"
                      }
                    },
                    "total": {
                      "type": "integer",
                      "description": "How many sea areas there are, across all pages."
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "results",
                    "total",
                    "limit",
                    "offset"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "results": [
                    {
                      "code": "28A",
                      "name": "Mediterranean Sea - Western Basin"
                    },
                    {
                      "code": "28a",
                      "name": "Strait of Gibraltar"
                    },
                    {
                      "code": "4",
                      "name": "North Sea"
                    }
                  ],
                  "total": 101,
                  "limit": 50,
                  "offset": 0
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used from an origin that is not on its list. `error.name` is `OriginNotAllowed`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "OriginNotAllowed",
                    "message": "This publishable key doesn't work from this origin. Add the origin to the key, or use a secret key from a server."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "description": "Results per page."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0
            },
            "description": "How many results to skip, for the next page."
          }
        ]
      }
    },
    "/api/v1/sea-areas/{code}": {
      "get": {
        "operationId": "getSeaArea",
        "summary": "Get a sea area",
        "description": "Look up one sea area by its S-23 code, e.g. `4` for the North Sea.\n\nCase matters: `28A` is the Western Basin of the Mediterranean, `28a` the Strait of Gibraltar. When no sea area has the code, the response is `204 No Content`, with an empty body.",
        "tags": [
          "Sea areas"
        ],
        "responses": {
          "200": {
            "description": "The sea area.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeaArea"
                },
                "example": {
                  "code": "4",
                  "name": "North Sea"
                }
              }
            }
          },
          "204": {
            "description": "No sea area has this code. The body is empty."
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used from an origin that is not on its list. `error.name` is `OriginNotAllowed`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "OriginNotAllowed",
                    "message": "This publishable key doesn't work from this origin. Add the origin to the key, or use a secret key from a server."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "code",
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "4"
            },
            "required": true,
            "description": "The sea area's S-23 code, e.g. `4`."
          }
        ]
      }
    },
    "/api/v1/ports/{unlocode}/arrivals": {
      "get": {
        "operationId": "getPortArrivals",
        "summary": "Port arrivals",
        "description": "The ships expected at a port within the hours ahead, soonest first.\n\nEach comes with our estimate, `eta`, and the crew's own ETA beside it, `reported_eta`. Estimates are for passenger ships, ferries among them, cargo ships and tankers. A ship stays listed for a while past its estimate, until it is seen arriving.\n\nCoverage depends on the region: some ports have few ships heard near them, or none yet.",
        "tags": [
          "Ports"
        ],
        "responses": {
          "200": {
            "description": "The ships expected, soonest first.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "unlocode": {
                      "type": "string",
                      "description": "The code asked for."
                    },
                    "port": {
                      "type": "string",
                      "description": "The port that answered: the code asked for, or the port it is part of."
                    },
                    "within_hours": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 720
                    },
                    "arrivals": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PortArrival"
                      }
                    },
                    "calls_last_30_days": {
                      "type": "number",
                      "description": "How many calls cargo ships and tankers, the ships arrivals are estimated for, began at the port in the last 30 days: a sign of how well they are heard there. Few or none means the list is thin."
                    },
                    "record": {
                      "type": "object",
                      "properties": {
                        "days": {
                          "type": "integer",
                          "description": "How many days back the record goes."
                        },
                        "seagoing": {
                          "type": "object",
                          "properties": {
                            "arrivals": {
                              "type": "integer",
                              "description": "Arrivals seen in that time."
                            },
                            "named_day_ahead": {
                              "description": "Of those after a voyage of a day or more, the share whose port we had already named as the likeliest a day before, from 0 to 1. `null` until there are enough to tell.",
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "eta_error_h": {
                              "description": "How far, in hours, arrivals fell from the estimate we gave a day before, early or late: the median. `null` until there are enough to tell.",
                              "type": [
                                "number",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "arrivals",
                            "named_day_ahead",
                            "eta_error_h"
                          ],
                          "additionalProperties": false,
                          "description": "Seagoing ships, those with an IMO number."
                        },
                        "other": {
                          "type": "object",
                          "properties": {
                            "arrivals": {
                              "type": "integer",
                              "description": "Arrivals seen in that time."
                            },
                            "named_day_ahead": {
                              "description": "Of those after a voyage of a day or more, the share whose port we had already named as the likeliest a day before, from 0 to 1. `null` until there are enough to tell.",
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "eta_error_h": {
                              "description": "How far, in hours, arrivals fell from the estimate we gave a day before, early or late: the median. `null` until there are enough to tell.",
                              "type": [
                                "number",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "arrivals",
                            "named_day_ahead",
                            "eta_error_h"
                          ],
                          "additionalProperties": false,
                          "description": "The rest, mostly inland barges."
                        }
                      },
                      "required": [
                        "days",
                        "seagoing",
                        "other"
                      ],
                      "additionalProperties": false,
                      "description": "How well we foresaw the cargo ships and tankers that arrived at the port lately: a sign of how far to trust the list here."
                    }
                  },
                  "required": [
                    "unlocode",
                    "port",
                    "within_hours",
                    "arrivals",
                    "calls_last_30_days",
                    "record"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "unlocode": "NLRTM",
                  "port": "NLRTM",
                  "within_hours": 72,
                  "arrivals": [
                    {
                      "mmsi": 563254200,
                      "imo": 9987196,
                      "name": "CMA CGM SEINE",
                      "ship_type": 71,
                      "ship_category": "cargo",
                      "destination_raw": "NLRTM",
                      "probability": 0.95,
                      "basis": "destination",
                      "eta": "2026-10-26T17:23:45.042Z",
                      "eta_range": {
                        "earliest": "2026-10-26T15:23:45.042Z",
                        "latest": "2026-10-28T04:23:45.042Z"
                      },
                      "reported_eta": null,
                      "predicted_at": "2026-10-26T11:08:43.505Z",
                      "overdue": false,
                      "waiting": false,
                      "position": {
                        "at": "2026-10-26T11:08:43.505Z",
                        "lat": 51.89073166666667,
                        "lon": 3.417578333333333,
                        "speed_kn": 5.9
                      }
                    }
                  ],
                  "calls_last_30_days": 1253,
                  "record": {
                    "days": 28,
                    "seagoing": {
                      "arrivals": 612,
                      "named_day_ahead": 0.61,
                      "eta_error_h": 4.2
                    },
                    "other": {
                      "arrivals": 541,
                      "named_day_ahead": 0.22,
                      "eta_error_h": 3.1
                    }
                  }
                }
              }
            }
          },
          "204": {
            "description": "No location has this code. The body is empty."
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key's organization does not have port arrivals and calls (`FeatureNotAvailable`), or a publishable key was used from an origin that is not on its list (`OriginNotAllowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "FeatureNotAvailable",
                    "message": "Port arrivals and calls are not available to this organization."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "unlocode",
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{2}[A-Z0-9]{3}$",
              "example": "NLRTM"
            },
            "required": true,
            "description": "The port's UN/LOCODE. A terminal or harbour that is part of a larger port, such as Birkenhead's `GBBRK`, answers for that port, which `port` names."
          },
          {
            "in": "query",
            "name": "within",
            "schema": {
              "default": 168,
              "example": 72,
              "type": "integer",
              "minimum": 1,
              "maximum": 720
            },
            "description": "How far ahead to look, in hours, up to 720 (30 days)."
          }
        ]
      }
    },
    "/api/v1/ports/{unlocode}/congestion": {
      "get": {
        "operationId": "getPortCongestion",
        "summary": "Port congestion",
        "description": "How long seagoing cargo ships and tankers waited for a berth at a port over the last 30 days, how long they stayed at it, and how many are waiting now.\n\nA ship's wait runs from when it stopped off the port for it, at an anchorage or drifting within 50 km, or at anchor in the port, to its first berth. Each spread is the median and the 75th percentile, `null` where too few calls berthed to tell.\n\nCoverage depends on the region: some ports have few ships heard near them, or none yet.",
        "tags": [
          "Ports"
        ],
        "responses": {
          "200": {
            "description": "Waiting and time at berth at the port.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortCongestion"
                },
                "example": {
                  "unlocode": "NLRTM",
                  "port": "NLRTM",
                  "days": 30,
                  "cargo": {
                    "waiting_now": 9,
                    "calls": 412,
                    "waiting_h": {
                      "median": 3.4,
                      "p75": 14.8
                    },
                    "at_berth_h": {
                      "median": 21.2,
                      "p75": 33.5
                    }
                  },
                  "tanker": {
                    "waiting_now": 6,
                    "calls": 287,
                    "waiting_h": {
                      "median": 6.1,
                      "p75": 22.3
                    },
                    "at_berth_h": {
                      "median": 28.7,
                      "p75": 41.9
                    }
                  }
                }
              }
            }
          },
          "204": {
            "description": "No location has this code. The body is empty."
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key's organization does not have port arrivals and calls (`FeatureNotAvailable`), or a publishable key was used from an origin that is not on its list (`OriginNotAllowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "FeatureNotAvailable",
                    "message": "Port arrivals and calls are not available to this organization."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "unlocode",
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{2}[A-Z0-9]{3}$",
              "example": "NLRTM"
            },
            "required": true,
            "description": "The port's UN/LOCODE. A terminal or harbour that is part of a larger port, such as Birkenhead's `GBBRK`, answers for that port, which `port` names."
          }
        ]
      }
    },
    "/api/v1/ports/{unlocode}/calls": {
      "get": {
        "operationId": "getPortCalls",
        "summary": "Port calls",
        "description": "The calls at a port: those still open, and those that ended within the hours past, latest arrival first.\n\nA call runs from when a ship enters the port to when it leaves, with each stop at anchor or at a berth in between. Calls are kept for 90 days.\n\nCoverage depends on the region: some ports have few ships heard near them, or none yet.",
        "tags": [
          "Ports"
        ],
        "responses": {
          "200": {
            "description": "The calls, latest arrival first.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "unlocode": {
                      "type": "string",
                      "description": "The code asked for."
                    },
                    "port": {
                      "type": "string",
                      "description": "The port that answered: the code asked for, or the port it is part of."
                    },
                    "within_hours": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 2160
                    },
                    "calls": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PortCall"
                      }
                    }
                  },
                  "required": [
                    "unlocode",
                    "port",
                    "within_hours",
                    "calls"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "unlocode": "NLRTM",
                  "port": "NLRTM",
                  "within_hours": 168,
                  "calls": [
                    {
                      "mmsi": 636026002,
                      "imo": 1016721,
                      "name": "MSC MIGSAN",
                      "ship_type": 71,
                      "ship_category": "cargo",
                      "destination_raw": "NLRTM",
                      "arrived_at": "2026-10-26T15:48:58.414Z",
                      "departed_at": null,
                      "arrival_seen": false,
                      "gap": false,
                      "waited_from": null,
                      "stops": [
                        {
                          "kind": "berthed",
                          "area": "NLRTMDDN",
                          "area_name": "ECT Delta Dedicated North (DDN)",
                          "start": "2026-10-26T16:11:35.204Z",
                          "end": null
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "204": {
            "description": "No location has this code. The body is empty."
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key's organization does not have port arrivals and calls (`FeatureNotAvailable`), or a publishable key was used from an origin that is not on its list (`OriginNotAllowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "FeatureNotAvailable",
                    "message": "Port arrivals and calls are not available to this organization."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "unlocode",
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{2}[A-Z0-9]{3}$",
              "example": "NLRTM"
            },
            "required": true,
            "description": "The port's UN/LOCODE. A terminal or harbour that is part of a larger port, such as Birkenhead's `GBBRK`, answers for that port, which `port` names."
          },
          {
            "in": "query",
            "name": "within",
            "schema": {
              "default": 168,
              "example": 168,
              "type": "integer",
              "minimum": 1,
              "maximum": 2160
            },
            "description": "How far back to look for calls that ended, in hours, up to 2160 (90 days). Open calls are always included."
          },
          {
            "in": "query",
            "name": "type",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "passenger",
                  "cargo",
                  "tanker",
                  "service",
                  "fishing",
                  "other"
                ]
              }
            },
            "description": "Only the calls of ships of these kinds: `passenger`, `cargo`, `tanker`, `service`, `fishing` or `other`. Repeat it for several. Leave it out for every ship."
          }
        ]
      }
    },
    "/api/v1/vessels/sanctioned": {
      "get": {
        "operationId": "listSanctionedVessels",
        "summary": "Sanctioned vessels",
        "description": "Every sanction and port ban in force on ships, newest first: the ships the UN Security Council, the EU, the US and the UK sanction, and those the Paris MoU's port States refuse access to their ports. A ship on several lists is in the results once for each.\n\nUse `since` to fetch only what changed since you last asked: the ships listed since, and with `include_delisted`, those taken off a list since. They are a record of what the authorities publish, not a screening: a ship on none of them may still be sanctioned under a name or number the lists do not give, or by an authority not among these.",
        "tags": [
          "Vessels"
        ],
        "responses": {
          "200": {
            "description": "A page of sanctions, newest first. When `offset + limit` is less than `total`, there are more pages.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SanctionedVessels"
                },
                "example": {
                  "results": [
                    {
                      "id": "sanc_b7e27af418ec2eba01ef8f6a9489a808",
                      "imo": 9243320,
                      "authority": "gb",
                      "programmes": [
                        "Russia"
                      ],
                      "measures": [
                        "deregistration",
                        "port_entry_ban",
                        "services_ban"
                      ],
                      "listed_on": "2026-10-08",
                      "name": "YEHOPE",
                      "flag": "BB",
                      "reason": "The Secretary of State considers that there are reasonable grounds to suspect that IMO 9243320 (\"YEHOPE\") is, has been or is likely to be involved in activity whose object or effect is to destabilise Ukraine or undermine or threaten the territorial integrity, sovereignty or independence of Ukraine or to obtain a benefit from or support the Government of Russia. Namely, 9243320 is involved in carrying oil or oil products that originated in Russia from Russia to a third country."
                    },
                    {
                      "id": "sanc_6fc4cd5b88eeb47510f891f3b1e19740",
                      "imo": 8128858,
                      "authority": "paris_mou",
                      "country": "GR",
                      "programmes": [],
                      "measures": [
                        "port_entry_ban"
                      ],
                      "listed_on": "2026-04-06",
                      "name": "DIEVA",
                      "flag": "CM",
                      "reason": "Multiple detentions",
                      "occurrence": 1,
                      "minimum_months": 3
                    }
                  ],
                  "total": 3113,
                  "limit": 2,
                  "offset": 0
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key's organization does not have vessels (`FeatureNotAvailable`), or a publishable key was used from an origin that is not on its list (`OriginNotAllowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "FeatureNotAvailable",
                    "message": "Vessels are not available to this organization."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "description": "Results per page."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0
            },
            "description": "How many results to skip, for the next page."
          },
          {
            "in": "query",
            "name": "authority",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "un",
                  "eu",
                  "us",
                  "gb",
                  "paris_mou"
                ]
              }
            },
            "description": "Only those imposed by this authority: `un`, `eu`, `us`, `gb` or `paris_mou`. Repeat it for several; leave it out for all of them."
          },
          {
            "in": "query",
            "name": "since",
            "schema": {
              "example": "2026-10-01",
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "description": "Only ships listed on or after this day, YYYY-MM-DD, and with `include_delisted`, those taken off a list on or after it."
          },
          {
            "in": "query",
            "name": "include_delisted",
            "schema": {
              "type": "string"
            },
            "description": "Include the sanctions lifted since November 2026, each with the day it was lifted in `delisted_on`. They are left out by default."
          }
        ]
      }
    },
    "/api/v1/vessels/search": {
      "get": {
        "operationId": "searchVessels",
        "summary": "Search vessels",
        "description": "Find ships with an IMO number by name, a name they had before, IMO number, MMSI or call sign, and narrow them by flag, kind, size and the year they were built. A name matches in part, its words in any order, so `ever giv` finds EVER GIVEN; an IMO number, MMSI or call sign matches whole. Each result has the name the ship has now.\n\nThe best matches come first: the query exactly, then names starting with it and ships that had it as a name before, then the rest, the largest ships by gross tonnage first within each. Each result is a summary of the ship's [particulars](https://waykite.com/docs/api/vessels/particulars), as recorded; fetch those for the rest, or its [position](https://waykite.com/docs/api/vessels/position) for where it is.",
        "tags": [
          "Vessels"
        ],
        "responses": {
          "200": {
            "description": "A page of ships, best matches first. When `offset + limit` is less than `total`, there are more pages.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VesselSearchResult"
                },
                "example": {
                  "results": [
                    {
                      "imo": 9811000,
                      "mmsi": 636026627,
                      "name": "EVER GIVEN",
                      "call_sign": "A8AB9",
                      "flag": "LR",
                      "type": "container_ship",
                      "type_raw": "Container ship",
                      "ship_category": "cargo",
                      "gross_tonnage": 219079,
                      "deadweight": 199692,
                      "year_built": 2018,
                      "former_name": null
                    }
                  ],
                  "total": 1,
                  "limit": 50,
                  "offset": 0
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key's organization does not have vessels (`FeatureNotAvailable`), a publishable key was used from an origin that is not on its list (`OriginNotAllowed`), or a publishable key was used without `q` (`SecretKeyRequired`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "FeatureNotAvailable",
                    "message": "Vessels are not available to this organization."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "schema": {
              "example": "ever giv",
              "type": "string",
              "maxLength": 100
            },
            "description": "Part of a name or a former name, or an IMO number (7 digits), MMSI (9 digits) or call sign. Leave it out to list the ships that pass the filters, the largest first, with a secret key."
          },
          {
            "in": "query",
            "name": "flag",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              }
            },
            "description": "Only ships under this flag, ISO 3166-1 alpha-2, e.g. `LR`. Repeat it for several."
          },
          {
            "in": "query",
            "name": "category",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "passenger",
                  "cargo",
                  "tanker",
                  "service",
                  "fishing",
                  "other"
                ]
              }
            },
            "description": "Only ships of this kind: `passenger`, `cargo`, `tanker`, `service`, `fishing` or `other`. Repeat it for several; leave it out for all of them."
          },
          {
            "in": "query",
            "name": "min_deadweight",
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Only ships of at least this deadweight, in tonnes."
          },
          {
            "in": "query",
            "name": "max_deadweight",
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Only ships of at most this deadweight, in tonnes."
          },
          {
            "in": "query",
            "name": "built_from",
            "schema": {
              "example": 2015,
              "type": "integer",
              "minimum": 1800,
              "maximum": 2100
            },
            "description": "Only ships built in this year or later."
          },
          {
            "in": "query",
            "name": "built_to",
            "schema": {
              "type": "integer",
              "minimum": 1800,
              "maximum": 2100
            },
            "description": "Only ships built in this year or earlier."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "description": "Results per page."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0
            },
            "description": "How many results to skip, for the next page."
          }
        ]
      }
    },
    "/api/v1/vessels/positions": {
      "get": {
        "operationId": "getVesselPositions",
        "summary": "Vessel positions",
        "description": "Where several ships were last heard, and the ports they are in: up to 100 at once, each by its IMO number or MMSI, e.g. to show a fleet on a map. Each position is as [position](https://waykite.com/docs/api/vessels/position) gives it, in the order asked; a ship with no known position is left out.\n\nThe call counts as a request for each ship asked about.",
        "tags": [
          "Vessels"
        ],
        "responses": {
          "200": {
            "description": "Where the ships were last heard.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VesselPosition"
                      }
                    }
                  },
                  "required": [
                    "results"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "results": [
                    {
                      "mmsi": 563254200,
                      "imo": 9987196,
                      "at": "2026-10-26T19:41:27.369Z",
                      "lat": 51.903591666666664,
                      "lon": 3.4542516666666665,
                      "speed_kn": 0,
                      "course_deg": 276.3,
                      "heading_deg": 200,
                      "nav_status": 1,
                      "in_port": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key's organization does not have vessels (`FeatureNotAvailable`), or a publishable key was used from an origin that is not on its list (`OriginNotAllowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "FeatureNotAvailable",
                    "message": "Vessels are not available to this organization."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "schema": {
              "example": "imo:9811000",
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^imo:\\d{7}$"
                  },
                  {
                    "type": "string",
                    "pattern": "^mmsi:\\d{9}$"
                  }
                ]
              }
            },
            "required": true,
            "description": "A ship, as `imo:` and its IMO number or `mmsi:` and its MMSI. Repeat it for each ship, up to 100: `id=imo:9811000&id=mmsi:235009802`."
          }
        ]
      }
    },
    "/api/v1/vessels/nearby": {
      "get": {
        "operationId": "findNearbyVessels",
        "summary": "Nearby vessels",
        "description": "Find the ships last heard nearest a point, closest first, within 100 km. Distances are great-circle distances in kilometres, rounded to 0.1 km.\n\nEach ship is where it was last heard: a moving ship has its position kept every half hour or so, a ship at anchor or alongside every two hours. Coverage depends on the region, so a ship out of reach is missing rather than shown where it was days ago.",
        "tags": [
          "Vessels"
        ],
        "responses": {
          "200": {
            "description": "The nearest ships, closest first, each with its distance. There is no `total` or `offset`: ask for a larger `limit` or `max_distance_km` to see more.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/NearbyVessel"
                      }
                    },
                    "limit": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "results",
                    "limit"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "results": [
                    {
                      "mmsi": 563254200,
                      "imo": 9987196,
                      "name": "CMA CGM SEINE",
                      "ship_category": "cargo",
                      "position": {
                        "at": "2026-10-26T19:41:27.369Z",
                        "lat": 51.903591666666664,
                        "lon": 3.4542516666666665,
                        "speed_kn": 0,
                        "course_deg": 276.3,
                        "heading_deg": 200,
                        "nav_status": 1
                      },
                      "state": "stopped",
                      "in_port": null,
                      "distance_km": 2.4
                    }
                  ],
                  "limit": 1
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key's organization does not have vessels (`FeatureNotAvailable`), or a publishable key was used from an origin that is not on its list (`OriginNotAllowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "FeatureNotAvailable",
                    "message": "Vessels are not available to this organization."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "lat",
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90,
              "example": 51.9
            },
            "required": true,
            "description": "Latitude in decimal degrees."
          },
          {
            "in": "query",
            "name": "lon",
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180,
              "example": 3.5
            },
            "required": true,
            "description": "Longitude in decimal degrees."
          },
          {
            "in": "query",
            "name": "max_distance_km",
            "schema": {
              "default": 25,
              "type": "number",
              "exclusiveMinimum": 0,
              "maximum": 100
            },
            "description": "How far to look, in kilometres, up to 100."
          },
          {
            "in": "query",
            "name": "category",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "passenger",
                  "cargo",
                  "tanker",
                  "service",
                  "fishing",
                  "other"
                ]
              }
            },
            "description": "Only ships of this kind: `passenger`, `cargo`, `tanker`, `service`, `fishing` or `other`. Repeat it for several; leave it out for all of them."
          },
          {
            "in": "query",
            "name": "heard_within_hours",
            "schema": {
              "default": 6,
              "type": "integer",
              "minimum": 1,
              "maximum": 72
            },
            "description": "Only ships heard from within this many hours, up to 72."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "How many to return."
          }
        ]
      }
    },
    "/api/v1/vessels/within": {
      "get": {
        "operationId": "listVesselsWithin",
        "summary": "Vessels in an area",
        "description": "List the ships last heard in a box, by its edges in decimal degrees, the latest heard first: every ship a map shows, for example. A box may be up to 5 degrees a side, and one whose west edge is east of its east edge crosses the antimeridian.\n\nAt most 500 ships are returned; `truncated` says when there were more, and a smaller box or fewer kinds of ship shows them all. Each ship is where it was last heard: a moving ship has its position kept every half hour or so, a ship at anchor or alongside every two hours. Coverage depends on the region, so a ship out of reach is missing rather than shown where it was days ago.",
        "tags": [
          "Vessels"
        ],
        "responses": {
          "200": {
            "description": "The ships in the box, the latest heard first.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VesselInArea"
                      }
                    },
                    "truncated": {
                      "type": "boolean",
                      "description": "Whether the box holds more than 500."
                    }
                  },
                  "required": [
                    "results",
                    "truncated"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "results": [
                    {
                      "mmsi": 563254200,
                      "imo": 9987196,
                      "name": "CMA CGM SEINE",
                      "ship_category": "cargo",
                      "position": {
                        "at": "2026-10-26T19:41:27.369Z",
                        "lat": 51.903591666666664,
                        "lon": 3.4542516666666665,
                        "speed_kn": 0,
                        "course_deg": 276.3,
                        "heading_deg": 200,
                        "nav_status": 1
                      },
                      "state": "stopped",
                      "in_port": null
                    }
                  ],
                  "truncated": false
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key's organization does not have vessels (`FeatureNotAvailable`), or a publishable key was used from an origin that is not on its list (`OriginNotAllowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "FeatureNotAvailable",
                    "message": "Vessels are not available to this organization."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "south",
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90,
              "example": 51.8
            },
            "required": true,
            "description": "The southern edge."
          },
          {
            "in": "query",
            "name": "west",
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180,
              "example": 3.2
            },
            "required": true,
            "description": "The western edge."
          },
          {
            "in": "query",
            "name": "north",
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90,
              "example": 52.1
            },
            "required": true,
            "description": "The northern edge."
          },
          {
            "in": "query",
            "name": "east",
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180,
              "example": 4.2
            },
            "required": true,
            "description": "The eastern edge."
          },
          {
            "in": "query",
            "name": "category",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "passenger",
                  "cargo",
                  "tanker",
                  "service",
                  "fishing",
                  "other"
                ]
              }
            },
            "description": "Only ships of this kind: `passenger`, `cargo`, `tanker`, `service`, `fishing` or `other`. Repeat it for several; leave it out for all of them."
          },
          {
            "in": "query",
            "name": "heard_within_hours",
            "schema": {
              "default": 6,
              "type": "integer",
              "minimum": 1,
              "maximum": 72
            },
            "description": "Only ships heard from within this many hours, up to 72."
          }
        ]
      }
    },
    "/api/v1/vessels/{id}": {
      "get": {
        "operationId": "getVessel",
        "summary": "Get a vessel",
        "description": "Look up who a ship is by its IMO number or MMSI, as `imo:9811000` or `mmsi:235009802`: its name, call sign, type and size, as it broadcasts them, and a photo of it where one is published under a free licence.\n\nShow the photo with its `credit`, its `license` and a link to its `source`, as the licence asks.\n\nWhere it is and where it is going are endpoints of their own, as they change by the hour: [position](https://waykite.com/docs/api/vessels/position) and [voyage](https://waykite.com/docs/api/vessels/voyage). When no ship is known by the number, the response is `204 No Content`, with an empty body.",
        "tags": [
          "Vessels"
        ],
        "responses": {
          "200": {
            "description": "The vessel.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Vessel"
                },
                "example": {
                  "mmsi": 563254200,
                  "imo": 9987196,
                  "name": "CMA CGM SEINE",
                  "call_sign": "9VDH9",
                  "ship_type": 71,
                  "ship_category": "cargo",
                  "length_m": 400,
                  "beam_m": 62,
                  "photos": [
                    {
                      "url": "https://waykite.com/view/vessels/imo:9987196/photos/123456789",
                      "width": 1280,
                      "height": 853,
                      "credit": "A. Photographer",
                      "license": "CC-BY-SA-4.0",
                      "source": "https://commons.wikimedia.org/wiki/File:CMA_CGM_Seine.jpg"
                    }
                  ]
                }
              }
            }
          },
          "204": {
            "description": "No ship is known by this number. The body is empty."
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key's organization does not have vessels (`FeatureNotAvailable`), or a publishable key was used from an origin that is not on its list (`OriginNotAllowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "FeatureNotAvailable",
                    "message": "Vessels are not available to this organization."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^imo:\\d{7}$"
                },
                {
                  "type": "string",
                  "pattern": "^mmsi:\\d{9}$"
                }
              ],
              "example": "imo:9811000"
            },
            "required": true,
            "description": "The ship, by a typed identifier: `imo:` and its IMO number (7 digits), which stays with it for life, or `mmsi:` and its MMSI (9 digits), which changes when it changes flag. An IMO number finds the ship that last sent it."
          }
        ]
      }
    },
    "/api/v1/vessels/{id}/position": {
      "get": {
        "operationId": "getVesselPosition",
        "summary": "Vessel position",
        "description": "Where a ship was last heard, and the port it is in.\n\n`at` says how fresh the position is: a ship that goes unheard keeps the position it was last heard at, and coverage depends on the region. When no position is known for the ship, the response is `204 No Content`, with an empty body.",
        "tags": [
          "Vessels"
        ],
        "responses": {
          "200": {
            "description": "Where the ship was last heard.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VesselPosition"
                },
                "example": {
                  "mmsi": 563254200,
                  "imo": 9987196,
                  "at": "2026-10-26T19:41:27.369Z",
                  "lat": 51.903591666666664,
                  "lon": 3.4542516666666665,
                  "speed_kn": 0,
                  "course_deg": 276.3,
                  "heading_deg": 200,
                  "nav_status": 1,
                  "in_port": null
                }
              }
            }
          },
          "204": {
            "description": "No position is known for a ship by this number. The body is empty."
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key's organization does not have vessels (`FeatureNotAvailable`), or a publishable key was used from an origin that is not on its list (`OriginNotAllowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "FeatureNotAvailable",
                    "message": "Vessels are not available to this organization."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^imo:\\d{7}$"
                },
                {
                  "type": "string",
                  "pattern": "^mmsi:\\d{9}$"
                }
              ],
              "example": "imo:9811000"
            },
            "required": true,
            "description": "The ship, by a typed identifier: `imo:` and its IMO number (7 digits), which stays with it for life, or `mmsi:` and its MMSI (9 digits), which changes when it changes flag. An IMO number finds the ship that last sent it."
          }
        ]
      }
    },
    "/api/v1/vessels/{id}/voyage": {
      "get": {
        "operationId": "getVesselVoyage",
        "summary": "Vessel voyage",
        "description": "Where a ship is going, and when.\n\n`destination_raw` and `reported_eta` are what its crew broadcasts. `next_port` is our estimate for passenger ships, cargo ships and tankers at sea: the port the destination most likely means, and when we expect the ship there. When no ship is known by the number, the response is `204 No Content`, with an empty body.",
        "tags": [
          "Vessels"
        ],
        "responses": {
          "200": {
            "description": "Where the ship is going.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VesselVoyage"
                },
                "example": {
                  "mmsi": 563254200,
                  "imo": 9987196,
                  "destination_raw": "NLRTM",
                  "reported_eta": "2026-10-26T12:00:00.000Z",
                  "draught_m": 15.2,
                  "next_port": {
                    "unlocode": "NLRTM",
                    "probability": 0.95,
                    "eta": "2026-10-26T17:23:45.042Z",
                    "predicted_at": "2026-10-26T11:08:43.505Z"
                  }
                }
              }
            }
          },
          "204": {
            "description": "No ship is known by this number. The body is empty."
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key's organization does not have vessels (`FeatureNotAvailable`), or a publishable key was used from an origin that is not on its list (`OriginNotAllowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "FeatureNotAvailable",
                    "message": "Vessels are not available to this organization."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^imo:\\d{7}$"
                },
                {
                  "type": "string",
                  "pattern": "^mmsi:\\d{9}$"
                }
              ],
              "example": "imo:9811000"
            },
            "required": true,
            "description": "The ship, by a typed identifier: `imo:` and its IMO number (7 digits), which stays with it for life, or `mmsi:` and its MMSI (9 digits), which changes when it changes flag. An IMO number finds the ship that last sent it."
          }
        ]
      }
    },
    "/api/v1/vessels/{id}/calls": {
      "get": {
        "operationId": "getVesselCalls",
        "summary": "Vessel calls",
        "description": "The ports a ship called at, latest arrival first: any it is in now, and those of the last 90 days.\n\nA call runs from when the ship enters a port to when it leaves, with each stop at anchor or at a berth in between, as for [port calls](https://waykite.com/docs/api/ports/calls). Calls are kept by the ship that made them, by its MMSI: those it made under another MMSI, before a change of flag, are not among them. When no ship is known by the number, the response is `204 No Content`, with an empty body.",
        "tags": [
          "Vessels"
        ],
        "responses": {
          "200": {
            "description": "The ship's calls, latest arrival first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VesselCalls"
                },
                "example": {
                  "mmsi": 563254200,
                  "imo": 9987196,
                  "calls": [
                    {
                      "unlocode": "NLRTM",
                      "arrived_at": "2026-10-26T18:02:11.530Z",
                      "departed_at": null,
                      "arrival_seen": true,
                      "gap": false,
                      "waited_from": "2026-10-25T22:37:40.206Z",
                      "stops": [
                        {
                          "kind": "berthed",
                          "area": "NLRTMEMX",
                          "area_name": "ECT Euromax Terminal (EMX)",
                          "start": "2026-10-26T19:40:52.118Z",
                          "end": null
                        }
                      ]
                    },
                    {
                      "unlocode": "GBFXT",
                      "arrived_at": "2026-10-22T06:14:37.902Z",
                      "departed_at": "2026-10-23T21:48:05.317Z",
                      "arrival_seen": true,
                      "gap": false,
                      "waited_from": null,
                      "stops": [
                        {
                          "kind": "berthed",
                          "start": "2026-10-22T08:31:16.004Z",
                          "end": "2026-10-23T20:02:44.761Z"
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "204": {
            "description": "No ship is known by this number. The body is empty."
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key's organization does not have vessels (`FeatureNotAvailable`), or a publishable key was used from an origin that is not on its list (`OriginNotAllowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "FeatureNotAvailable",
                    "message": "Vessels are not available to this organization."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^imo:\\d{7}$"
                },
                {
                  "type": "string",
                  "pattern": "^mmsi:\\d{9}$"
                }
              ],
              "example": "imo:9811000"
            },
            "required": true,
            "description": "The ship, by a typed identifier: `imo:` and its IMO number (7 digits), which stays with it for life, or `mmsi:` and its MMSI (9 digits), which changes when it changes flag. An IMO number finds the ship that last sent it."
          }
        ]
      }
    },
    "/api/v1/vessels/{id}/particulars": {
      "get": {
        "operationId": "getVesselParticulars",
        "summary": "Vessel particulars",
        "description": "A ship's particulars: its name, flag, call sign and MMSI, the societies that class it, and its type, gross tonnage, deadweight, size, ice class, the year it was built and its builder.\n\nWho a ship is now comes from what it broadcasts when it has been heard lately, otherwise from records of the last year; a value not known is `null`. When no ship is known by the number, the response is `204 No Content`, with an empty body.",
        "tags": [
          "Vessels"
        ],
        "responses": {
          "200": {
            "description": "The ship's particulars.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VesselParticulars"
                },
                "example": {
                  "imo": 9811000,
                  "mmsi": 636026627,
                  "name": "EVER GIVEN",
                  "call_sign": "A8AB9",
                  "flag": "LR",
                  "former_names": [],
                  "former_flags": [
                    {
                      "flag": "PA",
                      "from": null,
                      "to": "2024-06-11"
                    }
                  ],
                  "class_societies": [
                    "AMERICAN BUREAU OF SHIPPING"
                  ],
                  "former_classes": [],
                  "classification": [
                    {
                      "society": "AMERICAN BUREAU OF SHIPPING",
                      "status": "in_class",
                      "status_date": "2018-09-26",
                      "status_reason": null,
                      "last_survey": "2023-09-20",
                      "next_survey": "2028-09-25",
                      "notation": "✠A1, Container Carrier, ✠AMS, ✠ACCU",
                      "register_url": "https://absrecord.eagle.org/#/absrecord/extSearch?ImoNum=9811000"
                    }
                  ],
                  "certificates": [
                    {
                      "type": "document_of_compliance",
                      "issuer": "AMERICAN BUREAU OF SHIPPING",
                      "issuer_kind": "recognized_organization",
                      "issued": "2024-03-14",
                      "expires": "2029-03-13",
                      "as_of": "2026-06-02"
                    },
                    {
                      "type": "minimum_safe_manning",
                      "issuer": "LR",
                      "issuer_kind": "flag_state",
                      "issued": "2023-11-08",
                      "expires": null,
                      "as_of": "2026-06-02"
                    }
                  ],
                  "ice_class": null,
                  "type": "container_ship",
                  "type_raw": "Container ship",
                  "gross_tonnage": 219079,
                  "deadweight": 199692,
                  "length_m": 400,
                  "beam_m": 59,
                  "year_built": 2018,
                  "builder": "Imabari Shipbuilding",
                  "recycled": null
                }
              }
            }
          },
          "204": {
            "description": "No ship is known by this number. The body is empty."
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key's organization does not have vessels (`FeatureNotAvailable`), or a publishable key was used from an origin that is not on its list (`OriginNotAllowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "FeatureNotAvailable",
                    "message": "Vessels are not available to this organization."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^imo:\\d{7}$"
                },
                {
                  "type": "string",
                  "pattern": "^mmsi:\\d{9}$"
                }
              ],
              "example": "imo:9811000"
            },
            "required": true,
            "description": "The ship, by a typed identifier: `imo:` and its IMO number (7 digits), or `mmsi:` and its MMSI (9 digits), which is looked up for the IMO number its particulars are recorded under."
          }
        ]
      }
    },
    "/api/v1/vessels/{id}/management": {
      "get": {
        "operationId": "getVesselManagement",
        "summary": "Vessel management",
        "description": "The companies behind a ship, each once: what each does for it, such as its registered owner, its operator or the company answering for it under the ISM Code, and the identifiers known for it, such as its IMO number, its Legal Entity Identifier and its number in the register it is incorporated in.\n\nOnly what was recorded in the last year is given; a ship with nothing recorded has no companies. When an MMSI names no ship with a known IMO number, the response is `204 No Content`, with an empty body.",
        "tags": [
          "Vessels"
        ],
        "responses": {
          "200": {
            "description": "The ship's companies.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VesselManagement"
                },
                "example": {
                  "imo": 1029352,
                  "companies": [
                    {
                      "name": "MAERSK LINE, LIMITED",
                      "roles": [
                        "doc_company",
                        "operator"
                      ],
                      "identifiers": {
                        "imo": "1135952"
                      },
                      "country": "US",
                      "as_of": "2026-10-29"
                    },
                    {
                      "name": "MAERSK A/S",
                      "roles": [
                        "registered_owner"
                      ],
                      "identifiers": {
                        "lei": "254900BLYIXBFFRLUJ90",
                        "registration": {
                          "number": "32345794",
                          "jurisdiction": "DK"
                        }
                      },
                      "website": "https://www.maersk.com/",
                      "parents": {
                        "direct": {
                          "lei": "549300D2K6PKKKXVNN73",
                          "name": "A.P. MØLLER - MÆRSK A/S",
                          "website": "https://www.maersk.com/"
                        },
                        "ultimate": {
                          "lei": "5493000HKHWS15XW2C38",
                          "name": "A.P. MØLLER HOLDING A/S",
                          "website": "https://apmoller.com"
                        }
                      },
                      "as_of": "2026-10-14"
                    }
                  ],
                  "charterers": []
                }
              }
            }
          },
          "204": {
            "description": "No ship with an IMO number is known by this MMSI. The body is empty."
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key's organization does not have vessels (`FeatureNotAvailable`), or a publishable key was used from an origin that is not on its list (`OriginNotAllowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "FeatureNotAvailable",
                    "message": "Vessels are not available to this organization."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^imo:\\d{7}$"
                },
                {
                  "type": "string",
                  "pattern": "^mmsi:\\d{9}$"
                }
              ],
              "example": "imo:9811000"
            },
            "required": true,
            "description": "The ship, by a typed identifier: `imo:` and its IMO number (7 digits), or `mmsi:` and its MMSI (9 digits), which is looked up for the IMO number its companies are recorded under."
          }
        ]
      }
    },
    "/api/v1/vessels/{id}/emissions": {
      "get": {
        "operationId": "getVesselEmissions",
        "summary": "Vessel emissions",
        "description": "A ship's yearly reports of the fuel it burned and the greenhouse gases it emitted on voyages to, from and between ports in the EU and the EEA, and in those ports, newest first, with methane, nitrous oxide and CO₂-equivalent where available.\n\nA ship that has not reported has no reports. When an MMSI names no ship with a known IMO number, the response is `204 No Content`, with an empty body.",
        "tags": [
          "Vessels"
        ],
        "responses": {
          "200": {
            "description": "The ship's reports.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VesselEmissions"
                },
                "example": {
                  "imo": 9987196,
                  "reports": [
                    {
                      "year": 2025,
                      "period": {
                        "from": "2025-01-01",
                        "to": "2025-12-31"
                      },
                      "partial": false,
                      "name": "CMA CGM SEINE",
                      "ship_type": "Container ship",
                      "technical_efficiency": {
                        "index": "EEXI",
                        "value": 5.36
                      },
                      "port_of_registry": "Singapore",
                      "home_port": "Singapore",
                      "company": {
                        "imo": "5463827",
                        "name": "CMA CGM INTERNATIONAL SHIPPING COMPANY PTE LTD"
                      },
                      "fuel": {
                        "total": 17977.8,
                        "on_laden": 17366.8
                      },
                      "co2": {
                        "total": 50051.407,
                        "between_ports": 1992.637,
                        "departing": 16798.003,
                        "arriving": 29591.182,
                        "at_berth": 1669.586,
                        "in_port": 1669.586,
                        "on_laden": 48381.821,
                        "emissions_trading": 26606.148
                      },
                      "ch4": {
                        "total": 263.077,
                        "between_ports": 6.36,
                        "departing": 90.729,
                        "arriving": 155.408,
                        "at_berth": 10.579
                      },
                      "n2o": {
                        "total": 2.202,
                        "between_ports": 0.098,
                        "departing": 0.729,
                        "arriving": 1.306,
                        "at_berth": 0.069
                      },
                      "co2eq": {
                        "total": 58001.087,
                        "between_ports": 2196.613,
                        "departing": 19531.683,
                        "arriving": 34288.648,
                        "at_berth": 1984.143,
                        "in_port": 1984.143,
                        "on_laden": 56016.944,
                        "emissions_trading": 26606.148
                      },
                      "hours_at_sea": 3829.56,
                      "fuel_efficiency": {
                        "per_distance": 289.98,
                        "per_tonne_mile": 2.06,
                        "laden": {
                          "per_distance": 280.12
                        }
                      },
                      "co2_efficiency": {
                        "per_distance": 807.32,
                        "per_tonne_mile": 5.72,
                        "laden": {
                          "per_distance": 780.39,
                          "per_tonne_mile": 5.53
                        }
                      },
                      "co2eq_efficiency": {
                        "per_distance": 935.54,
                        "per_tonne_mile": 6.63,
                        "laden": {
                          "per_distance": 903.54,
                          "per_tonne_mile": 6.4
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "204": {
            "description": "No ship with an IMO number is known by this MMSI. The body is empty."
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key's organization does not have vessels (`FeatureNotAvailable`), or a publishable key was used from an origin that is not on its list (`OriginNotAllowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "FeatureNotAvailable",
                    "message": "Vessels are not available to this organization."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^imo:\\d{7}$"
                },
                {
                  "type": "string",
                  "pattern": "^mmsi:\\d{9}$"
                }
              ],
              "example": "imo:9987196"
            },
            "required": true,
            "description": "The ship, by a typed identifier: `imo:` and its IMO number (7 digits), or `mmsi:` and its MMSI (9 digits), which is looked up for the IMO number its reports are filed under."
          }
        ]
      }
    },
    "/api/v1/vessels/{id}/inspections": {
      "get": {
        "operationId": "getVesselInspections",
        "summary": "Vessel inspections",
        "description": "A ship's inspections by port and flag States, newest first: the examinations carried out, the deficiencies found and what was asked of the ship, and any detention or other measure they led to.\n\nIn the United States, its port state control examinations since 2018 are on record. Elsewhere, only inspections that led to a detention are, from the lists of detained ships that port States publish: they have no `types`, and their grounds are in the detention's `reason` where the list gives no coded deficiencies.\n\nA ship with no inspections on record has none. When an MMSI names no ship with a known IMO number, the response is `204 No Content`, with an empty body.",
        "tags": [
          "Vessels"
        ],
        "responses": {
          "200": {
            "description": "The ship's inspections.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VesselInspections"
                },
                "example": {
                  "imo": 9955894,
                  "inspections": [
                    {
                      "id": "insp_babcf0ace16d2dd1dcf28266587844a5",
                      "imo": 9955894,
                      "date": "2026-02-27",
                      "country": "US",
                      "office": "Sector New Orleans",
                      "kind": "port_state",
                      "types": [
                        "PSC A"
                      ],
                      "ship": {
                        "name": "ROSTRUM HEDONIST",
                        "flag": "LR",
                        "type": "Bulk Carrier",
                        "class_societies": [
                          "LLOYD'S REGISTER"
                        ]
                      },
                      "detained": true,
                      "controls": [
                        {
                          "type": "IMO Related Detention",
                          "category": "Safety",
                          "reason": "Identified Hazardous/Unsafe Operation",
                          "detention": true,
                          "imposed": "2026-02-27",
                          "lifted": "2026-03-02"
                        }
                      ],
                      "deficiencies": [
                        {
                          "code": "06199",
                          "area": "Cargo Operations Including Equipment",
                          "item": "Other (cargo)",
                          "description": "Vessel is currently loaded with Ammonium Nitrate Based Fertilizer (UN 2067). PSCO identified that vessel's crew has not maintained records of cargo temperature in accordance with IMSBC carriage requirements.",
                          "action": "Ship detained",
                          "resolution": "Training for crew conducted to satisfaction of Flag/Class; copy of new cargo temperature log provided.",
                          "issued": "2026-02-27",
                          "resolved": "2026-03-02"
                        },
                        {
                          "code": "15109",
                          "area": "Safety Management Systems (ISM)",
                          "item": "Maintenance of the ship and equipment",
                          "description": "The operational nature of deficiency number 1 provides objective evidence of a serious failure of the implementation of the ISM Code. An external audit report must be submitted prior to clearance of this deficiency.",
                          "action": "Ship detained",
                          "resolution": "Received SMS audit results; SMS updated for UN 2067.",
                          "issued": "2026-02-27",
                          "resolved": "2026-03-02"
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "204": {
            "description": "No ship with an IMO number is known by this MMSI. The body is empty."
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key's organization does not have vessels (`FeatureNotAvailable`), or a publishable key was used from an origin that is not on its list (`OriginNotAllowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "FeatureNotAvailable",
                    "message": "Vessels are not available to this organization."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^imo:\\d{7}$"
                },
                {
                  "type": "string",
                  "pattern": "^mmsi:\\d{9}$"
                }
              ],
              "example": "imo:9357119"
            },
            "required": true,
            "description": "The ship, by a typed identifier: `imo:` and its IMO number (7 digits), or `mmsi:` and its MMSI (9 digits), which is looked up for the IMO number its inspections are recorded under."
          }
        ]
      }
    },
    "/api/v1/vessels/{id}/sanctions": {
      "get": {
        "operationId": "getVesselSanctions",
        "summary": "Vessel sanctions",
        "description": "The sanctions and port bans in force on a ship, newest first: whether the UN Security Council, the EU, the US or the UK sanctions it, under which programmes and with what measures, and whether the Paris MoU's port States refuse it access to their ports.\n\nA sanction lifted is left out, unless you ask for it with `include_delisted`. They are a record of what the authorities publish, not a screening: a ship on none of them may still be sanctioned under a name or number the lists do not give, or by an authority not among these.\n\nA ship on none of the lists has no sanctions. When an MMSI names no ship with a known IMO number, the response is `204 No Content`, with an empty body.",
        "tags": [
          "Vessels"
        ],
        "responses": {
          "200": {
            "description": "The ship's sanctions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VesselSanctions"
                },
                "example": {
                  "imo": 9243320,
                  "sanctions": [
                    {
                      "id": "sanc_b7e27af418ec2eba01ef8f6a9489a808",
                      "imo": 9243320,
                      "authority": "gb",
                      "programmes": [
                        "Russia"
                      ],
                      "measures": [
                        "deregistration",
                        "port_entry_ban",
                        "services_ban"
                      ],
                      "listed_on": "2026-10-08",
                      "name": "YEHOPE",
                      "flag": "BB",
                      "reason": "The Secretary of State considers that there are reasonable grounds to suspect that IMO 9243320 (\"YEHOPE\") is, has been or is likely to be involved in activity whose object or effect is to destabilise Ukraine or undermine or threaten the territorial integrity, sovereignty or independence of Ukraine or to obtain a benefit from or support the Government of Russia. Namely, 9243320 is involved in carrying oil or oil products that originated in Russia from Russia to a third country."
                    },
                    {
                      "id": "sanc_3c5792784a53aac2990c950017365841",
                      "imo": 9243320,
                      "authority": "us",
                      "programmes": [
                        "IRAN-EO13902"
                      ],
                      "measures": [
                        "asset_freeze"
                      ],
                      "listed_on": "2026-07-29",
                      "name": "YEHOPE",
                      "flag": "BB"
                    },
                    {
                      "id": "sanc_6ea7846dcaf52d671dae5950d3ee1cea",
                      "imo": 9243320,
                      "authority": "eu",
                      "programmes": [
                        "Russia"
                      ],
                      "measures": [
                        "port_entry_ban",
                        "services_ban"
                      ],
                      "listed_on": "2026-07-24",
                      "name": "Yehope"
                    }
                  ]
                }
              }
            }
          },
          "204": {
            "description": "No ship with an IMO number is known by this MMSI. The body is empty."
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key's organization does not have vessels (`FeatureNotAvailable`), or a publishable key was used from an origin that is not on its list (`OriginNotAllowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "FeatureNotAvailable",
                    "message": "Vessels are not available to this organization."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^imo:\\d{7}$"
                },
                {
                  "type": "string",
                  "pattern": "^mmsi:\\d{9}$"
                }
              ],
              "example": "imo:9243320"
            },
            "required": true,
            "description": "The ship, by a typed identifier: `imo:` and its IMO number (7 digits), or `mmsi:` and its MMSI (9 digits), which is looked up for the IMO number its sanctions are listed under."
          },
          {
            "in": "query",
            "name": "include_delisted",
            "schema": {
              "type": "string"
            },
            "description": "Include the sanctions lifted since November 2026, each with the day it was lifted in `delisted_on`. They are left out by default."
          }
        ]
      }
    },
    "/api/v1/watchlist": {
      "get": {
        "operationId": "listWatches",
        "summary": "List the watchlist",
        "description": "The ports and ships the organization watches, ports first. Its webhook endpoints hear about them: see [Webhooks](https://waykite.com/docs/guides/webhooks).",
        "tags": [
          "Watchlist"
        ],
        "responses": {
          "200": {
            "description": "The watchlist.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "watches": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Watch"
                      }
                    }
                  },
                  "required": [
                    "watches"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "watches": [
                    {
                      "id": "0f3c1b9e-7d52-4a8e-9c61-2b84d5e7a310",
                      "port": "NLRTM",
                      "vessel": null,
                      "name": "Rotterdam",
                      "topics": [
                        "ais"
                      ],
                      "created_at": "2026-10-26T09:20:31.774Z"
                    },
                    {
                      "id": "6a2d8f41-c3b7-4e09-8f15-d97e0b4c2a68",
                      "port": null,
                      "vessel": "imo:9987196",
                      "name": "CMA CGM SEINE",
                      "topics": [
                        "ais",
                        "inspections",
                        "sanctions"
                      ],
                      "created_at": "2026-10-26T09:21:05.230Z"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used (`SecretKeyRequired`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "SecretKeyRequired",
                    "message": "The watchlist is managed with a secret key, from a server."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createWatch",
        "summary": "Watch a port or ship",
        "description": "Adds a port, by its UN/LOCODE, or a ship by `imo:` or `mmsi:`, one AIS has heard or, by its IMO number, one with a record, an inspection or a sanction on file, up to 100 an organization. A terminal or harbour that is part of a larger port is watched as that port; a ship is best watched by its IMO number, which stays with it when it changes flag. Without `topics`, a port is watched for `ais` and a ship for `ais`, `inspections` and `sanctions`. One already watched comes back as it is. Sends `watch.created` to the webhook endpoints that ask for it.",
        "tags": [
          "Watchlist"
        ],
        "responses": {
          "200": {
            "description": "The watch.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Watch"
                },
                "example": {
                  "id": "6a2d8f41-c3b7-4e09-8f15-d97e0b4c2a68",
                  "port": null,
                  "vessel": "imo:9987196",
                  "name": "CMA CGM SEINE",
                  "topics": [
                    "ais",
                    "inspections",
                    "sanctions"
                  ],
                  "created_at": "2026-10-26T09:21:05.230Z"
                }
              }
            }
          },
          "400": {
            "description": "The code is not a port (`NotAPort`), no ship is known by the number (`UnknownVessel`), a port is to be watched for `inspections` or `sanctions` (`TopicNotForPorts`), or the organization watches 100 already (`WatchLimitReached`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "UnknownVessel",
                    "message": "No ship is known by this number."
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used (`SecretKeyRequired`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "SecretKeyRequired",
                    "message": "The watchlist is managed with a secret key, from a server."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "port": {
                        "type": "string",
                        "pattern": "^[A-Z]{2}[A-Z0-9]{3}$",
                        "description": "A port, by its UN/LOCODE.",
                        "example": "NLRTM"
                      },
                      "topics": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "ais",
                            "inspections",
                            "sanctions"
                          ]
                        },
                        "description": "What of it to hear about: `ais`, the arrivals and calls of its ships, and for a ship, `inspections`, those recorded of it, and `sanctions`, those it is placed under."
                      }
                    },
                    "required": [
                      "port"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "vessel": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^imo:\\d{7}$"
                          },
                          {
                            "type": "string",
                            "pattern": "^mmsi:\\d{9}$"
                          }
                        ],
                        "description": "A ship, by `imo:` or `mmsi:`.",
                        "example": "imo:9987196"
                      },
                      "topics": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "ais",
                            "inspections",
                            "sanctions"
                          ]
                        },
                        "description": "What of it to hear about: `ais`, the arrivals and calls of its ships, and for a ship, `inspections`, those recorded of it, and `sanctions`, those it is placed under."
                      }
                    },
                    "required": [
                      "vessel"
                    ]
                  }
                ],
                "examples": [
                  {
                    "vessel": "imo:9987196",
                    "topics": [
                      "ais",
                      "inspections",
                      "sanctions"
                    ]
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/api/v1/watchlist/{id}": {
      "get": {
        "operationId": "getWatch",
        "summary": "Get a watch",
        "description": "A port or ship on the watchlist.",
        "tags": [
          "Watchlist"
        ],
        "responses": {
          "200": {
            "description": "The watch.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Watch"
                },
                "example": {
                  "id": "0f3c1b9e-7d52-4a8e-9c61-2b84d5e7a310",
                  "port": "NLRTM",
                  "vessel": null,
                  "name": "Rotterdam",
                  "topics": [
                    "ais"
                  ],
                  "created_at": "2026-10-26T09:20:31.774Z"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used (`SecretKeyRequired`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "SecretKeyRequired",
                    "message": "The watchlist is managed with a secret key, from a server."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Nothing on the watchlist has this id (`NotFound`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "NotFound",
                    "message": "Nothing on the watchlist has this id."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "0f3c1b9e-7d52-4a8e-9c61-2b84d5e7a310"
            },
            "required": true,
            "description": "The watch's id."
          }
        ]
      },
      "patch": {
        "operationId": "updateWatch",
        "summary": "Update a watch",
        "description": "Changes what the webhook endpoints hear about a port or ship. Sends `watch.updated` to the webhook endpoints that ask for it.",
        "tags": [
          "Watchlist"
        ],
        "responses": {
          "200": {
            "description": "The watch as it is now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Watch"
                },
                "example": {
                  "id": "6a2d8f41-c3b7-4e09-8f15-d97e0b4c2a68",
                  "port": null,
                  "vessel": "imo:9987196",
                  "name": "CMA CGM SEINE",
                  "topics": [
                    "ais",
                    "inspections",
                    "sanctions"
                  ],
                  "created_at": "2026-10-26T09:21:05.230Z"
                }
              }
            }
          },
          "400": {
            "description": "A port is to be watched for `inspections` or `sanctions` (`TopicNotForPorts`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "TopicNotForPorts",
                    "message": "Only a ship can be watched for its inspections and sanctions."
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used (`SecretKeyRequired`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "SecretKeyRequired",
                    "message": "The watchlist is managed with a secret key, from a server."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Nothing on the watchlist has this id (`NotFound`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "NotFound",
                    "message": "Nothing on the watchlist has this id."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "0f3c1b9e-7d52-4a8e-9c61-2b84d5e7a310"
            },
            "required": true,
            "description": "The watch's id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "topics": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "ais",
                        "inspections",
                        "sanctions"
                      ]
                    },
                    "description": "What of it to hear about: `ais`, the arrivals and calls of its ships, and for a ship, `inspections`, those recorded of it, and `sanctions`, those it is placed under."
                  }
                },
                "required": [
                  "topics"
                ],
                "examples": [
                  {
                    "topics": [
                      "ais",
                      "inspections",
                      "sanctions"
                    ]
                  }
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteWatch",
        "summary": "Stop watching",
        "description": "Takes a port or ship off the watchlist. Sends `watch.deleted` to the webhook endpoints that ask for it.",
        "tags": [
          "Watchlist"
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "deleted": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "id",
                    "deleted"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "id": "0f3c1b9e-7d52-4a8e-9c61-2b84d5e7a310",
                  "deleted": true
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used (`SecretKeyRequired`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "SecretKeyRequired",
                    "message": "The watchlist is managed with a secret key, from a server."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Nothing on the watchlist has this id (`NotFound`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "NotFound",
                    "message": "Nothing on the watchlist has this id."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "0f3c1b9e-7d52-4a8e-9c61-2b84d5e7a310"
            },
            "required": true,
            "description": "The watch's id."
          }
        ]
      }
    },
    "/api/v1/webhooks/endpoints": {
      "get": {
        "operationId": "listWebhookEndpoints",
        "summary": "List endpoints",
        "description": "The organization's webhook endpoints, oldest first.",
        "tags": [
          "Webhooks"
        ],
        "responses": {
          "200": {
            "description": "The endpoints.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "endpoints": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookEndpoint"
                      }
                    }
                  },
                  "required": [
                    "endpoints"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "endpoints": [
                    {
                      "id": "555cd35b-636b-4109-a621-6fcacbd296a8",
                      "url": "https://example.com/webhooks/waykite",
                      "description": "Arrivals for the operations team",
                      "events": [
                        "port.arrival.expected",
                        "port.call.arrived",
                        "port.call.departed"
                      ],
                      "state": "active",
                      "failing_since": null,
                      "disabled_at": null,
                      "previous_secret_until": null,
                      "created_at": "2026-10-26T09:12:44.318Z"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used (`SecretKeyRequired`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "SecretKeyRequired",
                    "message": "Webhooks are managed with a secret key, from a server."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createWebhookEndpoint",
        "summary": "Create an endpoint",
        "description": "Adds an endpoint, up to 10 an organization. The answer has its signing secret, which [Get the secret](https://waykite.com/docs/api/webhooks/secret) gives again.",
        "tags": [
          "Webhooks"
        ],
        "responses": {
          "200": {
            "description": "The endpoint and its secret.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "endpoint": {
                      "$ref": "#/components/schemas/WebhookEndpoint"
                    },
                    "secret": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "endpoint",
                    "secret"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "endpoint": {
                    "id": "555cd35b-636b-4109-a621-6fcacbd296a8",
                    "url": "https://example.com/webhooks/waykite",
                    "description": "Arrivals for the operations team",
                    "events": [
                      "port.arrival.expected",
                      "port.call.arrived",
                      "port.call.departed"
                    ],
                    "state": "active",
                    "failing_since": null,
                    "disabled_at": null,
                    "previous_secret_until": null,
                    "created_at": "2026-10-26T09:12:44.318Z"
                  },
                  "secret": "whsec_SgyrWT7p4tgTAoZRN3xlezbWMxu6iW2sP3choQX21Dk="
                }
              }
            }
          },
          "400": {
            "description": "A field is invalid, or the organization has 10 endpoints already (`EndpointLimitReached`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "EndpointLimitReached",
                    "message": "An organization can have up to 10 endpoints."
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used (`SecretKeyRequired`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "SecretKeyRequired",
                    "message": "Webhooks are managed with a secret key, from a server."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri"
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "events": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "port.arrival.expected",
                        "port.call.arrived",
                        "port.call.departed",
                        "vessel.arrival.expected",
                        "vessel.call.arrived",
                        "vessel.call.departed",
                        "vessel.inspection.recorded",
                        "vessel.inspection.updated",
                        "vessel.inspection.withdrawn",
                        "vessel.sanction.listed",
                        "vessel.sanction.delisted",
                        "watch.created",
                        "watch.updated",
                        "watch.deleted"
                      ]
                    }
                  }
                },
                "required": [
                  "url",
                  "events"
                ]
              }
            }
          }
        }
      }
    },
    "/api/v1/webhooks/endpoints/{id}": {
      "get": {
        "operationId": "getWebhookEndpoint",
        "summary": "Get an endpoint",
        "tags": [
          "Webhooks"
        ],
        "responses": {
          "200": {
            "description": "The endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                },
                "example": {
                  "id": "555cd35b-636b-4109-a621-6fcacbd296a8",
                  "url": "https://example.com/webhooks/waykite",
                  "description": "Arrivals for the operations team",
                  "events": [
                    "port.arrival.expected",
                    "port.call.arrived",
                    "port.call.departed"
                  ],
                  "state": "active",
                  "failing_since": null,
                  "disabled_at": null,
                  "previous_secret_until": null,
                  "created_at": "2026-10-26T09:12:44.318Z"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used (`SecretKeyRequired`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "SecretKeyRequired",
                    "message": "Webhooks are managed with a secret key, from a server."
                  }
                }
              }
            }
          },
          "404": {
            "description": "No endpoint or delivery of the organization has this id (`NotFound`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "NotFound",
                    "message": "No webhook endpoint has this id."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "The endpoint's id."
          }
        ]
      },
      "patch": {
        "operationId": "updateWebhookEndpoint",
        "summary": "Update an endpoint",
        "description": "Changes the fields given. `enabled: false` turns the endpoint off; `enabled: true` turns it back on, no longer failing.",
        "tags": [
          "Webhooks"
        ],
        "responses": {
          "200": {
            "description": "The endpoint as it is now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                },
                "example": {
                  "id": "555cd35b-636b-4109-a621-6fcacbd296a8",
                  "url": "https://example.com/webhooks/waykite",
                  "description": "Arrivals for the operations team",
                  "events": [
                    "port.arrival.expected",
                    "port.call.arrived",
                    "port.call.departed"
                  ],
                  "state": "active",
                  "failing_since": null,
                  "disabled_at": null,
                  "previous_secret_until": null,
                  "created_at": "2026-10-26T09:12:44.318Z"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used (`SecretKeyRequired`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "SecretKeyRequired",
                    "message": "Webhooks are managed with a secret key, from a server."
                  }
                }
              }
            }
          },
          "404": {
            "description": "No endpoint or delivery of the organization has this id (`NotFound`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "NotFound",
                    "message": "No webhook endpoint has this id."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "The endpoint's id."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri"
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "events": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "port.arrival.expected",
                        "port.call.arrived",
                        "port.call.departed",
                        "vessel.arrival.expected",
                        "vessel.call.arrived",
                        "vessel.call.departed",
                        "vessel.inspection.recorded",
                        "vessel.inspection.updated",
                        "vessel.inspection.withdrawn",
                        "vessel.sanction.listed",
                        "vessel.sanction.delisted",
                        "watch.created",
                        "watch.updated",
                        "watch.deleted"
                      ]
                    }
                  },
                  "enabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteWebhookEndpoint",
        "summary": "Delete an endpoint",
        "description": "Its deliveries are deleted with it.",
        "tags": [
          "Webhooks"
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "deleted": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "id",
                    "deleted"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "id": "555cd35b-636b-4109-a621-6fcacbd296a8",
                  "deleted": true
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used (`SecretKeyRequired`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "SecretKeyRequired",
                    "message": "Webhooks are managed with a secret key, from a server."
                  }
                }
              }
            }
          },
          "404": {
            "description": "No endpoint or delivery of the organization has this id (`NotFound`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "NotFound",
                    "message": "No webhook endpoint has this id."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "The endpoint's id."
          }
        ]
      }
    },
    "/api/v1/webhooks/endpoints/{id}/secret": {
      "get": {
        "operationId": "getWebhookSecret",
        "summary": "Get the secret",
        "description": "The endpoint's signing secret, and after a roll, the previous one while it still signs.",
        "tags": [
          "Webhooks"
        ],
        "responses": {
          "200": {
            "description": "The secrets.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSecret"
                },
                "example": {
                  "secret": "whsec_SgyrWT7p4tgTAoZRN3xlezbWMxu6iW2sP3choQX21Dk=",
                  "previous": null
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used (`SecretKeyRequired`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "SecretKeyRequired",
                    "message": "Webhooks are managed with a secret key, from a server."
                  }
                }
              }
            }
          },
          "404": {
            "description": "No endpoint or delivery of the organization has this id (`NotFound`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "NotFound",
                    "message": "No webhook endpoint has this id."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "The endpoint's id."
          }
        ]
      }
    },
    "/api/v1/webhooks/endpoints/{id}/roll": {
      "post": {
        "operationId": "rollWebhookSecret",
        "summary": "Roll the secret",
        "description": "Gives the endpoint a new secret. For `grace_hours` the old one keeps signing as well, so the receiver can move over first.",
        "tags": [
          "Webhooks"
        ],
        "responses": {
          "200": {
            "description": "The new secret.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "secret": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "secret"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "secret": "whsec_SgyrWT7p4tgTAoZRN3xlezbWMxu6iW2sP3choQX21Dk="
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used (`SecretKeyRequired`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "SecretKeyRequired",
                    "message": "Webhooks are managed with a secret key, from a server."
                  }
                }
              }
            }
          },
          "404": {
            "description": "No endpoint or delivery of the organization has this id (`NotFound`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "NotFound",
                    "message": "No webhook endpoint has this id."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "The endpoint's id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "grace_hours": {
                    "type": "number",
                    "enum": [
                      0,
                      1,
                      24,
                      168
                    ],
                    "description": "How long the old secret keeps signing."
                  }
                },
                "required": [
                  "grace_hours"
                ]
              }
            }
          }
        }
      }
    },
    "/api/v1/webhooks/endpoints/{id}/test": {
      "post": {
        "operationId": "testWebhookEndpoint",
        "summary": "Send a test event",
        "description": "Sends the endpoint a `webhook.test` event, whatever events it asks for.",
        "tags": [
          "Webhooks"
        ],
        "responses": {
          "200": {
            "description": "Queued.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "delivery_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "delivery_id"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "delivery_id": "msg_7707d6db627a4f6a9abf5a698b33f9f4"
                }
              }
            }
          },
          "400": {
            "description": "The endpoint is turned off (`EndpointOff`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "EndpointOff",
                    "message": "Turn the endpoint on first."
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used (`SecretKeyRequired`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "SecretKeyRequired",
                    "message": "Webhooks are managed with a secret key, from a server."
                  }
                }
              }
            }
          },
          "404": {
            "description": "No endpoint or delivery of the organization has this id (`NotFound`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "NotFound",
                    "message": "No webhook endpoint has this id."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "The endpoint's id."
          }
        ]
      }
    },
    "/api/v1/webhooks/deliveries": {
      "get": {
        "operationId": "listWebhookDeliveries",
        "summary": "List deliveries",
        "description": "The latest deliveries first, across the endpoints or for one. Deliveries are kept for 30 days.",
        "tags": [
          "Webhooks"
        ],
        "responses": {
          "200": {
            "description": "A page of deliveries, the latest first. When `offset + limit` is less than `total`, there are more pages.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookDelivery"
                      }
                    },
                    "total": {
                      "type": "integer",
                      "description": "How many deliveries there are, across all pages."
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "results",
                    "total",
                    "limit",
                    "offset"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "results": [
                    {
                      "id": "msg_7707d6db627a4f6a9abf5a698b33f9f4",
                      "endpoint_id": "555cd35b-636b-4109-a621-6fcacbd296a8",
                      "event_type": "port.arrival.expected",
                      "status": "delivered",
                      "attempts": 1,
                      "next_attempt_at": null,
                      "last_attempt_at": "2026-10-26T11:08:45.902Z",
                      "last_status": 200,
                      "last_error": null,
                      "created_at": "2026-10-26T11:08:45.517Z"
                    }
                  ],
                  "total": 1,
                  "limit": 50,
                  "offset": 0
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or invalid. `error.message` lists each problem as JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "ZodError"
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "error"
                  ]
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "ZodError",
                    "message": "[\n  {\n    \"origin\": \"string\",\n    \"code\": \"invalid_format\",\n    \"format\": \"regex\",\n    \"pattern\": \"/^(imo:\\\\d{7}|mmsi:\\\\d{9})$/\",\n    \"path\": [\n      \"id\"\n    ],\n    \"message\": \"Use imo: and an IMO number (7 digits) or mmsi: and an MMSI (9 digits).\"\n  }\n]"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used (`SecretKeyRequired`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "SecretKeyRequired",
                    "message": "Webhooks are managed with a secret key, from a server."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "description": "Results per page."
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0
            },
            "description": "How many results to skip, for the next page."
          },
          {
            "in": "query",
            "name": "endpoint",
            "schema": {
              "type": "string"
            },
            "description": "Only this endpoint’s deliveries."
          }
        ]
      }
    },
    "/api/v1/webhooks/deliveries/{id}/resend": {
      "post": {
        "operationId": "resendWebhookDelivery",
        "summary": "Resend a delivery",
        "description": "Sends a delivery again, with the same `webhook-id` and a fresh set of retries.",
        "tags": [
          "Webhooks"
        ],
        "responses": {
          "200": {
            "description": "Queued.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "delivery_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "delivery_id"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "delivery_id": "msg_7707d6db627a4f6a9abf5a698b33f9f4"
                }
              }
            }
          },
          "400": {
            "description": "Its endpoint is turned off (`EndpointOff`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "EndpointOff",
                    "message": "Turn the endpoint on first."
                  }
                }
              }
            }
          },
          "401": {
            "description": "No API key was sent (`MissingApiKey`), the key is unknown, revoked or expired, or not sent as `Authorization: Bearer <key>` (`InvalidApiKey`), or a workload's token is not valid (`InvalidToken`). `WWW-Authenticate` is `Bearer`, with `error=\"invalid_token\"` when a key or token was refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "InvalidApiKey",
                    "message": "The API key is not valid. It may have been revoked, or copied incompletely."
                  }
                }
              }
            }
          },
          "403": {
            "description": "A publishable key was used (`SecretKeyRequired`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "SecretKeyRequired",
                    "message": "Webhooks are managed with a secret key, from a server."
                  }
                }
              }
            }
          },
          "404": {
            "description": "No endpoint or delivery of the organization has this id (`NotFound`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "NotFound",
                    "message": "No webhook endpoint has this id."
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests: `RateLimited` when they come too fast, or `UsageLimitReached` when the key's organization has used the requests its plan allows this month (`Retry-After` gives the seconds until its month starts again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "error": {
                    "name": "RateLimited",
                    "message": "Too many requests at once."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "The delivery's id."
          }
        ]
      }
    }
  }
}
