Status Field Value
A status field value consists of its value
property which holds a reference to a status option. A status option has the properties id
(unique ID), text
(the label), color
(hexcolor value) and means_completed
(whether the status indicates completion). A status
field value holds at most one status option.
Record creation
A status field value can be created as part of a record creation. Here is an example request body for creating a record with a value for the "Onboarding status" field with ID 2, type status
and external ID onboarding_status
:
- cURL
- JSON
curl -X POST https://api.tapeapp.com/v1/record/app/1 \
-u user_key_replace_with_your_api_key: \
-H "Content-Type: application/json" \
--data '{
"fields": {
"onboarding_status": 1
}
}'
{
"fields": {
"onboarding_status": 1
}
}
{
"record_id": 1,
"title": "Not started",
"fields": [
{
"field_id": 2,
"external_id": "onboarding_status",
"label": "Onboarding status",
"type": "status",
"field_type": "status",
"values": [
{
"value": {
"id": 1,
"text": "Not started",
"color": "DF245E",
"means_completed": false
}
}
]
}
]
}
Record retrieval
A status field value can be retrieved as part of a record retrieval:
curl https://api.tapeapp.com/v1/record/1 \
-u user_key_replace_with_your_api_key:
{
"record_id": 1,
"title": "Not started",
"fields": [
{
"field_id": 2,
"external_id": "onboarding_status",
"label": "Onboarding status",
"type": "status",
"field_type": "status",
"values": [
{
"value": {
"id": 1,
"text": "Not started",
"color": "DF245E",
"means_completed": false
}
}
]
}
]
}
Record update
One or more status field values can be updated as part of a record update. Here is an example request body for updating multiple status field values of a record:
- cURL
- JSON
curl -X PUT https://api.tapeapp.com/v1/record/1 \
-u user_key_replace_with_your_api_key: \
-H "Content-Type: application/json" \
--data '{
"fields": {
"onboarding_status": 2
}
}'
{
"fields": {
"onboarding_status": 2
}
}
{
"record_id": 1,
"title": "Done",
"fields": [
{
"field_id": 2,
"external_id": "onboarding_status",
"label": "Onboarding status",
"type": "status",
"field_type": "status",
"values": [
{
"value": {
"id": 2,
"text": "Done",
"color": "007959",
"means_completed": true
}
}
]
}
]
}