Every open request to pay by invoice
const url = 'https://api.sloose.com/billing/admin/invoice-requests';const options = {method: 'GET', headers: {Authorization: 'Bearer <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://api.sloose.com/billing/admin/invoice-requests \ --header 'Authorization: Bearer <token>'Backoffice route: a staff session, or ADMIN_TOKEN; never a customer’s session. The staff-wide queue (#1337): every organisation’s open request, oldest first, a hundred at most, with the organisation it is from. A request whose mail never arrived is found here too. One from an organisation billed by invoice already is closed billed as it is read.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The open requests.
object
object
Example
{ "requests": [ { "status": "open" } ]}A bearer that is neither the token nor a live session (code: AUTH_REQUIRED).
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}A customer’s session, an API token, or no bearer at all — not staff, and not the ADMIN_TOKEN (code: ADMIN_REQUIRED).
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}The restore switch is on (code: MAINTENANCE): every route but /health and /robots.txt is refused before anything is read, except the operator’s own POST /staff/people/{id}/delete with the ADMIN_TOKEN. Sloose is down for maintenance. Please try again in a few minutes.
object
Example
{ "code": "MAINTENANCE"}Headers
Section titled “Headers”Seconds until asking again is worth it (300 while the switch is on).