---
title: "Retrieve aggregated congestion data for multiple ports"
method: POST
path: "/congestion/batch"
tags: ["Congestion"]
---

# Retrieve aggregated congestion data for multiple ports

`POST /congestion/batch`

Returns congestion, time-in-port statistics, and vessel counts for a list of ports.

Maximum 10 ports per request.

## Request body

- CongestionBatchRequest
  - `portCodes` string[], required — List of port codes (unlocode), maximum 10

## Response `200`

The congestion aggregates

- object
  - `results` 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

- `400` — The body in the request is not correct
- `401` — The authentication failed
- `500` — An error occurend on server side
- `default` — default

---

[API](https://skmtc.net/safecube/apis/api-container-tracking.md) · [All operations](https://skmtc.net/safecube/apis/api-container-tracking/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/safecube/api-container-tracking/revisions/e74a670ab7a5/schema)
