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
| 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/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
| Name | Type | Description |
|---|---|---|
id required | integer | The numeric id of the assignment. |
form_id required | string | The uid of the form. |
form_title required | string | |
student_id required | integer | |
assigned_at required | date-time | |
unassigned_at required | date-time | null | When the coach unassigned the form. Null while active. |
is_active required | boolean | The form is still assigned (unassigned_at is null). |
submissions_count required | integer | Submissions of this assignment. |
last_submitted_at required | date-time | null | The latest submission. Null before the first one. |
updated_at required | date-time | The latest change of the assignment: assigned, unassigned, a new submission, or a change (rename, deletion) of its form. |
deleted_at | date-time | null | Present when include_deleted is true. An assignment is deleted with its form. |
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 /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
| 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/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
| Name | Type | Description |
|---|---|---|
id required | string | |
assignment_id required | integer | The numeric id of the assignment (see /forms/assignments). |
form_id required | string | The uid of the form. |
form_title required | string | |
student_id required | integer | |
submitted_at required | date-time | The completion of the submission. An incomplete one (is_complete false) carries the date of its assignment. |
is_complete required | boolean | |
answers_count required | integer | Answers of this submission, deleted ones excluded. |
updated_at required | date-time | The latest change of the submission: submitted, one of its answers edited or deleted, or a change (rename, deletion) of its form. |
deleted_at | date-time | null | Present when include_deleted is true. A submission is deleted with its form. |
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 /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
| Name | Type | Description |
|---|---|---|
id requiredpath | string | The 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
| Name | Type | Description |
|---|---|---|
id required | string | |
assignment_id required | integer | The numeric id of the assignment (see /forms/assignments). |
form_id required | string | The uid of the form. |
form_title required | string | |
student_id required | integer | |
submitted_at required | date-time | The completion of the submission. An incomplete one (is_complete false) carries the date of its assignment. |
is_complete required | boolean | |
answers_count required | integer | Answers of this submission, deleted ones excluded. |
updated_at required | date-time | The latest change of the submission: submitted, one of its answers edited or deleted, or a change (rename, deletion) of its form. |
answers | FormSubmissionAnswer[] | 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
| 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 |