Records the current user vote on a survey post and returns the updated survey configuration with their choices flagged.
Send the chosen option identifiers in vote_indexes. The post must actually be of the survey content type and must have a valid option list; a survey past its end_date is refused. The returned options carry a voted flag for the caller.
Endpoint
Method:
POSTPath:
/feeds/{feed_id}/apps/survey-voteEdition: Core
Controller:
ReactionController@castSurveyVoteRoute source:
fluent-community/app/Http/Routes/api.php:78Controller source:
fluent-community/app/Http/Controllers/ReactionController.phpRequires a signed-in user who can read the post.
Live sample
The request and response below were recorded against a running FluentCommunity install and then anonymised — member names, emails, avatars and post content are fictional, and long collections are trimmed to a few entries.
POST Cast Survey Vote
Records the current user vote on a survey post and returns the updated survey configuration with their choices flagged.
Controller: ReactionController@castSurveyVote
Route source: fluent-community/app/Http/Routes/api.php:78
Authorizations
WordPress Application Passwords — use Basic auth with username:application_password.
Parameters
Path Parameters
Feed ID extracted from the URL path.
Request Body
Responses
Successful response