Custom Fields

Custom fields can be used to store contact information that isn't already represented by the default LionDesk fields. This resource defines the user's fields themselves, not the values for said fields.

To see how custom field values can be set, visit the docs for Custom Field Values.

The following fields relate to the Custom Fields endpoint.

FieldLimitsRequired?Writeable?
id
NoNo

The custom field id

user_id
Automatically set to the token holder's user id
NoNo

The user id of this custom field creator

data_type
One of: Text, Number, Date, or Dollar Amt
YesYes

The type of field, used for proper display

name
Up to 255 characters
YesYes

The name of the field. Used as its title when displayed.

rank
Some integer value
NoYes

Determines the order of the fields when displayed. The lower the number, the higher in the list. Defaults to 99999

Submit one Custom Field

To submit one custom field:

POST https://api-v2.liondesk.com//custom-fields headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }

The request object should have this form:{ "data_type": "Text", "name": "Kids Names", "rank": "1" }

Update one Custom Field

To update some attributes on one custom field:

PATCH https://api-v2.liondesk.com//custom-fields/10 headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }

data: {
data_type: "Text",
name: "Kids Names"
}

Get One Custom Field

To get one custom field:

GET https://api-v2.liondesk.com//custom-fields/1 headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }

The response object will have this form:{ "id": "147", "user_id": "13", "data_type": "Text", "name": "Kids Names", "rank": "1" }

Find All Custom Fields

You find/search custom fields by issuing a GET request to the base endpoint:

GET https://api-v2.liondesk.com//custom-fields headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }

The response will contain an array of custom field objects, like so:

{ "total": 2, "limit": 10, "skip": 0, "data": [ { "id": "147", "user_id": "13", "data_type": "Text", "name": "Kids Names", "rank": "1" }, { "id": "148", "user_id": "45", "data_type": "Number", "name": "Number of Kids", "rank": "99999" } ] }

Remove

Custom Fields can be removed with a delete request.

DELETE https://api-v2.liondesk.com//custom-fields/386 headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }