Training
6 routes
GET /programs
Programs, never a template.
- Scope training:read
- 1 credit
- Read
- Stable
Parameters
| Name | 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/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
| Name | Type | Description |
|---|---|---|
id required | string | |
student_id required | integer | null | |
coach_id required | integer | |
name required | string | |
status required | stringone of draft, in_progress, scheduled, finished | |
weeks_duration required | integer | null | |
start_at required | date-time | null | |
end_at required | date-time | null | |
updated_at required | date-time | |
deleted_at | date-time | null | Present when include_deleted is true. |
Errors
| Status | Code | When |
|---|---|---|
400 | VALIDATION | Invalid parameters or body.billed |
401 | UNAUTHORIZED | Key missing, unknown or revoked.not billed |
402 | CREDITS_EXHAUSTED | No credits left this month and no reserve.not billed |
403 | SCOPE_MISSING | The key doesn't have the required scope.not billed |
403 | PLAN_NOT_ELIGIBLE | Your plan doesn't include the API.not billed |
429 | RATE_LIMITED | Too 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
| Name | 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 | |
include_not_donequery | booleandefault false | Also 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
| Name | Type | Description |
|---|---|---|
id required | string | |
workout_id required | string | |
student_id required | integer | |
exercise_id required | integer | |
exercise_name required | string | null | |
set_index required | integer | Position of the set in the exercise. |
is_done required | boolean | |
weight_kg required | number | null | In kilograms, converted from pounds when needed. |
reps required | number | null | |
duration_s required | number | null | |
distance_m required | number | null | |
rpe required | number | null | The RPE column of the set, else the intensity the student gave. |
rir required | number | null | |
tempo required | string | null | |
extra required | object | The 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 required | integer | null | Hearts the student gave the set, 1 to 10. |
comment required | string | null | |
updated_at required | date-time | |
deleted_at | date-time | null | Present when include_deleted is true. |
Errors
| Status | Code | When |
|---|---|---|
400 | VALIDATION | Invalid parameters or body.billed |
401 | UNAUTHORIZED | Key missing, unknown or revoked.not billed |
402 | CREDITS_EXHAUSTED | No credits left this month and no reserve.not billed |
403 | SCOPE_MISSING | The key doesn't have the required scope.not billed |
403 | PLAN_NOT_ELIGIBLE | Your plan doesn't include the API.not billed |
429 | RATE_LIMITED | Too 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
| Name | Type | Description |
|---|---|---|
id requiredpath | integer≥ 1 | The 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
| Name | Type | Description |
|---|---|---|
data required | Record[] |
Errors
| Status | Code | When |
|---|---|---|
400 | VALIDATION | Invalid parameters or body.billed |
401 | UNAUTHORIZED | Key missing, unknown or revoked.not billed |
402 | CREDITS_EXHAUSTED | No credits left this month and no reserve.not billed |
403 | SCOPE_MISSING | The key doesn't have the required scope.not billed |
403 | PLAN_NOT_ELIGIBLE | Your plan doesn't include the API.not billed |
404 | NOT_FOUND | Nothing at this address.billed |
429 | RATE_LIMITED | Too 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
| Name | 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 |
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
| Name | Type | Description |
|---|---|---|
id required | string | |
workout_id required | string | |
student_id required | integer | |
tiredness required | string | nullone of bad, normal, good | |
intensity required | integer | null | Perceived effort the student slid, 0 to 10. |
satisfaction required | integer | null | Hearts the student gave the session, 1 to 10. |
completion_rate required | number | null | |
comment required | string | null | |
created_at required | date-time | |
updated_at required | date-time | |
deleted_at | date-time | null | Present when include_deleted is true. |
Errors
| Status | Code | When |
|---|---|---|
400 | VALIDATION | Invalid parameters or body.billed |
401 | UNAUTHORIZED | Key missing, unknown or revoked.not billed |
402 | CREDITS_EXHAUSTED | No credits left this month and no reserve.not billed |
403 | SCOPE_MISSING | The key doesn't have the required scope.not billed |
403 | PLAN_NOT_ELIGIBLE | Your plan doesn't include the API.not billed |
429 | RATE_LIMITED | Too 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
| Name | 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 | |
statusquery | string |
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
| Name | Type | Description |
|---|---|---|
id required | string | |
program_id required | string | null | The program uid, null without one. |
student_id required | integer | null | The program's student, else the student the workout is assigned to. |
coach_id required | integer | |
name required | string | |
status required | stringone of scheduled, done, in_progress, draft, missed | |
scheduled_at required | date-time | null | |
started_at required | date-time | null | |
ended_at required | date-time | null | |
day_in_program required | integer | null | |
updated_at required | date-time | |
deleted_at | date-time | null | Present when include_deleted is true. |
Errors
| Status | Code | When |
|---|---|---|
400 | VALIDATION | Invalid parameters or body.billed |
401 | UNAUTHORIZED | Key missing, unknown or revoked.not billed |
402 | CREDITS_EXHAUSTED | No credits left this month and no reserve.not billed |
403 | SCOPE_MISSING | The key doesn't have the required scope.not billed |
403 | PLAN_NOT_ELIGIBLE | Your plan doesn't include the API.not billed |
429 | RATE_LIMITED | Too 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
| Name | Type | Description |
|---|---|---|
id requiredpath | string | The 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
| Name | Type | Description |
|---|---|---|
id required | string | |
program_id required | string | null | The program uid, null without one. |
student_id required | integer | null | The program's student, else the student the workout is assigned to. |
coach_id required | integer | |
name required | string | |
status required | stringone of scheduled, done, in_progress, draft, missed | |
scheduled_at required | date-time | null | |
started_at required | date-time | null | |
ended_at required | date-time | null | |
day_in_program required | integer | null | |
updated_at required | date-time | |
deleted_at | date-time | null | Present when include_deleted is true. |
groups required | object[] |
Errors
| Status | Code | When |
|---|---|---|
400 | VALIDATION | Invalid parameters or body.billed |
401 | UNAUTHORIZED | Key missing, unknown or revoked.not billed |
402 | CREDITS_EXHAUSTED | No credits left this month and no reserve.not billed |
403 | SCOPE_MISSING | The key doesn't have the required scope.not billed |
403 | PLAN_NOT_ELIGIBLE | Your plan doesn't include the API.not billed |
404 | NOT_FOUND | Nothing at this address.billed |
429 | RATE_LIMITED | Too many calls: 10 per second, 300 per minute, 60 writes and 20 deletes per minute.not billed |