---
title: "Last Booking Versions By Departure Date"
method: POST
path: "/Ocean/metrics/last-bookings-by-departure-date"
tags: ["Ocean"]
---

# Last Booking Versions By Departure Date

`POST /Ocean/metrics/last-bookings-by-departure-date`

## Request

- Base URL: `https://api.freightwaves.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.freightwaves.com/Ocean/metrics/last-bookings-by-departure-date`
- Auth: none declared

This endpoint allows permissioned users to get ocean booking metrics for a given ocean lane and timeframe

For more information about getting access to this endpoint or using this endpoint, please reach out to our Customer Success team (cs@gosonar.com).

Returns a timeseries collection of last booking metrics for the given ocean lane and date range.

This endpoint handles the following input fields:

*   origin: the Ocean Location code for the origin, required. This may be a port code (for example USLAX), a country name exactly as returned by the locations endpoint (for example China), or ALL for all ports worldwide
*   destination: the Ocean Location code for the destination, required. This may be a port code, a country name, or ALL for all ports worldwide; origin and destination may both be ALL
*   start\_date: the earliest departure date of the range being requested
*   end\_date: the latest departure date of the range being requested

Here are the output fields returned in a successful call:

*   origin: an object containing the origin location details
*   destination: an object containing the destination location details
*   start\_date: the first date in the range requested
*   end\_date: the last date in the range requested
*   values: the collection of metrics records for the given date range
    *   date: the date for the metrics record
    *   confirmed\_teu\_count\_global\_index: an index that represents the rolling 1, 7 or 14-day average count of TEUs confirmed by ocean carriers
    *   confirmed\_transaction\_count\_global\_index: an index that represents the rolling 1, 7 or 14-day average count of transactions confirmed by ocean carriers
    *   transit\_time\_days: a number that represents the rolling 1, 7 or 14-day average transit time in days

## Headers

- `x-api-version` string

## Request body

- OceanMetricsRequest
  - `origin` string, required
  - `destination` string, required
  - `start_date` string, date-time, required
  - `end_date` string, date-time, required

## Response `200`

OK

- LastBookingVersionByDepartureDateResponse
  - `origin` OceanBookingLocation
    - `code` string
    - `port` string
    - `port_name` string
    - `country` string
    - `type` string
  - `destination` OceanBookingLocation
    - `code` string
    - `port` string
    - `port_name` string
    - `country` string
    - `type` string
  - `start_date` string
  - `end_date` string
  - `values` LastBookingVersionByDepartureDateItem[]
    - `date` string
    - `confirmed_teu_count_global_index` OceanBookingIndex
      - `one_day_avg` number, double
      - `seven_day_avg` number, double
      - `fourteen_day_avg` number, double
    - `confirmed_transaction_count_global_index` OceanBookingIndex
      - `one_day_avg` number, double
      - `seven_day_avg` number, double
      - `fourteen_day_avg` number, double
    - `transit_time_days` OceanBookingIndex
      - `one_day_avg` number, double
      - `seven_day_avg` number, double
      - `fourteen_day_avg` number, double

## Other responses

- `204`: No Content
- `400`: Bad Request
- `429`: Too Many Requests
- `500`: Internal Server Error

## Changes

- **2026-11-04** `e5429902e12b`: 4 info
  - added the non-success response with the status `400`
  - added the non-success response with the status `429`
  - added the non-success response with the status `500`
  - added the success response with the status `204`

[Operation history](https://skmtc.dev/freightwaves/apis/sonar-api/changes/Ocean/metrics/last-bookings-by-departure-date/post.md)

---

[API](https://skmtc.dev/freightwaves/apis/sonar-api.md) - [All operations](https://skmtc.dev/freightwaves/apis/sonar-api/llms.txt) - [OpenAPI document](https://skmtc.dev/freightwaves/apis/sonar-api/revisions/e5429902e12b?raw)
