Facebook Pixel
Fit'DistanceDocumentation
Open the app

Students

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.

  • Scope students:read
  • Scope students.contact:read
  • 1 credit
  • Read
  • Stable

Parameters

NameTypeDescription
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 · a page of 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 · a page of Student

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

Errors

StatusCodeWhen
400VALIDATIONInvalid parameters or body.billed
401UNAUTHORIZEDKey missing, unknown or revoked.not billed
402CREDITS_EXHAUSTEDNo credits left this month and no reserve.not billed
403SCOPE_MISSINGThe key doesn't have the required scope.not billed
403PLAN_NOT_ELIGIBLEYour plan doesn't include the API.not billed
429RATE_LIMITEDToo many calls: 10 per second, 300 per minute, 60 writes and 20 deletes per minute.not billed

GET /students/departures

Students who left the coach.

  • Scope students:read
  • 1 credit
  • Read
  • Stable

Parameters

NameTypeDescription
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 · a page of 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 · a page of Departure

NameTypeDescription
id requiredinteger
student_id requiredinteger
coach_id requiredinteger
left_at requireddate-time
reason requiredstringone of unassigned, student_deleted, contract_ended
updated_at requireddate-time

Errors

StatusCodeWhen
400VALIDATIONInvalid parameters or body.billed
401UNAUTHORIZEDKey missing, unknown or revoked.not billed
402CREDITS_EXHAUSTEDNo credits left this month and no reserve.not billed
403SCOPE_MISSINGThe key doesn't have the required scope.not billed
403PLAN_NOT_ELIGIBLEYour plan doesn't include the API.not billed
429RATE_LIMITEDToo many calls: 10 per second, 300 per minute, 60 writes and 20 deletes per minute.not billed

GET /students/{id}

One student.

  • Scope students:read
  • Scope students.contact:read
  • 1 credit
  • Read
  • Stable

Parameters

NameTypeDescription
id requiredpathinteger≥ 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

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

Errors

StatusCodeWhen
400VALIDATIONInvalid parameters or body.billed
401UNAUTHORIZEDKey missing, unknown or revoked.not billed
402CREDITS_EXHAUSTEDNo credits left this month and no reserve.not billed
403SCOPE_MISSINGThe key doesn't have the required scope.not billed
403PLAN_NOT_ELIGIBLEYour plan doesn't include the API.not billed
404NOT_FOUNDNothing at this address.billed
429RATE_LIMITEDToo many calls: 10 per second, 300 per minute, 60 writes and 20 deletes per minute.not billed