List reports

GET /api/v1/reports

Retrieve all reports for a business with pagination.

Operation ID: list_reports_api_v1_reports_get · View as markdown · OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Parameters

Query

client_visible_only boolean default: False
cursor string

Cursor for pagination

limit integer

Pagination limit

direction string default: next

Pagination direction: 'next' or 'prev'

include_total_count boolean default: False

Whether to include total count (expensive - avoid if possible)

sort_by string

Column name to sort by (e.g. 'created_at', 'amount', 'name'). When changing sort, reset cursor to None.

descending boolean default: True

Sort direction: true for descending (newest/largest first), false for ascending

Responses

200 Successful Response

items array · ReportResponse requiredReportResponse

List of items

10 fields
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.

total integer

Total number of items (null when not calculated for performance)

limit integer

Pagination limit

next_cursor string

Cursor for next page

prev_cursor string

Cursor for previous page

has_next boolean required

Whether there are more items

has_prev boolean required

Whether there are previous items

401 Unauthorized - Authentication required

403 Forbidden - Insufficient permissions

422 Validation Error

detail array · ValidationError ValidationError
5 fields
loc array · string | integer required
msg string required
type string required
input object
ctx object