API reference
Custom fields
8 requests. Each shows the permission a key needs, what to send and what comes back.
On this page
Booking templates (Xota's task templates): a name and its own booking fields
GET/v1/booking-templates
- Permission
customFields.view- Answers
200
Parameters
| Name | In | Kind | |
|---|---|---|---|
archived | query | enum | One of true, false, all · Default "false" |
Response array of object
iduuidrequirednamestringrequireddescriptionstringrequiredcan be nulldurationMinutesintegerrequiredcan be null-9007199254740991 to 9007199254740991
pricePenceintegerrequiredcan be null-9007199254740991 to 9007199254740991
fieldDefaultsobjectrequiredchecklistarray of objectrequirediduuidrequiredlabelstringrequiredinstructionstringrequiredcan be nullkindenumrequiredOne of
"tick","text","textarea","number","date","time","checkbox","select","photo"unitstringrequiredcan be nulloptionsarray of stringrequiredaskCommentbooleanrequiredrequiredbooleanrequiredvisibleToClientsbooleanrequired
archivedbooleanrequiredinUseintegerrequired-9007199254740991 to 9007199254740991
fieldsarray of objectrequirediduuidrequiredentityenumrequiredOne of
"client","project","booking","team_member"templateIduuidrequiredcan be nulllabelstringrequiredslugstringrequiredtypeenumrequiredOne of
"text","textarea","number","date","checkbox","select","address"optionsarray of stringrequiredrequiredbooleanrequiredshowInListbooleanrequiredvisibleToOperativesbooleanrequiredvisibleToClientsbooleanrequiredpositionintegerrequired-9007199254740991 to 9007199254740991
archivedbooleanrequired
curl "https://app.workscope.co.uk/v1/booking-templates" \
-H "Authorization: Bearer wsk_your_key_here"Example response
[
{
"id": "3f2a9c1e-6b4d-4e8a-9f1c-2d7b5a0e8c41",
"name": "Harbourside Dental",
"description": "Side gate code is on the key safe.",
"durationMinutes": 120,
"pricePence": 4500,
"fieldDefaults": {},
"checklist": [
{
"id": "8c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
"label": "text",
"instruction": "text",
"kind": "tick",
"unit": "text",
"options": [
"text"
],
"askComment": false,
"required": false,
"visibleToClients": false
}
],
"archived": false,
"inUse": -9007199254740991,
"fields": [
{
"id": "b7e6d5c4-3b2a-4190-8f7e-6d5c4b3a2918",
"entity": "client",
"templateId": "3f2a9c1e-6b4d-4e8a-9f1c-2d7b5a0e8c41",
"label": "text",
"slug": "example-slug",
"type": "text",
"options": [
"text"
],
"required": false,
"showInList": false,
"visibleToOperatives": false,
"visibleToClients": false,
"position": -9007199254740991,
"archived": false
}
]
}
]Add a booking template
POST/v1/booking-templates
- Permission
customFields.manage- Answers
201
Request body JSON
namestringrequired1–200 characters
descriptionstringoptionalcan be nullUp to 5000 characters
durationMinutesintegeroptionalcan be null1 to 10080
pricePenceintegeroptionalcan be null0 to 100000000
fieldDefaultsobjectoptionalchecklistarray of objectoptionalUp to 50 items
iduuidoptionallabelstringrequired1–200 characters
instructionstringoptionalcan be nullUp to 1000 characters
kindenumoptionalOne of
"tick","text","textarea","number","date","time","checkbox","select","photo"· Default"tick"unitstringoptionalcan be nullUp to 20 characters
optionsarray of stringoptionalUp to 30 items · Default
[]askCommentbooleanoptionalDefault
falserequiredbooleanoptionalDefault
falsevisibleToClientsbooleanoptionalDefault
false
Response object
iduuidrequirednamestringrequireddescriptionstringrequiredcan be nulldurationMinutesintegerrequiredcan be null-9007199254740991 to 9007199254740991
pricePenceintegerrequiredcan be null-9007199254740991 to 9007199254740991
fieldDefaultsobjectrequiredchecklistarray of objectrequirediduuidrequiredlabelstringrequiredinstructionstringrequiredcan be nullkindenumrequiredOne of
"tick","text","textarea","number","date","time","checkbox","select","photo"unitstringrequiredcan be nulloptionsarray of stringrequiredaskCommentbooleanrequiredrequiredbooleanrequiredvisibleToClientsbooleanrequired
archivedbooleanrequiredinUseintegerrequired-9007199254740991 to 9007199254740991
fieldsarray of objectrequirediduuidrequiredentityenumrequiredOne of
"client","project","booking","team_member"templateIduuidrequiredcan be nulllabelstringrequiredslugstringrequiredtypeenumrequiredOne of
"text","textarea","number","date","checkbox","select","address"optionsarray of stringrequiredrequiredbooleanrequiredshowInListbooleanrequiredvisibleToOperativesbooleanrequiredvisibleToClientsbooleanrequiredpositionintegerrequired-9007199254740991 to 9007199254740991
archivedbooleanrequired
curl -X POST "https://app.workscope.co.uk/v1/booking-templates" \
-H "Authorization: Bearer wsk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Harbourside Dental",
"description": "Side gate code is on the key safe.",
"durationMinutes": 120,
"pricePence": 4500,
"fieldDefaults": {},
"checklist": [
{
"id": "3f2a9c1e-6b4d-4e8a-9f1c-2d7b5a0e8c41",
"label": "text",
"instruction": "text",
"kind": "tick",
"unit": "text",
"options": [
"text"
],
"askComment": false,
"required": false,
"visibleToClients": false
}
]
}'Example response
{
"id": "3f2a9c1e-6b4d-4e8a-9f1c-2d7b5a0e8c41",
"name": "Harbourside Dental",
"description": "Side gate code is on the key safe.",
"durationMinutes": 120,
"pricePence": 4500,
"fieldDefaults": {},
"checklist": [
{
"id": "8c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
"label": "text",
"instruction": "text",
"kind": "tick",
"unit": "text",
"options": [
"text"
],
"askComment": false,
"required": false,
"visibleToClients": false
}
],
"archived": false,
"inUse": -9007199254740991,
"fields": [
{
"id": "b7e6d5c4-3b2a-4190-8f7e-6d5c4b3a2918",
"entity": "client",
"templateId": "3f2a9c1e-6b4d-4e8a-9f1c-2d7b5a0e8c41",
"label": "text",
"slug": "example-slug",
"type": "text",
"options": [
"text"
],
"required": false,
"showInList": false,
"visibleToOperatives": false,
"visibleToClients": false,
"position": -9007199254740991,
"archived": false
}
]
}Rename or archive a booking template
PATCH/v1/booking-templates/{id}
- Permission
customFields.manage- Answers
200
Parameters
| Name | In | Kind | |
|---|---|---|---|
id | path | uuidrequired |
Request body JSON
namestringoptional1–200 characters
descriptionstringoptionalcan be nullUp to 5000 characters
durationMinutesintegeroptionalcan be null1 to 10080
pricePenceintegeroptionalcan be null0 to 100000000
fieldDefaultsobjectoptionalchecklistarray of objectoptionalUp to 50 items
iduuidoptionallabelstringrequired1–200 characters
instructionstringoptionalcan be nullUp to 1000 characters
kindenumoptionalOne of
"tick","text","textarea","number","date","time","checkbox","select","photo"· Default"tick"unitstringoptionalcan be nullUp to 20 characters
optionsarray of stringoptionalUp to 30 items · Default
[]askCommentbooleanoptionalDefault
falserequiredbooleanoptionalDefault
falsevisibleToClientsbooleanoptionalDefault
false
archivedbooleanoptional
Response object
iduuidrequirednamestringrequireddescriptionstringrequiredcan be nulldurationMinutesintegerrequiredcan be null-9007199254740991 to 9007199254740991
pricePenceintegerrequiredcan be null-9007199254740991 to 9007199254740991
fieldDefaultsobjectrequiredchecklistarray of objectrequirediduuidrequiredlabelstringrequiredinstructionstringrequiredcan be nullkindenumrequiredOne of
"tick","text","textarea","number","date","time","checkbox","select","photo"unitstringrequiredcan be nulloptionsarray of stringrequiredaskCommentbooleanrequiredrequiredbooleanrequiredvisibleToClientsbooleanrequired
archivedbooleanrequiredinUseintegerrequired-9007199254740991 to 9007199254740991
fieldsarray of objectrequirediduuidrequiredentityenumrequiredOne of
"client","project","booking","team_member"templateIduuidrequiredcan be nulllabelstringrequiredslugstringrequiredtypeenumrequiredOne of
"text","textarea","number","date","checkbox","select","address"optionsarray of stringrequiredrequiredbooleanrequiredshowInListbooleanrequiredvisibleToOperativesbooleanrequiredvisibleToClientsbooleanrequiredpositionintegerrequired-9007199254740991 to 9007199254740991
archivedbooleanrequired
curl -X PATCH "https://app.workscope.co.uk/v1/booking-templates/ID" \
-H "Authorization: Bearer wsk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Harbourside Dental",
"description": "Side gate code is on the key safe.",
"durationMinutes": 120,
"pricePence": 4500,
"fieldDefaults": {},
"checklist": [
{
"id": "3f2a9c1e-6b4d-4e8a-9f1c-2d7b5a0e8c41",
"label": "text",
"instruction": "text",
"kind": "tick",
"unit": "text",
"options": [
"text"
],
"askComment": false,
"required": false,
"visibleToClients": false
}
],
"archived": false
}'Example response
{
"id": "3f2a9c1e-6b4d-4e8a-9f1c-2d7b5a0e8c41",
"name": "Harbourside Dental",
"description": "Side gate code is on the key safe.",
"durationMinutes": 120,
"pricePence": 4500,
"fieldDefaults": {},
"checklist": [
{
"id": "8c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
"label": "text",
"instruction": "text",
"kind": "tick",
"unit": "text",
"options": [
"text"
],
"askComment": false,
"required": false,
"visibleToClients": false
}
],
"archived": false,
"inUse": -9007199254740991,
"fields": [
{
"id": "b7e6d5c4-3b2a-4190-8f7e-6d5c4b3a2918",
"entity": "client",
"templateId": "3f2a9c1e-6b4d-4e8a-9f1c-2d7b5a0e8c41",
"label": "text",
"slug": "example-slug",
"type": "text",
"options": [
"text"
],
"required": false,
"showInList": false,
"visibleToOperatives": false,
"visibleToClients": false,
"position": -9007199254740991,
"archived": false
}
]
}Delete a booking template nothing uses (archive it otherwise)
DELETE/v1/booking-templates/{id}
- Permission
customFields.manage- Answers
200
Parameters
| Name | In | Kind | |
|---|---|---|---|
id | path | uuidrequired |
Response object
okconstantrequiredAlways
true
curl -X DELETE "https://app.workscope.co.uk/v1/booking-templates/ID" \
-H "Authorization: Bearer wsk_your_key_here"Example response
{
"ok": true
}The company's own fields on clients, projects and bookings (operatives get the booking fields marked for them)
GET/v1/custom-fields
- Permission
customFields.view- Answers
200
Parameters
| Name | In | Kind | |
|---|---|---|---|
entity | query | enum | One of client, project, booking, team_member |
templateId | query | uuid | |
archived | query | enum | One of true, false, all · Default "false" |
Response array of object
iduuidrequiredentityenumrequiredOne of
"client","project","booking","team_member"templateIduuidrequiredcan be nulllabelstringrequiredslugstringrequiredtypeenumrequiredOne of
"text","textarea","number","date","checkbox","select","address"optionsarray of stringrequiredrequiredbooleanrequiredshowInListbooleanrequiredvisibleToOperativesbooleanrequiredvisibleToClientsbooleanrequiredpositionintegerrequired-9007199254740991 to 9007199254740991
archivedbooleanrequired
curl "https://app.workscope.co.uk/v1/custom-fields" \
-H "Authorization: Bearer wsk_your_key_here"Example response
[
{
"id": "3f2a9c1e-6b4d-4e8a-9f1c-2d7b5a0e8c41",
"entity": "client",
"templateId": "8c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
"label": "text",
"slug": "example-slug",
"type": "text",
"options": [
"text"
],
"required": false,
"showInList": false,
"visibleToOperatives": false,
"visibleToClients": false,
"position": -9007199254740991,
"archived": false
}
]Add a field
POST/v1/custom-fields
- Permission
customFields.manage- Answers
201
Request body JSON
labelstringrequired1–100 characters
typeenumrequiredOne of
"text","textarea","number","date","checkbox","select","address"optionsarray of stringoptionalUp to 100 items · Default
[]requiredbooleanoptionalDefault
falseshowInListbooleanoptionalDefault
falsevisibleToOperativesbooleanoptionalvisibleToClientsbooleanoptionalDefault
falsepositionintegeroptional0 to 10000
entityenumrequiredOne of
"client","project","booking","team_member"templateIduuidoptionalcan be null
Response object
iduuidrequiredentityenumrequiredOne of
"client","project","booking","team_member"templateIduuidrequiredcan be nulllabelstringrequiredslugstringrequiredtypeenumrequiredOne of
"text","textarea","number","date","checkbox","select","address"optionsarray of stringrequiredrequiredbooleanrequiredshowInListbooleanrequiredvisibleToOperativesbooleanrequiredvisibleToClientsbooleanrequiredpositionintegerrequired-9007199254740991 to 9007199254740991
archivedbooleanrequired
curl -X POST "https://app.workscope.co.uk/v1/custom-fields" \
-H "Authorization: Bearer wsk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"label": "text",
"type": "text",
"options": [
"text"
],
"required": false,
"showInList": false,
"visibleToOperatives": false,
"visibleToClients": false,
"position": 0,
"entity": "client",
"templateId": "3f2a9c1e-6b4d-4e8a-9f1c-2d7b5a0e8c41"
}'Example response
{
"id": "3f2a9c1e-6b4d-4e8a-9f1c-2d7b5a0e8c41",
"entity": "client",
"templateId": "8c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
"label": "text",
"slug": "example-slug",
"type": "text",
"options": [
"text"
],
"required": false,
"showInList": false,
"visibleToOperatives": false,
"visibleToClients": false,
"position": -9007199254740991,
"archived": false
}Change a field (its type and slug stay), or archive it
PATCH/v1/custom-fields/{id}
- Permission
customFields.manage- Answers
200
Parameters
| Name | In | Kind | |
|---|---|---|---|
id | path | uuidrequired |
Request body JSON
labelstringoptional1–100 characters
optionsarray of stringoptionalUp to 100 items
requiredbooleanoptionalshowInListbooleanoptionalvisibleToOperativesbooleanoptionalvisibleToClientsbooleanoptionalpositionintegeroptional0 to 10000
archivedbooleanoptional
Response object
iduuidrequiredentityenumrequiredOne of
"client","project","booking","team_member"templateIduuidrequiredcan be nulllabelstringrequiredslugstringrequiredtypeenumrequiredOne of
"text","textarea","number","date","checkbox","select","address"optionsarray of stringrequiredrequiredbooleanrequiredshowInListbooleanrequiredvisibleToOperativesbooleanrequiredvisibleToClientsbooleanrequiredpositionintegerrequired-9007199254740991 to 9007199254740991
archivedbooleanrequired
curl -X PATCH "https://app.workscope.co.uk/v1/custom-fields/ID" \
-H "Authorization: Bearer wsk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"label": "text",
"options": [
"text"
],
"required": false,
"showInList": false,
"visibleToOperatives": false,
"visibleToClients": false,
"position": 0,
"archived": false
}'Example response
{
"id": "3f2a9c1e-6b4d-4e8a-9f1c-2d7b5a0e8c41",
"entity": "client",
"templateId": "8c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
"label": "text",
"slug": "example-slug",
"type": "text",
"options": [
"text"
],
"required": false,
"showInList": false,
"visibleToOperatives": false,
"visibleToClients": false,
"position": -9007199254740991,
"archived": false
}Delete a field nothing has a value for (archive it otherwise)
DELETE/v1/custom-fields/{id}
- Permission
customFields.manage- Answers
200
Parameters
| Name | In | Kind | |
|---|---|---|---|
id | path | uuidrequired |
Response object
okconstantrequiredAlways
true
curl -X DELETE "https://app.workscope.co.uk/v1/custom-fields/ID" \
-H "Authorization: Bearer wsk_your_key_here"Example response
{
"ok": true
}