Custom Fields Version 2

This document describes the custom fields resource as implemented by the Action Network.

Custom fields track data you collect for an activist in your group that will vary from person to person. This endpoint allows you to retrieve a list of the existing custom fields in your group.

Note: Custom fields are read only.

Sections:

Endpoints and URL structures

Endpoints:

https://actionnetwork.org/api/v2/metadata/custom_fields

Custom fields live exclusively at the above endpoint. The endpoint returns a collection of all the custom field names associated with your API key.

Back To Top ↑

Field names and descriptions

Field names and descriptions:
Field Name Type Required on POST Description
origin_system string n/a A human readable string identifying where this custom field originated.
name string n/a A human readable string identifying the name of this endpoint.
description string n/a A human readable string describing the data available at this endpoint.
action_network:custom_fields Custom Fields[] n/a An array of custom field hashes associated with this API key.
Custom fields:
Field Name Type Required on POST Description
name string n/a The name of the custom field.
created_date datetime n/a The date and time the resource was created. System generated, not editable.
modified_date datetime n/a The date and time the resource was last modified. System generated, not editable.
notes string n/a Internal, administrative-only notes on this field name.
Back To Top ↑

Links

Link Name Description
self A link to this custom field collection.
Back To Top ↑

Scenario: Retrieving a collection of custom field resources (GET)

Custom field resources are presented as a collection of custom fields. For example, calling the custom fields endpoint will return a collection of all the custom fields associated with your API key.

Request

						
https://actionnetwork.org/api/v2/metadata/custom_fields/

Header:
OSDI-API-Token: your_api_key_here
					

Response

						
200 OK

Content-Type: application/hal+json
Cache-Control: max-age=0, private, must-revalidate


{
  "origin_system": "Action Network",
  "name": "Custom Fields",
  "description": "The collection of custom fields available at this endpoint.",
  "_links": {
    "self": [
      {
        "href": "https://dev.actionnetwork.org/api/v2/metadata/custom_fields"
      }
    ],
    "curies": [
      {
        "name": "osdi",
        "href": "https://dev.actionnetwork.org/docs/v2/{rel}",
        "templated": true
      },
      {
        "name": "action_network",
        "href": "https://dev.actionnetwork.org/docs/v2/{rel}",
        "templated": true
      }
    ]
  },
  "action_network:custom_fields": [
    {
      "name": "employer",
      "created_date": "2020-04-21T18:24:11Z",
      "modified_date": "2020-04-21T18:24:11Z",
      "notes": null
    },
    {
      "name": "mobile_message_referrer",
      "created_date": "2020-04-22T15:39:25Z",
      "modified_date": "2020-04-22T15:39:25Z",
      "notes": null
    },
    {
      "name": "occupation",
      "created_date": "2020-04-21T18:25:35Z",
      "modified_date": "2020-04-21T18:25:35Z",
      "notes": null
    },
    {
      "name": "volunteer",
      "created_date": "2019-09-26T18:06:06Z",
      "modified_date": "2019-09-26T18:06:06Z",
      "notes": null
    }
  ]
}
					
Back To Top ↑

Scenario: POST/PUT/DELETE

Posting, putting, and deleting custom fields is not allowed. Attempts will result in errors.

Back To Top ↑