# PATCH /api/v1/fixed-assets/{asset_id}

> Update fixed asset

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

## Description

Update a fixed asset.

**Path Parameters:**
- `asset_id`: UUID of the asset to update

**Request Body:** (all fields optional)
- `name`: Updated asset name, 1-255 chars
- `description`: Updated description
- `asset_number`: Updated asset number, max 50 chars
- `serial_number`: Updated serial number, max 100 chars
- `location`: Updated location, max 255 chars
- `notes`: Updated notes
- `category_id`: Updated category UUID
- `vendor_id`: Updated vendor UUID

**Note:** Core depreciation fields (cost, purchase_date, useful_life, etc.) cannot be changed after asset is placed in service.

**Returns:** Updated fixed asset.

## Authentication

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

## Parameters

- `asset_id` (path, string, required)

## Request body

Schema: `FixedAssetUpdate`

- `name` (string)
- `description` (string)
- `asset_number` (string)
- `serial_number` (string)
- `category_id` (string)
- `vendor_id` (string)
- `salvage_value` (integer)
- `useful_life_months` (integer)
- `depreciation_method` (DepreciationMethod)
- `total_expected_units` (integer)
- `location` (string)
- `notes` (string)

## Responses

### 200 — Successful Response

Schema: `SuccessEnvelope_FixedAssetResponse_`

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

### 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 PATCH 'https://api.ondayzero.com/api/v1/fixed-assets/{asset_id}' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "description": "string",
  "asset_number": "string",
  "serial_number": "string",
  "category_id": "string",
  "vendor_id": "string"
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/fixed-assets/{asset_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",
  "asset_number": "string",
  "serial_number": "string",
  "category_id": "string",
  "vendor_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",
  "asset_number": "string",
  "serial_number": "string",
  "category_id": "string",
  "vendor_id": "string"
}

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

## See also

- HTML version: https://www.ondayzero.com/docs/reference/fixed-assets/update-fixed-asset
- OpenAPI slice: https://www.ondayzero.com/docs/reference/fixed-assets/update-fixed-asset/openapi.json
- Other endpoints in **fixed-assets**: https://www.ondayzero.com/docs/reference/fixed-assets
