> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voyantcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Booking Categories

> Return booking revenue totals grouped by product category.

## Method

`GET` `/v1/analytics/bookings/categories`

## Query Parameters

<ParamField query="from" type="string" required>Start date (YYYY-MM-DD, inclusive).</ParamField>
<ParamField query="to" type="string" required>End date (YYYY-MM-DD, inclusive).</ParamField>
<ParamField query="workspaceId" type="uuid" required>Workspace identifier.</ParamField>

## Headers

<ParamField header="Authorization" type="string">Bearer token with `analytics:read` scope.</ParamField>

## Request Example

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.voyantcloud.com/v1/analytics/bookings/categories?from=2025-02-01&to=2025-02-07&workspaceId=ws_abc" \
    -H "Authorization: Bearer $VOYANT_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const res = await fetch(
    "https://api.voyantcloud.com/v1/analytics/bookings/categories?from=2025-02-01&to=2025-02-07&workspaceId=ws_abc",
    { headers: { Authorization: `Bearer ${process.env.VOYANT_API_KEY}` } },
  )
  const categories = await res.json()
  ```

  ```python Python theme={null}
  import os, requests

  resp = requests.get(
    "https://api.voyantcloud.com/v1/analytics/bookings/categories",
    params={"from": "2025-02-01", "to": "2025-02-07", "workspaceId": "ws_abc"},
    headers={"Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}"},
  )
  rows = resp.json()
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json 200 OK theme={null}
  [
    { "day": "2025-02-01", "product_category": "cruise", "amount_cents_sum": 1180000, "cnt": 5 },
    { "day": "2025-02-01", "product_category": "tour", "amount_cents_sum": 420000, "cnt": 2 },
    { "day": "2025-02-02", "product_category": "hotel", "amount_cents_sum": 260000, "cnt": 3 }
  ]
  ```
</ResponseExample>

<Tip>Product categories originate from your catalog taxonomy. Ensure products are properly categorized to keep downstream analytics meaningful.</Tip>
