Read Assets and Equipment servicing settings
const url = 'https://example.com/business-settings';const options = { method: 'GET', headers: {cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/business-settings \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token>Whether Assets and Equipment servicing are switched on, and where each stands for this business: hidden, locked behind a bigger plan, off or on.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The settings
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" } ]}