Aller au contenu principal

Reports API

Auto-generated from the OpenAPI spec. Run node docs-site/scripts/fetch-openapi.js to regenerate.

GET /api/v1/reports/attendance​

Get Attendance Report

Parameters

NameInRequiredTypeDescription
start_datequeryNo
end_datequeryNo

Responses

  • 200 — Successful Response
  • 422 — Validation Error

GET /api/v1/reports/revenue​

Get Revenue Report

Parameters

NameInRequiredTypeDescription
start_datequeryNo
end_datequeryNo

Responses

  • 200 — Successful Response
  • 422 — Validation Error

GET /api/v1/reports/memberships​

Get Memberships Report

Parameters

NameInRequiredTypeDescription
start_datequeryNo
end_datequeryNo

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 than GET /api/v1/clients's total, 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 (with insufficient_data: true) when that denominator is below _RETENTION_MIN_DENOMINATOR — the frontend should show "not enough data" rather than a 0%.

Parameters

NameInRequiredTypeDescription
start_datequeryNo
end_datequeryNo

Responses

  • 200 — Successful Response
  • 422 — Validation Error

GET /api/v1/reports/attendance/export​

Export Attendance Csv

Parameters

NameInRequiredTypeDescription
start_datequeryNo
end_datequeryNo

Responses

  • 200 — Successful Response
  • 422 — Validation Error

GET /api/v1/reports/product-sales​

Get Product Sales Report

Parameters

NameInRequiredTypeDescription
start_datequeryNo
end_datequeryNo

Responses

  • 200 — Successful Response
  • 422 — Validation Error

GET /api/v1/reports/product-sales/export​

Export Product Sales Csv

Parameters

NameInRequiredTypeDescription
start_datequeryNo
end_datequeryNo

Responses

  • 200 — Successful Response
  • 422 — Validation Error

GET /api/v1/reports/revenue/export​

Export Revenue Csv

Parameters

NameInRequiredTypeDescription
start_datequeryNo
end_datequeryNo

Responses

  • 200 — Successful Response
  • 422 — Validation Error