# GET /api/v1/reports/{report_id}

> Get report

- **Tag:** reports
- **Operation ID:** `get_report_api_v1_reports__report_id__get`

## Description

Retrieve a specific report by ID.

## Authentication

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

## Parameters

- `report_id` (path, string, required)

## Responses

### 200 — Successful Response

Schema: `ReportResponse`

- `id` (string · required) — Unique identifier for this generated report. Use this ID to retrieve the report details or delete it. Example: '019ab37c-rpt1-7000-8000-000000000001'.
- `business_id` (string · required) — UUID of the business this report belongs to. Reports are scoped to a single business and cannot be accessed by other businesses.
- `report_name` (string · required) — The report type that was generated. Matches the report_name from the original request. Example: 'profit_and_loss', 'master_transactions', 'ar_report'.
- `created_at` (string · date-time · required) — Timestamp when the report was generated (ISO 8601 format). Example: '2026-01-15T14:00:00Z'.
- `downloaded_at` (string · date-time · required) — Timestamp of the most recent download of this report. Updated each time the report is accessed. Useful for tracking report usage.
- `s3_bucket` (string · required) — Name of the S3 bucket where the report file is stored. Format: 'dayzero-{environment}-reports'. Example: 'dayzero-prod-reports'.
- `s3_key` (string · required) — S3 object key (path) for the report file within the bucket. Format: 'reports/{business_id}/{report_type}_{dates}.xlsx'. Example: 'reports/019ab37c-bus1/master_transactions_2026-01-01_2026-12-31.xlsx'.
- `generation_params` (object) — Dictionary of all parameters used to generate this report. Includes resolved dates (even when using tax_year/tax_quarter), filters, and any additional parameters. Useful for understanding report scope and audit purposes. Example: {'start_date': '2026-01-01', 'end_date': '2026-12-31', 'ledger_id': null}.
- `download_url` (string · required) — Same-origin proxy URL for downloading the report file. Streams through the backend to avoid CORS and presigned-URL expiration issues. Requires Authorization and x-business-id headers.
- `generated_by_name` (string) — Display name of the user who generated this report, e.g. 'Sarah Chen'. Extracted from generation_params.

### 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/reports/{report_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/reports/{report_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/reports/{report_id}", headers=headers)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/reports/get-report
- OpenAPI slice: https://www.ondayzero.com/docs/reference/reports/get-report/openapi.json
- Other endpoints in **reports**: https://www.ondayzero.com/docs/reference/reports
