Fields
Common properties, used in the field-endpoints
ownerType
string- One of the following:
team
- One of the following:
fieldId
uuidoptionId
uuid
Get fields
GET /fields/:ownerType
Response
Status code 200
{
"data": [
{
"id": "862d0d34-419b-4203-a49a-0ca76bf8e2c2",
"type": "single_choice",
"label": "Gender",
"description": null,
"is_hidden": false,
"is_read_only": false,
"validation": null,
"team_id": null,
"group_id": null,
"links": [],
"options": [
{
"id": "0fcb27ca-9d4e-4af7-9eec-c78acf23f64a",
"value": "Male",
"sort": 1
},
{
"id": "6a0bd589-2aae-4bb2-842f-e7cb235ca3ab",
"value": "Female",
"sort": 2
}
]
},
{
"id": "f729f55f-796e-4587-81f5-f35e1a5a707b",
"type": "single_choice",
"label": "Honorific",
"description": null,
"is_hidden": false,
"is_read_only": false,
"validation": null,
"team_id": null,
"group_id": null,
"links": [
{
"field_id": "862d0d34-419b-4203-a49a-0ca76bf8e2c2",
"option_id": "0fcb27ca-9d4e-4af7-9eec-c78acf23f64a",
"options_shown": [
"d20b85e3-3834-4473-be6c-06b83e137e14",
"7cdf1f30-e878-42e0-8d91-e85f25736e08",
"e7f4332e-b697-4790-a526-6c5b87b3e739",
"eb20bf0b-1b7d-4f30-b999-55d53fd75e20"
],
"default_option": "d20b85e3-3834-4473-be6c-06b83e137e14"
},
{
"field_id": "862d0d34-419b-4203-a49a-0ca76bf8e2c2",
"option_id": "6a0bd589-2aae-4bb2-842f-e7cb235ca3ab",
"options_shown": [
"019c5875-9329-4cf7-b9de-25f975da69a3",
"326b88b1-03fd-40f4-9343-e77d15b66842",
"9dc3cb24-637c-4abe-a636-e2cfdfbc4c01",
"7cdf1f30-e878-42e0-8d91-e85f25736e08",
"e7f4332e-b697-4790-a526-6c5b87b3e739",
"eb20bf0b-1b7d-4f30-b999-55d53fd75e20"
],
"default_option": "019c5875-9329-4cf7-b9de-25f975da69a3"
}
],
"options": [
{
"id": "d20b85e3-3834-4473-be6c-06b83e137e14",
"value": "Mr",
"sort": 1
},
{
"id": "019c5875-9329-4cf7-b9de-25f975da69a3",
"value": "Miss",
"sort": 2
},
{
"id": "326b88b1-03fd-40f4-9343-e77d15b66842",
"value": "Mrs",
"sort": 3
},
{
"id": "9dc3cb24-637c-4abe-a636-e2cfdfbc4c01",
"value": "Ms",
"sort": 4
},
{
"id": "7cdf1f30-e878-42e0-8d91-e85f25736e08",
"value": "Mx",
"sort": 5
},
{
"id": "e7f4332e-b697-4790-a526-6c5b87b3e739",
"value": "Dr",
"sort": 6
},
{
"id": "eb20bf0b-1b7d-4f30-b999-55d53fd75e20",
"value": "Prof",
"sort": 7
}
]
}
]
}
Get field
GET /fields/:ownerType/:fieldId
Response
Status code 200
{
"id": "862d0d34-419b-4203-a49a-0ca76bf8e2c2",
"type": "single_choice",
"label": "Gender",
"description": null,
"is_hidden": false,
"is_read_only": false,
"validation": null,
"team_id": null,
"group_id": null,
"links": [],
"options": [
{
"id": "0fcb27ca-9d4e-4af7-9eec-c78acf23f64a",
"value": "Male",
"sort": 1
},
{
"id": "6a0bd589-2aae-4bb2-842f-e7cb235ca3ab",
"value": "Female",
"sort": 2
}
]
}
Create field
POST /fields/:ownerType
Parameters
label
string- Required
- Max 255 characters
description
string- Max 250 characters
- Default:
null
type
string- Required
- One of the following:
boolean
date
multi_line
multiple_choice
numeric
single_choice
text
is_hidden
boolean - If set to true, the field should not show up in the UI- Default:
false
- Default:
is_read_only
boolean - If set to true, the field should not be editable in the UI- Default:
false
- Default:
validation
string- One of the following:
boolean
date
email
numeric
url
- Default:
null
- One of the following:
Payload
{
"type": "single_choice",
"label": "A new field",
"description" : null,
"is_hidden": false,
"is_read_only": false,
"validation": null
}
Response
Status code 201
{
"id": "f7cb534d-53e0-45ac-b5e1-41df191dabc4",
"type": "single_choice",
"label": "A new field",
"description" : null,
"is_hidden": false,
"is_read_only": false,
"validation": null,
"team_id": null,
"group_id": null,
"links": [],
"options": []
}
Update field
PUT /fields/:ownerType/:fieldId
Parameters
label
string- Required
- Max 255 characters
description
string- Max 250 characters
- Default:
null
type
string- Required
- One of the following:
boolean
date
multi_line
multiple_choice
numeric
single_choice
text
is_hidden
boolean - If set to true, the field should not show up in the UI- Default:
false
- Default:
is_read_only
boolean - If set to true, the field should not be editable in the UI- Default:
false
- Default:
validation
string- One of the following:
boolean
date
email
numeric
url
- Default:
null
- One of the following:
Payload
{
"type": "single_choice",
"label": "Change the label and hide the field",
"description" : null,
"is_hidden": true,
"is_read_only": false,
"validation": null
}
Response
Status code 200
{
"id": "f7cb534d-53e0-45ac-b5e1-41df191dabc4",
"type": "single_choice",
"label": "Change the label and hide the field",
"description" : null,
"is_hidden": true,
"is_read_only": false,
"validation": null,
"team_id": null,
"group_id": null,
"links": [],
"options": []
}
Delete field
DELETE /fields/:ownerType/:fieldId
Response
Status code 204
Options
Create option
POST /fields/:ownerType/:fieldId/options
Parameters
value
string- Required
- Max 255 characters
sort
integer- Default:
null
- Default:
Payload
{
"value": "Option 1",
"sort": 1
}
Response
Status code 201
{
"id": "5112ba5d-c997-4b22-b02d-bff4a86243b6",
"value": "Option 1",
"sort": 1
}
Update option
PUT /fields/:ownerType/:fieldId/options/:optionId
Parameters
value
string- Required
- Max 255 characters
sort
integer- Default:
null
- Default:
Payload
{
"value": "Option 1 - updated",
"sort": 2
}
Response
Status code 201
{
"id": "5112ba5d-c997-4b22-b02d-bff4a86243b6",
"value": "Option 1 - updated",
"sort": 2
}
Delete option
DELETE /fields/:ownerType/:fieldId/options/:optionId
Response
Status code 204
Sorting
Get sorting
GET /fields/:ownerType/sort
Response
Status code 200
{
"data": [
{
"type": "property",
"value": "property.name"
},
{
"type": "field",
"value": "862d0d34-419b-4203-a49a-0ca76bf8e2c2"
}
]
}
Update sorting
PUT /fields/:ownerType/sort
Parameters
sort
arraysort.*.type
string- Required
- One of the following:
field
orproperty
sort.*.value
string- Required
- Must be a valid
field_id
ifsort.*.type
isfield
Payload
{
"sort": [
{
"type": "field",
"value": "862d0d34-419b-4203-a49a-0ca76bf8e2c2"
},
{
"type": "property",
"value": "property.name"
}
]
}
Response
Status code 200
{
"data": [
{
"type": "field",
"value": "862d0d34-419b-4203-a49a-0ca76bf8e2c2"
},
{
"type": "property",
"value": "property.name"
}
]
}
Links
Update links
PUT /fields/:ownerType/:fieldId/links
Parameters
links
array- Required
links.*.field_id
uuid- Required
- Must be a valid field id, that the user has access to edit
links.*.option_id
uuid- Required
- Must be a valid option id, that belongs to the
field_id
in the payload
links.*.options_shown
array- Required
- Min 1 item
- Max 1 item, if the
fieldId
in the path is of typesingle_choice
links.*.options_shown.*
uuid- Must be valid option ids, that belong to the
fieldId
in the path
- Must be valid option ids, that belong to the
links.*.default_option
uuid- Must be a valid option id, that belongs to the
fieldId
in the path - Default:
null
- Must be a valid option id, that belongs to the
Payload
{
"links": [
{
"field_id": "862d0d34-419b-4203-a49a-0ca76bf8e2c2",
"option_id": "0fcb27ca-9d4e-4af7-9eec-c78acf23f64a",
"options_shown": [
"d20b85e3-3834-4473-be6c-06b83e137e14"
],
"default_option": "d20b85e3-3834-4473-be6c-06b83e137e14"
}
]
}
Response
Status code 200
{
"data": [
{
"field_id": "862d0d34-419b-4203-a49a-0ca76bf8e2c2",
"option_id": "0fcb27ca-9d4e-4af7-9eec-c78acf23f64a",
"options_shown": [
"d20b85e3-3834-4473-be6c-06b83e137e14"
],
"default_option": "d20b85e3-3834-4473-be6c-06b83e137e14"
}
]
}