---
title: "Read a vote"
method: GET
path: "/api/v2/votes/{code}"
tags: ["Votes (v2)"]
---

# Read a vote

`GET /api/v2/votes/{code}`

## Request

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

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.

## Response `200`

- object
  - `code` string
  - `state` string
  - `title` string
  - `type` object
    - `id` integer
    - `name` string
  - `description` string, nullable
  - `trip` object
    - `external_id` string
  - `settings` object
    - `anonymous` boolean
    - `allow_multiple_options` boolean
    - `ranked_choice_voting` boolean
    - `show_live_results` boolean
    - `weighted_voting_enabled` boolean
    - `gamification` boolean
    - `name_required` boolean
    - `voting_deadline` string
    - `consensus_threshold_percent` integer
  - `options` object[]
    - `id` integer
    - `title` string
    - `description` string, nullable
    - `tags` unknown[]
      - unknown
    - `votes` integer
    - `voters` object[]
      - `voter_name` string
    - `mine` boolean
  - `results_visible` boolean
  - `total_votes` integer
  - `my_option_ids` integer[]
  - `has_voted` boolean
  - `outcome` object
    - `closed` boolean
    - `winner` string, nullable
    - `tied` unknown[]
      - unknown
    - `tie_broken` boolean
    - `winner_title` string, nullable
    - `runoff_code` string, nullable
  - `is_author` boolean
  - `can` object
    - `manage` boolean
    - `vote` boolean
    - `add_voter` boolean
    - `edit` boolean
  - `share_url` string
  - `results_url` string
  - `closed_at` string, nullable
  - `created_at` string
  - `updated_at` string

## Other responses

- `401`: unauthenticated: No valid bearer token was sent.
- `404`
- `429`: rate_limited: A throttle or a per-account allowance refused the request; `retry_after` or `remaining` may be present.
- `500`: server_error: Unhandled failure; quote `request_id` to support.

---

[API](https://skmtc.dev/endlesstravelplans/apis/endless-travel-plans-api.md) · [All operations](https://skmtc.dev/endlesstravelplans/apis/endless-travel-plans-api/llms.txt) · [OpenAPI document](https://skmtc.dev/endlesstravelplans/apis/endless-travel-plans-api/revisions/ae82ed3e4a8f?raw)
