---
title: "All Booking Versions By Version Date"
method: POST
path: "/Ocean/metrics/all-bookings-by-version-date"
tags: ["Ocean"]
---

# All Booking Versions By Version Date

`POST /Ocean/metrics/all-bookings-by-version-date`

This endpoint allows permissioned users to get ocean booking metrics for a given ocean lane and historical 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 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 11, 7 or 14-day average count of transactions confirmed by ocean carriers
    *   teu\_count\_rejection\_rate: rolling 1, 7 or 14-day average for the percent of TEU rejections
    *   transaction\_count\_rejection\_rate: rolling 1, 7 or 14-day average for the percent of transaction rejections

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

- AllBookingsByVersionDateResponse
  - `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` AllBookingsByVersionDateItem[]
    - `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
    - `teu_count_rejection_rate` OceanBookingIndex
      - `one_day_avg` number, double
      - `seven_day_avg` number, double
      - `fourteen_day_avg` number, double
    - `transaction_count_rejection_rate` 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)
