REST API Guide
REST API v1
Base: `/api/v1` | Auth: OAuth 2.0 Client Credentials (Bearer token)
Resources
| Resource | GET | POST | PUT | DELETE | |----------|-----|------|-----|--------| | Clients | List, get one | Create | Update | Archive | | Appointments | List, get one | - | - | - | | Programs | List, get one | - | - | - | | Revenue | Summary (period) | - | - | - | | Classes | List, get one | - | - | - | | Workouts | List, get one | - | - | - |
Quick start
1. Create an OAuth app: Developers → API Apps (log in as trainer/admin).
2. Get a token: `POST /api/oauth/token` with `grant_type=client_credentials`, `client_id`, `client_secret`.
3. Call the API: `Authorization: Bearer
Links
- OpenAPI (human + agent): `/buildstability-rest-api.json` - Swagger UI: `/api/docs` (if backend is same origin) - OAuth: OAuth 2.0 Guide - Code: Code Examples - Test doc: `/docs/REST_API_TEST_DOC.md` (in repo)