# GET /api/v1/budgets

> List budgets

- **Tag:** budgets
- **Operation ID:** `list_budgets_api_v1_budgets_get`

## Description

List all budgets for the business with optional filtering.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Parameters

- `status` (query, string, optional) — Filter by status: draft, active, closed
- `fiscal_year` (query, integer, optional) — Filter by fiscal year
- `search` (query, string, optional) — Search by budget name
- `offset` (query, integer, optional) — Number of records to skip
- `limit` (query, integer, optional) — Maximum records to return
- `include_total_count` (query, boolean, optional) — Include total count (expensive - avoid if possible)

## Responses

### 200 — Successful Response

Schema: `BudgetListResponse`

- `items` (array · BudgetResponse · required) → `BudgetResponse` — List of items
  - `id` (string · required) — Budget UUID.
  - `name` (string · required) — Budget name.
  - `fiscal_year` (integer · required) — Fiscal year.
  - `start_date` (string · date · required) — Budget period start date.
  - `end_date` (string · date · required) — Budget period end date.
  - `status` (BudgetStatusEnum · required) → `BudgetStatusEnum` — Budget status: draft, active, or closed.
  - `period_type` (BudgetPeriodTypeEnum · required) → `BudgetPeriodTypeEnum` — Period granularity.
  - `description` (string) — Budget description.
  - `notes` (string) — Additional notes.
  - `line_count` (integer) — Number of budget lines.
  - `total_budgeted_revenue` (integer) — Total budgeted revenue in cents.
  - `total_budgeted_expenses` (integer) — Total budgeted expenses in cents.
  - `budgeted_net_income` (integer) — Budgeted net income (revenue - expenses) in cents.
  - `source_scenario_id` (string) — CFO projection scenario UUID that generated this budget.
  - `business_id` (string · required) — Business UUID.
  - `created_at` (string · date-time · required) — Creation timestamp.
  - `updated_at` (string · date-time · required) — Last update timestamp.
- `total` (integer) — Total number of items (null when not calculated for performance)
- `limit` (integer) — Pagination limit
- `next_cursor` (string) — Cursor for next page
- `prev_cursor` (string) — Cursor for previous page
- `has_next` (boolean · required) — Whether there are more items
- `has_prev` (boolean · required) — Whether there are previous items

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

## Code samples

### cURL

```bash
curl -X GET 'https://api.ondayzero.com/api/v1/budgets' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/budgets', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
  },
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

response = httpx.get("https://api.ondayzero.com/api/v1/budgets", headers=headers)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/budgets/list-budgets
- OpenAPI slice: https://www.ondayzero.com/docs/reference/budgets/list-budgets/openapi.json
- Other endpoints in **budgets**: https://www.ondayzero.com/docs/reference/budgets
