# GET /api/v1/month-end-packages/{package_id}

> Get month-end package

- **Tag:** month-end-packages
- **Operation ID:** `get_package_api_v1_month_end_packages__package_id__get`

## Description

Get a single month-end package by id (poll for build progress).

## Authentication

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

## Parameters

- `package_id` (path, string, required)

## Responses

### 200 — Successful Response

Schema: `MonthEndPackageResponse`

- `id` (string · required) — Month-end package UUID
- `business_id` (string · required) — Owning business UUID
- `accounting_period_id` (string) — Linked accounting period UUID, if any
- `period_start` (string · date-time · required) — Start of the covered period
- `period_end` (string · date-time · required) — End of the covered period
- `status` (MonthEndPackageStatusEnum · required) → `MonthEndPackageStatusEnum` — Build status: queued, in_progress, ready, or failed
- `report_format` (MonthEndPackageFormatEnum · required) → `MonthEndPackageFormatEnum` — Per-report format inside the zip
- `selected_reports` (array · string) — Report keys included in the package
- `workflow_id` (string) — Temporal workflow id driving the build
- `file_size_bytes` (integer) — Final zip size in bytes (set when ready)
- `filename` (string) — Suggested attachment filename for the zip download
- `error_message` (string) — Failure reason when ``status == 'failed'``
- `requested_by_user_id` (string) — User who requested the package
- `started_at` (string · date-time) — When the build started
- `ready_at` (string · date-time) — When the package became downloadable
- `created_at` (string · date-time · required) — Creation timestamp
- `updated_at` (string · date-time · required) — Last update timestamp

### 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 GET 'https://api.ondayzero.com/api/v1/month-end-packages/{package_id}' \
  -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/month-end-packages/{package_id}', {
  method: 'GET',
  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.get("https://api.ondayzero.com/api/v1/month-end-packages/{package_id}", headers=headers)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/month-end-packages/get-package
- OpenAPI slice: https://www.ondayzero.com/docs/reference/month-end-packages/get-package/openapi.json
- Other endpoints in **month-end-packages**: https://www.ondayzero.com/docs/reference/month-end-packages
