# POST /api/v1/fixed-assets/post-scheduled-depreciation

> Post due scheduled depreciation

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

## Description

Post every queued depreciation entry whose date has arrived.

Idempotent: each entry is locked `FOR UPDATE` on its `pending` status
before its journal entry is written, so a retry cannot double-post.

## Authentication

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

## Request body

Schema: `PostScheduledDepreciationRequest`

- `as_of` (string · date) — Post entries dated on or before this date (default: today)

## Responses

### 201 — Successful Response

Schema: `SuccessEnvelope_PostScheduledDepreciationResponse_`

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

### 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 POST 'https://api.ondayzero.com/api/v1/fixed-assets/post-scheduled-depreciation' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "as_of": "2026-01-01"
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/fixed-assets/post-scheduled-depreciation', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "as_of": "2026-01-01"
}),
});
const data = await response.json();
```

### Python

```python
import httpx

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

payload = {
  "as_of": "2026-01-01"
}

response = httpx.post("https://api.ondayzero.com/api/v1/fixed-assets/post-scheduled-depreciation", headers=headers, json=payload)
data = response.json()
```

## See also

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