Élèves
3 routes
GET /students
Active students: no demo student, no student waiting for approval. include_deleted has no effect: a student who leaves is in /students/departures.
- Périmètre students:read
- Périmètre students.contact:read
- 1 crédit
- Lecture
- Stable
Paramètres
| Nom | Type | Description |
|---|---|---|
limitquery | integer1–200, default 50 | |
cursorquery | string | Opaque cursor: next_cursor of the previous page. |
sincequery | date-time | ISO 8601. Returns the objects with updated_at >= since. |
include_deletedquery | booleandefault false | |
tagquery | string |
curl "https://api.fitdistance.io/api/partner/v1/students?limit=50" \
-H "Authorization: Bearer fd_live_xxxxxxxx"200 · une page de Student
{
"data": [
{
"id": 4821,
"coach_id": 4821,
"first_name": "Camille",
"last_name": "Roux",
"email": "camille.roux@example.com",
"phone": "string",
"birth_date": "2026-10-24",
"joined_at": "2026-10-24T09:12:00Z",
"contract_status": "ACTIVE",
"contract_start_at": "2026-10-24T09:12:00Z",
"contract_end_at": "2026-10-24T09:12:00Z",
"tags": [
{
"id": "7c1d1e2a-9b3f-4c5d-8e6f-1a2b3c4d5e6f",
"name": "string",
"color": "string"
}
],
"updated_at": "2026-10-24T09:12:00Z"
}
],
"next_cursor": null,
"has_more": false
}403 · SCOPE_MISSING
{
"error": {
"name": "PARTNER_API",
"message": "SCOPE_MISSING"
}
}200 · une page de Student
| Nom | Type | Description |
|---|---|---|
id requis | integer | |
coach_id requis | integer | The coach of the student: a trainer of the team with team:read. |
first_name requis | string | |
last_name requis | string | |
email | string | Present only with the students.contact:read scope. |
phone | string | null | Present only with the students.contact:read scope. |
birth_date requis | date | null | |
joined_at requis | date-time | Creation of the student account. |
contract_status requis | string | nullparmi : ACTIVE, ENDING_SOON, EXPIRED, PAUSED | Status of the contract in use with the coach. |
contract_start_at requis | date-time | null | |
contract_end_at requis | date-time | null | |
tags requis | object[] | The tags of the student's current coach. id is the tag uid, from students.tags_list. |
updated_at requis | date-time | The latest change of the student, its user account or its contract in use. A time-driven contract status change (ENDING_SOON or EXPIRED, set by a nightly job) does not move it: derive it from contract_end_at. Any write on the user account (password, settings) moves it, so a sync can receive a student with no visible change. Every login of the student moves it too (last login time): a daily since sync receives again every student who logged in since the previous one. |
Erreurs
| Statut | Code | Quand |
|---|---|---|
400 | VALIDATION | Paramètres ou corps invalides.facturé |
401 | UNAUTHORIZED | Clé absente, inconnue ou révoquée.non facturé |
402 | CREDITS_EXHAUSTED | Plus de crédits ce mois-ci et aucune réserve.non facturé |
403 | SCOPE_MISSING | La clé n'a pas le périmètre demandé.non facturé |
403 | PLAN_NOT_ELIGIBLE | Ton offre n'ouvre pas l'API.non facturé |
429 | RATE_LIMITED | Trop d'appels : 10 par seconde, 300 par minute, 60 écritures et 20 suppressions par minute.non facturé |
GET /students/departures
Students who left the coach.
- Périmètre students:read
- 1 crédit
- Lecture
- Stable
Paramètres
| Nom | Type | Description |
|---|---|---|
limitquery | integer1–200, default 50 | |
cursorquery | string | Opaque cursor: next_cursor of the previous page. |
sincequery | date-time | ISO 8601. Returns the objects with updated_at >= since. |
include_deletedquery | booleandefault false | |
student_idquery | integer≥ 1 |
curl "https://api.fitdistance.io/api/partner/v1/students/departures?limit=50" \
-H "Authorization: Bearer fd_live_xxxxxxxx"200 · une page de Departure
{
"data": [
{
"id": 4821,
"student_id": 4821,
"coach_id": 4821,
"left_at": "2026-10-24T09:12:00Z",
"reason": "unassigned",
"updated_at": "2026-10-24T09:12:00Z"
}
],
"next_cursor": null,
"has_more": false
}403 · SCOPE_MISSING
{
"error": {
"name": "PARTNER_API",
"message": "SCOPE_MISSING"
}
}200 · une page de Departure
| Nom | Type | Description |
|---|---|---|
id requis | integer | |
student_id requis | integer | |
coach_id requis | integer | |
left_at requis | date-time | |
reason requis | stringparmi : unassigned, student_deleted, contract_ended | |
updated_at requis | date-time |
Erreurs
| Statut | Code | Quand |
|---|---|---|
400 | VALIDATION | Paramètres ou corps invalides.facturé |
401 | UNAUTHORIZED | Clé absente, inconnue ou révoquée.non facturé |
402 | CREDITS_EXHAUSTED | Plus de crédits ce mois-ci et aucune réserve.non facturé |
403 | SCOPE_MISSING | La clé n'a pas le périmètre demandé.non facturé |
403 | PLAN_NOT_ELIGIBLE | Ton offre n'ouvre pas l'API.non facturé |
429 | RATE_LIMITED | Trop d'appels : 10 par seconde, 300 par minute, 60 écritures et 20 suppressions par minute.non facturé |
GET /students/{id}
One student.
- Périmètre students:read
- Périmètre students.contact:read
- 1 crédit
- Lecture
- Stable
Paramètres
| Nom | Type | Description |
|---|---|---|
id requispath | integer≥ 1 | The numeric id of the resource. |
curl "https://api.fitdistance.io/api/partner/v1/students/4821" \
-H "Authorization: Bearer fd_live_xxxxxxxx"200 · Student
{
"id": 4821,
"coach_id": 4821,
"first_name": "Camille",
"last_name": "Roux",
"email": "camille.roux@example.com",
"phone": "string",
"birth_date": "2026-10-24",
"joined_at": "2026-10-24T09:12:00Z",
"contract_status": "ACTIVE",
"contract_start_at": "2026-10-24T09:12:00Z",
"contract_end_at": "2026-10-24T09:12:00Z",
"tags": [
{
"id": "7c1d1e2a-9b3f-4c5d-8e6f-1a2b3c4d5e6f",
"name": "string",
"color": "string"
}
],
"updated_at": "2026-10-24T09:12:00Z"
}403 · SCOPE_MISSING
{
"error": {
"name": "PARTNER_API",
"message": "SCOPE_MISSING"
}
}200 · Student
| Nom | Type | Description |
|---|---|---|
id requis | integer | |
coach_id requis | integer | The coach of the student: a trainer of the team with team:read. |
first_name requis | string | |
last_name requis | string | |
email | string | Present only with the students.contact:read scope. |
phone | string | null | Present only with the students.contact:read scope. |
birth_date requis | date | null | |
joined_at requis | date-time | Creation of the student account. |
contract_status requis | string | nullparmi : ACTIVE, ENDING_SOON, EXPIRED, PAUSED | Status of the contract in use with the coach. |
contract_start_at requis | date-time | null | |
contract_end_at requis | date-time | null | |
tags requis | object[] | The tags of the student's current coach. id is the tag uid, from students.tags_list. |
updated_at requis | date-time | The latest change of the student, its user account or its contract in use. A time-driven contract status change (ENDING_SOON or EXPIRED, set by a nightly job) does not move it: derive it from contract_end_at. Any write on the user account (password, settings) moves it, so a sync can receive a student with no visible change. Every login of the student moves it too (last login time): a daily since sync receives again every student who logged in since the previous one. |
Erreurs
| Statut | Code | Quand |
|---|---|---|
400 | VALIDATION | Paramètres ou corps invalides.facturé |
401 | UNAUTHORIZED | Clé absente, inconnue ou révoquée.non facturé |
402 | CREDITS_EXHAUSTED | Plus de crédits ce mois-ci et aucune réserve.non facturé |
403 | SCOPE_MISSING | La clé n'a pas le périmètre demandé.non facturé |
403 | PLAN_NOT_ELIGIBLE | Ton offre n'ouvre pas l'API.non facturé |
404 | NOT_FOUND | Rien à cette adresse.facturé |
429 | RATE_LIMITED | Trop d'appels : 10 par seconde, 300 par minute, 60 écritures et 20 suppressions par minute.non facturé |