# DOKK API

## Integrations

The Integrations API offers a suite of endpoints tailored for third-party developers to interact with DOKK's platform. Access to these endpoints requires an **API Key**, which serves as an authentication credential. You can request an API Key from our development team by contacting us at **<dokk@dokk.is>** or submitting a request here: [Support Request Form](/support/support-request-form.md).

As according to Plans and Pricing, Port Organizations receive an API-Key free of charge. Cruise Line -, Agency -, and Media Organizations are required to pay yearly for an access to an API key.

#### **API Key Usage and Throttling**

* Each API Key is unique and tied to an organization or developer.
* Throttling limits may apply to ensure fair usage and prevent server congestion. While we recommend limiting requests to once every **10–30 minutes**, higher request frequencies may be acceptable during development and testing.
* Auth: API Key required
  * Throttling: 300 requests per day per API Key
* To test the endpoints, we recommend tools like [Postman](https://www.postman.com/).

<figure><img src="/files/UDEE2IGjrqCUEQm1u4ZM" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/YTVwir1btZuvDRjh2vlE" alt=""><figcaption><p>Screenshot from Postman</p></figcaption></figure>

**Note**: Refer to our [/pages/fcD5wI9krITzFt8ra8dA#id-9.6-api-key-usage-and-restrictions](https://info.dokk.com/developers/pages/fcD5wI9krITzFt8ra8dA#id-9.6-api-key-usage-and-restrictions "mention") in our Terms of use for additional details on usage guidelines and policies.

### Cruise Details

<mark style="color:green;">`GET`</mark> `/v1/integration/cruise-details-orgkey`  **new**

<mark style="color:green;">`GET`</mark> `/v1/integration/{organization_uuid}/cruise-details`  **old and retiring (still works)**

The Cruise Details endpoint provides a simplified view of port call schedules, abstracted from the internal calendar. It is designed for external use and is currently applicable only to **Port organizations**. For Agencies, a similar endpoint will be introduced soon to address their specific data requirements.

This endpoint is deprecated. Please use cruise-details-orgkey from now on.

<pre class="language-http" data-overflow="wrap"><code class="lang-http"><strong>GET https://b.dokk.is/api/v1/integration/organizations/{uuid}/cruise-details/?start_date={YYYY-MM-DD}&#x26;end_date={YYYY-MM-DD}
</strong></code></pre>

The new GET request will not include the {uuid} for an organization and will simply look at the allocated API key for organization:

```http
GET https://b.dokk.is/api/v1/integration/cruise-details-orgkey/?start_date={YYYY-MM-DD}&end_date={YYYY-MM-DD}
```

| Parameter   | Type   | Description                                                               |
| ----------- | ------ | ------------------------------------------------------------------------- |
| start\_date | string | (Optional) Filter results starting from this date (format: `YYYY-MM-DD`). |
| end\_date   | string | (Optional) Filter results up to this date (format: `YYYY-MM-DD`).         |
| uuid        | string | Required 32 character long string.                                        |

#### **Usage Notes**

* **UUID**: This identifier is provided by DOKK and uniquely represents the organization.
* **Date Filtering**: The `start_date` and `end_date` parameters are optional and can be used to narrow down the results to a specific time range.
* **Data Integrity**: Results returned are subject to the accuracy and currency of the information inputted into the DOKK platform.

The response is an array of cruise details, structured as follows:

```json
{
        "id": integer,
        "created": datetime,
        "updated": datetime,
        "arrival": datetime,
        "departure": datetime,
        "port_name": string,
        "port_locode": string,
        "voyage": string,
        "turn_around": bool,
        "turn_around_date": datetime,
        "arrival_number": string,
        "status": string,
        "last_status": string,
        "location_name": string,
        "location_color": string,
        "location_max_draught": decimal,
        "location_max_length": decimal,
        "vessel_name": string,
        "vessel_imo": integer,
        "vessel_mmsi": integer,
        "vessel_type": string,
        "vessel_flag": string,
        "vessel_build_year": integer,
        "vessel_passenger_capacity": integer,
        "vessel_crew_capacity": integer,
        "vessel_length_overall": decimal,
        "vessel_breadth_extreme": decimal,
        "vessel_draught": decimal,
        "vessel_grt": decimal,
        "vessel_owner": string,
        "agent_name": string,
        "show_booking": bool,
        "agency_organization_name": string
}
```

### Ports Metadata

<mark style="color:green;">`GET`</mark> `/v1/integration/ports-metadata`

The Ports Metadata endpoint returns ports and their active locations (quays/berths). It’s intended to help integrations discover valid port and location IDs for other endpoints.

| Parameter | Type   | Description                                                |
| --------- | ------ | ---------------------------------------------------------- |
| q         | string | (Optional) Search in port.name, port.locode, location.name |
| country   | string | (Optional) Filter by port country (ISO code, e.g. IS)      |
| port      | int    | (Optional) Return a single port by ID (int)                |

#### Notes:

* Only locations where is\_active=true are included.
* Ports are only included if they have at least one active location (quay)

```json
[
  {
    "id": 1,
    "name": "Reykjavík",
    "locode": "ISREY",
    "country": "IS",
    "time_zone": "Atlantic/Reykjavik",
    "locations": [
      { "id": 12, "name": "Skarfabakki" },
      { "id": 13, "name": "Miðbakki" }
    ]
  }
]
```

## Visible Port Calls

<mark style="color:green;">`GET`</mark> `/v1/integration/visible-portcalls`

This endpoint returns public/visible port calls. It is intended for third-party integrations (e.g., travel sites and public schedule pages).

Visibility rules

A port call is included only if:

* show\_booking = true, and
* either:
  * status = accepted, or
  * status = updated and last\_status = accepted

Time window

* Results are capped to max 12 months into the future (from the current date), regardless of requested end\_date.
* If start\_date is not provided, it defaults to last 30 days.

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Api-Key`          |

**Body**

| Name         | Type   | Description                                                                                                                                 |
| ------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `start_date` | string | Optional. Start date (YYYY-MM-DD). Defaults to last 30 days.                                                                                |
| `end_date`   | string | Optional. End date (YYYY-MM-DD). Clamped to max 12 months ahead.                                                                            |
| `port`       | int    | Optional. Filter by port id.                                                                                                                |
| `location`   | int    | Optional. Filter by location id.                                                                                                            |
| `vessel`     | int    | Optional. Filter by vessel id.                                                                                                              |
| `q`          | string | Optional. Text search across port name/locode, location name, vessel name, vessel owner, cruise line name. Numeric q also matches IMO/MMSI. |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "id": 3389,
    "arrival": "2026-06-20T07:00:00Z",
    "departure": "2026-06-20T20:00:00Z",
    "port_name": "Reykjavík",
    "port_locode": "REY",
    "turn_around": true,
    "turn_around_date": null,
    "location_name": "Skarfabakki-315",
    "vessel_name": "Viking Neptune",
    "vessel_imo": 9845910,
    "vessel_mmsi": 257850000,
    "vessel_type": "passenger",
    "vessel_flag": "NO",
    "vessel_build_year": 2022,
    "vessel_passenger_capacity": 930,
    "vessel_crew_capacity": 470,
    "vessel_length_overall": 229,
    "vessel_breadth_extreme": 32,
    "vessel_draught": 6.7,
    "vessel_grt": 47878,
    "vessel_owner": "Viking Cruises"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}

## Vessels

<mark style="color:green;">`GET`</mark> `/v1/integration/vessels`&#x20;

The Vessels endpoint returns all active vessels registered in the DOKK platform with key identification fields. Intended for integrations that need to maintain a local vessel directory or resolve vessel identifiers.

| Parameter | Type   | Description                                                                                                      |
| --------- | ------ | ---------------------------------------------------------------------------------------------------------------- |
| q         | string | Optional. Search by vessel name, IMO, MMSI, owner, or cruise line name. Numeric q also matches IMO/MMSI exactly. |

**Notes:**

* Only vessels where `is_active = true` are returned.
* `cruise_line` is the name of the associated cruise line organization, if one is linked.

**Response example (200):**

```json
{
  "id": 42,
  "name": "Viking Neptune",
  "imo": 9845910,
  "mmsi": 257850000,
  "type": "passenger",
  "owner": "Viking Cruises",
  "cruise_line": "Viking Ocean Cruises"
}
```

## Port Call Changes

<mark style="color:green;">`GET`</mark> `/v1/integration/visible-vessels`&#x20;

Returns portcalls that have had changes to their **location**, **arrival time**, or **departure time** within a given time window. This endpoint is designed for integrations that store portcall data locally and need to detect updates without re-fetching the full schedule.

Only visible portcalls are included. The same visibility rules as the Visible Port Calls endpoint apply.

**Visibility rules:**

A portcall is included only if:

* `show_booking = true`, and
* either:
  * `status = accepted`, or
  * `status = updated` and `last_status = accepted`

**Time window:**

* Results are capped to a maximum lookback of **30 days**.
* If `since` is not provided, it defaults to the **last 24 hours**.

**Headers:**

| Name          | Value            |
| ------------- | ---------------- |
| Content-Type  | application/json |
| Authorization | Api-Key          |

**Parameters:**

| Parameter    | Type   | Description                                                                                                                                            |
| ------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| since        | string | Optional. ISO 8601 datetime. Returns changes that occurred after this point. Default: 24 hours ago. Max: 30 days back. Example: `2025-06-01T08:00:00Z` |
| vessels      | string | Optional. Comma-separated vessel IDs to filter by, e.g. `1,4,7`                                                                                        |
| cruise\_line | string | Optional. Filter by cruise line name (partial match).                                                                                                  |

**Response example (200):**

```json
[
  {
    "portcall_id": 3389,
    "vessel_id": 42,
    "vessel_name": "Viking Neptune",
    "vessel_imo": 9845910,
    "changes": [
      {
        "changed_at": "2026-06-01T09:15:00Z",
        "arrival_previous": "2026-06-20T07:00:00Z",
        "arrival_new": "2026-06-20T09:00:00Z",
        "location_id_previous": 12,
        "location_name_previous": "Skarfabakki",
        "location_id_new": 13,
        "location_name_new": "Miðbakki"
      }
    ]
  }
]
```

**Notes on the response:**

* Each object in the array represents one portcall that had at least one tracked change within the window.
* Each entry in `changes` represents a single save event. Only the fields that actually changed are included in that entry — if `arrival` didn't change in a given event, no `arrival_*` keys will appear.
* Multiple fields can change in a single save event (e.g. both `arrival` and `location` in the same entry).
* `changes` is ordered chronologically, oldest first.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://info.dokk.com/developers/dokk-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
