Get the form a session is on
/onboarding-sessions/{id}/formReturns the form the respondent is on: the start form, or where the latest route leads, with its pages, fields and answers keyed by form field id, as submissions show them. The first time the current form is read it creates the respondent's form record, so this GET writes. A flow with no start form is 409 invalid_state. Masked answers are withheld. A file answer reads as {uuid, name, size}. can_go_back says whether step-back has somewhere to go.
Path parameters
The onboarding session's id, a uuid. An unknown id, or a session you cannot see, returns 404.
Responses
{
"data": {
"session_id": "8e7d6c5b-4a39-4817-a605-f4e3d2c1b0a9",
"form_id": "1f2e3d4c-5b6a-4978-8695-a4b3c2d1e0f9",
"submission_id": "2a3b4c5d-6e7f-4a8b-9c0d-1e2f3a4b5c6d",
"name": "Investor qualification",
"pages": [
{
"id": "3b4c5d6e-7f8a-4b9c-8d1e-2f3a4b5c6d7e",
"name": "Income",
"description": null,
"order": 1
}
],
"fields": [
{
"id": "4c5d6e7f-8a9b-4c0d-9e2f-3a4b5c6d7e8f",
"label": "Annual income",
"name": "income",
"description": null,
"type": "TEXT",
"reference": "income",
"validator": null,
"placeholder": null,
"pre_population_key": null,
"backfill": false,
"order": 1,
"page_id": "3b4c5d6e-7f8a-4b9c-8d1e-2f3a4b5c6d7e",
"option_preset_id": null,
"options": null,
"required": true,
"conditions": [],
"condition_logic": "AND"
}
],
"answers": {
"4c5d6e7f-8a9b-4c0d-9e2f-3a4b5c6d7e8f": "85000"
},
"completed_at": null,
"can_go_back": false
}
}Authorization failed. error.code is one of org_disabled,
ip_blocked, missing_scope, scope_disabled, user_disabled.
The request conflicts with existing state (error.code = conflict),
e.g. a compliance flow with the requested name already exists.
Examples
curl https://your-org-domain/kong/core/api/v2/onboarding-sessions/{id}/form\
-H "Authorization: Bearer $HELM_API_KEY"\
-H "Content-Type: application/json"