# NGP VAN

> Find, create and update people, apply activist codes, record survey responses and notes, and manage event signups in NGP VAN (EveryAction).

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/ngp-van

## Actions

### Add a note to a person

Add a free-text note to a person.

**Inputs**

- VAN ID (`van_id`, number, required): The person's VAN ID.
- Note (`text`, text, required): The note's text.
- Restricted (`is_view_restricted`, true/false): Whether only some users in this database can see the note. Visible to everyone if left empty.
- Category (`note_category_id`, number): The note's category.

**Outputs**

- `data` (object): The response from NGP VAN.

**Example output**

```json
{
  "data": {}
}
```

### Apply an activist code

Apply an activist code to a person.

**Inputs**

- VAN ID (`van_id`, number, required): The person's VAN ID.
- Activist code (`activist_code_id`, number, required): The activist code to apply.
- Skip contact history (`skip_contact_history`, true/false): Whether to apply the code without recording a contact attempt. Default: `true`.
- Contact type (`contact_type_id`, number): How the person was reached, such as phone or walk.
- Date (`date_canvassed`, date): The day of the contact. Today if left empty.

**Outputs**

- `data` (object): The response from NGP VAN.

**Example output**

```json
{
  "data": {}
}
```

### Delete a signup

Delete a signup. This can't be undone and isn't shown in VAN's history; changing its status is usually better.

**Inputs**

- Signup ID (`event_signup_id`, number, required): The ID of the signup to delete.

**Outputs**

- `data` (object): The response from NGP VAN.

**Example output**

```json
{
  "data": {}
}
```

### Find a person

Look for one person by name and email, phone, date of birth or address. Nothing is created or changed.

**Inputs**

- First name (`first_name`, text): The person's first name.
- Last name (`last_name`, text): The person's last name.
- Email (`email`, text): The person's email address.
- Phone (`phone`, text): The person's phone number.
- Date of birth (`date_of_birth`, date): The person's date of birth.
- Street address (`address_line1`, text): The first line of the person's street address.
- City (`city`, text): The city of the person's address.
- State (`state`, text): The two or three letter state or province code, such as MN.
- ZIP code (`zip`, text): The ZIP or postal code.

**Outputs**

- `data` (object): The response from NGP VAN.

**Example output**

```json
{
  "data": {
    "status": "example",
    "vanId": 1
  }
}
```

### Find or create a person

Find a person, updating them with what you give, or create them if no one matches.

**Inputs**

- First name (`first_name`, text): The person's first name.
- Last name (`last_name`, text): The person's last name.
- Email (`email`, text): The person's email address.
- Phone (`phone`, text): The person's phone number.
- Date of birth (`date_of_birth`, date): The person's date of birth.
- Street address (`address_line1`, text): The first line of the person's street address.
- City (`city`, text): The city of the person's address.
- State (`state`, text): The two or three letter state or province code, such as MN.
- ZIP code (`zip`, text): The ZIP or postal code.
- Middle name (`middle_name`, text): The person's middle name.
- Email type (`email_type`, text): P for personal, W for work or O for other. Personal if left empty. One of: `P`, `W`, `O`.
- Email subscription (`email_subscription`, text): S for subscribed, N for neutral or U for unsubscribed, for targeted email. One of: `S`, `N`, `U`.
- Phone type (`phone_type`, text): H for home, W for work, C for cell, M for main or F for fax. One of: `H`, `W`, `C`, `M`, `F`.
- Phone opt-in (`phone_opt_in`, text): I for opted in, U for unknown or O for opted out of texts. One of: `I`, `U`, `O`.
- Address type (`address_type`, text): The kind of address. One of: `Mailing`, `Home`, `Voting`, `Work`.
- Employer (`employer`, text): Where the person works.
- Occupation (`occupation`, text): What the person does, such as teacher.
- Sex (`sex`, text): M or F. One of: `M`, `F`.

**Outputs**

- `data` (object): The response from NGP VAN.

**Example output**

```json
{
  "data": {
    "status": "example",
    "vanId": 1
  }
}
```

### Get a person

Get a person with their emails, phones and addresses.

**Inputs**

- VAN ID (`van_id`, number, required): The person's VAN ID.

**Outputs**

- `data` (object): The response from NGP VAN.

**Example output**

```json
{
  "data": {
    "addresses": [],
    "contactMode": "example",
    "dateOfBirth": "example",
    "emails": [],
    "employer": "example",
    "firstName": "example",
    "jobTitle": "example",
    "lastName": "example",
    "middleName": "example",
    "nickname": "example",
    "occupation": "example",
    "party": "example",
    "phones": [],
    "sex": "example",
    "suffix": "example",
    "title": "example",
    "vanId": 1
  }
}
```

### Get a survey question

Get a survey question and its possible answers.

**Inputs**

- Survey question (`survey_question_id`, number, required): The survey question.

**Outputs**

- `data` (object): The response from NGP VAN.

**Example output**

```json
{
  "data": {
    "cycle": 1,
    "mediumName": "example",
    "name": "example",
    "responses": [],
    "scriptQuestion": "example",
    "shortName": "example",
    "status": "example",
    "surveyQuestionId": 1,
    "type": "example"
  }
}
```

### Get an event

Get an event with its shifts, roles and locations.

**Inputs**

- Event (`event_id`, number, required): The event.

**Outputs**

- `data` (object): The response from NGP VAN.

**Example output**

```json
{
  "data": {
    "codes": [],
    "createdDate": "example",
    "description": "example",
    "districtFieldValue": "example",
    "endDate": "example",
    "eventId": 1,
    "eventType": {
      "eventTypeId": 1,
      "name": "example"
    },
    "isOnlyEditableByCreatingUser": false,
    "isPubliclyViewable": "example",
    "locations": [],
    "name": "example",
    "notes": "example",
    "roles": [],
    "shifts": [],
    "shortName": "example",
    "startDate": "example",
    "voterRegistrationBatches": "example"
  }
}
```

### Get the API key's details

Get the database, committee and user the API key works in.

**Inputs**: None.

**Outputs**

- `data` (object): The response from NGP VAN.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [],
    "nextPageLink": "example"
  }
}
```

### List a person's notes

List the notes on a person.

**Inputs**

- VAN ID (`van_id`, number, required): The person's VAN ID.
- Limit (`top`, number): How many notes to return, at most 50. From 1 to 50.
- Skip (`skip`, number): How many notes to skip, for paging. Starts at 0. At least 0.

**Outputs**

- `data` (object): The response from NGP VAN.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [],
    "nextPageLink": "example"
  }
}
```

### List activist codes

List the activist codes available in this database.

**Inputs**

- Statuses (`statuses`, list): Only codes with these statuses. Active if left empty. One or more of: `Active`, `Archived`, `Inactive`.
- Name starts with (`name`, text): Only codes whose name starts with this.
- Type (`type`, text): Only codes of this type, such as Volunteer.
- Limit (`top`, number): How many activist codes to return, at most 200. From 1 to 200.
- Skip (`skip`, number): How many activist codes to skip, for paging. Starts at 0. At least 0.

**Outputs**

- `data` (object): The response from NGP VAN.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [],
    "nextPageLink": "example"
  }
}
```

### List codes

List the codes (tags and sources) available in this database.

**Inputs**

- Name contains (`name`, text): Only codes whose name contains this.
- Code type (`code_type`, text): Only codes of this type, such as Tag.
- Limit (`top`, number): How many codes to return, at most 200. From 1 to 200.
- Skip (`skip`, number): How many codes to skip, for paging. Starts at 0. At least 0.

**Outputs**

- `data` (object): The response from NGP VAN.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [],
    "nextPageLink": "example"
  }
}
```

### List contact types

List the ways a person can be reached, such as Phone or Walk.

**Inputs**: None.

**Outputs**

- `data` (list): The response from NGP VAN.

**Example output**

```json
{
  "data": []
}
```

### List events

List events, optionally by type or start date.

**Inputs**

- Starting after (`starting_after`, date): Only events starting after this date.
- Starting before (`starting_before`, date): Only events starting before this date.
- Event type IDs (`event_type_ids`, list): Only events of these types.
- Limit (`top`, number): How many events to return, at most 50. From 1 to 50.
- Skip (`skip`, number): How many events to skip, for paging. Starts at 0. At least 0.

**Outputs**

- `data` (object): The response from NGP VAN.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [],
    "nextPageLink": "example"
  }
}
```

### List note categories

List the categories notes can have.

**Inputs**: None.

**Outputs**

- `data` (list): The response from NGP VAN.

**Example output**

```json
{
  "data": []
}
```

### List result codes

List the results a contact attempt can have, such as Not Home.

**Inputs**: None.

**Outputs**

- `data` (list): The response from NGP VAN.

**Example output**

```json
{
  "data": []
}
```

### List signup statuses

List the statuses a signup for an event can have.

**Inputs**

- Event (`event_id`, number, required): The event.

**Outputs**

- `data` (list): The response from NGP VAN.

**Example output**

```json
{
  "data": []
}
```

### List signups

List the signups for an event, or a person's signups across events.

**Inputs**

- Event (`event_id`, number): The event whose signups to list.
- VAN ID (`van_id`, number): The person whose signups to list.
- Limit (`top`, number): How many signups to return, at most 200. From 1 to 200.
- Skip (`skip`, number): How many signups to skip, for paging. Starts at 0. At least 0.

**Outputs**

- `data` (object): The response from NGP VAN.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [],
    "nextPageLink": "example"
  }
}
```

### List survey questions

List the survey questions available in this database.

**Inputs**

- Statuses (`statuses`, list): Only questions with these statuses. Active if left empty. One or more of: `Active`, `Archived`, `Inactive`.
- Name starts with (`name`, text): Only questions whose name starts with this.
- Cycle (`cycle`, number): Only questions for this election year, such as 2026. At least 1900.
- Limit (`top`, number): How many survey questions to return, at most 200. From 1 to 200.
- Skip (`skip`, number): How many survey questions to skip, for paging. Starts at 0. At least 0.

**Outputs**

- `data` (object): The response from NGP VAN.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": [],
    "nextPageLink": "example"
  }
}
```

### Record a contact attempt

Record a contact attempt that didn't reach the person, such as Not Home or Wrong Number.

**Inputs**

- VAN ID (`van_id`, number, required): The person's VAN ID.
- Result (`result_code_id`, number, required): What happened, such as Not Home.
- Contact type (`contact_type_id`, number): How the person was reached, such as phone or walk.
- Date (`date_canvassed`, date): The day of the contact. Today if left empty.

**Outputs**

- `data` (object): The response from NGP VAN.

**Example output**

```json
{
  "data": {}
}
```

### Record a survey response

Record a person's answer to a survey question.

**Inputs**

- VAN ID (`van_id`, number, required): The person's VAN ID.
- Survey question (`survey_question_id`, number, required): The survey question.
- Answer (`survey_response_id`, number, required): The person's answer.
- Contact type (`contact_type_id`, number): How the person was reached, such as phone or walk.
- Date (`date_canvassed`, date): The day of the contact. Today if left empty.

**Outputs**

- `data` (object): The response from NGP VAN.

**Example output**

```json
{
  "data": {}
}
```

### Remove an activist code

Take an activist code off a person.

**Inputs**

- VAN ID (`van_id`, number, required): The person's VAN ID.
- Activist code (`activist_code_id`, number, required): The activist code to remove.

**Outputs**

- `data` (object): The response from NGP VAN.

**Example output**

```json
{
  "data": {}
}
```

### Sign a person up for an event

Sign a person up for an event shift and role, or change their existing signup's status.

**Inputs**

- VAN ID (`van_id`, number, required): The person's VAN ID.
- Event (`event_id`, number, required): The event.
- Shift ID (`event_shift_id`, number, required): The ID of the event's shift, from Get an event.
- Role ID (`role_id`, number, required): The ID of the person's role at the event, such as host, from Get an event.
- Status (`status_id`, number, required): The signup's status, such as Scheduled.
- Location ID (`location_id`, number): The ID of the event location, from Get an event, if the event has several.

**Outputs**

- `data` (object): The response from NGP VAN.

**Example output**

```json
{
  "data": {
    "eventSignupId": 1
  }
}
```

### Suppress a person

Suppress a person's record, in databases where records can be suppressed.

**Inputs**

- VAN ID (`van_id`, number, required): The VAN ID of the person to suppress.

**Outputs**

- `data` (object): The response from NGP VAN.

**Example output**

```json
{
  "data": {}
}
```

### Update a person

Add or change details on a person. Emails, phones and addresses you give are added to theirs.

**Inputs**

- VAN ID (`van_id`, number, required): The VAN ID of the person to update.
- First name (`first_name`, text): The person's first name.
- Last name (`last_name`, text): The person's last name.
- Email (`email`, text): The person's email address.
- Phone (`phone`, text): The person's phone number.
- Date of birth (`date_of_birth`, date): The person's date of birth.
- Street address (`address_line1`, text): The first line of the person's street address.
- City (`city`, text): The city of the person's address.
- State (`state`, text): The two or three letter state or province code, such as MN.
- ZIP code (`zip`, text): The ZIP or postal code.
- Middle name (`middle_name`, text): The person's middle name.
- Email type (`email_type`, text): P for personal, W for work or O for other. Personal if left empty. One of: `P`, `W`, `O`.
- Email subscription (`email_subscription`, text): S for subscribed, N for neutral or U for unsubscribed, for targeted email. One of: `S`, `N`, `U`.
- Phone type (`phone_type`, text): H for home, W for work, C for cell, M for main or F for fax. One of: `H`, `W`, `C`, `M`, `F`.
- Phone opt-in (`phone_opt_in`, text): I for opted in, U for unknown or O for opted out of texts. One of: `I`, `U`, `O`.
- Address type (`address_type`, text): The kind of address. One of: `Mailing`, `Home`, `Voting`, `Work`.
- Employer (`employer`, text): Where the person works.
- Occupation (`occupation`, text): What the person does, such as teacher.
- Sex (`sex`, text): M or F. One of: `M`, `F`.

**Outputs**

- `data` (object): The response from NGP VAN.

**Example output**

```json
{
  "data": {
    "status": "example",
    "vanId": 1
  }
}
```
