---
title: "Revenue analytics"
method: GET
path: "/api/v1/revenue/stats"
tags: ["Revenue"]
---

# Revenue analytics

`GET /api/v1/revenue/stats`

## Request

- Base URL: `http://localhost:3002`
- URL: `http://localhost:3002/api/v1/revenue/stats`
- Auth: HTTP bearer

Returns revenue totals, booking counts, weekly breakdown, harbor distribution, and day-of-week distribution for the specified period.

## Query parameters

- `period` 'this-month' | 'last-30' | 'this-season' | 'this-year' | 'all-time': Time period for analytics

## Response `200`

Revenue stats

- object
  - `data` object
    - `totalRevenue` number
    - `prevRevenue` number
    - `bookingCount` integer
    - `prevBookingCount` integer
    - `avgCharterValue` number
    - `avgTipAmount` number
    - `weeklyRevenue` object[]
      - `week` string, date
      - `revenue` number
      - `bookings` integer
    - `harborData` object[]
      - `name` string
      - `count` integer
    - `dayData` object[]
      - `day` string
      - `count` integer

## Other responses

- `401`: Authentication required, or the bearer token is missing or invalid.

---

[API](https://skmtc.dev/chartercaptain/apis/charter-captain-api.md) · [All operations](https://skmtc.dev/chartercaptain/apis/charter-captain-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chartercaptain/apis/charter-captain-api/revisions/1ffea1113adb?raw)
