Skip to content

The billing page in one call

GET
/orgs/{org}/billing/summary
curl --request GET \
--url https://api.sloose.com/orgs/org_9f3c/billing/summary \
--header 'Authorization: Bearer <token>'

Subscription, plan, limits, balance, usage, open notices and the purchasable credit packs.

org
required

The organisation id the session was issued for. A token for one organisation can never read another.

string
Example
org_9f3c

The organisation id the session was issued for. A token for one organisation can never read another.

The organisation’s billing state.

Media typeapplication/json

Everything the billing page renders, in one call.

object
stripeConfigured
required

False on a deployment without Stripe keys; the UI hides purchase paths.

boolean
subscription
required
object
status
required
string | null
Allowed values: free trialing active past_due suspended cancelled
interval
required
string | null
collectionMethod
required
string | null
currentPeriodStart
required
string | null
currentPeriodEnd
required
string | null
cancelAtPeriodEnd
required
boolean
trialEnd
required
string | null
graceEndsAt
required
string | null
suspendedAt
required
string | null
dataRetainedUntil
required
string | null
historyHeldUntil
required

Until when a change of plan holds the organisation’s history (#330): for thirty days after the plan last changed, nothing past the plan’s history_days is retired — runs, AI conversations or imports — so a move down never takes what the organisation already had that night. Null when no change of plan holds anything now. A suspension’s own date is dataRetainedUntil.

string | null
hasStripeCustomer
required
boolean
hasSubscription
required
boolean
hadTrial
required

Whether this organisation has had its trial — one per organisation, running or over. No trial is offered after one (#729).

boolean
viewerHadTrial
required

Whether the person asking has had their one trial in ANOTHER organisation (#2381): one a person, so this owner’s Start trial would be refused PERSON_ALREADY_TRIALED, and Plan offers none. False for an API token, which is no person.

boolean
trialCredits
required

The AI credits the trial running now granted, once, for its whole length; null when none is running. What Plan says beside the plan’s monthly credits (#1460): a trial of Business is not Business’s month.

number | null
plan
required
object
key
required
string | null
Allowed values: free team business enterprise
name
required
string
version
required
number
priceMonthlyCents
required
number | null
priceAnnualCents
required
number | null
currency
required
string
limits
required
object
crm_users_max
required

CRM users allowed to use the widget; null = unlimited.

number | null
connections_max
required

Connections the organisation may hold — a sandbox is a connection like any other; null = unlimited. A file is not one.

number | null
runs_per_month
required

Import runs per period, each counted once at the first row it sends to be written, whether or not the CRM takes that row; null = unlimited (fair use). Dry runs never count, and neither does a free retry (Retry failed of a run with failed rows, at most three in a row, each spent at its first admitted row: one that ends having admitted none is given back) while the rows it writes are its chain’s: one that writes a row new to its chain past the rows the chain was counted for is counted at that row. This is judged by key only while the chain’s keys are kept: a day after the chain last ran, or for a chain begun before keys were kept, a link’s rows are judged by the count it declared instead, as they were before, and no run is counted at a later row.

number | null
runs_concurrent

Imports that may be running in the organisation at once, dry runs aside; null or absent = no limit. A run past it is refused at authorise with LIMIT_RUNS_CONCURRENT.

number | null
rows_per_run
required

The most rows one import set may declare. Checked before anything is written.

number
rows_per_month
required

Server-side runs only. Browser runs are never refused on it.

number
row_overage_per_1000
required

USD per 1,000 rows beyond rows_per_month, server-side runs only; null = not offered.

number | null
schedules_max
required
number
history_days
required
number
ai_credits_monthly
required
number
files_bytes

Bytes of uploaded files the organisation may hold at once; null = no limit, absent = the plan offers no files. Checked when an upload is reserved: past it, only NEW uploads are refused, with LIMIT_FILES_BYTES; nothing stored is deleted early.

number | null
files_keep_days

Days a stored file is kept after its last use (a run that used it, naming it in a sheet, or its upload); absent = the longest any plan keeps one.

number
features
required
object
shared_templates
required
boolean
helper_libraries
required
boolean
server_run
required
boolean
mcp
required
boolean
rollback
required
boolean
scheduled_imports
required
boolean
monthlyCredits
required

The AI credits a paid month of this plan version grants, before any staff override: what an invoice grants (limits carries the organisation’s resolved allowance, overrides applied). What Usage & credits names beside a trial’s own grant (#1560).

number
scheduledPlan
required

A plan change that takes effect at the next renewal.

object
key
required
string | null
Allowed values: free team business enterprise
name
required
string
interval
required

The interval it bills from the renewal; null when it is not known. A move from a year to a month on the same plan names that plan, and this says what changes (#1310).

string | null
Allowed values: month year
price
required

Its list price on that interval, in the currency’s smallest unit, before tax: what Plan says it moves to (#330 PR 3b). Null when the interval is not known.

number | null
currency
required
string
overage
required
object
offered
required

Whether the plan offers overage at all.

boolean
enabled
required
boolean
perThousand
required
number | null
lowBalance
required
object
enabled
required

Whether the owner and administrators are told — a credits_low notice and its mail — when the credits the organisation holds (included and purchased) fall below threshold. Nothing is ever charged by it: the notice links to the pack, whose Checkout offers again a card a buyer chose to save with an earlier pack.

boolean
threshold
required

Tell them when the credits the organisation holds fall below this.

number
thresholdMost
required

The most a threshold may be: what a page bounds its box by.

number
packKey
required

The pack the notice offers; null is the smallest on sale — and so is a pack chosen before that is no longer on sale, which reads as null.

string | null
balance
required

AI credits. Included credits reset each period; purchased ones do not.

object
included
required
number
purchased
required
number
reserved
required
number
available
required

Included + purchased − reserved

number
periodStart
required
string
periodEnd
required
string
usage
required
object
periodStart
required
string
periodEnd
required
string
rowsWritten
required
number
rowsOverage
required
number
creditsUsed
required
number
runs
required

Runs counted this period, through any of the organisation’s connections: each once, at the first row it sent to be written, whether or not the CRM took that row.

number
term
required

An annual subscription is metered in months of its term (#1369), and usage is this month: this is the term so far, every month of it summed. Null for a monthly one, whose month is its period.

object
start
required
string
end
required
string
runs
required
number
rowsWritten
required
number
creditsUsed
required
number
counts
required

What the organisation holds against its plan (#552): its connections as connections_max counts them — distinct tenants, active and the organisation’s — and the size of its largest connected CRM against crm_users_max, which is a warning (LIMIT_CRM_USERS), never a limit.

object
connections
required
object
used
required
number
max
required

Null is unlimited.

number | null
crmUsers
required
object
used
required

Active users of the largest connected CRM; null when no connection has said.

number | null
max
required
number | null
files
required

Files stored (“Files in Sloose”, #2441), against the plan.

object
usedBytes
required

Bytes of uploaded files held now: each stored file’s real size and each reserved upload’s declared size.

number
maxBytes
required

What the plan stores at once; null = no limit, 0 = the plan offers no files. Past it only NEW uploads are refused (LIMIT_FILES_BYTES); nothing stored is deleted early. Never counted as over the plan.

number | null
removedBytes
required

Of usedBytes, the bytes of files that were removed (or whose import ended) and that the sweep has not yet deleted. They still count until they are deleted, up to keepDays after their last use.

number
freeBy
required

When the last of the removed files frees its space: the later of its due date and the end of a hold; null when none is removed.

string | null
heldUntil
required

Until when a change of plan or a suspension’s promise holds every file, so that nothing is deleted before; null when no hold is in force.

string | null
keepDays
required

The days after its last use the plan keeps a file: how long a removed one can take to free its space.

number | null
overPlan
required

Each enforced limit the organisation is past, connections then runs (#330): a move down, or a trial’s end, may leave an organisation holding more than its plan allows, and only what would grow it is refused. Empty when nothing is over. CRM users are never over: theirs is a warning.

Array<object>
object
limit
required
string
Allowed values: connections runs
used
required
number
max
required
number
warnings
required
Array<string>
Allowed values: LIMIT_ROWS LIMIT_RUNS LIMIT_RUNS_CONCURRENT LIMIT_ROWS_PER_RUN LIMIT_CONNECTORS LIMIT_SCHEDULES LIMIT_CRM_USERS LIMIT_FILES_BYTES LIMIT_FILE_SIZE FEATURE_SHARED_TEMPLATES FEATURE_HELPER_LIBRARIES FEATURE_SERVER_RUN FEATURE_MCP FEATURE_ROLLBACK FEATURE_SCHEDULED_IMPORTS CREDITS_EXHAUSTED STATUS_SUSPENDED STATUS_PAST_DUE
notices
required

The notices shown now, to whoever is asking: open, not dismissed by them (the three-day warning of a trial’s end comes back a day after it is), and still true of the organisation. Each names the settings page it is shown on — the page its email names — and whether it may be dismissed.

Array<object>

A notice as it is shown: these fields and no others. What the product keeps to act on a notice is not handed on — a failed payment’s invoice page included, which the organisation’s standing gives only to a person who may pay it.

object
id
required
string
orgId
required
string
kind
required
string
createdAt
required
string
acknowledgedAt
required

When the person asking dismissed it, or null: dismissing is each person’s own (#729).

string | null
resolvedAt
required
string | null
page
required

The settings page the notice is shown on, which is the page its email names (Plan, or Usage & credits).

string
Allowed values: plan usage
dismissible
required

Whether a person may dismiss it. The trial’s end is not dismissed but said on Plan for as long as it is true.

boolean
refunded

On a closed dispute only: the payment had also been refunded, whole or in part, and the refund took the credits it asked for.

string
Allowed values: whole part
creditPacks
required
Array<object>
object
key
required
string
name
required
string
credits
required
number
priceCents
required
number
currency
required
string
purchasable
required

False until the pack has a Stripe price attached.

boolean
invoiceRequest
required
Any of:
object
id
required
string
status
required
string
Allowed values: open billed declined
billingEntity
required
string
country
required
string
taxId
required
string | null
poNumber
required
string | null
currency
required
string
createdAt
required
string
decidedAt
required
string | null
timeZone
required

The zone the notices’ deadlines are named in, as their emails and the organisation’s banner name them: the organisation’s own (Settings → General), or UTC when it has none.

string
invoiceRequestsMade
required

How many requests to pay by invoice the organisation has made, counted in the statement that found invoiceRequest (#1478). A page holding this summary compares it with the request’s own place, which the answer to POST …/billing/invoice-request carries (#1532), to know which of the two was read first: fewer, and this summary was read before that request was made; as many, after it, with invoiceRequest saying whether it still waits; more, after another was made since.

integer
Example
{
"subscription": {
"status": "free"
},
"plan": {
"key": "free"
},
"scheduledPlan": {
"key": "free",
"interval": "month"
},
"overPlan": [
{
"limit": "connections"
}
],
"warnings": [
"LIMIT_ROWS"
],
"notices": [
{
"page": "plan",
"refunded": "whole"
}
],
"invoiceRequest": {
"status": "open"
}
}

No bearer, or one that no longer resolves: a session that is unknown or expired (code: AUTH_REQUIRED), or an API token that was revoked or expired (TOKEN_REVOKED, TOKEN_EXPIRED), whose organisation is gone (ORG_NOT_FOUND) or whose member or user row is (MEMBERSHIP_GONE).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

The bearer’s role is too low (code: ROLE_REQUIRED), or it was issued for a different organisation; the organisation has been closed (code: ORG_CLOSED, either kind of bearer); the person is banned (code: BANNED, a session); or it is a session that is signed in but in no organisation (code: NO_ORG): one that never joined one, or whose person was taken out of the one it was in, or left it. Signing in again changes nothing for NO_ORG; choosing or making an organisation does.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
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.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed value: MAINTENANCE
Example
{
"code": "MAINTENANCE"
}
Retry-After
integer

Seconds until asking again is worth it (300 while the switch is on).

Report a problem with this page

sloose.com