The org’s standing: one banner, and the trial
const url = 'https://api.sloose.com/orgs/org_9f3c/billing/standing';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/orgs/org_9f3c/billing/standing \ --header 'Authorization: Bearer <token>'What the app bar says about the org, for whoever is asking: the one banner to show — suspended, a payment failed, over the plan, the trial ended, the trial ending in three days, AI credits running low, most serious first — or none; while a trial runs, when it ends; the AI credits available; and the zone its days are named in.
A suspension and being over the plan are said to every member, in the administrators’ words (with the way to settle it, or to see what is over) or everybody else’s. Over the plan is an enforced limit the org is past (over), where a move down or a trial’s end can leave it: connections past connections_max — adding one is refused, a reconnect never — or runs this period past runs_per_month, which refuses the next run. The other four are said to the owner and administrators only. The trial’s end is said for seven days after it. Two are dismissed, each by a person for themselves through POST …/billing/notices/{id}/ack: the three-day warning, for a day, and running low (credits_low, the one-click top-up, #298), for this shortfall.
Asking also checks the org’s credits against its one-click top-up number before answering (#1356): a shortfall reached by a path that tells nobody — a hold that lapsed, credits that expired — is raised then, and this answer carries its banner.
The owed invoice’s page (invoiceUrl) pays it with no sign-in, so it is handed only to the owner or an administrator through their own session — never to an org API token, whatever its role, nor to a staff member’s view, which are told the same banner without it.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The org id the session was issued for. A token for one org can never read another.
Example
org_9f3cThe org id the session was issued for. A token for one org can never read another.
Responses
Section titled “Responses”The org’s standing.
object
object
The administrators’ version, with the way to settle the account; false for everybody else, who are told an admin settles it and that dry runs still work.
The owed invoice’s own page at Stripe, where it is paid: https on invoice.stripe.com. Handed only to a person who may pay it — the owner or an administrator, through their own session; never an org API token, whatever its role, nor a staff member’s view. Null otherwise, or when no invoice is owed: then the way to settle is the Customer Portal.
Whether an invoice is owed that settles this — “Pay the invoice” — whether or not this bearer is handed its page (invoiceUrl). So a staff member’s view of an administrator is told it with no page, and shows the member’s button disabled. Only ever true on the administrators’ banner.
object
The plan a settled payment keeps.
It is settled before then.
The owed invoice’s own page at Stripe, where it is paid: https on invoice.stripe.com. Handed only to a person who may pay it — the owner or an administrator, through their own session; never an org API token, whatever its role, nor a staff member’s view. Null otherwise, or when no invoice is owed: then the way to settle is the Customer Portal.
Whether an invoice is owed that settles this — “Pay the invoice” — whether or not this bearer is handed its page (invoiceUrl). So a staff member’s view of an administrator is told it with no page, and shows the member’s button disabled. Only ever true on the administrators’ banner.
object
The administrators’ version, with the way to see what is over; false for everybody else, who are told the org is over its plan and that an administrator can sort it out.
The plan the org is on, which it is over.
Each enforced limit the org is past, connections then runs, as the billing summary’s overPlan names them.
object
object
The plan the org is on now: Free.
Its runs a month; null is unlimited.
object
Dismissed through its notice, which quiets it for a day, for the one person.
The plan being trialled.
A trial Stripe runs, which becomes the plan by itself when it ends; false for the org’s own trial, which ends in Free unless a plan is chosen.
object
Dismissed through its notice, for the one person and this shortfall: the next time the balance falls below the threshold is a new notice.
The AI credits the org holds, included and purchased, whatever calls in flight have reserved: what is short is judged on these.
The number the org chose to be told below (one-click top-up).
The pack whose Checkout the banner’s button opens — the one chosen, else the smallest on sale. Null when none can be bought on this deployment: the banner then points at Usage & credits.
object
While a trial runs: when it ends. For every member.
object
object
The zone the banner’s days and times are named in, as its emails name them: the org’s own (Settings → General), or UTC when it has none.
Example
{ "banner": { "kind": "suspended" }}No bearer, or one that is expired, revoked or no longer resolves to a member.
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 bearer’s role is too low, or it was issued for a different org.
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"}