voterGuidePossibilityPositionSave
< back to index
HTTP request
POST https://api.wevoteusa.org/apis/v1/voterGuidePossibilityPositionSave (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 |
voter_guide_possibility_id |
integer |
This id of the VoterGuidePossibility is required. |
voter_guide_possibility_position_id |
integer |
The voter_guide_possibility_position to be updated, or if set to 0, create new. |
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 |
ballot_item_name |
string |
The candidate or measure name shown on the web page. |
ballot_item_state_code |
string |
The 2 digit state code of this candidate or measure. When state_code is provided, create a candidate if an existing entry can't be found. |
position_stance |
string |
SUPPORT, OPPOSE or INFORMATION_ONLY |
statement_text |
string |
A written description of why the endorsement is what it is. |
more_info_url |
string |
The URL a voter can go to for more information about the endorsement. |
possibility_should_be_deleted |
boolean |
Permanent delete of the VoterGuidePossibilityPosition entry. |
possibility_should_be_ignored |
boolean |
Soft delete. Stop analyzing this entry. |
candidate_we_vote_id |
string |
|
measure_we_vote_id |
string |
|
organization_we_vote_id |
string |
|
position_should_be_removed |
boolean |
Delete saved position from PositionEntered table. |
google_civic_election_id_list[] |
integerlist |
The election ids we care about. |
Response
{
"status": string,
"success": boolean,
"voter_guide_possibility_id": integer,
"possible_position_list": list [
{
"possibility_position_id": integer,
"possibility_position_number": integer,
"ballot_item_name": string,
"ballot_item_state_code": string,
"candidate_twitter_handle": string,
"candidate_we_vote_id": string,
"edit_position_url": string,
"google_civic_election_id": string,
"measure_we_vote_id": string,
"more_info_url": string,
"more_info_url_stored": string,
"office_we_vote_id": string,
"organization_name": string,
"organization_twitter_handle": string,
"organization_we_vote_id": string,
"office_name": string,
"position_should_be_removed": boolean,
"position_stance": string,
"position_stance_stored": string,
"position_we_vote_id": string,
"possibility_should_be_deleted": boolean,
"possibility_should_be_ignored": boolean,
"statement_text": string,
"statement_text_stored": string,
"state_code": 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. |
VOTER_GUIDE_POSSIBILITY_NOT_FOUND |
A voter guide possibility was not found at that URL. |
VOTER_GUIDE_POSSIBILITY_FOUND_WITH_URL |
A voter guide possibility entry was found. |
Try It Now: API Variables
Save one possible endorsement from one particular web page.