Skip to content

Change a cylinder detail

PATCH
/asset-references/{id}
curl --request PATCH \
--url https://example.com/asset-references/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f \
--header 'Content-Type: application/json' \
--cookie __Host-bottle.session_token=<__Host-bottle.session_token> \
--data '{ "name": "example", "valueType": "text", "lifetime": "cylinder", "unique": true, "required": "always", "shownAs": "sticker", "shownAsOther": "example", "pattern": "example", "hint": "example", "warnAmount": 1, "warnUnit": "days", "pastAction": "warn" }'

Renaming keeps every value recorded under the detail. A new format applies to values recorded from now on; existing values are kept as they are.

id
required

UUID v7

string format: uuid

Example

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

UUID v7

Media typeapplication/json
object
name
string
>= 1 characters <= 60 characters
valueType

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

string
Allowed values: text date
lifetime

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
boolean
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

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
string | null
<= 120 characters
pattern
string | null
<= 200 characters
hint
string | null
<= 200 characters
warnAmount
integer | null
<= 3650
warnUnit
string | null
Allowed values: days weeks months years
pastAction

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

Saved

Media typeapplication/json
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

Example

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

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, or another cylinder already has that detail

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