Get Started
Portal api methods
Help

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

Description

Sends a vote to a certain option in a poll-type event with the ID specified

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

If 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": "Sample news",
    "created": "2019-12-12T20:36:51.5170665Z",
    "updated": "2019-12-12T20:36:51.5170665Z",
    "type": 1,
    "createdBy": {
      "id": "00000000-0000-0000-0000-000000000000",
      "displayName": "Mike Zanyatski",
      "title": "Manager",
      "avatarSmall": "url to small avatar",
      "profileUrl": ""
    },
    "text": "Text of feed",
    "poll": {
      "pollType": 0,
      "endDate": "2019-12-12T20:36:51.5170665Z",
      "startDate": "2019-12-12T20:36:51.5170665Z",
      "voted": false,
      "votes": [
        {
          "id": 133,
          "name": "Variant 1",
          "votes": 100
        }
      ]
    }
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <id>10</id>
    <title>Sample news</title>
    <created>2019-12-12T20:36:51.5170665Z</created>
    <updated>2019-12-12T20:36:51.5170665Z</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></profileUrl>
    </createdBy>
    <text>Text of feed</text>
    <poll>
      <pollType>0</pollType>
      <endDate>2019-12-12T20:36:51.5170665Z</endDate>
      <startDate>2019-12-12T20:36:51.5170665Z</startDate>
      <voted>false</voted>
      <votes>
        <id>133</id>
        <name>Variant 1</name>
        <votes>100</votes>
      </votes>
    </poll>
  </response>
</result>