{
  "openapi": "3.0.3",
  "info": {
    "title": "Gangway AIS Data API",
    "version": "1",
    "description": "The Data API of Gangway AIS. Each request carries your key in the Authorization header as a Bearer token. Each position names its source and each response carries the credit each source's licence asks for in attribution. Not for navigation. The full words, examples and the live stream are at https://gangwayais.com/docs/."
  },
  "servers": [
    {
      "url": "https://gangwayais.com"
    },
    {
      "url": "https://ais.gangway.app"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "tags": [
    {
      "name": "Vessels"
    },
    {
      "name": "Ports"
    },
    {
      "name": "Reports"
    },
    {
      "name": "Watching"
    },
    {
      "name": "Events"
    },
    {
      "name": "Routes"
    },
    {
      "name": "Network"
    }
  ],
  "paths": {
    "/v1/status": {
      "get": {
        "operationId": "status",
        "summary": "Status",
        "tags": [
          "Network"
        ],
        "x-gangway-route": "status",
        "security": [],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/verify/{code}": {
      "get": {
        "operationId": "verify",
        "summary": "Check a report",
        "tags": [
          "Reports"
        ],
        "x-gangway-route": "verify",
        "security": [],
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "description": "The code printed on a report.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/verify": {
      "get": {
        "operationId": "verify_query",
        "summary": "Check a report, code as a parameter",
        "tags": [
          "Reports"
        ],
        "x-gangway-route": "verify_query",
        "security": [],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "description": "The code printed on a report, or a port's UN/LOCODE.",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sources": {
      "get": {
        "operationId": "sources",
        "summary": "Sources",
        "tags": [
          "Network"
        ],
        "x-gangway-route": "sources",
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/watch": {
      "get": {
        "operationId": "watch",
        "summary": "Watched vessels",
        "tags": [
          "Watching"
        ],
        "x-gangway-route": "watch",
        "parameters": [
          {
            "name": "mmsi",
            "in": "query",
            "description": "The vessel's MMSI number.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "watch_post",
        "summary": "Watched vessels",
        "tags": [
          "Watching"
        ],
        "x-gangway-route": "watch",
        "parameters": [
          {
            "name": "mmsi",
            "in": "query",
            "description": "The vessel's MMSI number.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "watch_delete",
        "summary": "Watched vessels",
        "tags": [
          "Watching"
        ],
        "x-gangway-route": "watch",
        "parameters": [
          {
            "name": "mmsi",
            "in": "query",
            "description": "The vessel's MMSI number.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/watch/ports": {
      "get": {
        "operationId": "watch_ports",
        "summary": "Watched ports",
        "tags": [
          "Watching"
        ],
        "x-gangway-route": "watch_ports",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "description": "The code printed on a report, or a port's UN/LOCODE.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "watch_ports_post",
        "summary": "Watched ports",
        "tags": [
          "Watching"
        ],
        "x-gangway-route": "watch_ports",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "description": "The code printed on a report, or a port's UN/LOCODE.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "watch_ports_delete",
        "summary": "Watched ports",
        "tags": [
          "Watching"
        ],
        "x-gangway-route": "watch_ports",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "description": "The code printed on a report, or a port's UN/LOCODE.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/usage": {
      "get": {
        "operationId": "usage",
        "summary": "Your usage",
        "tags": [
          "Network"
        ],
        "x-gangway-route": "usage",
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vessels/search": {
      "get": {
        "operationId": "vessels_search",
        "summary": "Search vessels",
        "tags": [
          "Vessels"
        ],
        "x-gangway-route": "vessels_search",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Text to search for.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "around",
            "in": "query",
            "description": "lat,lon: rank results near this point.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Largest number of rows.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vessels": {
      "get": {
        "operationId": "vessels_area",
        "summary": "Vessels in an area",
        "tags": [
          "Vessels"
        ],
        "x-gangway-route": "vessels_area",
        "parameters": [
          {
            "name": "bbox",
            "in": "query",
            "description": "min_lat,min_lon,max_lat,max_lon.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "max_age",
            "in": "query",
            "description": "How old a report may be, such as 90m.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "AIS type group.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "min_sog",
            "in": "query",
            "description": "Lowest speed in knots.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Largest number of rows.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vessels/{mmsi}": {
      "get": {
        "operationId": "vessel",
        "summary": "Get a vessel",
        "tags": [
          "Vessels"
        ],
        "x-gangway-route": "vessel",
        "parameters": [
          {
            "name": "mmsi",
            "in": "path",
            "required": true,
            "description": "The vessel's MMSI number.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vessels/{mmsi}/track": {
      "get": {
        "operationId": "track",
        "summary": "Vessel track",
        "tags": [
          "Vessels"
        ],
        "x-gangway-route": "track",
        "parameters": [
          {
            "name": "mmsi",
            "in": "path",
            "required": true,
            "description": "The vessel's MMSI number.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "hours",
            "in": "query",
            "description": "Hours back from now.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Start of the period.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "End of the period.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "The form of the answer.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "geojson",
                "gpx"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              },
              "application/gpx+xml": {
                "schema": {
                  "type": "string"
                }
              },
              "application/geo+json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vessels/{mmsi}/port-calls": {
      "get": {
        "operationId": "port_calls",
        "summary": "Vessel port calls",
        "tags": [
          "Vessels"
        ],
        "x-gangway-route": "port_calls",
        "parameters": [
          {
            "name": "mmsi",
            "in": "path",
            "required": true,
            "description": "The vessel's MMSI number.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "Days to cover.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vessels/{mmsi}/activity": {
      "get": {
        "operationId": "activity",
        "summary": "Vessel activity",
        "tags": [
          "Vessels"
        ],
        "x-gangway-route": "activity",
        "parameters": [
          {
            "name": "mmsi",
            "in": "path",
            "required": true,
            "description": "The vessel's MMSI number.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "Days to cover.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vessels/{imo}/sanctions": {
      "get": {
        "operationId": "sanctions",
        "summary": "Sanctions check",
        "tags": [
          "Vessels"
        ],
        "x-gangway-route": "sanctions",
        "parameters": [
          {
            "name": "imo",
            "in": "path",
            "required": true,
            "description": "The vessel's IMO number.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ports/search": {
      "get": {
        "operationId": "ports_search",
        "summary": "Search ports",
        "tags": [
          "Ports"
        ],
        "x-gangway-route": "ports_search",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Text to search for.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "near",
            "in": "query",
            "description": "lat,lon: rank results near this point.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Largest number of rows.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ports/resolve": {
      "get": {
        "operationId": "ports_resolve",
        "summary": "Resolve a destination",
        "tags": [
          "Ports"
        ],
        "x-gangway-route": "ports_resolve",
        "parameters": [
          {
            "name": "destination",
            "in": "query",
            "description": "The AIS destination text.",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ports": {
      "get": {
        "operationId": "ports_area",
        "summary": "Ports in an area",
        "tags": [
          "Ports"
        ],
        "x-gangway-route": "ports_area",
        "parameters": [
          {
            "name": "bbox",
            "in": "query",
            "description": "min_lat,min_lon,max_lat,max_lon.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Largest number of rows.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ports/{locode}": {
      "get": {
        "operationId": "port",
        "summary": "Port activity",
        "tags": [
          "Ports"
        ],
        "x-gangway-route": "port",
        "parameters": [
          {
            "name": "locode",
            "in": "path",
            "required": true,
            "description": "UN/LOCODE of the port.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reach",
            "in": "query",
            "description": "Reach in kilometres.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Largest number of rows.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ports/{locode}/waiting": {
      "get": {
        "operationId": "waiting",
        "summary": "Waiting times at anchor",
        "tags": [
          "Ports"
        ],
        "x-gangway-route": "waiting",
        "parameters": [
          {
            "name": "locode",
            "in": "path",
            "required": true,
            "description": "UN/LOCODE of the port.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vessels",
            "in": "query",
            "description": "Add the vessels behind each figure.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ports/{locode}/vessels": {
      "get": {
        "operationId": "port_vessels",
        "summary": "Arrivals, departures, in port",
        "tags": [
          "Ports"
        ],
        "x-gangway-route": "port_vessels",
        "parameters": [
          {
            "name": "locode",
            "in": "path",
            "required": true,
            "description": "UN/LOCODE of the port.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "list",
            "in": "query",
            "description": "expected, inport, arrived or departed.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "description": "Vessel kind.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flag",
            "in": "query",
            "description": "Two-letter ISO country code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "min_length",
            "in": "query",
            "description": "Shortest length in metres.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "max_length",
            "in": "query",
            "description": "Longest length in metres.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Largest number of rows.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "The form of the answer.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ports/{locode}/terminals": {
      "get": {
        "operationId": "port_terminals",
        "summary": "Terminals: occupancy and dwell",
        "tags": [
          "Ports"
        ],
        "x-gangway-route": "port_terminals",
        "parameters": [
          {
            "name": "locode",
            "in": "path",
            "required": true,
            "description": "UN/LOCODE of the port.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "Days to cover.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/terminals/{id}": {
      "get": {
        "operationId": "terminal",
        "summary": "One terminal",
        "tags": [
          "Ports"
        ],
        "x-gangway-route": "terminal",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Terminal id, from /v1/ports/{locode}/terminals.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "Days to cover.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ports/{locode}/congestion": {
      "get": {
        "operationId": "port_congestion",
        "summary": "Port congestion",
        "tags": [
          "Ports"
        ],
        "x-gangway-route": "port_congestion",
        "parameters": [
          {
            "name": "locode",
            "in": "path",
            "required": true,
            "description": "UN/LOCODE of the port.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "Days to cover.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/congestion": {
      "get": {
        "operationId": "congestion",
        "summary": "Most congested ports",
        "tags": [
          "Ports"
        ],
        "x-gangway-route": "congestion",
        "parameters": [
          {
            "name": "region",
            "in": "query",
            "description": "A region name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bbox",
            "in": "query",
            "description": "min_lat,min_lon,max_lat,max_lon.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Largest number of rows.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vessels/{mmsi}/calls": {
      "get": {
        "operationId": "vessel_calls",
        "summary": "Calls with cargo estimates",
        "tags": [
          "Vessels"
        ],
        "x-gangway-route": "vessel_calls",
        "parameters": [
          {
            "name": "mmsi",
            "in": "path",
            "required": true,
            "description": "The vessel's MMSI number.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "Days to cover.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vessels/{mmsi}/calls/{call_id}/evidence": {
      "get": {
        "operationId": "call_evidence",
        "summary": "AIS call timeline",
        "tags": [
          "Reports"
        ],
        "x-gangway-route": "call_evidence",
        "parameters": [
          {
            "name": "mmsi",
            "in": "path",
            "required": true,
            "description": "The vessel's MMSI number.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "call_id",
            "in": "path",
            "required": true,
            "description": "<mmsi>-<unix time of her first berthing>, from /v1/vessels/{mmsi}/calls.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "The form of the answer.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "html"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ports/{locode}/calls": {
      "get": {
        "operationId": "port_calls_by_date",
        "summary": "Calls on a day",
        "tags": [
          "Ports"
        ],
        "x-gangway-route": "port_calls_by_date",
        "parameters": [
          {
            "name": "locode",
            "in": "path",
            "required": true,
            "description": "UN/LOCODE of the port.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "description": "YYYY-MM-DD, UTC.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vessels/{mmsi}/employment": {
      "get": {
        "operationId": "employment",
        "summary": "Employment history",
        "tags": [
          "Vessels"
        ],
        "x-gangway-route": "employment",
        "parameters": [
          {
            "name": "mmsi",
            "in": "path",
            "required": true,
            "description": "The vessel's MMSI number.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "Days to cover.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/transits": {
      "get": {
        "operationId": "transits",
        "summary": "Canal and strait transits",
        "tags": [
          "Ports"
        ],
        "x-gangway-route": "transits",
        "parameters": [
          {
            "name": "gate",
            "in": "query",
            "description": "A canal or strait, from the docs.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "days",
            "in": "query",
            "description": "Days to cover.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ports/{locode}/bunkering": {
      "get": {
        "operationId": "bunkering",
        "summary": "Bunker deliveries",
        "tags": [
          "Ports"
        ],
        "x-gangway-route": "bunkering",
        "parameters": [
          {
            "name": "locode",
            "in": "path",
            "required": true,
            "description": "UN/LOCODE of the port.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "Days to cover.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vessels/{mmsi}/history": {
      "get": {
        "operationId": "vessel_history",
        "summary": "Vessel history",
        "tags": [
          "Reports"
        ],
        "x-gangway-route": "vessel_history",
        "parameters": [
          {
            "name": "mmsi",
            "in": "path",
            "required": true,
            "description": "The vessel's MMSI number.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "Days to cover.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "max_credits",
            "in": "query",
            "description": "Refuse the report if it would cost more than this.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "The form of the answer.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "html"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vessels/{mmsi}/cargo": {
      "get": {
        "operationId": "cargo_report",
        "summary": "Cargo and trade",
        "tags": [
          "Reports"
        ],
        "x-gangway-route": "cargo_report",
        "parameters": [
          {
            "name": "mmsi",
            "in": "path",
            "required": true,
            "description": "The vessel's MMSI number.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "Days to cover.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "The form of the answer.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "html"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vessels/{mmsi}/calls/{call_id}/summary": {
      "get": {
        "operationId": "call_summary",
        "summary": "Port call summary",
        "tags": [
          "Reports"
        ],
        "x-gangway-route": "call_summary",
        "parameters": [
          {
            "name": "mmsi",
            "in": "path",
            "required": true,
            "description": "The vessel's MMSI number.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "call_id",
            "in": "path",
            "required": true,
            "description": "<mmsi>-<unix time of her first berthing>, from /v1/vessels/{mmsi}/calls.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "The form of the answer.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "html"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ports/{locode}/report": {
      "get": {
        "operationId": "port_report",
        "summary": "Port and terminal report",
        "tags": [
          "Reports"
        ],
        "x-gangway-route": "port_report",
        "parameters": [
          {
            "name": "locode",
            "in": "path",
            "required": true,
            "description": "UN/LOCODE of the port.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "Days to cover.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "The form of the answer.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "html"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ports/{locode}/waiting-report": {
      "get": {
        "operationId": "port_waiting",
        "summary": "Port waiting report",
        "tags": [
          "Reports"
        ],
        "x-gangway-route": "port_waiting",
        "parameters": [
          {
            "name": "locode",
            "in": "path",
            "required": true,
            "description": "UN/LOCODE of the port.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "month",
            "in": "query",
            "description": "YYYY-MM.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Start of the period.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "Days to cover.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "The form of the answer.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "html"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/transits/report": {
      "get": {
        "operationId": "transit_report",
        "summary": "Transit report",
        "tags": [
          "Reports"
        ],
        "x-gangway-route": "transit_report",
        "parameters": [
          {
            "name": "gate",
            "in": "query",
            "description": "A canal or strait, from the docs.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "days",
            "in": "query",
            "description": "Days to cover.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "The form of the answer.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "html"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vessels/{mmsi}/calls/{call_id}/evidence/preview": {
      "get": {
        "operationId": "call_evidence_preview",
        "summary": "AIS call timeline, free preview",
        "tags": [
          "Reports"
        ],
        "x-gangway-route": "call_evidence_preview",
        "parameters": [
          {
            "name": "mmsi",
            "in": "path",
            "required": true,
            "description": "The vessel's MMSI number.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "call_id",
            "in": "path",
            "required": true,
            "description": "<mmsi>-<unix time of her first berthing>, from /v1/vessels/{mmsi}/calls.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vessels/{mmsi}/calls/{call_id}/summary/preview": {
      "get": {
        "operationId": "call_summary_preview",
        "summary": "Port call summary, free preview",
        "tags": [
          "Reports"
        ],
        "x-gangway-route": "call_summary_preview",
        "parameters": [
          {
            "name": "mmsi",
            "in": "path",
            "required": true,
            "description": "The vessel's MMSI number.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "call_id",
            "in": "path",
            "required": true,
            "description": "<mmsi>-<unix time of her first berthing>, from /v1/vessels/{mmsi}/calls.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vessels/{mmsi}/history/preview": {
      "get": {
        "operationId": "vessel_report_preview_history",
        "summary": "Vessel history, free preview",
        "tags": [
          "Reports"
        ],
        "x-gangway-route": "vessel_report_preview",
        "parameters": [
          {
            "name": "mmsi",
            "in": "path",
            "required": true,
            "description": "The vessel's MMSI number.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "Days to cover.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vessels/{mmsi}/cargo/preview": {
      "get": {
        "operationId": "vessel_report_preview_cargo",
        "summary": "Cargo and trade, free preview",
        "tags": [
          "Reports"
        ],
        "x-gangway-route": "vessel_report_preview",
        "parameters": [
          {
            "name": "mmsi",
            "in": "path",
            "required": true,
            "description": "The vessel's MMSI number.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "Days to cover.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ports/{locode}/report/preview": {
      "get": {
        "operationId": "port_report_preview",
        "summary": "Port and terminal report, free preview",
        "tags": [
          "Reports"
        ],
        "x-gangway-route": "port_report_preview",
        "parameters": [
          {
            "name": "locode",
            "in": "path",
            "required": true,
            "description": "UN/LOCODE of the port.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "Days to cover.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ports/{locode}/waiting-report/preview": {
      "get": {
        "operationId": "port_waiting_preview",
        "summary": "Port waiting report, free preview",
        "tags": [
          "Reports"
        ],
        "x-gangway-route": "port_waiting_preview",
        "parameters": [
          {
            "name": "locode",
            "in": "path",
            "required": true,
            "description": "UN/LOCODE of the port.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "month",
            "in": "query",
            "description": "YYYY-MM.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Start of the period.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "Days to cover.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/transits/report/preview": {
      "get": {
        "operationId": "transit_report_preview",
        "summary": "Transit report, free preview",
        "tags": [
          "Reports"
        ],
        "x-gangway-route": "transit_report_preview",
        "parameters": [
          {
            "name": "gate",
            "in": "query",
            "description": "A canal or strait, from the docs.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "days",
            "in": "query",
            "description": "Days to cover.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/events": {
      "get": {
        "operationId": "events",
        "summary": "Port events",
        "tags": [
          "Events"
        ],
        "x-gangway-route": "events",
        "parameters": [
          {
            "name": "bbox",
            "in": "query",
            "description": "min_lat,min_lon,max_lat,max_lon.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kinds",
            "in": "query",
            "description": "Comma-separated event kinds, or all.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since",
            "in": "query",
            "description": "ISO 8601 time.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Largest number of rows.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/routes": {
      "get": {
        "operationId": "route",
        "summary": "Plan a route",
        "tags": [
          "Routes"
        ],
        "x-gangway-route": "route",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "description": "Start of the period.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "to",
            "in": "query",
            "description": "End of the period.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "length",
            "in": "query",
            "description": "Length in metres.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "draught",
            "in": "query",
            "description": "Draught in metres.",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/routes/check": {
      "get": {
        "operationId": "route_check",
        "summary": "Check a route",
        "tags": [
          "Routes"
        ],
        "x-gangway-route": "route_check",
        "parameters": [
          {
            "name": "via",
            "in": "query",
            "description": "lat,lon;lat,lon;... the route to check.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "length",
            "in": "query",
            "description": "Length in metres.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "draught",
            "in": "query",
            "description": "Draught in metres.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "beam",
            "in": "query",
            "description": "Beam in metres.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "air",
            "in": "query",
            "description": "Air draught in metres.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "ukc",
            "in": "query",
            "description": "Under-keel clearance in metres.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "room",
            "in": "query",
            "description": "Room to keep.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "inland",
            "in": "query",
            "description": "Allow inland waters.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "gap",
            "in": "query",
            "description": "Largest gap between checks.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "approach",
            "in": "query",
            "description": "Approach to the port.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/depth": {
      "get": {
        "operationId": "depth",
        "summary": "Depth at a position",
        "tags": [
          "Routes"
        ],
        "x-gangway-route": "depth",
        "parameters": [
          {
            "name": "lat",
            "in": "query",
            "description": "Latitude.",
            "schema": {
              "type": "number"
            },
            "required": true
          },
          {
            "name": "lon",
            "in": "query",
            "description": "Longitude.",
            "schema": {
              "type": "number"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/density": {
      "get": {
        "operationId": "density",
        "summary": "Traffic density",
        "tags": [
          "Network"
        ],
        "x-gangway-route": "density",
        "parameters": [
          {
            "name": "hours",
            "in": "query",
            "description": "Hours back from now.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "cell",
            "in": "query",
            "description": "Cell size in degrees.",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "No credits left in this period, or a paid plan is needed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/coverage/quiet": {
      "get": {
        "operationId": "quiet",
        "summary": "Quiet ports",
        "tags": [
          "Network"
        ],
        "x-gangway-route": "quiet",
        "responses": {
          "200": {
            "description": "The answer. X-Credits-Used says what it cost.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is missing or out of range. The body names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or the key is not valid or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such vessel, port or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait for Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Your key, starting gw_live_."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "status",
          "error",
          "detail"
        ],
        "properties": {
          "status": {
            "type": "integer"
          },
          "error": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "param": {
            "type": "string",
            "nullable": true
          },
          "code": {
            "type": "string"
          }
        }
      }
    }
  }
}
