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

# Geo Map Filters

> Retrieve available geographic filter options for map-based statistics.

# Geo Map Filters

Returns a list of geographic filter options based on the specified date range.

## Endpoint

`GET /hubspot/stats/geo-map-filters/:startDate/:endDate`

### URL Parameters

| Parameter   | Type   | Required | Description                          |
| ----------- | ------ | -------- | ------------------------------------ |
| `startDate` | string | ✅        | Start date of the range (YYYY-MM-DD) |
| `endDate`   | string | ✅        | End date of the range (YYYY-MM-DD)   |

### Request Headers

| Header          | Value            | Description          |
| --------------- | ---------------- | -------------------- |
| `Authorization` | `Bearer <token>` | Authentication token |

> **Note:** This endpoint does not accept a request body.

## Response

### Success Response (HTTP 200)

```json theme={null}
{
  "message": "",
  "data": {
    "filters": [
      {
        "key": "string",
        "label": "string",
        "states": ["CA", "NY", "TX"]
      }
    ]
  }
}
```

* `filters`: List of available geographic filters
  * `key`: Identifier for the filter
  * `label`: Display name for the filter
  * `states`: List of US states when applicable (empty for non-US entries)

### Error Response (HTTP 400–500)

```json theme={null}
{
  "message": "Invalid params",
  "data": {}
}
```

> Any non-200 status code indicates an error.

## Authentication

Provide a valid token using the `Authorization` header.

## Example Request (cURL)

```bash theme={null}
curl -X GET "https://yourdomain.com/hubspot/stats/geo-map-filters/2025-11-01/2025-11-15" \
-H "Authorization: Bearer YOUR_TOKEN"
```

## Example Request (JavaScript - fetch)

```javascript theme={null}
const res = await fetch(
  "/hubspot/stats/geo-map-filters/2025-11-01/2025-11-15",
  {
    method: "GET",
    headers: { "Authorization": "Bearer YOUR_TOKEN" }
  }
);

const data = await res.json();
console.log(data);
```

## Notes

* Returned filters may include a `states` array only when applicable (US regions).
* Dates must be in `YYYY-MM-DD` format.
