< back to index

HTTP request

GET https://api.wevoteusa.org/apis/v1/voterRetrieve (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

Optional Parameters

Parameter name Value Description
voter_device_id string An 88 character unique identifier linked to a voter record on the server. If not provided, a new voter_device_id (and voter entry) will be generated, and the voter_device_id will be returned.

Response

{
  "status": string (description of what happened),
  "success": boolean (True as long as no db errors),
  "voter_device_id": string (88 characters long),
  "voter_created": boolean,
  "voter_found": boolean,
  "we_vote_id": string,
  "facebook_id": integer,
  "email": string,
  "facebook_email": string,
  "facebook_profile_image_url_https": string,
  "full_name": string,
  "first_name": string,
  "last_name": string,
  "twitter_screen_name": string,
  "is_signed_in": boolean,
  "is_admin": boolean,
  "is_partner_organization": boolean,
  "is_political_data_manager": boolean,
  "is_political_data_viewer": boolean,
  "is_verified_volunteer": boolean,
  "signed_in_facebook": boolean,
  "signed_in_google": boolean,
  "signed_in_twitter": boolean,
  "signed_in_with_email": boolean,
  "has_valid_email": boolean,
  "has_data_to_preserve": boolean,
  "has_email_with_verified_ownership": boolean,
  "linked_organization_we_vote_id": string,
  "voter_photo_url_large": string,
  "voter_photo_url_medium": string,
  "voter_photo_url_tiny": string,
  "voter_donation_journal_list": list [ (List of donation journal entries for charges and subscriptions),
    "created": datetime, (Timestamp of the charge creation)
    "amount" : integer, (Amount donatated, or subscribed to, in cents)
    "currency" : integer, (International 3 letter currency code, like 'usd'
    "record_enum" : string, (One of {PAYMENT_FROM_UI, PAYMENT_AUTO_SUBSCRIPTION, SUBSCRIPTION_SETUP_AND_INITIAL})
    "brand" : string, (Credit card brand, like Visa or MasterCard)
    "exp_month" : string, (Credit card expiration month {1...12})
    "exp_year" : string, (Credit card expiration year, like 2017)
    "last4" : string, (Last 4 digits of the credit card)
    "stripe_status" : string, (The status stripe returned for the transaction)
    "charge_id" : string, (Stripe's charge id)
    "subscription_id" : string, (Stripe's subscription id)
    "subscription_canceled_at" : datetime, (Date the subscription was canceled)
    "subscription_ended_at" : datetime, (Date the subscription was ended)
   ]
  "interface_status_flags": integer,
  "notification_settings_flags": integer,
}

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_DEVICE_ID-VOTER_RETRIEVE There is no voter_id attached to that voter_device_id
VOTER_ID_COULD_NOT_BE_RETRIEVED Unable to retrieve voter_id, although voter_id was found linked to voter_device_id

Try It Now: API Variables

Export key voter data to JSON format

Parameter name Value  
voter_device_id:

(opens in new window)