Custom Fields
Custom Fields allow the user to store extra data against a Contact or Property
Object Definition
| Field | Type | Description | |
|---|---|---|---|
uuid | string | Unique identifier for the object | |
created_at | string | ISO 8601 datetime when the custom field was originally created | |
updated_at | string | ISO 8601 datetime when the custom field was last updated | |
name | string | Name of the custom field (Usually a machine identifiable string) | |
label | string | Human readable name of the custom field | |
type | object | The type of custom field (Currently may only be text) | |
type.code | integer | Machine identifiable code for the type of custom field (Currently may only be 1) | |
type.name | string | Human readable name for the type of custom field (Currently may only be Text) | |
entity_type | object | The entity the custom field may be used with | |
entity_type.code | integer | Machine identifiable code for the type of entity the custom field may be used with | |
entity_type.name | string | Human readable name for the entity the custom field may be used with | q |
List all Custom Fields
Retrieve a paginated list of all the accounts Custom Fields. GET /custom-fields.
Filters
You may filter the results from the list endpoint using the following query parameters
| Field | Type | Description |
|---|---|---|
value | string | Fuzzy search on the value of the custom field (May only be used when accessing a Relational Filter) |
Example Response
{
"data": [
{
"uuid": "42494d68-cb97-41bf-9e1e-bc4adba4f863",
"created_at": "2018-08-02T14:48:33+01:00",
"updated_at": "2018-08-02T14:48:37+01:00",
"name": "twitter_handle",
"label": "Twitter Handle",
"type": {
"code": 1,
"name": "Text"
},
"entity_type": {
"code": 2,
"name": "Property"
}
}
]
}
Get a single Custom Field
Retrieve a single custom field by it's uuid. GET /custom-fields/:uuid.
Example Response
{
"data": {
"uuid": "5cca7fde-0262-4523-8153-465e218a5b6d",
"created_at": "2018-08-02T15:00:35+01:00",
"updated_at": "2018-08-02T15:00:39+01:00",
"name": "twitter_handle",
"label": "Twitter Handle",
"type": {
"code": 1,
"name": "Text"
},
"entity_type": {
"code": 1,
"name": "Contact"
}
}
}
Creating a Custom Field
Perform a POST request to the /custom-fields endpoint. This endpoint will return a HTTP 201 status code on success.
Input
| Field | Type | Description |
|---|---|---|
name | string / null | Name of the custom field (Usually a machine identifiable string) (If this attribute is not supplied, we will generate one from the label) |
label | string | Human readable name of the custom field Required |
type | object | The type of custom field (Currently may only be text) Required |
type.code | integer | Machine identifiable code for the type of custom field (Currently may only be 1) Required |
entity_type | object | The entity the custom field may be used with Required |
entity_type.code | integer | Machine identifiable code for the type of entity the custom field may be used with Required |
Updating a Custom Field
Perform a PUT request to the /custom-fields/:uuid endpoint. This endpoint will return a HTTP 200 status code on success.
Input
| Field | Type | Description |
|---|---|---|
name | string / null | Name of the custom field (Usually a machine identifiable string) |
label | string | Human readable name of the custom field |
type | object | The type of custom field (Currently may only be text) |
type.code | integer | Machine identifiable code for the type of custom field (Currently may only be 1) |
entity_type | object | The entity the custom field may be used with |
entity_type.code | integer | Machine identifiable code for the type of entity the custom field may be used with |
Deleting a Custom Field
Perform a DELETE request to the /custom-fields/:uuid endpoint. This endpoint will return a HTTP 204 status code on success.
