Entity Types

Entities enable you to organize and track the people & groups most important to your organization, in the way that makes the most sense for your organizers. Entities conveniently and strategically categorize people and groups. By default, each organization starts with a people entity type. You can have other entity types for any information or data you want to track, such as someone's nonprofit organization, union local, or workplace.

Each type of entity can store information differently. You can toggle fields in the Action Builder UI to make certain standard fields available, like address, date of birth, email, phone, or preferred language.

Endpoints and URL Structures


https://[your-sub-domain].actionbuilder.org/api/rest/v1/campaigns/[campaign_id]/entity_types
					

Entity type resources live exclusively at the above endpoint. The endpoint returns a collection of all the entity types associated with your API key and specified campaign.

URL Structures:


https://[your-sub-domain].actionbuilder.org/api/rest/v1/campaigns/[campaign_id]/entity_types/[entity_type_id]

To address a specific entity type, use the resource type name like:


https://techworkersunited.actionbuilder.org/api/v1/rest/campaigns/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/entity_types/fa0016b8-c69e-46e2-bd73-84613adc5d68
					 
Back To Top ↑

Field Names and Descriptions

Entity Type Fields

Field Name Type Description
origin_system string A human readable string identifying where this entity type originated.
identifiers strings[] An array containing the read-only Action Builder identifier of this resource in the format [system name]:[id]. See the general concepts document for more information about identifiers.
created_date datetime The date and time the resource was created. System generated, not editable.
modified_date datetime The date and time the resource was last modified. System generated, not editable.
plural_name string The entity's plural label.
singular_nane string The entity's singular label.
name_type string Indicates whether multi-name or single-name is enabled for this entity type. Either multi or single.
address_enabled boolean Indicates whether address fields are enabled (true) or disabled (false) for this entity type.
date_of_birth_enabled boolean Indicates whether date of birth fields are enabled (true) or disabled (false) for this entity type.
email_enabled boolean Indicates whether email fields are enabled (true) or disabled (false) for this entity type.
phone_enabled boolean Indicates whether phone fields are enabled (true) or disabled (false) for this entity type.
preferred_language_enabled boolean Indicates whether preferred language fields are enabled (true) or disabled (false) for this entity type.

Back To Top ↑

Related Resources

Scenario: Retrieving a collection of entity type resources (GET)

Entity type resources are sometimes presented as collections of entity types. For example, calling the entity types endpoint will return a collection of all the entity types associated with that API key and specified campaign.

Request

						
GET https://techworkersunited.actionbuilder.org/api/rest/v1/campaigns/4c0fa555-10b0-4608-98db-ff25876ea9c0/entity_types		

Header:
OSDI-API-Token: your_api_key_here					
						
					

Response

						
{
  "per_page": 25,
  "page": 1,
  "total_pages": 1,
  "_embedded": {
    "action_builder:entity_types": [
      {
        "origin_system": "Action Builder",
        "identifiers": [
          "action_builder:fa0016b8-c69e-46e2-bd73-84613adc5d68"
        ],
        "created_date": "2022-01-24T18:58:04.020Z",
        "modified_date": "2022-01-24T18:58:04.020Z",
        "plural_name": "locals",
        "singular_name": "local",
        "name_type": "single",
        "address_enabled": true,
        "date_of_birth_enabled": false,
        "email_enabled": true,
        "phone_enabled": true,
        "preferred_language_enabled": false,
        "_links": {
          "self": {
            "href": "https://techworkersunited.actionbuilder.org/api/rest/v1/campaigns/84a684a7-2f5a-4359-bdb4-898ce4fbc88f/entity_types/fa0016b8-c69e-46e2-bd73-84613adc5d68"
          },
          "action_builder:campaign": {
            "href": "https://techworkersunited.actionbuilder.org/api/rest/v1/campaigns/84a684a7-2f5a-4359-bdb4-898ce4fbc88f"
          }
        }
      },
      {
        "origin_system": "Action Builder",
        "identifiers": [
          "action_builder:786888a8-868f-4694-a3ba-1caf0688d0c0"
        ],
        "created_date": "2020-06-05T22:43:19.738Z",
        "modified_date": "2021-10-07T14:37:14.023Z",
        "plural_name": "people",
        "singular_name": "person",
        "name_type": "multi",
        "address_enabled": true,
        "date_of_birth_enabled": true,
        "email_enabled": true,
        "phone_enabled": true,
        "preferred_language_enabled": true,
        "_links": {
          "self": {
            "href": "https://techworkersunited.actionbuilder.org/api/rest/v1/campaigns/84a684a7-2f5a-4359-bdb4-898ce4fbc88f/entity_types/786888a8-868f-4694-a3ba-1caf0688d0c0"
          },
          "action_builder:campaign": {
            "href": "https://techworkersunited.actionbuilder.org/api/rest/v1/campaigns/84a684a7-2f5a-4359-bdb4-898ce4fbc88f"
          }
        }
      }
    ]
  },
  "_links": {
    "self": {
      "href": "https://techworkersunited.actionbuilder.org/api/rest/v1/campaigns/84a684a7-2f5a-4359-bdb4-898ce4fbc88f/entity_types"
    },
    "curies": [
      {
        "name": "osdi",
        "href": "https://actionbuilder.org/docs/v1/{rel}",
        "templated": true
      },
      {
        "name": "action_builder",
        "href": "https://actionbuilder.org/docs/v1/{rel}",
        "templated": true
      }
    ],
    "action_builder:entity_types": [
      {
        "href": "https://techworkersunited.actionbuilder.org/api/rest/v1/campaigns/84a684a7-2f5a-4359-bdb4-898ce4fbc88f/entity_types/fa0016b8-c69e-46e2-bd73-84613adc5d68"
      },
      {
        "href": "https://techworkersunited.actionbuilder.org/api/rest/v1/campaigns/84a684a7-2f5a-4359-bdb4-898ce4fbc88f/entity_types/786888a8-868f-4694-a3ba-1caf0688d0c0"
      }
    ]
  }
}						
						
					

Back To Top ↑

Scenario: Retrieving an individual entity type resource (GET)

Calling an individual entity type resource will return the entity type directly, along with all associated fields and appropriate links to additional information about the entity type.

Request

					
GET https://techworkersunited.actionbuilder.org/api/rest/v1/campaigns/4c0fa555-10b0-4608-98db-ff25876ea9c0/entity_types/786888a8-868f-4694-a3ba-1caf0688d0c0

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 Builder",
  "identifiers": [
    "action_builder:786888a8-868f-4694-a3ba-1caf0688d0c0"
  ],
  "created_date": "2020-06-05T22:43:19.738Z",
  "modified_date": "2021-10-07T14:37:14.023Z",
  "plural_name": "people",
  "singular_name": "person",
  "name_type": "multi",
  "address_enabled": true,
  "date_of_birth_enabled": true,
  "email_enabled": true,
  "phone_enabled": true,
  "preferred_language_enabled": true,
  "_links": {
    "curies": [
      {
        "name": "osdi",
        "href": "https://actionbuilder.org/docs/v1/{rel}",
        "templated": true
      },
      {
        "name": "action_builder",
        "href": "https://actionbuilder.org/docs/v1/{rel}",
        "templated": true
      }
    ],
    "self": {
      "href": "https://techworkersunited.actionbuilder.org/api/rest/v1/campaigns/4c0fa555-10b0-4608-98db-ff25876ea9c0/entity_types/786888a8-868f-4694-a3ba-1caf0688d0c0"
    },
    "action_builder:campaign": {
      "href": "https://techworkersunited.actionbuilder.org/api/rest/v1/campaigns/4c0fa555-10b0-4608-98db-ff25876ea9c0"
    }
  }
}			 
				 
			  

Back To Top ↑

Scenario: POST/PUT/DELETE

Posting, putting, and deleting of entity types is not allowed. Attempts will result in errors.


Back To Top ↑