Facebook Pixel
Fit'DistanceDocumentation
Open the app

Forms

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.

  • Scope forms: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/forms/assignments?limit=50" \
  -H "Authorization: Bearer fd_live_xxxxxxxx"
200 · a page of 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 · a page of FormAssignment

NameTypeDescription
id requiredintegerThe numeric id of the assignment.
form_id requiredstringThe uid of the form.
form_title requiredstring
student_id requiredinteger
assigned_at requireddate-time
unassigned_at requireddate-time | nullWhen the coach unassigned the form. Null while active.
is_active requiredbooleanThe form is still assigned (unassigned_at is null).
submissions_count requiredintegerSubmissions of this assignment.
last_submitted_at requireddate-time | nullThe latest submission. Null before the first one.
updated_at requireddate-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.

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 /forms/submissions

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

  • Scope forms: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/forms/submissions?limit=50" \
  -H "Authorization: Bearer fd_live_xxxxxxxx"
200 · a page of 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 · a page of FormSubmission

NameTypeDescription
id requiredstring
assignment_id requiredintegerThe numeric id of the assignment (see /forms/assignments).
form_id requiredstringThe uid of the form.
form_title requiredstring
student_id requiredinteger
submitted_at requireddate-timeThe completion of the submission. An incomplete one (is_complete false) carries the date of its assignment.
is_complete requiredboolean
answers_count requiredintegerAnswers of this submission, deleted ones excluded.
updated_at requireddate-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.

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

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

  • Scope forms:read
  • Scope forms.answers:read
  • 1 credit
  • Read
  • Stable

Parameters

NameTypeDescription
id requiredpathstringThe 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

NameTypeDescription
id requiredstring
assignment_id requiredintegerThe numeric id of the assignment (see /forms/assignments).
form_id requiredstringThe uid of the form.
form_title requiredstring
student_id requiredinteger
submitted_at requireddate-timeThe completion of the submission. An incomplete one (is_complete false) carries the date of its assignment.
is_complete requiredboolean
answers_count requiredintegerAnswers of this submission, deleted ones excluded.
updated_at requireddate-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.

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