# CustomerCategory

A customer category: the hand-maintained taxonomy customers are grouped by, used for segmentation and reporting. Deleting one un-categorises its customers rather than blocking.

## Used by
- GET /api/v2/customer-categories: List customer categories (CustomerCategoryList)
- POST /api/v2/customer-categories: Create a customer category (CustomerCategory)
- GET /api/v2/customer-categories/{customer_category}: Read a customer category (CustomerCategory)
- PATCH /api/v2/customer-categories/{customer_category}: Update a customer category (CustomerCategory)

## CustomerCategory fields
- id (integer, required): Unique identifier.
- name (string ≤ 255, required): Category name as shown in the UI, e.g. Enterprise.
- description (string or null, required, multiline): Free-text note on what belongs in this category.
- 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.
- customers_count (integer ≥ 0, required): Number of customers in this category.
- links (CustomerCategoryLinks, required)
  - self (url, required): The canonical URI of this record.
  - customers (url, required): Customers in this category.

## Variants

### CustomerCategoryList

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

7 fields.
Identical to the detail object above.

### CustomerCategorySummary

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

2 fields.
Omits: description, created_at, updated_at, customers_count, links

### CustomerCategoryLinks

The `links` object on this resource.

Keys: self, customers

## Example
```json
{
  "id": 1,
  "name": "Enterprise",
  "description": "Accounts over 500 seats.",
  "created_at": "2026-03-04T09:15:00Z",
  "updated_at": "2026-03-04T09:15:00Z",
  "customers_count": 1,
  "links": {
    "self": "https://<your-url>/api/v2/work-items/1",
    "customers": "https://<your-url>/api/v2/work-items/1"
  }
}
```
