Skip to content

Start from a servicing starter set

POST
/service-starter-sets/{set}
curl --request POST \
--url https://example.com/service-starter-sets/medical_oxygen \
--cookie __Host-bottle.session_token=<__Host-bottle.session_token>

Adds the set’s item types and service plans, skipping any the business already has by that name. Applying it again changes nothing. Each can be changed or removed afterwards.

set
required

Medical_oxygen: oxygen kits, stand alone cylinders and regulators on an annual inspection. industrial_gas: regulators, manifolds and flashback arrestors on an annual inspection, with regulators and arrestors replaced every five years.

string
Allowed values: medical_oxygen industrial_gas

Medical_oxygen: oxygen kits, stand alone cylinders and regulators on an annual inspection. industrial_gas: regulators, manifolds and flashback arrestors on an annual inspection, with regulators and arrestors replaced every five years.

Every item type and plan afterwards

Media typeapplication/json
object
itemTypes
required
Array<object>
object
id
required

UUID v7

string format: uuid
name
required
string
fields
required
Array<object>
object
id
required

UUID v7

string format: uuid
name
required
string
valueType
required
string
Allowed values: text date
required
required
boolean
unique
required
boolean
pattern
required
string | null
hint
required
string | null
itemCount
required
integer
plans
required
Array<object>
object
id
required

UUID v7

string format: uuid
name
required
string
intervalMonths
required
integer
nextFrom
required

Last_service: the next date counts from the day the service was done. anniversary: the dates stay fixed from the first one.

string
Allowed values: last_service anniversary
dueRule
required

Day: due on the date. month: due within the month; the date held is the 1st of the month.

string
Allowed values: day month
startFrom
required

What the first due date counts from. installed: the item’s installed date. field: the item’s date detail named in startField. entered: a date typed in when the plan is given to the item.

string
Allowed values: installed field entered
startField
required
string | null
itemTypeIds
required
Array<string>
itemCount
required
integer

Example

{
"itemTypes": [
{
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"name": "Regulator",
"fields": [
{
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"name": "Serial number",
"valueType": "text"
}
]
}
],
"plans": [
{
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"name": "Annual inspection",
"intervalMonths": 12,
"nextFrom": "last_service",
"dueRule": "day",
"startFrom": "installed",
"itemTypeIds": [
"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"
]
}
]
}

Not signed in

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Not an owner or admin, missing scope, or the plan does not open Equipment servicing

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Not found, or Equipment servicing is not available to this business

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Equipment servicing is switched off, other equipment already has that detail, or the cylinder already has servicing set up

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Validation failed

Media typeapplication/json
object
error
required
string
Allowed values: validation
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string

Example

{
"error": "validation",
"issues": [
{
"path": "email",
"message": "Invalid email"
}
]
}