Reports API
Auto-generated from the OpenAPI spec. Run
node docs-site/scripts/fetch-openapi.jsto regenerate.
GET /api/v1/reports/attendance
Get Attendance Report
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
start_date | query | No | ||
end_date | query | No |
Responses
- 200 — Successful Response
- 422 — Validation Error
GET /api/v1/reports/revenue
Get Revenue Report
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
start_date | query | No | ||
end_date | query | No |
Responses
- 200 — Successful Response
- 422 — Validation Error
GET /api/v1/reports/memberships
Get Memberships Report
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
start_date | query | No | ||
end_date | query | No |
Responses
- 200 — Successful Response
- 422 — Validation Error
GET /api/v1/reports/retention
Get Retention Report
Retention for the requested period.
"Activity" means real attendance: a confirmed class booking for a class
occurrence in the window, OR a confirmed/completed appointment (1:1 /
personal training) starting in the window. cancelled and no_show
appointments do not count. Appointment-only members (personal training,
never a group class) would otherwise be invisible here and wrongly churned.
Population definitions (all counts drawn from ONE base — active clients — so they reconcile with each other):
total_clients— active clients. Intentionally narrower thanGET /api/v1/clients'stotal, which also counts inactive and GDPR-anonymized rows.active_clients— active clients with >=1 confirmed class booking for a class occurring in the period, or a confirmed/completed appointment starting in the period.churned_clients— active clients with class-booking or appointment activity before the period but none in it. Always<= total_clients.retention_rate— pre-existing active clients still active in the period, over (total_clients - new_clients).null(withinsufficient_data: true) when that denominator is below_RETENTION_MIN_DENOMINATOR— the frontend should show "not enough data" rather than a 0%.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
start_date | query | No | ||
end_date | query | No |
Responses
- 200 — Successful Response
- 422 — Validation Error
GET /api/v1/reports/attendance/export
Export Attendance Csv
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
start_date | query | No | ||
end_date | query | No |
Responses
- 200 — Successful Response
- 422 — Validation Error
GET /api/v1/reports/product-sales
Get Product Sales Report
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
start_date | query | No | ||
end_date | query | No |
Responses
- 200 — Successful Response
- 422 — Validation Error
GET /api/v1/reports/product-sales/export
Export Product Sales Csv
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
start_date | query | No | ||
end_date | query | No |
Responses
- 200 — Successful Response
- 422 — Validation Error
GET /api/v1/reports/revenue/export
Export Revenue Csv
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
start_date | query | No | ||
end_date | query | No |
Responses
- 200 — Successful Response
- 422 — Validation Error