Skip to content

Change equipment

PATCH
/service-items/{id}
curl --request PATCH \
--url https://example.com/service-items/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f \
--header 'Content-Type: application/json' \
--cookie __Host-bottle.session_token=<__Host-bottle.session_token> \
--data '{ "typeId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "deliveryAddressId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "serial": "example", "installedOn": "2026-03-01", "details": { "additionalProperty": "example" }, "notes": "example", "plans": [ { "planId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "startOn": "2026-03-01", "nextDueOn": "2026-03-01" } ] }'

Values left out stay as they are. plans, when given, is every plan the equipment is on: plans it already had keep their due dates unless startOn or nextDueOn is given, which is kept in the history as a change by hand. New ones count from the date the plan names. Plans left out stop, and so do plans that no longer cover the item type. Changing the item type drops details that are not on the new type.

id
required

UUID v7

string format: uuid

Example

019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f

UUID v7

Media typeapplication/json
object
typeId

UUID v7

string format: uuid

Example

019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f
deliveryAddressId

UUID v7

string | null format: uuid

Example

019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f
productId

UUID v7

string | null format: uuid

Example

019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f
serial
string | null
<= 100 characters
installedOn
string | null format: date

Example

2026-03-01
details
object
key
additional properties
string
<= 100 characters
notes
string | null
<= 1000 characters
plans
Array<object>
<= 20 items
object
planId
required

UUID v7

string format: uuid

Example

019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f
startOn
string | null format: date

Example

2026-03-01
nextDueOn
string | null format: date

Example

2026-03-01

Changed

Media typeapplication/json
object
id
required

UUID v7

string format: uuid
type
required
object
id
required

UUID v7

string format: uuid
name
required
string
kind
required
string
Allowed values: customer asset
customerId
required

UUID v7

string | null format: uuid
deliveryAddress
required
object
id
required

UUID v7

string format: uuid
label
required
string
asset
required
object
id
required

UUID v7

string format: uuid
productName
required
string
serial
required
string | null
product
required
object
id
required

UUID v7

string format: uuid
name
required
string
serial
required
string | null
installedOn
required
string | null format: date
details
required
object
key
additional properties
string
notes
required
string | null
schedules
required
Array<object>
object
id
required

UUID v7

string format: uuid
planId
required

UUID v7

string format: uuid
planName
required
string
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
nextDueOn
required
string format: date
lastDoneOn
required
string | null format: date
overdue
required
boolean
changes
required
Array<object>
object
from
required
string format: date
to
required
string format: date
at
required
string format: date-time
byName
required
string | null
note
required
string | null
notDone
required
object
on
required
string format: date
reason
required

Not_in: the customer was not in. item_missing: the item was not there. failed: it failed the service. other: said in the note.

string
Allowed values: not_in item_missing failed other
note
required
string | null
orderId
required

UUID v7

string | null format: uuid

Example

{
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"type": {
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"
},
"kind": "customer",
"customerId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"deliveryAddress": {
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"
},
"asset": {
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"
},
"product": {
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"
},
"installedOn": "2026-03-01",
"schedules": [
{
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"planId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"dueRule": "day",
"nextDueOn": "2026-03-01",
"lastDoneOn": "2026-03-01",
"changes": [
{
"from": "2026-03-01",
"to": "2026-03-01"
}
],
"notDone": {
"on": "2026-03-01",
"reason": "not_in",
"orderId": "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"
}
]
}