post_answer_set
POST /answer_sets
Create an answer_set
POST /api/v1/answer_sets
{
"data": {
"type": "answer_sets",
"attributes": {
"would_recommend": 4,
"comment": "Perfect !",
"completed": true,
"secondary_answers": {
"QUESTION-UUID": "answer-value"
},
"dispatch_to_email": "example@email.com",
"segments": {
"gender": "male",
"age": "42"
}
},
"relationships": {
"client": {
"data": { "type": "clients", "id": "CLIENT-UUID" }
},
"survey_language": {
"data": {"type": "survey_languages", "id": "SURVEY-LANGUAGE-UUID"}
},
"survey": {
"data": {"type": "surveys", "id": "SURVEY-UUID"}
}
}
}
}
attributes
| attribute | description |
|---|---|
| comment string | responder comment |
| completed boolean | Set to true to mark the answer_set as completed and trigger the associated scenarii and third party integrations |
| would_recommend integer | responder recommendation note |
| segments hash { string: string|array[string] } | custom data associated with the answer set |
| secondary_answers hash { "QUESTION-UUID": "answer value" } | Optional. Hash of secondary questions and answers |
| dispatch_to_email string | Optional. Email of the client (responder) |
| locale string | Optional. Iso code of the answer language |
relationships
| relationship | description |
|---|---|
| client required if dispatch_to_email attribute is missing | answer_set responder |
| survey_language required if locale and survey are missing | answer_set survey_language |
| survey required if survey_language is missing | answer_set survey |