< back to index

HTTP request

GET https://api.wevoteusa.org/apis/v1/positionRetrieve (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
position_we_vote_id string We Vote unique identifier so we can move positions from server-to-server.

Response

{
  "success": boolean,
  "status": string,
  "ballot_item_display_name": string (either measure name or candidate name),
  "speaker_display_name": string,
  "speaker_image_url_https_large": string,
  "speaker_image_url_https_medium": string,
  "speaker_image_url_https_tiny": string,
  "speaker_twitter_handle": string,
  "twitter_followers_count": integer,
  "speaker_type": string,
  "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,
  "organization_we_vote_id": string (the organization identifier that moves server-to-server),
  "google_civic_election_id": integer,
  "position_we_vote_id": string (the position identifier that moves server-to-server),
  "position_ultimate_election_date": integer,
  "position_year": integer,
  "voter_id": integer,
  "vote_smart_rating": string,
  "vote_smart_time_span": string,
  "candidate_we_vote_id": string,
  "measure_we_vote_id": string,
  "office_we_vote_id": string,
  "stance": string (support/oppose/info only),
  "statement_text": string,
  "statement_html": string,
  "more_info_url": string,
  "last_updated": string (time in this format %Y-%m-%d %H:%M:%S),
}

Response Status Codes

Code Description
RETRIEVE_POSITION_FOUND_WITH_POSITION_ID The position was found using the internal id
RETRIEVE_POSITION_FOUND_WITH_WE_VOTE_ID The position was found using the we_vote_id
POSITION_RETRIEVE_BOTH_IDS_MISSING One identifier required. Neither provided.
POSITION_NOT_FOUND_WITH_ID The position was not found with internal id.
ERROR_<specifics here> An internal description of what error prevented the retrieve of the position.

Try It Now: API Variables

Retrieve the position using we_vote_id. (In the future we will add theability to retrieve via a set of variables like (organization_we_vote_id, google_civic_election_id, candidate_we_vote_id)

Parameter name Value  
voter_device_id:
position_we_vote_id:

(opens in new window)