Facebook Pixel
Fit'DistanceDocumentation
Ouvrir l'app

É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

NomTypeDescription
limitqueryinteger1–200, default 50
cursorquerystringOpaque cursor: next_cursor of the previous page.
sincequerydate-timeISO 8601. Returns the objects with updated_at >= since.
include_deletedquerybooleandefault false
tagquerystring
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

NomTypeDescription
id requisinteger
coach_id requisintegerThe coach of the student: a trainer of the team with team:read.
first_name requisstring
last_name requisstring
emailstringPresent only with the students.contact:read scope.
phonestring | nullPresent only with the students.contact:read scope.
birth_date requisdate | null
joined_at requisdate-timeCreation of the student account.
contract_status requisstring | nullparmi : ACTIVE, ENDING_SOON, EXPIRED, PAUSEDStatus of the contract in use with the coach.
contract_start_at requisdate-time | null
contract_end_at requisdate-time | null
tags requisobject[]The tags of the student's current coach. id is the tag uid, from students.tags_list.
updated_at requisdate-timeThe 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

StatutCodeQuand
400VALIDATIONParamètres ou corps invalides.facturé
401UNAUTHORIZEDClé absente, inconnue ou révoquée.non facturé
402CREDITS_EXHAUSTEDPlus de crédits ce mois-ci et aucune réserve.non facturé
403SCOPE_MISSINGLa clé n'a pas le périmètre demandé.non facturé
403PLAN_NOT_ELIGIBLETon offre n'ouvre pas l'API.non facturé
429RATE_LIMITEDTrop 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

NomTypeDescription
limitqueryinteger1–200, default 50
cursorquerystringOpaque cursor: next_cursor of the previous page.
sincequerydate-timeISO 8601. Returns the objects with updated_at >= since.
include_deletedquerybooleandefault false
student_idqueryinteger≥ 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

NomTypeDescription
id requisinteger
student_id requisinteger
coach_id requisinteger
left_at requisdate-time
reason requisstringparmi : unassigned, student_deleted, contract_ended
updated_at requisdate-time

Erreurs

StatutCodeQuand
400VALIDATIONParamètres ou corps invalides.facturé
401UNAUTHORIZEDClé absente, inconnue ou révoquée.non facturé
402CREDITS_EXHAUSTEDPlus de crédits ce mois-ci et aucune réserve.non facturé
403SCOPE_MISSINGLa clé n'a pas le périmètre demandé.non facturé
403PLAN_NOT_ELIGIBLETon offre n'ouvre pas l'API.non facturé
429RATE_LIMITEDTrop 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

NomTypeDescription
id requispathinteger≥ 1The 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

NomTypeDescription
id requisinteger
coach_id requisintegerThe coach of the student: a trainer of the team with team:read.
first_name requisstring
last_name requisstring
emailstringPresent only with the students.contact:read scope.
phonestring | nullPresent only with the students.contact:read scope.
birth_date requisdate | null
joined_at requisdate-timeCreation of the student account.
contract_status requisstring | nullparmi : ACTIVE, ENDING_SOON, EXPIRED, PAUSEDStatus of the contract in use with the coach.
contract_start_at requisdate-time | null
contract_end_at requisdate-time | null
tags requisobject[]The tags of the student's current coach. id is the tag uid, from students.tags_list.
updated_at requisdate-timeThe 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

StatutCodeQuand
400VALIDATIONParamètres ou corps invalides.facturé
401UNAUTHORIZEDClé absente, inconnue ou révoquée.non facturé
402CREDITS_EXHAUSTEDPlus de crédits ce mois-ci et aucune réserve.non facturé
403SCOPE_MISSINGLa clé n'a pas le périmètre demandé.non facturé
403PLAN_NOT_ELIGIBLETon offre n'ouvre pas l'API.non facturé
404NOT_FOUNDRien à cette adresse.facturé
429RATE_LIMITEDTrop d'appels : 10 par seconde, 300 par minute, 60 écritures et 20 suppressions par minute.non facturé