< back to index
HTTP request
GET https://api.wevoteusa.org/apis/v1/voterAddressRetrieve (Jump to "Try It Now")
Required Parameters
Parameter name |
Value |
Description |
api_key |
string (from post, cookie, or get (in that order)) |
The unique key provided to any organization using the WeVoteServer APIs |
voter_device_id |
string |
An 88 character unique identifier linked to a voter record on the server |
Optional Parameters
Parameter name |
Value |
Description |
guess_if_no_address_saved |
boolean |
Default = True. If True and the address is blank, make a guess at the voter's address based on IP address, save it, then reach out to Google Civic to get the fresh ballot, andfinally, return the address. |
Response
{
"success": boolean,
"voter_device_id": string (88 characters long),
"text_for_map_search": string (the value submitted and saved),
"address_type": string (one char: B = Ballot address),
"google_civic_election_id": integer,
"guess_if_no_address_saved": boolean,
"address_found": boolean,
"latitude": string (value from Google),
"longitude": string (value from Google),
"normalized_line1": string (value from Google),
"normalized_line2": string (value from Google),
"normalized_city": string (value from Google),
"normalized_state": string (value from Google),
"normalized_zip": string (value from Google),
}
Response Status Codes
Code |
Description |
VALID_VOTER_DEVICE_ID_MISSING |
A valid voter_device_id parameter was not included. Cannot proceed. |
VOTER_NOT_FOUND_FROM_VOTER_DEVICE_ID |
No voter could be found from the voter_device_id |
VOTER_ADDRESS_NOT_RETRIEVED |
retrieve_ballot_address_from_voter_id failed. |
Try It Now: API Variables
Retrieve the voter address for voter using voter_device_id.