< back to index
HTTP request
GET https://api.wevoteusa.org/apis/v1/positionListForOpinionMaker (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 |
kind_of_opinion_maker |
string |
The kind of ballot item we want positions for. (One of these: 'ORGANIZATION', 'PUBLIC_FIGURE')
|
opinion_maker_id |
integer |
The unique internal identifier of the ballot item we want positions for. (either opinion_maker_id OR opinion_maker_we_vote_id required -- not both. If it exists, opinion_maker_id is used instead of opinion_maker_we_vote_id) |
opinion_maker_we_vote_id |
string |
The unique identifier for this opinion_maker across all networks (either opinion_maker_id OR opinion_maker_we_vote_id required -- not both. NOTE: In the future we might support other identifiers used in the industry. |
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 positions for the election that the server thinks the voter is looking at. If this variable is included, state_code will be ignored. |
state_code |
string |
The us state we want ballot item positions for. |
filter_for_voter |
boolean |
The default is 'True'. If we can figure out (on API server) what the current google_civic_election_id is, only show positions about things on the current ballot. If not, figure out the state_code and only show positions about items in this state. |
filter_out_voter |
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,
"kind_of_opinion_maker": string (One of these: 'ORGANIZATION', 'PUBLIC_FIGURE', 'UNKNOWN'),
"friends_vs_public": string (One of these: 'FRIENDS_ONLY', 'PUBLIC_ONLY', 'FRIENDS_AND_PUBLIC'),
"opinion_maker_id": integer,
"opinion_maker_we_vote_id": string,
"opinion_maker_display_name": string,
"opinion_maker_image_url_https_large": string,
"opinion_maker_image_url_https_medium": string,
"opinion_maker_image_url_https_tiny": string,
"is_following": boolean (Is this voter following this org/public_figure?),
"is_ignoring": boolean (Is this voter ignoring this org/public_figure?),
"position_list": list
[
"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,
"vote_smart_rating": string,
"vote_smart_time_span": string,
],
"filter_for_voter": boolean (True if only returning positions for voter's ballot),
"filter_out_voter": boolean (True if returning positions NOT on voter's ballot,
}
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 opinion maker (an organization, friend, or public figure).