---
title: "Retrieve aggregated congestion data for a port"
method: GET
path: "/congestion/{portCode}"
tags: ["Congestion"]
---

# Retrieve aggregated congestion data for a port

`GET /congestion/{portCode}`

## Request

- Base URL: `https://api.sinay.ai/congestion/api/v1`
- URL: `https://api.sinay.ai/congestion/api/v1/congestion/{portCode}`
- Auth: API key in header `API_KEY`

Returns congestion, time-in-port statistics, and vessel counts for a given port.

## Path parameters

- `portCode` string, required

## Response `200`

The congestion aggregate

- CongestionAggregate
  - `portCode` string, required: The port code (unlocode)
  - `rateOccupation` RateOccupationBreakdown, required
    - `commercialVessels` RateOccupationByVesselType
      - `rateOccupationPercentage` number, double, nullable
      - `rateOccupationGapWithMean` number, double, nullable
    - `cargo` RateOccupationByVesselType
      - `rateOccupationPercentage` number, double, nullable
      - `rateOccupationGapWithMean` number, double, nullable
    - `tanker` RateOccupationByVesselType
      - `rateOccupationPercentage` number, double, nullable
      - `rateOccupationGapWithMean` number, double, nullable
    - `roro` RateOccupationByVesselType
      - `rateOccupationPercentage` number, double, nullable
      - `rateOccupationGapWithMean` number, double, nullable
  - `time` TimeAggregate, required
    - `timeInPortStatistics` TimeStatistics
      - `max` number, double, nullable
      - `median` number, double, nullable
      - `min` number, double, nullable
  - `vesselsInPortCount` VesselsInPortCount, required
    - `commercialVessels` integer, nullable
    - `cargo` integer, nullable
    - `tanker` integer, nullable
    - `roro` integer, nullable

## Other responses

- `401`: The authentication failed
- `404`: The resource has not been found
- `500`: An error occurend on server side
- `default`: default

---

[API](https://skmtc.dev/safecube/apis/congestion-api.md) - [All operations](https://skmtc.dev/safecube/apis/congestion-api/llms.txt) - [OpenAPI document](https://skmtc.dev/safecube/apis/congestion-api/revisions/93b20569de8b?raw)
