< back to index

HTTP request

GET https://api.wevoteusa.org/apis/v1/electionsRetrieve (Jump to "Try It Now")

Required Parameters

Parameter name Value Description
api_key string (from post, cookie, or get (in that order)) The unique key provided to any organization using the WeVoteServer APIs
voter_device_id string An 88 character unique identifier linked to a voter record on the server

Response

{
  "status": string,
  "success": boolean,
  "election_list": list,
  [{
    "ballot_location_list": list
    [{
      "ballot_location_display_name": string,
      "ballot_location_shortcut": string,
      "ballot_returned_we_vote_id": string,
      "ballot_location_order": integer,
    }],
    "google_civic_election_id": integer,
    "election_name": string,
    "election_day_text": string,
    "election_is_upcoming": boolean,
    "get_election_state": string,
    "state_code": string,
    "ocd_division_id": string,
    "state_code_list": list
    [],
  }]
}

Try It Now: API Variables

Return a list of all elections, and include ballot location options so a voter can jump to sample ballots.

Parameter name Value  
voter_device_id:

(opens in new window)