Access status of every client in the team
const url = 'http://localhost:8000/api/clients/access-summary/';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:8000/api/clients/access-summary/ \ --header 'Authorization: Bearer <token>'One row per card of the active team that has anyone on it — the roster’s chips: the furthest status among its people (active, then invited, then expired, then revoked) and how many hold an active grant. A card with nobody on it has no row.
A coach of the team, on a card of the active team. Every route answers 404 while client access is switched off on the environment. A partner API key and a client’s own account get 403. Open on every plan: a coach on a team whose plan no longer includes client access still sees who has it and can revoke it.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”object
One row of GET /api/clients/access-summary/ — a roster chip
(ClientAccessSummary).
object
The furthest status among the card’s people: active, then invited, then expired, then revoked.
invited- Invitedactive- Activeexpired- Expiredrevoked- Revoked
How many people hold an active grant.
Examples
Two cards with people on them
{ "results": [ { "client_id": "a1f1c0a2-0000-4000-8000-0000000000aa", "status": "active", "active_count": 1 }, { "client_id": "a1f1c0a2-0000-4000-8000-0000000000bb", "status": "expired", "active_count": 0 } ]}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Example generated
{ "detail": "example"}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Examples
403 — a client's own account
The coach side is for a coach of the team; a client uses the portal.
{ "detail": "client_account"}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Example generated
{ "detail": "example"}