< back to index
HTTP request
GET https://api.wevoteusa.org/apis/v1/positionListForVoter (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 |
stance |
string |
Default is ANY_STANCE. Other options include SUPPORT, STILL_DECIDING, INFO_ONLY, NO_STANCE, OPPOSE, PERCENT_RATING |
friends_vs_public |
string |
Default is FRIENDS_AND_PUBLIC. Other options include FRIENDS_ONLY, PUBLIC_ONLY, FRIENDS_AND_PUBLIC |
google_civic_election_id |
integer |
The unique identifier for a particular election. If not provided, return all positions for this organization. If this variable is included, state_code will be ignored. |
state_code |
string |
The us state we want ballot item positions for. |
show_only_this_election |
boolean |
The default is 'True'. Only show positions about things on the current ballot. |
show_all_other_elections |
boolean |
The default is 'False'. Show the positions for this ballot item that are NOT on this voter's ballot. |
Response
{
"status": string,
"success": boolean,
"count": integer,
"friends_vs_public": string (One of these: 'FRIENDS_ONLY', 'PUBLIC_ONLY', 'FRIENDS_AND_PUBLIC'),
"voter_we_vote_id": string,
"voter_display_name": string,
"voter_image_url_https_large": string,
"voter_image_url_https_medium": string,
"voter_image_url_https_tiny": string,
"google_civic_election_id": integer,
"state_code": string,
"position_list": list
"show_only_this_election": boolean (True if only returning positions for voter's ballot),
"show_all_other_elections": boolean (True if returning positions NOT on voter's ballot,
[
"ballot_item_display_name": string (either measure name or candidate name),
"ballot_item_id": integer,
"ballot_item_image_url_https_large": string,
"ballot_item_image_url_https_medium": string,
"ballot_item_image_url_https_tiny": string,
"ballot_item_twitter_handle": string,
"ballot_item_we_vote_id": string,
"ballot_item_political_party": string,
"ballot_item_state_code": string,
"contest_office_id": integer,
"contest_office_we_vote_id": string,
"contest_office_name": string (The name of the office if kind_of_ballot_item is CANDIDATE),
"google_civic_election_id": integer,
"is_support": boolean,
"is_positive_rating": boolean,
"is_support_or_positive_rating": boolean,
"is_oppose": boolean,
"is_negative_rating": boolean,
"is_oppose_or_negative_rating": boolean,
"is_information_only": boolean,
"kind_of_ballot_item": string, (One of these: 'CANDIDATE', 'MEASURE', 'OFFICE', 'UNKNOWN')
"last_updated": string (time in this format %Y-%m-%d %H:%M:%S),
"more_info_url": string,
"position_we_vote_id": string,
"position_ultimate_election_date": integer,
"position_year": integer,
"race_office_level": string, "statement_text": string,
"statement_html": string,
],
}
Response Status Codes
Code |
Description |
VALID_VOTER_DEVICE_ID_MISSING |
Cannot proceed. A valid voter_device_id parameter was not included. |
VALID_VOTER_ID_MISSING |
Cannot proceed. A valid voter_id was not found. |
UNABLE_TO_RETRIEVE-CANDIDATE_ID_AND_MEASURE_ID_MISSING |
Cannot proceed. Neither candidate_id nor measure_id were included. |
SUCCESSFUL_RETRIEVE_OF_POSITIONS |
The number of opposes for this ballot item was retrieved. |
SUCCESSFUL_RETRIEVE_OF_POSITIONS_NOT_FOLLOWED |
The number of endorsers that oppose this ballot item that voter is NOT following. |
Try It Now: API Variables
A list of all positions (support/oppose/info) held by this voter.