# Get dashboard filters

`GET /api/dropdown/dashboard-filters`

Filter options for dashboard (districts, fiscal years, dates, etc.). Successful reads are shared-cacheable for approximately 60 seconds. Cache keys include the complete request URL and query string, and responses vary by Origin. Requests with latest=true and error responses use Cache-Control: no-store.

**Query parameters**

- `fiscalYear` (string, optional): Fiscal year (YYYY-YYYY) whose months to list; defaults to the current fiscal year
- `fiscalMonth` (integer, optional): Fiscal month (1 = July). With fiscalYear, adds that month's report dates. Takes precedence over month.
- `month` (integer, optional): Calendar month (1 = January), as an alternative to fiscalMonth

**Returns**

- `success` (enum) One of: `true`.
- `data` (object)
  - `fiscalYears` (array of objects)
    - `value` (string)
    - `label` (string)
  - `months` (array of objects): Months with data in the fiscal year
    - `value` (integer)
    - `label` (string)
    - `month` (integer)
  - `dates` (array of objects): Report dates in the month; sent only when a fiscal year and a month are given
    - `value` (string)
    - `label` (string)
    - `date_value` (string)
  - `districts` (array of objects)
    - `value` (string)
    - `label` (string)
    - `district` (string)
- `metadata` (object)
  - `fiscal_year_count` (integer)
  - `month_count` (integer)
  - `date_count` (integer)
  - `district_count` (integer)
  - `last_updated` (timestamp)

**Errors**

- `422`: fiscalMonth is not between 1 and 12
- `500`: Internal server error

**Example request**

```bash
curl "https://tm-api.devinpearson.me/api/dropdown/dashboard-filters"
```

**Example response**

```json
{
  "success": true,
  "data": {
    "fiscalYears": [
      {
        "value": "string",
        "label": "string"
      }
    ],
    "months": [
      {
        "value": 0,
        "label": "string",
        "month": 0
      }
    ],
    "dates": [
      {
        "value": "string",
        "label": "string",
        "date_value": "string"
      }
    ],
    "districts": [
      {
        "value": "string",
        "label": "string",
        "district": "74"
      }
    ]
  },
  "metadata": {
    "fiscal_year_count": 0,
    "month_count": 0,
    "date_count": 0,
    "district_count": 0,
    "last_updated": "2026-11-19T04:30:00.000Z"
  }
}
```
