Download expiry dates as CSV
const url = 'https://example.com/asset-reports/expiring.csv?productId=019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f';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/asset-reports/expiring.csv?productId=019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token>Cylinders whose dates the business warns about (a date detail with a warning or an action when it passes, such as the expiry date) have passed or fall within that detail’s warning, 30 days when it has none. Past dates first, then the soonest, with days left from today in London. Lost and retired cylinders are left out. Up to 500, with truncated set when there are more; the CSV has them all. One line per cylinder and date. UTF-8 with a byte order mark and CRLF line ends. Any text cell a spreadsheet would run as a formula has a ' put in front.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Only cylinders of this product. Every tracked product when left out.
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fOnly cylinders of this product. Every tracked product when left out.
Responses
Section titled “Responses”The CSV file
Not signed in
object
Example
{ "error": "not_found", "message": "Customer not found"}Not an owner or admin, missing scope, or the plan does not open Assets
object
Example
{ "error": "not_found", "message": "Customer not found"}Assets is not available to this business
object
Example
{ "error": "not_found", "message": "Customer not found"}Assets is switched off
object
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
object
object
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}