< back to index

HTTP request

GET http://wevotedeveloper.com:8000/apis/v1/voterUpdate (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
facebook_email string The voter's email from facebook.
facebook_profile_image_url_https string The url on the facebook servers of this person's profile photo.
first_name string The first name to update to.
first_name_changed boolean Are we trying to change the voter's first name?
middle_name string The middle name to update to.
last_name string The last name (family name) to update to.
last_name_changed boolean Are we trying to change the voter's last name?
twitter_profile_image_url_https string The url on the twitter servers of this person's profile photo.
interface_status_flags integer An integer whose bits represent several flags for the user, such as the
flag_integer_to_set integer Sets the corresponding bit represented by this integer's bit, in interface_status_flags bit
flag_integer_to_unset integer Unsets the corresponding bit represented by this integer's bit, in interface_status_flags bit
notification_settings_flags integer An integer whose bits represent several flags for the user, such as the
notification_flag_integer_to_set integer Sets the corresponding bit represented by this integer's bit, in notification_settings_flags bit
notification_flag_integer_to_unset integer Unsets the corresponding bit represented by this integer's bit, in notification_settings_flags bit
voter_photo_from_file_reader string The binary photo uploaded by voter.
voter_photo_changed boolean Are we trying to change the voter's uploaded photo?
management_api_key string Server-to-server key required to add or remove WeVoteServer staff access rights.
email_address string Email address used to find a voter account with verified email ownership.
phone_number string Phone number used to find a voter account with verified SMS ownership.
create_account boolean If true, create a voter account when no matching voter is found.
remove_all_staff_access boolean If true, remove all staff access rights supported by this API.
add_staff_access[] checkboxlist Staff access rights to add. ADMIN is not supported.
remove_staff_access[] checkboxlist Staff access rights to remove. ADMIN is not supported.

Response

{
  "status": string (description of what happened),
  "success": boolean (True as long as no db errors),
  "voter_device_id": string (88 characters long),
  "voter_updated": boolean (did the voter address save happen?),
  "facebook_profile_image_url_https": string,
  "twitter_profile_image_url_https": string,
  "we_vote_hosted_profile_image_url_large": string,
  "we_vote_hosted_profile_image_url_medium": string,
  "we_vote_hosted_profile_image_url_tiny": string,
  "interface_status_flags": integer,
  "flag_integer_to_set": integer,
  "flag_integer_to_unset": integer,
  "notification_settings_flags": integer,
  "notification_flag_integer_to_set": integer,
  "notification_flag_integer_to_unset": integer,
}

Response Status Codes

Code Description
VALID_VOTER_DEVICE_ID_MISSING Cannot proceed. A valid voter_device_id parameter was not included.
MISSING_VOTER_ID Cannot proceed. Missing variables voter_id while trying to save.
UPDATED_VOTER Successfully saved
MANAGEMENT_API_KEY_NOT_ACCEPTED The management_api_key did not match the server-side MANAGEMENT_API_KEY.
INVALID_STAFF_ACCESS One or more requested staff access rights are not supported.
VOTER_STAFF_ACCESS_UPDATED The requested staff access rights were updated.

Try It Now: API Variables

Update profile-related information for the current voter. If the string 'False' is passed (or the boolean value), do not update the field.

Parameter name Value  
voter_device_id:
facebook_email:
facebook_profile_image_url_https:
first_name:
first_name_changed: True
False
middle_name:
last_name:
last_name_changed: True
False
twitter_profile_image_url_https:
interface_status_flags:
flag_integer_to_set:
flag_integer_to_unset:
notification_settings_flags:
notification_flag_integer_to_set:
notification_flag_integer_to_unset:
voter_photo_from_file_reader:
voter_photo_changed: True
False
management_api_key:
email_address:
phone_number:
create_account: True
False
remove_all_staff_access: True
False
add_staff_access[]:





remove_staff_access[]:






(opens in new window)