submit_form
Send a real answer to a Nettskjema form as the authenticated client. Answers are schema-checked before delivery and added to the form's collected data.
Instructions
Deliver a response to a form, as the authenticated API client.
This submits a real answer to a real form: it adds a row to the form's collected data, and the form's owner sees it alongside human responses. There is no draft or preview mode here. Use submit_form_for_invitation instead when answering on behalf of a specific invitation.
Each answer is checked against the vendored ClientAnswerDTO schema before the request is sent, so a bad enum value or a mistyped field fails without reaching the form. 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. | |
| form_id | Yes | The form's numeric ID. | |
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |