The organization’s plan, its limits and current usage
GET
/api/v1/organizations/{organizationId}/subscription
const url = 'https://api.crossmart.io/api/v1/organizations/example/subscription';const options = { method: 'GET', headers: {cookie: 'better-auth.session_token=<better-auth.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://api.crossmart.io/api/v1/organizations/example/subscription \ --cookie better-auth.session_token=<better-auth.session_token>For people holding billing:view (owners and admins) in a workspace of the organization; others in it get 403, and outsiders 404. Usage is counted across all of its workspaces. Needs a signed-in user.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”organizationId
required
string
Responses
Section titled “Responses”Media typeapplication/json
object
organizationId
required
string format: uuid
plan
required
object
code
required
Stable identifier of the plan
string
name
required
string
version
required
The plan version the organization is on; later versions never change it
number
status
required
string
currentPeriodEnd
required
When the paid period ends; null until billing is connected
string format: date-time
enforced
required
Whether limits block actions here (402), or are only reported
boolean
features
required
Every feature, with what the plan allows and what is in use
Array<object>
object
feature
required
string
kind
required
A counted limit, or a flag the plan turns on or off
string
enabled
required
Whether the plan includes the feature at all
boolean
limit
required
How many the plan allows; null is unlimited, 0 is not included
number
usage
required
How many are in use now, across the organization; null for flags
number
Example
{ "plan": { "code": "growth", "name": "Growth", "version": 1 }, "status": "ACTIVE", "features": [ { "feature": "active_listings", "kind": "limit" } ]}