Votes (v2)

Read a vote

The vote's document for the caller: the options with tallies and voters when the caller may see them (the organiser always; others on a vote showing live results or once it is closed), the caller's own picks, the outcome once closed, and the organiser's roster, voters and shared devices. Anyone with the code may read the vote, as the join page does. state is draft, open or closed. results_visible says whether this caller may see tallies; when it is false every option's votes is null and total_votes is null. settings.show_live_results and settings.voting_deadline (a date or null) are the organiser's choices. outcome is filled once the vote is closed. An option's voters entry adds vote_weight on a weighted vote and the list is empty on an anonymous one.

get/api/v2/votes/{code}

Request

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

Response

codestring
statestring
titlestring
descriptionstring nullable
results_visibleboolean
total_votesinteger
my_option_idsinteger[]
has_votedboolean
is_authorboolean
share_urlstring
results_urlstring
closed_atstring nullable
created_atstring
updated_atstring

Example response

{
  "code": "7Q2K-9M4N",
  "state": "open",
  "title": "Where do we go?",
  "type": {
    "id": 1,
    "name": "Destination"
  },
  "description": null,
  "trip": {
    "external_id": "01J9X"
  },
  "settings": {
    "anonymous": false,
    "allow_multiple_options": false,
    "ranked_choice_voting": false,
    "show_live_results": true,
    "weighted_voting_enabled": false,
    "gamification": false,
    "name_required": true,
    "voting_deadline": "2026-11-01",
    "consensus_threshold_percent": 25
  },
  "options": [
    {
      "id": 1,
      "title": "Lisbon",
      "description": null,
      "tags": [],
      "votes": 2,
      "voters": [
        {
          "voter_name": "Sam"
        }
      ],
      "mine": true
    }
  ],
  "results_visible": true,
  "total_votes": 3,
  "my_option_ids": [
    1
  ],
  "has_voted": true,
  "outcome": {
    "closed": false,
    "winner": null,
    "tied": [],
    "tie_broken": false,
    "winner_title": null,
    "runoff_code": null
  },
  "is_author": false,
  "can": {
    "manage": false,
    "vote": false,
    "add_voter": false,
    "edit": false
  },
  "share_url": "https://www.endlesstravelplans.com/tools/vote/join/7Q2K9M4N",
  "results_url": "https://www.endlesstravelplans.com/tools/vote/results/7Q2K9M4N",
  "closed_at": null,
  "created_at": "2026-10-01T12:00:00+00:00",
  "updated_at": "2026-10-02T09:00:00+00:00"
}

Changes

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