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

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
*   destination: the Ocean Location code for the destination, required
*   start\_date: the earliest version date of the range being requested
*   end\_date: the latest version 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-day or 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

---

[API](https://skmtc.net/freightwaves/apis/sonar-api.md) · [All operations](https://skmtc.net/freightwaves/apis/sonar-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/freightwaves/sonar-api/revisions/3a995f316cda/schema)
