Switch Assets or Equipment servicing on or off
const url = 'https://example.com/business-settings';const options = { method: 'PATCH', headers: { cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"assetsEnabled":true,"servicingEnabled":true}'};
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/business-settings \ --header 'Content-Type: application/json' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token> \ --data '{ "assetsEnabled": true, "servicingEnabled": true }'Send only what changes. Refused with 403 plan_locked on a plan without the feature. Assets cannot be switched off while any product is set to track individual cylinders: 409 assets_in_use names them. Switching off hides the screens and keeps every record.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Example generated
{ "assetsEnabled": true, "servicingEnabled": true}Responses
Section titled “Responses”Saved
object
object
Whether products can be tracked one cylinder at a time. On unless the business switches it off. Nothing changes on screen until a product is tracked.
Whether drivers and yard staff can record cylinders with the phone’s camera. Set by Bottle once the business’s cylinders have been tested.
Whether the business keeps service dates for the equipment its customers have. Off unless switched on.
Hidden: not available to this business. locked: needs a bigger plan. off: available, and switched off. on: in use.
Hidden: not available to this business. locked: needs a bigger plan. off: available, and switched off. on: in use.
object
Example
{ "assets": "hidden", "servicing": "hidden"}Not signed in
object
Example
{ "error": "not_found", "message": "Customer not found"}Not an owner or admin, or the plan does not open this
object
Example
{ "error": "not_found", "message": "Customer not found"}Not available to this business
object
Example
{ "error": "not_found", "message": "Customer not found"}Assets cannot be switched off while products are tracked
object
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
object
object
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}