Facebook Pixel
Fit'DistanceDocumentation
Open the app

Training

6 routes

GET /programs

Programs, never a template.

  • Scope training: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/programs?limit=50" \
  -H "Authorization: Bearer fd_live_xxxxxxxx"
200 · a page of Program
{
  "data": [
    {
      "id": "7c1d1e2a-9b3f-4c5d-8e6f-1a2b3c4d5e6f",
      "student_id": 4821,
      "coach_id": 4821,
      "name": "string",
      "status": "draft",
      "weeks_duration": 8,
      "start_at": "2026-10-24T09:12:00Z",
      "end_at": "2026-10-24T09:12:00Z",
      "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 Program

NameTypeDescription
id requiredstring
student_id requiredinteger | null
coach_id requiredinteger
name requiredstring
status requiredstringone of draft, in_progress, scheduled, finished
weeks_duration requiredinteger | null
start_at requireddate-time | null
end_at requireddate-time | null
updated_at requireddate-time
deleted_atdate-time | nullPresent when include_deleted is true.

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 /set-results

Set results, decoded. Only the done sets by default.

  • Scope training: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
include_not_donequerybooleandefault falseAlso returns the sets not done.
curl "https://api.fitdistance.io/api/partner/v1/set-results?limit=50" \
  -H "Authorization: Bearer fd_live_xxxxxxxx"
200 · a page of SetResult
{
  "data": [
    {
      "id": "7c1d1e2a-9b3f-4c5d-8e6f-1a2b3c4d5e6f",
      "workout_id": "7c1d1e2a-9b3f-4c5d-8e6f-1a2b3c4d5e6f",
      "student_id": 4821,
      "exercise_id": 4821,
      "exercise_name": "string",
      "set_index": 4821,
      "is_done": true,
      "weight_kg": 72.5,
      "reps": 10,
      "duration_s": 72.5,
      "distance_m": 72.5,
      "rpe": 7,
      "rir": 2,
      "tempo": "string",
      "extra": {},
      "satisfaction": 8,
      "comment": "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 SetResult

NameTypeDescription
id requiredstring
workout_id requiredstring
student_id requiredinteger
exercise_id requiredinteger
exercise_name requiredstring | null
set_index requiredintegerPosition of the set in the exercise.
is_done requiredboolean
weight_kg requirednumber | nullIn kilograms, converted from pounds when needed.
reps requirednumber | null
duration_s requirednumber | null
distance_m requirednumber | null
rpe requirednumber | nullThe RPE column of the set, else the intensity the student gave.
rir requirednumber | null
tempo requiredstring | null
extra requiredobjectThe other columns of the set, by lower-case column type (for example rep_range, amrap). Free text in a numeric column is kept here.
satisfaction requiredinteger | nullHearts the student gave the set, 1 to 10.
comment requiredstring | null
updated_at requireddate-time
deleted_atdate-time | nullPresent when include_deleted is true.

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}/records

Best values of one student on each exercise practiced with the coaches this key reads. Sessions with a former coach do not count. Not paginated.

  • Scope training: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/records" \
  -H "Authorization: Bearer fd_live_xxxxxxxx"
Response
{
  "data": [
    {
      "exercise_id": 4821,
      "exercise_name": "string",
      "weight_max_kg": 72.5,
      "one_rm_kg": 72.5,
      "reps_max": 72.5,
      "time_max_s": 72.5,
      "distance_max_m": 72.5,
      "computed_at": "2026-10-24T09:12:00Z"
    }
  ]
}
403 · SCOPE_MISSING
{
  "error": {
    "name": "PARTNER_API",
    "message": "SCOPE_MISSING"
  }
}

Response

NameTypeDescription
data requiredRecord[]

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

GET /workout-feedbacks

Workout feedbacks.

  • Scope training: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
curl "https://api.fitdistance.io/api/partner/v1/workout-feedbacks?limit=50" \
  -H "Authorization: Bearer fd_live_xxxxxxxx"
200 · a page of WorkoutFeedback
{
  "data": [
    {
      "id": "7c1d1e2a-9b3f-4c5d-8e6f-1a2b3c4d5e6f",
      "workout_id": "7c1d1e2a-9b3f-4c5d-8e6f-1a2b3c4d5e6f",
      "student_id": 4821,
      "tiredness": "bad",
      "intensity": 7,
      "satisfaction": 8,
      "completion_rate": 100,
      "comment": "string",
      "created_at": "2026-10-24T09:12:00Z",
      "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 WorkoutFeedback

NameTypeDescription
id requiredstring
workout_id requiredstring
student_id requiredinteger
tiredness requiredstring | nullone of bad, normal, good
intensity requiredinteger | nullPerceived effort the student slid, 0 to 10.
satisfaction requiredinteger | nullHearts the student gave the session, 1 to 10.
completion_rate requirednumber | null
comment requiredstring | null
created_at requireddate-time
updated_at requireddate-time
deleted_atdate-time | nullPresent when include_deleted is true.

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 /workouts

Workouts, never a template.

  • Scope training: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
statusquerystring
curl "https://api.fitdistance.io/api/partner/v1/workouts?limit=50" \
  -H "Authorization: Bearer fd_live_xxxxxxxx"
200 · a page of Workout
{
  "data": [
    {
      "id": "7c1d1e2a-9b3f-4c5d-8e6f-1a2b3c4d5e6f",
      "program_id": "string",
      "student_id": 4821,
      "coach_id": 4821,
      "name": "string",
      "status": "scheduled",
      "scheduled_at": "2026-10-24T09:12:00Z",
      "started_at": "2026-10-24T09:12:00Z",
      "ended_at": "2026-10-24T09:12:00Z",
      "day_in_program": 3,
      "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 Workout

NameTypeDescription
id requiredstring
program_id requiredstring | nullThe program uid, null without one.
student_id requiredinteger | nullThe program's student, else the student the workout is assigned to.
coach_id requiredinteger
name requiredstring
status requiredstringone of scheduled, done, in_progress, draft, missed
scheduled_at requireddate-time | null
started_at requireddate-time | null
ended_at requireddate-time | null
day_in_program requiredinteger | null
updated_at requireddate-time
deleted_atdate-time | nullPresent when include_deleted is true.

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 /workouts/{id}

One workout with its groups, exercises and planned sets.

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

Parameters

NameTypeDescription
id requiredpathstringThe uid of the resource (string).
curl "https://api.fitdistance.io/api/partner/v1/workouts/7c1d1e2a-9b3f-4c5d-8e6f-1a2b3c4d5e6f" \
  -H "Authorization: Bearer fd_live_xxxxxxxx"
200 · WorkoutDetail
{
  "id": "7c1d1e2a-9b3f-4c5d-8e6f-1a2b3c4d5e6f",
  "program_id": "string",
  "student_id": 4821,
  "coach_id": 4821,
  "name": "string",
  "status": "scheduled",
  "scheduled_at": "2026-10-24T09:12:00Z",
  "started_at": "2026-10-24T09:12:00Z",
  "ended_at": "2026-10-24T09:12:00Z",
  "day_in_program": 3,
  "updated_at": "2026-10-24T09:12:00Z",
  "groups": [
    {
      "id": "7c1d1e2a-9b3f-4c5d-8e6f-1a2b3c4d5e6f",
      "type": "standalone",
      "repeat": 4821,
      "work_seconds": 4821,
      "rest_between_exercises_seconds": 4821,
      "rest_between_rounds_seconds": 4821,
      "exercises": [
        {
          "id": "7c1d1e2a-9b3f-4c5d-8e6f-1a2b3c4d5e6f",
          "exercise_id": 4821,
          "exercise_name": "string",
          "note": "string",
          "planned_sets": [
            {
              "weight_kg": 72.5,
              "reps": 10,
              "duration_s": 72.5,
              "distance_m": 72.5,
              "rpe": 7,
              "rir": 2,
              "tempo": "string",
              "extra": {}
            }
          ]
        }
      ]
    }
  ]
}
403 · SCOPE_MISSING
{
  "error": {
    "name": "PARTNER_API",
    "message": "SCOPE_MISSING"
  }
}

200 · WorkoutDetail

NameTypeDescription
id requiredstring
program_id requiredstring | nullThe program uid, null without one.
student_id requiredinteger | nullThe program's student, else the student the workout is assigned to.
coach_id requiredinteger
name requiredstring
status requiredstringone of scheduled, done, in_progress, draft, missed
scheduled_at requireddate-time | null
started_at requireddate-time | null
ended_at requireddate-time | null
day_in_program requiredinteger | null
updated_at requireddate-time
deleted_atdate-time | nullPresent when include_deleted is true.
groups requiredobject[]

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