Start from a servicing starter set
const url = 'https://example.com/service-starter-sets/medical_oxygen';const options = { method: 'POST', headers: {cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”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.
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.
Responses
Section titled “Responses”Every item type and plan afterwards
object
object
UUID v7
object
UUID v7
object
UUID v7
Last_service: the next date counts from the day the service was done. anniversary: the dates stay fixed from the first one.
Day: due on the date. month: due within the month; the date held is the 1st of the month.
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.
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
object
Example
{ "error": "not_found", "message": "Customer not found"}Not an owner or admin, missing scope, or the plan does not open Equipment servicing
object
Example
{ "error": "not_found", "message": "Customer not found"}Not found, or Equipment servicing is not available to this business
object
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
object
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
object
object
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}