# Retrieve active site analytics for admin users only

Returns sites grouped by clientAccountId with optional date filters.

Endpoint: GET /site/billing-analytics-admin
Version: 1.0
Security: bearer

## Security:

  - `bearer` (unknown)
    http bearer JWT

## Query parameters:

  - `startDate` (string)
    Filter sites by start date (inclusive). Format: YYYY-MM-DD

  - `endDate` (string)
    Filter sites by end date (inclusive). Format: YYYY-MM-DD

  - `clientAccountIds` (array)
    Filter by one or multiple ClientAccount IDs (optional). Example usage for multiple IDs: ?clientAccountIds=10&clientAccountIds=20

## Response 200:

  - `200` (unknown)
    Array of { clientAccountId, sites[], activeSiteCount }

## Response 200 fields (application/json):

  - `clientAccountId` (number, required)
    Client Account ID
    Example: 10

  - `sites` (array, required)
    List of sites
    Example: ["[object Object]"]

  - `activeSiteCount` (number, required)
    Active site count
    Example: 5

## Response 401:

  - `401` (unknown)
    Unauthorized: Invalid or missing token.

## Response 401 fields (application/json):

  - `message` (string, required)
    Error message indicating unauthorized access.
    Example: Unauthorized

  - `statusCode` (number, required)
    HTTP status code for unauthorized access.
    Example: 401

## Response 403:

  - `403` (unknown)
    Forbidden: Access denied due to unaccepted Terms or insufficient permissions.

## Response 403 fields (application/json):

  - `statusCode` (number, required)
    HTTP status code indicating forbidden access due to unaccepted Terms of Service.
    Example: 403

  - `message` (string, required)
    Human-readable explanation of the error.
    Example: User must accept Terms of Service before continuing

  - `reason` (string, required)
    Machine-readable reason code for the error.
    Example: tos_required

  - `termsOfServicesLink` (string, required)
    URL to the Terms of Service the user must accept.
    Example: https://heydonto.com/terms-of-use/

  - `timestamp` (string, required)
    Timestamp when the error occurred (ISO 8601).
    Example: 2025-01-01T00:00:00.000Z

  - `statusCode` (number, required)
    HTTP status code indicating forbidden access.
    Example: 403

