Get survey results
Returns the tallied answers for a survey, broken down per question, along with how many of the eligible respondents replied. Requires the hoa_surveys:read permission.
Authorization
AuthorizationstringrequiredPath parameters
surveyIdstringrequiredThe survey to act on.
Response
200 · The tallied results.
surveyIdstringThe survey these results belong to.
titlestringThe survey's title.
statusstringWhere the survey has got to.
eligibleCountintegerHow many people were recorded as eligible when the survey was published. 0 for a CommunityMembers survey and for anything still in draft, because no eligible list is kept for those.
responseCountintegerHow many distinct owners answered at least one question.
responseRatenumberresponseCount divided by eligibleCount, as a fraction between 0 and 1 — 0.67 is 67%. Exactly 0 whenever eligibleCount is 0.
questionsobject[]One entry per question, sorted by order. Which fields are filled in depends on the question's type.
401 · The bearer token is missing, expired, or not valid.
403 · The token is valid but the caller does not hold the `hoa_surveys:read` permission.
404 · No survey with that id belongs to the calling company.
There is no state restriction — you can read results while the survey is still Open to watch answers arrive. A survey that was never published has no answers, so every count comes back as 0 and questions is empty.
Each entry in questions only carries the fields that make sense for its type, and the rest are absent rather than zero:
| Type | Fields you get |
|---|---|
YesNo | yesCount, noCount |
MultipleChoice | options, one row per option including the unpicked ones |
FreeText | responseCount and responses, the answers themselves |
skippedCount is on every entry. It is the number of people who took part in the survey but left this question unanswered, so it can only ever be as large as responseCount at the top level.
responses names the owner behind every typed answer through ownerId. If you show survey results to the community, strip it first.