Skip to content

Instantly share code, notes, and snippets.

@Arique1104
Created November 16, 2023 17:27
Show Gist options
  • Save Arique1104/af8d881c69d6567fbc2fe70ac7d26859 to your computer and use it in GitHub Desktop.
Save Arique1104/af8d881c69d6567fbc2fe70ac7d26859 to your computer and use it in GitHub Desktop.

Live Reading Dump

  • Van Integration Works, but not well enough. Collecting Opt-Ins.This was already figured out within Spoke Being able to collect Opt-Ins Opt-out VAN Integration (manual opt-outs are configured poorly) (Team Name: TBD)
  • Opt outs that are created in Spoke, have to be manually inputed to show up in the VAN.
  • It has to be pulled from optout table in Spoke and Into VAN

VAN API Requirements

  • Do we want regular updates? How regularly? - How many pings in a day?

  • Service Manager that runs VAN-Opt-Out Sync

  • Our users should be able to modify how often they update their VAN Integration, with standard being once over night.

  • VAN REST API exposes resources as varied as those available through the VAN user interface. Unless specified otherwise, these endpoints only respond to and return JSON. Most REST conventions are followed: GET /resources lists all resources in the authenticated context, GET /resources/{id} gets the details of a specific object, POST /resources creates a new object, PUT /resources/{id} updates a specific object, and DELETE /resources/{id} deletes or suppresses a specific object. Some endpoints also support the PATCH HTTP verb for partial resource updates.

Authentication

  • Before using the API, you will need to know your Application Name and API Key. The Application Name is a short string that identifies your application (e.g., acmeCrmProduct) and the API Key is a string that identifies the specific context to which API requests should resolve. Specifically, it identifies an API user in an instance, database tab, and committee–the same information that is determined during the typical VANlogin process.

  • The API key will look like the concatenation of a GUID, a | and a 0 or 1 (e.g., 7c9e6679-7425-40de-944b-e07fc1f90ae7|1). Database Mode is set by using 0 to work in My Voters or 1 to work in My Campaign. Because the API key is connected to a specific context, the API will only return data available to that context.

🚧

  • API keys are connected to specific developers and applications. Do not share or re-use an API key for different applications nor expose it via client-side scripts or public code repositories.

  • To authenticate your API requests, use Basic HTTP authentication and set the username to the Application Name and password to the API Key. Most programming frameworks supports basic authentication out of the box.

  • Every API key gives a single User the ability to access data within a single Instance, Database, and Committee only. In many cases, an API key will provide access to both My Voters and My Campaign mode. However, no API key will provide access to multiple Databases or Committees simultaneously.

  • Every API service is connected to a Permission, and an API key’s ability to access that service is determined by whether or not the API key’s User has the relevant Permission in the User Profile. In some cases, additional Permissions control the way in which a given API service operates - for example, there are some Expand Sections in the GET /people/{vanID} service which require special Permissions for access.

  • https://docs.ngpvan.com/reference/common-models

  • /people/findByPhone

  • POSThttps://api.securevan.com/v4/people/findByPhone

  • https://docs.ngpvan.com/reference/findbyphone

  • https://docs.ngpvan.com/reference/peoplevanidmergeinto

  • https://docs.ngpvan.com/reference/peoplevanid-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment