# BudgetGroup

A budget group: the organisation-wide category budgets are filed under, carrying the icon plnnrly shows beside them. Deleting one ungroups its budgets permanently.

## Used by
- GET /api/v2/budget-groups: List budget groups (BudgetGroupList)
- POST /api/v2/budget-groups: Create a budget group (BudgetGroup)
- GET /api/v2/budget-groups/{budget_group}: Read a budget group (BudgetGroup)
- PATCH /api/v2/budget-groups/{budget_group}: Update a budget group (BudgetGroup)

## BudgetGroup fields
- id (integer, required): Unique identifier.
- name (string ≤ 255, required): Budget group name as shown in the UI. This is the default sort key.
- icon (string ≤ 255, required): Icon identifier rendered beside the group, e.g. `heroicon-o-rectangle-stack`.
- created_at (timestamp (YYYY-MM-DDThh:mm:ssZ), required): Creation timestamp.
- updated_at (timestamp (YYYY-MM-DDThh:mm:ssZ), required): Last-write timestamp; use for incremental sync.
- budgets_count (integer ≥ 0, required): Number of budgets filed under this group.
- links (BudgetGroupLinks, required)
  - self (url, required): The canonical URI of this record.
  - budgets (url, required): Budgets filed under this group.

## Variants

### BudgetGroupList

What a collection returns, and what `?view=summary` returns on a single record.

7 fields.
Identical to the detail object above.

### BudgetGroupSummary

The embedded form: what you get when another resource carries this one and you did not `include` it.

2 fields.
Omits: icon, created_at, updated_at, budgets_count, links

### BudgetGroupLinks

The `links` object on this resource.

Keys: self, budgets

## Example
```json
{
  "id": 1,
  "name": "Development",
  "icon": "heroicon-o-code-bracket",
  "created_at": "2026-03-04T09:15:00Z",
  "updated_at": "2026-03-04T09:15:00Z",
  "budgets_count": 1,
  "links": {
    "self": "https://<your-url>/api/v2/work-items/1",
    "budgets": "https://<your-url>/api/v2/work-items/1"
  }
}
```
