Response
A Response represents a set of answers submitted for a specific questionnaire. Each response corresponds to a version of the questionnaire and includes answers to questions defined in it.
Submitting Answers
Endpoints:
POST /persons/{person_id}/questionnaires/{questionnaire_id}/responsePOST /corporates/{corporate_id}/questionnaires/{questionnaire_id}/response
Request Body
Each request must contain an array of answers that correspond to the questions within the questionnaire.
View Example Request
{
"answers": [
{
"question_id": "355ec732-2352-4e9f-9cfb-f5e950d1d299",
"answer_integer": 42
},
{
"question_id": "3f51ece0-cf4f-4dfb-a86f-b635cec968b8",
"answer_text": "I'm opening account to know the answer to life, the universe, and everything."
},
{
"question_id": "24166076-72f2-4994-a972-bef9dd4b427f",
"answer_boolean": true
},
{
"question_id": "0b4e7db0-4ee2-4d74-b7c3-d0500497628c",
"answer_option_id": "c3f67a14-0a4a-4c52-bc69-2905f79dc41f"
},
{
"question_id": "58ab3150-8e71-4373-b383-7a754b238af5",
"answer_option_ids": ["60eb07e0-3f01-4d05-8408-1f9d9d8e612c", "30d449b6-9b45-4e98-87f5-bce68f51b832"]
},
{
"question_id": "90b8e47f-2a0b-434b-ae06-4b2818184eb1",
"answer_document_id": "f38ed9e4-cffa-4e54-b4dd-d66cd4591248"
},
{
"question_id": "2401af49-93a8-4ab2-a13e-37d3bd0d5a43",
"answer_document_ids": ["b8958fee-8012-44db-9464-72e6cfeb447e", "7e26bb77-dad0-4b17-8240-97bc43506170"]
},
]
}
Request Body Schema
| Field | Type | Description |
|---|---|---|
| answers | Array[Answer] | List of answers for each question. |
Answer
| Field | Type | Description |
|---|---|---|
| question_id | UUID | Identifier of the question being answered. |
| answer_<type> | ANY or Array[UUID] | The provided answer. The format depends on the question_type. |
Answer Formats by Question Type
| Question Type | Answer field | Expected Format | Notes |
|---|---|---|---|
text | answer_text | String | Free text field. |
integer | answer_integer | Integer | Numeric input. |
bool | answer_boolean | Boolean | Boolean (checkbox, yes/no). |
single_choice | answer_option_id | String | One selected value from available options. |
multiple_choice | answer_option_ids | Array[UUID] | Multiple selections allowed. |
document | answer_document_id | UUID | Must be a valid uploaded document ID. |
multiple_documents | answer_document_ids | UUID | List of valid uploaded document IDs. |