< back to index

HTTP request

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

Required Parameters

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

Optional Parameters

Parameter name Value Description
google_civic_election_id integer The unique identifier for a particular election. If not provided, use the most recent ballot for the voter's address.
state_code string The unique identifier for one state.

Response

{
  "status": string,
  "success": boolean,
  "ballot_found": integer,
  "ballot_item_list": list
   [
     "ballot_item_display_name": string,
     "candidate_list": list (if kind_of_ballot_item is CANDIDATE)
      [
        "we_vote_id": string,
        "ballot_item_display_name": string,
        "ballotpedia_candidate_summary": string,
        "ballotpedia_candidate_url": string,
        "candidate_photo_url_medium": string,
        "candidate_photo_url_tiny": string,
        "kind_of_ballot_item": string,
        "party": string,
        "state_code": string,
        "twitter_handle": string,
        "twitter_description": string,
        "twitter_followers_count": integer,
        "withdrawn_from_election": boolean,
        "withdrawal_date": string,
      ],
     "election_name": string,
     "election_day_text": string,
     "google_civic_election_id": integer,
     "kind_of_ballot_item": string (if kind_of_ballot_item is MEASURE),
     "measure_subtitle": string (if kind_of_ballot_item is MEASURE)
     "measure_text": string (if kind_of_ballot_item is MEASURE)
     "measure_url": string (if kind_of_ballot_item is MEASURE)
     "no_vote_description": string (if kind_of_ballot_item is MEASURE)
     "state_code": string,
     "yes_vote_description": string (if kind_of_ballot_item is MEASURE)
   ],
}

Response Status Codes

Code Description
VALID_VOTER_DEVICE_ID_MISSING A valid voter_device_id parameter was not included. Cannot proceed.
VALID_VOTER_ID_MISSING A valid voter_id was not found from voter_device_id. Cannot proceed.
MISSING_GOOGLE_CIVIC_ELECTION_ID A valid google_civic_election_id not found. Cannot proceed.
VOTER_BALLOT_ITEMS_RETRIEVED Ballot items were found.

Try It Now: API Variables

Request a skeleton of ballot data for this election, so that the web_app has all the ids it needs to make more requests for data about each ballot item.

Parameter name Value  
voter_device_id:
google_civic_election_id:
state_code:

(opens in new window)