Custom Fields
The Custom Fields resource has full CRUD functionality. It allows you to Create, Retrieve, Update, and Delete Custom Fields. The following actions can be performed on this resource...
Retrieve All Custom Fields
Retrieves all custom fields for the brand.
You can include additional parameters in the request as described in the Query Parameters section. For instance, the request below will return custom fields with a data type of "boolean".
Example Response:
{
"data": [
{
"custom_field_id": 1111,
"_brand_id": 123456789,
"name": "Member",
"internal_name": "member",
"description": "Is contact a member?",
"data_type": "boolean",
"created": "2024-01-01 21:45:53",
"last_updated": "2024-01-02 18:23:25"
}
],
"pagingData": {
"prevPage": null,
"currentPage": null,
"nextPage": null,
"currentPageString": null,
"hasMore": false
}
}
Retrieve a Specific Custom Field
Retrieves a single custom field with the custom field ID equal to {id}. The custom field ID can be found using the retrieve all custom fields endpoint.
Example Response:
{
"custom_field_id": 1111,
"_brand_id": 123456789,
"name": "Member",
"internal_name": "member",
"description": “Is contact a member?”,
"data_type": "boolean",
"created": "2024-01-01 21:45:53",
"last_updated": "2024-01-02 18:23:25"
}
Edit a Specific Custom Field
Allows you to edit an existing custom field. You can target an existing custom field by passing the custom field ID in your PUT request. The custom field ID can be found using the retrieve all custom fields endpoint. At least one of the arguments below is required.
If you change the custom field name, the internal name will not change.
When changing data types, it will not affect the data already stored in the custom field. It will only affect validation upon data entry.
Arguments
PARAMETER | DESCRIPTION |
---|---|
name | The name of your custom field. |
data_type | Define the type of data that will be stored in the custom field. This will aid in validation of the data entered. The data types are:
|
description | Description of the custom field you are updating. |
Example Request Body:
{
"name": "Updated Custom Field Name",
"description": "Updated Custom Field Description",
"data_type": "string"
}
Example Response:
{
"custom_field_id": 1111,
"_brand_id": 123456789,
"name": "Updated Custom Field Name",
"internal_name": "custom_text",
"description": "Updated Custom Field Description",
"data_type": "string",
"created": "2024-10-31 12:21:24",
"last_updated": "2024-12-06 13:59:56"
}
Delete a Specific Custom Field
Deletes an existing custom field with the custom field ID equal to {id}. The custom field ID can be found using the retrieve all custom fields endpoint. Using this action, the custom field is simply removed completely from the brand. All data stored in that custom field will be lost for all contacts.
Example Response:
[]