Facebook Pixel
Fit'DistanceDocumentation
Ouvrir l'app

Activité

1 route

GET /coaching-timeline

Coaching phases of each student (cutting, bulking…). A deleted phase leaves no tombstone: resync the student's phases when one is missing. include_deleted has no effect.

  • Périmètre activity: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/coaching-timeline?limit=50" \
  -H "Authorization: Bearer fd_live_xxxxxxxx"
200 · une page de CoachingPhase
{
  "data": [
    {
      "id": 4821,
      "student_id": 4821,
      "coach_id": 4821,
      "phase": "cutting",
      "start_date": "2026-10-24",
      "end_date": "2026-10-24",
      "description": "string",
      "color": "string",
      "order": 1,
      "is_active": true,
      "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 CoachingPhase

NomTypeDescription
id requisinteger
student_id requisinteger
coach_id requisinteger | nullThe coach who set the phase, not necessarily the student's current coach.
phase requisstringparmi : cutting, bulking, maintenance, recomposition, preparation, recovery, custom
start_date requisdate
end_date requisdate
description requisstring | null
color requisstringHexadecimal color, for example #3f48b7.
order requisinteger
is_active requisboolean
updated_at requisdate-timeThe latest change of the phase.

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é