Change a cylinder detail
const url = 'https://example.com/asset-references/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f';const options = { method: 'PATCH', headers: { cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"name":"example","valueType":"text","lifetime":"cylinder","unique":true,"required":"always","shownAs":"sticker","shownAsOther":"example","pattern":"example","hint":"example","warnAmount":1,"warnUnit":"days","pastAction":"warn"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Request Bodyrequired
Section titled “Request Bodyrequired”object
Text: letters, numbers and symbols, kept exactly as typed. date: a calendar day.
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.
Always: every cylinder must have it. when_full: only a full cylinder, such as a batch number. never: optional.
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.
Warn: the driver is warned and the office told. block: the driver cannot deliver it. nothing: no action.
Responses
Section titled “Responses”Saved
object
UUID v7
Text: letters, numbers and symbols, kept exactly as typed. date: a calendar day.
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.
Always: every cylinder must have it. when_full: only a full cylinder, such as a batch number. never: optional.
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.
Warn: the driver is warned and the office told. block: the driver cannot deliver it. nothing: no action.
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
object
Example
{ "error": "not_found", "message": "Customer not found"}Missing scope or role, or the plan does not open Assets
object
Example
{ "error": "not_found", "message": "Customer not found"}Not found, or Assets is not available to this business
object
Example
{ "error": "not_found", "message": "Customer not found"}Assets is switched off, or another cylinder already has that detail
object
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
object
object
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}