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
By default, the first set of 50 Custom Fields will be returned, but you can modify this number with limit and offset values in the query string. The max limit for a single request is 10,000. You can also retrieve your data with pagination. You do this by passing the page and pageSize query string parameters. Page determines which page number to be returned and pageSize will determine the number of Custom Fields returned in that page.
When retrieving multiple Custom Fields, you may also want to include additional criteria in the query string to filter the results by. Any field that is included in the resources is available for use as a filter. These are exact matches; they are case-sensitive and do not allow wildcards.
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}.
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. 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}. 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:
[]