# PATCH /api/v1/fixed-assets/categories/{category_id}

> Update asset category

- **Tag:** fixed-assets
- **Operation ID:** `update_asset_category`

## Description

Update an asset category.

**Path Parameters:**
- `category_id`: UUID of the category to update

**Request Body:** (all fields optional)
- `name`: Updated category name, 1-255 chars
- `description`: Updated description, max 1000 chars
- `default_useful_life_months`: Updated useful life, 1-600
- `default_depreciation_method`: Updated depreciation method
- `default_salvage_percent`: Updated salvage percent, 0-100
- `asset_ledger_id`: Updated asset ledger ID
- `depreciation_expense_ledger_id`: Updated depreciation expense ledger ID
- `accumulated_depreciation_ledger_id`: Updated accumulated depreciation ledger ID

**Returns:** Updated asset category.

## Authentication

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

## Parameters

- `category_id` (path, string, required)

## Request body

Schema: `AssetCategoryUpdate`

- `name` (string) — Category name
- `description` (string) — Category description
- `default_useful_life_months` (integer) — Default useful life in months
- `default_depreciation_method` (DepreciationMethod) — Default depreciation method
- `default_salvage_percent` (integer) — Default salvage value as percentage of cost
- `asset_ledger_id` (string) — Ledger account for asset cost
- `depreciation_expense_ledger_id` (string) — Ledger account for depreciation expense
- `accumulated_depreciation_ledger_id` (string) — Ledger account for accumulated depreciation

## Responses

### 200 — Successful Response

Schema: `SuccessEnvelope_AssetCategoryResponse_`

- `success` (boolean)
- `message` (string)
- `code` (string)
- `data` (AssetCategoryResponse)

### 401 — Unauthorized - Missing or expired token, an MCP OAuth token used against the REST API, or no access to this business

Schema: `ErrorResponse`

- `error` (string · required) — Error category: `validation_error`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `rate_limited`, `server_error`, or `service_unavailable`.
- `message` (string · required) — Human-readable explanation, safe to show to end users.
- `code` (string · required) — Stable machine-readable code in `CATEGORY_NNN` form (e.g. `NOT_FOUND_006`, `AUTH_010`, `GEN_002`).
- `request_id` (string) — Correlation id for support requests. Echoes the `x-request-id` request header when one was supplied.
- `errors` (object) — Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

### 403 — Forbidden - Insufficient permissions

Schema: `ErrorResponse`

- `error` (string · required) — Error category: `validation_error`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `rate_limited`, `server_error`, or `service_unavailable`.
- `message` (string · required) — Human-readable explanation, safe to show to end users.
- `code` (string · required) — Stable machine-readable code in `CATEGORY_NNN` form (e.g. `NOT_FOUND_006`, `AUTH_010`, `GEN_002`).
- `request_id` (string) — Correlation id for support requests. Echoes the `x-request-id` request header when one was supplied.
- `errors` (object) — Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

### 422 — Validation Error

Schema: `ErrorResponse`

- `error` (string · required) — Error category: `validation_error`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `rate_limited`, `server_error`, or `service_unavailable`.
- `message` (string · required) — Human-readable explanation, safe to show to end users.
- `code` (string · required) — Stable machine-readable code in `CATEGORY_NNN` form (e.g. `NOT_FOUND_006`, `AUTH_010`, `GEN_002`).
- `request_id` (string) — Correlation id for support requests. Echoes the `x-request-id` request header when one was supplied.
- `errors` (object) — Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

## Code samples

### cURL

```bash
curl -X PATCH 'https://api.ondayzero.com/api/v1/fixed-assets/categories/{category_id}' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "description": "string",
  "default_useful_life_months": 0,
  "default_depreciation_method": "string",
  "default_salvage_percent": 0,
  "asset_ledger_id": "string"
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/fixed-assets/categories/{category_id}', {
  method: 'PATCH',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "string",
  "description": "string",
  "default_useful_life_months": 0,
  "default_depreciation_method": "string",
  "default_salvage_percent": 0,
  "asset_ledger_id": "string"
}),
});
const data = await response.json();
```

### Python

```python
import httpx

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

payload = {'name': 'string',
 'description': 'string',
 'default_useful_life_months': 0,
 'default_depreciation_method': 'string',
 'default_salvage_percent': 0,
 'asset_ledger_id': 'string'}

response = httpx.patch("https://api.ondayzero.com/api/v1/fixed-assets/categories/{category_id}", headers=headers, json=payload)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/fixed-assets/update-asset-category
- OpenAPI slice: https://www.ondayzero.com/docs/reference/fixed-assets/update-asset-category/openapi.json
- Other endpoints in **fixed-assets**: https://www.ondayzero.com/docs/reference/fixed-assets (markdown bundle: https://www.ondayzero.com/docs/reference/fixed-assets.md, OpenAPI: https://www.ondayzero.com/docs/reference/fixed-assets/openapi.json)
- Endpoint catalog: https://www.ondayzero.com/docs/reference/index.md
