Votes (v2)

Name the winner

After a tie on a closed vote, the organiser picks the winner from the tied options.

post/api/v2/votes/{code}/winner

Request

  • Base URL: https://www.endlesstravelplans.com
  • URL: https://www.endlesstravelplans.com/api/v2/votes/{code}/winner
  • Auth: HTTP bearer

Request body

optionIdinteger required

One of the tied options.

Example request

{
  "optionId": 1
}

Response

codestring
statestring

Example response

{
  "code": "7Q2K-9M4N",
  "state": "closed",
  "outcome": {
    "closed": true,
    "winner": {
      "id": 1,
      "title": "Lisbon",
      "points": 2
    },
    "tie_broken": true
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.