< back to index

HTTP request

GET https://api.wevoteusa.org/apis/v1/voterPositionCommentSave (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_ballot_item string The kind of ballot item the voter wants to comment on. (kind_of_ballot_item is either "CANDIDATE", "POLITICIAN" or "MEASURE")
ballot_item_we_vote_id string The unique identifier for this ballot_item across all networks.
statement_text string A text description of this stance.
statement_html string An HTML description of this stance.
google_civic_election_id integer ID of the election this position is related to.

Optional Parameters

Parameter name Value Description
position_we_vote_id string We Vote unique identifier for this position.
set_as_public_position boolean Should this position be saved so it can be seen by anyone in the public, or only for friends

Response

{
  "status": string,
  "success": boolean,
  "voter_device_id": string (88 characters long),
  "position_we_vote_id": string (the position identifier that moves server-to-server),
  "new_position_created": boolean,
  "google_civic_election_id": integer,
  "office_we_vote_id": string,
  "candidate_we_vote_id": string,
  "measure_we_vote_id": string,
  "statement_text": string,
  "statement_html": string,
  "is_public_position": boolean,
  "last_updated": string,
}

Response Status Codes

Code Description
VALID_VOTER_DEVICE_ID_MISSING Cannot proceed. A valid voter_device_id parameter was not included.
VOTER_NOT_FOUND_FROM_VOTER_DEVICE_ID Cannot proceed. A valid voter_id was not found.

Try It Now: API Variables

Save a voter's comment about an office, candidate or measure, to be shared with friends.

Parameter name Value  
voter_device_id:
kind_of_ballot_item:
ballot_item_we_vote_id:
statement_text:
statement_html:
google_civic_election_id:
position_we_vote_id:
set_as_public_position: True
False

(opens in new window)