submit_form_for_invitation
Submit a real Nettskjema form response using an invitation ID, recording answers against the invited respondent so the form owner can identify who replied.
Instructions
Deliver a response to the form a given invitation was issued for.
Same delivery as submit_form, addressed by invitation rather than by form: the response is recorded against that invitation, so the form's owner can see which invited respondent answered. The invitation is identified by its own numeric id, not by the form's. This submits a real answer to a real form; there is no draft or preview mode.
Each answer is checked against the vendored ClientAnswerDTO schema before the request is sent. A field the snapshot does not declare is passed through to the API, which has the final say.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| answers | Yes | The answers to deliver, one object per answered element. The schema declares answerId, answerOptionIds, answered, date, datetime, id, ids, questionId, text, time, type and unAnswered; every one is optional. type must be one of SINGLE_OPTION, MULTIPLE_OPTIONS, TEXT, FILE, DATE_TIME, DATE, TIME or NOT_PROVIDED, and date, datetime and time are ISO 8601 strings. | |
| metadata | No | Optional delivery metadata. The schema declares elapsedTime (integer) and tsdRespondent (an object with personal_identifier, provider, representation, sub, task_id and user_name). Omitted from the request entirely when not given. | |
| invitation_id | Yes | The invitation's numeric ID. This is not a form ID. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |