Get work report settings
const url = 'https://example.com/work-report/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/work-report/settings \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token>Whether work reports are on, who they are emailed to, which stops get one, the next report number, what the customer agrees to and what the driver must record. The first time any business reads this, Bottle adds the starting job types (Install, Refill, Return, Service) and checks (Condition, Gauge, Leaks) and saves the settings with their defaults. This happens once; removing them later does not bring them back.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The settings
object
Main_contact: the customer’s main contact. everyone: every contact on the account. ask_driver: the driver picks at the stop.
Tracked: stops where a tracked cylinder is delivered or collected. every: every stop.
object
Example
{ "emailTo": "main_contact", "sendAfter": "tracked"}Not signed in
object
Example
{ "error": "not_found", "message": "Customer not found"}Not an owner or admin, 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 the business already has 50 job types or checks
object
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
object
object
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}