Skip to content

Start from a starter set

POST
/asset-starter-sets/{set}
curl --request POST \
--url https://example.com/asset-starter-sets/medical_oxygen \
--header 'Content-Type: application/json' \
--cookie __Host-bottle.session_token=<__Host-bottle.session_token> \
--data '{ "workReport": "replace" }'

Adds the set’s cylinder details, skipping any the business already has by that name, and sets the work report’s job types, checks and statements. When the business has changed those from a starter set, it answers 409 starterSetWorkReportChanged and changes nothing, unless workReport says to replace or keep them. Applying the set the business already has changes nothing. Needs both tenant:write and stock:write. Each can be changed or removed afterwards.

set
required

Medical_oxygen: serial, batch, fill and expiry dates; Install, Refill, Return and Service. industrial_gas: serial, next test due, tare weight, batch and fill date; Delivery, Exchange, Collection and Service.

string
Allowed values: medical_oxygen industrial_gas

Medical_oxygen: serial, batch, fill and expiry dates; Install, Refill, Return and Service. industrial_gas: serial, next test due, tare weight, batch and fill date; Delivery, Exchange, Collection and Service.

Media typeapplication/json
object
workReport
string
Allowed values: replace keep

Every cylinder detail afterwards, and what happened to the work report

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

UUID v7

string format: uuid
name
required
string
valueType
required

Text: letters, numbers and symbols, kept exactly as typed. date: a calendar day.

string
Allowed values: text date
lifetime
required

Cylinder: stays the same for the cylinder’s life, such as its serial number. fill: new each time it is refilled, such as its batch number.

string
Allowed values: cylinder fill
unique
required
boolean
required
required

Always: every cylinder must have it. when_full: only a full cylinder, such as a batch number. never: optional.

string
Allowed values: always when_full never
shownAs
required

Sticker: printed text. barcode: a barcode or QR code. stamped: stamped into the metal. not_on_cylinder: typed in. other: described in shownAsOther, and typed in.

string
Allowed values: sticker barcode stamped not_on_cylinder other
shownAsOther
required
string | null
pattern
required
string | null
hint
required
string | null
warnAmount
required
integer | null
warnUnit
required
string | null
Allowed values: days weeks months years
pastAction
required

Warn: the driver is warned and the office told. block: the driver cannot deliver it. nothing: no action.

string | null
Allowed values: warn block nothing
position
required
integer
workReport
required
string
Allowed values: set kept

Example

{
"items": [
{
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"name": "Serial number",
"valueType": "text",
"lifetime": "cylinder",
"required": "always",
"shownAs": "sticker",
"warnUnit": "days",
"pastAction": "warn"
}
],
"workReport": "set"
}

Not signed in

Media typeapplication/json
object
error
required
string
message
required
string

Example

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

Missing scope or role, or the plan does not open Assets

Media typeapplication/json
object
error
required
string
message
required
string

Example

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

Not found, or Assets is not available to this business

Media typeapplication/json
object
error
required
string
message
required
string

Example

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

Assets is switched off, another cylinder already has that detail, or a batch release needs confirming

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"
}
]
}