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
| 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/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
| Nom | Type | Description |
|---|---|---|
id requis | integer | The numeric id of the assignment. |
form_id requis | string | The uid of the form. |
form_title requis | string | |
student_id requis | integer | |
assigned_at requis | date-time | |
unassigned_at requis | date-time | null | When the coach unassigned the form. Null while active. |
is_active requis | boolean | The form is still assigned (unassigned_at is null). |
submissions_count requis | integer | Submissions of this assignment. |
last_submitted_at requis | date-time | null | The latest submission. Null before the first one. |
updated_at requis | 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. |
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 /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
| 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/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
| Nom | Type | Description |
|---|---|---|
id requis | string | |
assignment_id requis | integer | The numeric id of the assignment (see /forms/assignments). |
form_id requis | string | The uid of the form. |
form_title requis | string | |
student_id requis | integer | |
submitted_at requis | date-time | The completion of the submission. An incomplete one (is_complete false) carries the date of its assignment. |
is_complete requis | boolean | |
answers_count requis | integer | Answers of this submission, deleted ones excluded. |
updated_at requis | 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. |
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 /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
| Nom | Type | Description |
|---|---|---|
id requispath | 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
| Nom | Type | Description |
|---|---|---|
id requis | string | |
assignment_id requis | integer | The numeric id of the assignment (see /forms/assignments). |
form_id requis | string | The uid of the form. |
form_title requis | string | |
student_id requis | integer | |
submitted_at requis | date-time | The completion of the submission. An incomplete one (is_complete false) carries the date of its assignment. |
is_complete requis | boolean | |
answers_count requis | integer | Answers of this submission, deleted ones excluded. |
updated_at requis | 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. |
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é |