> For the complete documentation index, see [llms.txt](https://docs.api.intratool.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.api.intratool.de/api-reference/surveys/survey-vote-seleted-answer-options.md).

# SurveyVoteSelectedAnswerOptions

## Introduction

`SurveyVoteSelectedAnswerOptions` represent the selected [SurveyAnswerOptions](/api-reference/surveys/survey-answer-options.md) for each [SurveyVote](/api-reference/surveys/survey-votes.md). They allow you to analyze which [SurveyAnswerOptions](/api-reference/surveys/survey-answer-options.md) were chosen by [Users](/api-reference/users.md) for a given [Survey](/api-reference/surveys/surveys.md), and to aggregate results for reporting and statistics. These entities are read-only and are managed automatically when [Users](/api-reference/users.md) vote.

## Model Definition

### Alias

`surveyVoteSelectedAnswerOption`

### Relations

| Key                  | Relation                                                              | Type       | Relation Field(s)         |
| -------------------- | --------------------------------------------------------------------- | ---------- | ------------------------- |
| `surveyVote`         | [SurveyVote](/api-reference/surveys/survey-votes.md)                  | Belongs to | `survey_vote_id`          |
| `surveyAnswerOption` | [SurveyAnswerOption](/api-reference/surveys/survey-answer-options.md) | Belongs to | `survey_answer_option_id` |

## List by Survey

Get a list of all `SurveyVoteSelectedAnswerOptions` for a given [Survey](/api-reference/surveys/surveys.md).

**Definition**

<mark style="color:green;">`GET`</mark> `/api/surveys/{survey}/selected-answer-options`

**Example Request**

{% tabs %}
{% tab title="PHP" %}

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

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "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](/api-reference/surveys/survey-answer-options.md) for a given [Survey](/api-reference/surveys/surveys.md).

**Definition**

<mark style="color:green;">`GET`</mark> `/api/surveys/{survey}/selected-answer-options/summary`

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$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}"]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.api.intratool.de/api-reference/surveys/survey-vote-seleted-answer-options.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
