Get Company Custom Field Definition
post
[PlatformAddress]/api/1.0/contact?action=getCompanyCustomFieldDefinition
Get Company Custom Field Definition
Get the definition of custom field
1
[
2
{
3
"fieldId": 47,
4
"fieldType": 3,
5
"displayName": "Test Multiple",
6
"isRequired": false,
7
"sortOrder": 1,
8
"selectValues": {
9
"Test 1": "Test 1",
10
"Test 2": "Test 2"
11
},
12
"fileTypes": null
13
},
14
{
15
"fieldId": 1,
16
"fieldType": 0,
17
"displayName": "TIN Number",
18
"isRequired": false,
19
"sortOrder": 2,
20
"selectValues": null,
21
"fileTypes": null
22
},
23
{
24
"fieldId": 2,
25
"fieldType": 4,
26
"displayName": "Accountant Address",
27
"isRequired": false,
28
"sortOrder": 3,
29
"selectValues": null,
30
"fileTypes": null
31
},
32
{
33
"fieldId": 3,
34
"fieldType": 5,
35
"displayName": "Your Birth Date",
36
"isRequired": true,
37
"sortOrder": 4,
38
"selectValues": null,
39
"fileTypes": null
40
},
41
{
42
"fieldId": 45,
43
"fieldType": 6,
44
"displayName": "Profile Picture",
45
"isRequired": false,
46
"sortOrder": 5,
47
"selectValues": null,
48
"fileTypes": [
49
"images"
50
]
51
}
52
]
Copied!

Returns

An array of objects with the following properties
Property
Description
fieldId
The unique identifier for this custom field
fieldType
displayName
The name of this field
isRequired
If this field is required or not
sortOrder
Order to display this field
selectValues
Values that can be selected with select fields
fileTypes
Types of files that can be uploaded with the file custom field

Types of field

  • 0 = Small Text
  • 1 = Large Text
  • 2 = Single Select
    • Valid options are provided in the ‘selectValues’ key
  • 3 = Multiple Select
    • Valid options are provided in the ‘selectValues’ key
  • 4 = Address
  • 5 = Date
  • 6 = File
    • Valid file types are provided in the ‘fileTypes’ key
  • 7 = Static Text
    • Values cannot be set for this type
  • 8 = Whole Number
  • 9 = Large Select
This call will return an array of custom fields available on the account. The result will have the fieldId which is the unique field identifier for the specific field, as well as the display name and any options required for each field.
As part of the field definition there is a ‘fieldType’ property which can be resolved to the following types
  • 0 = Small Text
  • 1 = Large Text
  • 2 = Single Select
    • Valid options are provided in the ‘selectValues’ key
  • 3 = Multiple Select
    • Valid options are provided in the ‘selectValues’ key
  • 4 = Address
  • 5 = Date
  • 6 = File
    • Valid file types are provided in the ‘fileTypes’ key
  • 7 = Static Text
    • Values cannot be set for this type
  • 8 = Whole Number
  • 9 = Large Select
Last modified 3mo ago
Copy link