SurveyVoteSelectedAnswerOptions

Introduction

SurveyVoteSelectedAnswerOptions represent the selected SurveyAnswerOptions for each SurveyVote. They allow you to analyze which SurveyAnswerOptions were chosen by Users for a given Survey, and to aggregate results for reporting and statistics. These entities are read-only and are managed automatically when Users vote.

Model Definition

Alias

surveyVoteSelectedAnswerOption

Relations

Key
Relation
Type
Relation Field(s)

surveyVote

Belongs to

survey_vote_id

surveyAnswerOption

Belongs to

survey_answer_option_id

List by Survey

Get a list of all SurveyVoteSelectedAnswerOptions for a given Survey.

Definition

GET /api/surveys/{survey}/selected-answer-options

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/surveys/1/selected-answer-options', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);

Example Response

[
  {
    "id": 1,
    "survey_vote_id": 1,
    "survey_answer_option_id": 2,
    "created_at": "2024-07-15 12:00:00",
    "updated_at": "2024-07-15 12:00:00"
  },
  {
    "id": 2,
    "survey_vote_id": 2,
    "survey_answer_option_id": 3,
    "created_at": "2024-07-15 13:00:00",
    "updated_at": "2024-07-15 13:00:00"
  }
]

Summary by Survey

Get a summary (grouped count) of selected SurveyAnswerOptions for a given Survey.

Definition

GET /api/surveys/{survey}/selected-answer-options/summary

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/surveys/1/selected-answer-options/summary', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);

Example Response

[
  {
    "survey_answer_option_id": 2,
    "count": 5
  },
  {
    "survey_answer_option_id": 3,
    "count": 3
  }
]

Last updated