Method | Path |
---|---|
POST |
https://agora.olery.com/v3/feedback/answers/:id |
This endpoint is used to update an existing answer to a question through the answer ID. It returns the answer details.
Input Format
The request’s body can have the following fields:
Field | Data Types | Description |
---|---|---|
answer | String or Array | Answer itself. It can be an array of strings if the question type requires more than one selection (required) |
question_id | String | Question’s ID (not needed) |
response_id | Integer | Response’s ID (not needed) |
follow_up | String | Used for questions of the rating type |
Output Format
The aggregated data is returned as a JSON object in the data
field. The object has the following fields:
Field | Data Types | Description |
---|---|---|
id | Integer | Answer’s ID |
question_id | String | Question’s ID |
answer | String | The registered answer will be in this field if the questions is a enum , open_answer , or open_answer_long |
response_id | Integer | Response’s ID |
follow_up | String | Used for questions of the rating type |
created_at | String | Denotes when the answer was created |
updated_at | String | Denotes when the answer was updated |
type | String | Denotes the question type |
max_value | Integer | Denotes the maximum rating. Used when the question type is a rating |
rating | Integer | The registered answer will be in this field if the questions is a rating |
yes_no | Boolean | The registered answer will be in this field if the questions is a yes_no . It will be true if the answer represents a yes |
date | Date | The registered answer will be in this field if the questions is a date or past_date |
selection | Array | The registered answer will be in this field if the questions is a drop_down or multiple_select |
Example Input
{
"answer": 1,
"question_id": "959d32ab8cbfi4b70bff295d0",
"response_id": 857206,
"follow_up": "horrible hotel"
}
Example Output
{
"data": {
"id": 4546538,
"question_id": "959d32ab8cbfi4b70bff295d0",
"answer": null,
"response_id": 857206,
"follow_up": "horrible hotel",
"created_at": "2022-08-17T11:11:24.635Z",
"updated_at": "2022-08-17T11:11:24.635Z",
"type": "rating",
"max_value": 5,
"rating": 1,
"yes_no": null,
"date": null,
"selection": null,
}
}