< back to index

HTTP request

GET https://api.wevoteusa.org/apis/v1/organizationSave (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
organization_id integer The internal database id for this organization. (One of these is required to update data: organization_id, organization_we_vote_id, facebook_id, organization_website or organization_twitter_handle)
organization_we_vote_id string The unique identifier for this organization across all networks. (One of these is required to update data: organization_id, organization_we_vote_id, facebook_id, organization_website or organization_twitter_handle)

Optional Parameters

Parameter name Value Description
chosen_domain_string string This is the value of client's customized web address. Ex/ vote.organization.orgIt is changed by a client in Settings section.
chosen_google_analytics_tracking_id string This is the value of client's Google Analytics code. It is changed by a client in Settings section.
chosen_html_verification_string string This is the value of client's verification string, needed by Google. It is changed by a client in Settings section.
chosen_hide_we_vote_logo boolean The client wants to hide the default logo. It is changed by a client in Settings section.
chosen_prevent_sharing_opinions boolean If you are a 501c3, this lets you maintain compliance by turning off the ability for voters to share their opinions out to social media, from your site.
chosen_social_share_description string This is the value of client's customized description. It is changed by a client in Settings section.
chosen_subdomain_string string This is the value of client's customized subdomain. Ex/ cats.WeVote.US It is changed by a client in Settings section.
chosen_subscription_plan integer This is an integer value specifying the subscription plan the client has chosen. It is changed by a client in Settings section.
facebook_id string Facebook identifier of the voter who wants to share a voter guide. (NOTE: In order to create a new organization, you may pass in either organization_twitter_handle OR facebook_id)
facebook_email string Personal email returned upon Facebook sign in.
facebook_profile_image_url_https string Personal photo returned upon Facebook sign in.
organization_description string The description of the organization that is displayed.
organization_email string Contact email of the organization.
organization_facebook string Facebook page of the organization.
organization_image string Logo of the organization that is displayed.
organization_name string Name of the organization that is displayed.
organization_twitter_handle string Twitter handle of the organization. (NOTE: In order to create a new organization, you may pass in either organization_twitter_handle OR facebook_id)
organization_type string The type of the organization: C = Corporation, G = Group of people (not an individual), but org status unknown, I = One person, C3 = 501(c)(3) Nonprofit, C4 = 501(c)(3) Nonprofit, NP = Nonprofit other than C3 or C4, NW = News organization, P = Political Action Committee, C = Company, PF = Politician, U = Other
organization_website string Website of the organization.
refresh_from_twitter boolean Augment the data passed in with information from Twitter. Do not replace data passed in as a variable with the data from Twitter, but if a variable is not passed in via the API, then fill in that variable with data from Twitter. One use-case is to save an organization with only a Twitter handle, and fill in the rest of the data with a call to Twitter.

Response

{
  "status": string,
  "success": boolean,
  "facebook_id": integer,
  "new_organization_created": boolean,
  "organization_email": string,
  "organization_facebook": string,
  "organization_instagram_handle": string,
  "organization_id": integer,
  "organization_description": string,
  "organization_name": string,
  "organization_photo_url": string,
  "organization_twitter_handle": string,
  "organization_type": string,
  "organization_website": string,
  "organization_we_vote_id": string,
  "refresh_from_twitter": boolean,
  "twitter_followers_count": integer,
  "twitter_description": 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.
ORGANIZATION_REQUIRED_UNIQUE_IDENTIFIER_VARIABLES_MISSING Cannot proceed. Missing sufficient unique identifiers for either save new or update.
NEW_ORGANIZATION_REQUIRED_VARIABLES_MISSING Cannot proceed. This is a new entry and there are not sufficient variables.
FOUND_WITH_WEBSITE SAVED An organization with matching website was found. Record updated.

Try It Now: API Variables

Save a new organization or update an existing organization. Note that passing in a blank value does not delete an existing value. We may want to come up with a variable we pass if we want to clear a value.

Parameter name Value  
voter_device_id:
organization_id:
organization_we_vote_id:
chosen_domain_string:
chosen_google_analytics_tracking_id:
chosen_html_verification_string:
chosen_hide_we_vote_logo: True
False
chosen_prevent_sharing_opinions: True
False
chosen_social_share_description:
chosen_subdomain_string:
chosen_subscription_plan:
facebook_id:
facebook_email:
facebook_profile_image_url_https:
organization_description:
organization_email:
organization_facebook:
organization_image:
organization_name:
organization_twitter_handle:
organization_type:
organization_website:
refresh_from_twitter: True
False

(opens in new window)