Facebook Pixel
Fit'DistanceDocumentation
Ouvrir l'app

Formulaires

3 routes

GET /forms/assignments

Form assignments: one per form and student, inactive ones included. Deleted with the form. Deleting a submission lowers the counts without moving updated_at: resync the assignments when a submission is missing.

  • Périmètre forms: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/forms/assignments?limit=50" \
  -H "Authorization: Bearer fd_live_xxxxxxxx"
200 · une page de FormAssignment
{
  "data": [
    {
      "id": 4821,
      "form_id": "7c1d1e2a-9b3f-4c5d-8e6f-1a2b3c4d5e6f",
      "form_title": "string",
      "student_id": 4821,
      "assigned_at": "2026-10-24T09:12:00Z",
      "unassigned_at": "2026-10-24T09:12:00Z",
      "is_active": true,
      "submissions_count": 3,
      "last_submitted_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 FormAssignment

NomTypeDescription
id requisintegerThe numeric id of the assignment.
form_id requisstringThe uid of the form.
form_title requisstring
student_id requisinteger
assigned_at requisdate-time
unassigned_at requisdate-time | nullWhen the coach unassigned the form. Null while active.
is_active requisbooleanThe form is still assigned (unassigned_at is null).
submissions_count requisintegerSubmissions of this assignment.
last_submitted_at requisdate-time | nullThe latest submission. Null before the first one.
updated_at requisdate-timeThe latest change of the assignment: assigned, unassigned, a new submission, or a change (rename, deletion) of its form.
deleted_atdate-time | nullPresent when include_deleted is true. An assignment is deleted with its form.

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é

GET /forms/submissions

Private submissions of assigned forms, without the answers: see /forms/submissions/{id}. A submission the coach deleted leaves no tombstone.

  • Périmètre forms: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/forms/submissions?limit=50" \
  -H "Authorization: Bearer fd_live_xxxxxxxx"
200 · une page de FormSubmission
{
  "data": [
    {
      "id": "7c1d1e2a-9b3f-4c5d-8e6f-1a2b3c4d5e6f",
      "assignment_id": 4821,
      "form_id": "7c1d1e2a-9b3f-4c5d-8e6f-1a2b3c4d5e6f",
      "form_title": "string",
      "student_id": 4821,
      "submitted_at": "2026-10-24T09:12:00Z",
      "is_complete": true,
      "answers_count": 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 FormSubmission

NomTypeDescription
id requisstring
assignment_id requisintegerThe numeric id of the assignment (see /forms/assignments).
form_id requisstringThe uid of the form.
form_title requisstring
student_id requisinteger
submitted_at requisdate-timeThe completion of the submission. An incomplete one (is_complete false) carries the date of its assignment.
is_complete requisboolean
answers_count requisintegerAnswers of this submission, deleted ones excluded.
updated_at requisdate-timeThe latest change of the submission: submitted, one of its answers edited or deleted, or a change (rename, deletion) of its form.
deleted_atdate-time | nullPresent when include_deleted is true. A submission is deleted with its form.

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é

GET /forms/submissions/{id}

One private submission. The answers need the forms.answers:read scope; without it the answers key is absent.

  • Périmètre forms:read
  • Périmètre forms.answers:read
  • 1 crédit
  • Lecture
  • Stable

Paramètres

NomTypeDescription
id requispathstringThe uid of the resource (string).
curl "https://api.fitdistance.io/api/partner/v1/forms/submissions/7c1d1e2a-9b3f-4c5d-8e6f-1a2b3c4d5e6f" \
  -H "Authorization: Bearer fd_live_xxxxxxxx"
200 · FormSubmissionDetail
{
  "id": "7c1d1e2a-9b3f-4c5d-8e6f-1a2b3c4d5e6f",
  "assignment_id": 4821,
  "form_id": "7c1d1e2a-9b3f-4c5d-8e6f-1a2b3c4d5e6f",
  "form_title": "string",
  "student_id": 4821,
  "submitted_at": "2026-10-24T09:12:00Z",
  "is_complete": true,
  "answers_count": 3,
  "updated_at": "2026-10-24T09:12:00Z",
  "answers": [
    {
      "question_id": "7c1d1e2a-9b3f-4c5d-8e6f-1a2b3c4d5e6f",
      "question_title": "string",
      "type": "scale_of_1_to_10",
      "value": "string",
      "selected_option_ids": [
        "string"
      ],
      "additional_text": "string",
      "files": [
        {
          "id": "7c1d1e2a-9b3f-4c5d-8e6f-1a2b3c4d5e6f",
          "name": "string",
          "mime_type": "string",
          "size_bytes": 4821
        }
      ]
    }
  ]
}
403 · SCOPE_MISSING
{
  "error": {
    "name": "PARTNER_API",
    "message": "SCOPE_MISSING"
  }
}

200 · FormSubmissionDetail

NomTypeDescription
id requisstring
assignment_id requisintegerThe numeric id of the assignment (see /forms/assignments).
form_id requisstringThe uid of the form.
form_title requisstring
student_id requisinteger
submitted_at requisdate-timeThe completion of the submission. An incomplete one (is_complete false) carries the date of its assignment.
is_complete requisboolean
answers_count requisintegerAnswers of this submission, deleted ones excluded.
updated_at requisdate-timeThe latest change of the submission: submitted, one of its answers edited or deleted, or a change (rename, deletion) of its form.
answersFormSubmissionAnswer[]Present only with the forms.answers:read scope. A question left unanswered is absent. An answer whose question was deleted for good is counted in answers_count but not served.

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é
404NOT_FOUNDRien à cette adresse.facturé
429RATE_LIMITEDTrop d'appels : 10 par seconde, 300 par minute, 60 écritures et 20 suppressions par minute.non facturé