Upload Payload

This document describes the Action Network webhook payload for uploads.

Uploads represent the action an activist is recorded to have taken when they are part of a file uploaded to Action Network via the uploads tool (either email uploads, unique ID uploads, or transaction uploads), or POSTed via the person signup helper over the API. In the case of transaction uploads, a donation event will also be fired to represent the transaction being uploaded. Uploads have no direct equivalent over the API.

The upload format is closely related to the person signup helper on the Action Network API. Please refer to that documentation for a fuller explanation of fields, format, and how they relate to other resources.

Uploads are linked to the person resource corresponding to the activist who was part of the upload.

Unlike most webhook payloads, upload payloads will contain full 'core' fields such as first name or address from an activist, even if those fields were not specifically part of the uploaded data. They will contain the specific custom fields in the uploaded file, but they will not represent whether those custom fields were actually applied to the activist's record or not -- uploads have their own logic around custom fields (whether they should overwrite existing data or not) that the webhook payload is unaware of. You can read more about custom field data and uploads here. Finally, upload payloads originating from the person signup helper will not include tags or custom fields POSTed on that helper.

Sections:

Type

Upload events are identified by their type, which is the JSON closure that surrounds the hash in the POSTed array.

The upload type is action_network:upload.

Back To Top ↑

Field names and descriptions

Upload fields:
Field Name Type Description
created_date datetime The date and time the resource was created.
modified_date datetime The date and time the resource was last modified.
action_network:referrer_data Referrer Data Always a blank hash. Action Network-only.
person Person* A hash representing person data to associate with this upload. Contains full core fields and only custom fields uploaded as part of the file, though not necessarily applied to the person. See above for more explanation. See the people document for more information about people.
add_tags strings[] An array of strings representing tags that were added to the person's record during the upload creation. Note: The person may have already had these tags applied to their record before taking action, and in a network these tags may not exist on parent groups. This array only represents what tags were attempted to be added to the person's record, not the actual result of those operations. Tags will not be present on a person signup helper upload event.
action_network:sponsor Sponsor A hash of sponsor data indicating the sponsoring group uploaded to. Useful for determining where in a network the event originated. Action Network-only.
idempotency_key string A hash of webhook message id. Unique per webhook message, consistent across retries.
Sponsor fields:
Field Name Type Description
title string The name of the sponsoring group.
browser_url string The URL to the group's public page.
Back To Top ↑

Links

Link Name Description
osdi:person A link to the person who was uploaded. Click here for people documentation.
Back To Top ↑

Related resources

Back To Top ↑

Example

If an activist is part of an uploaded file and your webhook's trigger matches the event, an upload webhook payload like the below will be fired off to your server's webhook URL. The below example does not show all possible fields. As noted above, all core fields plus only custom fields that were part of the upload file (but were not necessarily applied to the person) will be included in the payload.

Request

						
POST https://your-webhook-url.com

Header:
Content-Type: application/json


[
  {
    "action_network:upload": {
      "created_date": "2018-11-07T19:49:26Z",
      "modified_date": "2018-11-07T19:49:26Z",
      "person": {
        "created_date": "2018-11-07T17:56:40Z",
        "modified_date": "2018-11-07T19:46:40Z",
        "family_name": "Smith",
        "postal_addresses": [
          {
            "primary": true,
            "address_lines": [
              "1600 Pennsylvania Ave NW"
            ],
            "locality": "Washington",
            "postal_code": "20036",
            "region": "District of Columbia",
            "country": "US",
            "location": {
              "latitude": 41.2967,
              "longitude": -73.6698,
              "accuracy": "Approximate"
            }
          }
        ],  
        "email_addresses": [
          {
            "primary": true,
            "address": "jsmith@mail.com",
            "status": "subscribed"
          }
        ],
        "phone_numbers": [
          {
            "primary": true,
            "number": "12024444444",
            "number_type": "Mobile",
            "status": "subscribed"
          }
        ],
        "languages_spoken": [
          "en"
        ],
        "custom_fields": {
          "phone_number": "123.456.7890"
        }
      },
      "action_network:referrer_data": {},
      "add_tags": [
        "volunteer",
        "member"
      ],
      "_links": {
        "osdi:person": {
          "href": "https://actionnetwork.org/api/v2/people/0df69aaf-3614-4315-b73a-088866b404e8"
        }
      }
    },
    "action_network:sponsor": {
      "title": "Progressive Action Now",
      "url": "https://actionnetwork.org/groups/progressive-action-now"
    },
    "idempotency_key": "1679091c5a880faf6fb5e6087eb1b2dcup"
  }
]
					
Back To Top ↑