Custom Fields
Custom fields can be created and modified programmatically to be used with Embeddables.
Custom Field Template Properties
| Property | Type | Description |
|---|---|---|
| id | string | Unique identifier of custom field template. |
| name | string | Name of custom field that will appear in reports and details screens. |
| label | string | Label displayed on the custom field entry screen. |
| type | string | Type of field. Valid values: drop_down, text_box, text_field, email, phone, date, auto_complete |
| hint_text | string | Helpful hint text displayed in form field until typing begins in field. |
| options | array of strings | List of options available in type drop_down or autocomplete field. |
| required | bool | true indicates a validation error will be displayed if field is left incomplete. |
Create Custom Field Template
Request:
POST /custom_field/template
{
"name": "Shirt Size",
"label": "What is your shirt size?",
"type": "drop_down",
"hint_text": "select one",
"options": [
"Small",
"Medium",
"Large"
],
"required": false
}
Response:
200 OK
{
"id": "5b438efc253baf6a003248f2"
}Get Custom Field Template
Request:
GET /custom_field/template/{Id}
Response:
200 OK
{
"data": {
"id": "5b438efc253baf6a003248f2",
"name": "Shirt Size",
"label": "What is your shirt size?",
"type": "drop_down",
"hint_text": "select one",
"options": [
"Small",
"Medium",
"Large"
],
"required": false
}
}Update Custom Field Template
Request:
PUT /custom_field/template/{Id}
{
"name": "Shirt Size",
"label": "What is your shirt size?",
"type": "drop_down",
"hint_text": "select one",
"options": [
"Small",
"Medium",
"Large"
],
"required": false
}
Response:
204 No ContentDelete Custom Field Template
Request:
DELETE /custom_field/template/{Id}
Response:
204 No ContentUpdated 6 months ago
