upload_codebook
Uploads a complete codebook mapping form elements, sub-elements, and answer options to external identifiers for a Nettskjema form. Include every mapping; omitted entries may be deleted.
Instructions
Upload a codebook mapping form elements to external identifiers.
The spec does not document whether omitted entries are preserved or deleted. Send the complete mapping you want the form to have: include every element, sub-element and answer option whose external id you want to keep or set. Omitting an entry has undefined effect and may delete that mapping.
Each map is validated against the CodebookDTO schema before the request is sent. All three maps are required by the schema: send an empty dict for any map you do not need to populate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| form_id | Yes | The form's numeric ID. | |
| element_ids_and_external_element_ids_map | Yes | A mapping of element IDs (as strings) to their external IDs. | |
| sub_element_ids_and_external_element_ids_map | Yes | A mapping of sub-element IDs (as strings) to their external IDs. | |
| answer_option_ids_and_external_answer_option_ids_map | Yes | A mapping of answer option IDs (as strings) to their external IDs. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |