# POST /api/v1/accounting-periods/{period_id}/close-readiness

> AI close readiness check

- **Tag:** accounting-periods
- **Operation ID:** `check_close_readiness_api_v1_accounting_periods__period_id__close_readiness_post`

## Description

Check period close readiness with AI-enhanced analysis.

## Authentication

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

## Parameters

- `period_id` (path, string, required)

## Responses

### 201 — Successful Response

Schema: `SuccessEnvelope_CloseReadinessResponse_`

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

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 404 — Not Found - Resource does not exist

### 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/accounting-periods/{period_id}/close-readiness' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/accounting-periods/{period_id}/close-readiness', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
  },
});
const data = await response.json();
```

### Python

```python
import httpx

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

response = httpx.post("https://api.ondayzero.com/api/v1/accounting-periods/{period_id}/close-readiness", headers=headers)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/accounting-periods/check-close-readiness
- OpenAPI slice: https://www.ondayzero.com/docs/reference/accounting-periods/check-close-readiness/openapi.json
- Other endpoints in **accounting-periods**: https://www.ondayzero.com/docs/reference/accounting-periods
