Entraînement
6 routes
GET /programs
Programs, never a template.
- Périmètre training: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/programs?limit=50" \
-H "Authorization: Bearer fd_live_xxxxxxxx"200 · une page de 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 · une page de Program
| Nom | Type | Description |
|---|---|---|
id requis | string | |
student_id requis | integer | null | |
coach_id requis | integer | |
name requis | string | |
status requis | stringparmi : draft, in_progress, scheduled, finished | |
weeks_duration requis | integer | null | |
start_at requis | date-time | null | |
end_at requis | date-time | null | |
updated_at requis | date-time | |
deleted_at | date-time | null | Present when include_deleted is true. |
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 /set-results
Set results, decoded. Only the done sets by default.
- Périmètre training: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 | |
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 · une page de 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 · une page de SetResult
| Nom | Type | Description |
|---|---|---|
id requis | string | |
workout_id requis | string | |
student_id requis | integer | |
exercise_id requis | integer | |
exercise_name requis | string | null | |
set_index requis | integer | Position of the set in the exercise. |
is_done requis | boolean | |
weight_kg requis | number | null | In kilograms, converted from pounds when needed. |
reps requis | number | null | |
duration_s requis | number | null | |
distance_m requis | number | null | |
rpe requis | number | null | The RPE column of the set, else the intensity the student gave. |
rir requis | number | null | |
tempo requis | string | null | |
extra requis | 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 requis | integer | null | Hearts the student gave the set, 1 to 10. |
comment requis | string | null | |
updated_at requis | date-time | |
deleted_at | date-time | null | Present when include_deleted is true. |
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}/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.
- Périmètre training: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/records" \
-H "Authorization: Bearer fd_live_xxxxxxxx"Réponse
{
"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"
}
}Réponse
| Nom | Type | Description |
|---|---|---|
data requis | Record[] |
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é |
GET /workout-feedbacks
Workout feedbacks.
- Périmètre training: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 |
curl "https://api.fitdistance.io/api/partner/v1/workout-feedbacks?limit=50" \
-H "Authorization: Bearer fd_live_xxxxxxxx"200 · une page de 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 · une page de WorkoutFeedback
| Nom | Type | Description |
|---|---|---|
id requis | string | |
workout_id requis | string | |
student_id requis | integer | |
tiredness requis | string | nullparmi : bad, normal, good | |
intensity requis | integer | null | Perceived effort the student slid, 0 to 10. |
satisfaction requis | integer | null | Hearts the student gave the session, 1 to 10. |
completion_rate requis | number | null | |
comment requis | string | null | |
created_at requis | date-time | |
updated_at requis | date-time | |
deleted_at | date-time | null | Present when include_deleted is true. |
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 /workouts
Workouts, never a template.
- Périmètre training: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 | |
statusquery | string |
curl "https://api.fitdistance.io/api/partner/v1/workouts?limit=50" \
-H "Authorization: Bearer fd_live_xxxxxxxx"200 · une page de 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 · une page de Workout
| Nom | Type | Description |
|---|---|---|
id requis | string | |
program_id requis | string | null | The program uid, null without one. |
student_id requis | integer | null | The program's student, else the student the workout is assigned to. |
coach_id requis | integer | |
name requis | string | |
status requis | stringparmi : scheduled, done, in_progress, draft, missed | |
scheduled_at requis | date-time | null | |
started_at requis | date-time | null | |
ended_at requis | date-time | null | |
day_in_program requis | integer | null | |
updated_at requis | date-time | |
deleted_at | date-time | null | Present when include_deleted is true. |
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 /workouts/{id}
One workout with its groups, exercises and planned sets.
- Périmètre training:read
- 1 crédit
- Lecture
- Stable
Paramètres
| Nom | Type | Description |
|---|---|---|
id requispath | 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
| Nom | Type | Description |
|---|---|---|
id requis | string | |
program_id requis | string | null | The program uid, null without one. |
student_id requis | integer | null | The program's student, else the student the workout is assigned to. |
coach_id requis | integer | |
name requis | string | |
status requis | stringparmi : scheduled, done, in_progress, draft, missed | |
scheduled_at requis | date-time | null | |
started_at requis | date-time | null | |
ended_at requis | date-time | null | |
day_in_program requis | integer | null | |
updated_at requis | date-time | |
deleted_at | date-time | null | Present when include_deleted is true. |
groups requis | object[] |
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é |