POST api/2.0/community/event/{feedid}/vote This function requires authentication

Description

Sends a vote for a certain option in a poll-type event with the ID specified in the request.

Parameters
Name Description Type Example
feedid
sent in url
Event ID number 1234
variants
sent in body
Options array of numbers [1234,123]
Remark

If an event is not a poll, then you'll get an error.

Example
             Sending data in application/json:
             {
                 variants:[1,2,3],
             }
              Sending data in application/x-www-form-urlencoded
             variants=[1,2,3]
             
Returns

Event

Example Response

application/json

{
  "status": 0,
  "response": {
    "Id": 10,
    "Title": "Manager",
    "Created": "2020-12-07T13:56:02.2729203Z",
    "Updated": "2020-12-07T13:56:02.2729203Z",
    "Type": 1,
    "CreatedBy": {
      "Id": "00000000-0000-0000-0000-000000000000",
      "DisplayName": "Mike Zanyatski",
      "Title": "Manager",
      "AvatarSmall": "url to small avatar",
      "ProfileUrl": "\\/Products\\/People\\/Profile.aspx?user=administrator"
    },
    "Text": "Text of feed",
    "Poll": {
      "PollType": 0,
      "EndDate": "2020-12-07T13:56:02.2859248Z",
      "StartDate": "2020-12-07T13:56:02.2859248Z",
      "Votes": [
        {
          "Id": 133,
          "Name": "Variant 1",
          "Votes": 100
        }
      ],
      "Voted": false
    }
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <Id>10</Id>
    <Title>Manager</Title>
    <Created>2020-12-07T13:56:02.2729203Z</Created>
    <Updated>2020-12-07T13:56:02.2729203Z</Updated>
    <Type>1</Type>
    <CreatedBy>
      <Id>00000000-0000-0000-0000-000000000000</Id>
      <DisplayName>Mike Zanyatski</DisplayName>
      <Title>Manager</Title>
      <AvatarSmall>url to small avatar</AvatarSmall>
      <ProfileUrl>\/Products\/People\/Profile.aspx?user=administrator</ProfileUrl>
    </CreatedBy>
    <Text>Text of feed</Text>
    <Poll>
      <PollType>0</PollType>
      <EndDate>2020-12-07T13:56:02.2859248Z</EndDate>
      <StartDate>2020-12-07T13:56:02.2859248Z</StartDate>
      <Votes>
        <Id>133</Id>
        <Name>Variant 1</Name>
        <Votes>100</Votes>
      </Votes>
      <Voted>False</Voted>
    </Poll>
  </response>
</result>