Skip to content

List plan versions and credit packs

GET
/billing/admin/plans
curl --request GET \
--url https://api.sloose.com/billing/admin/plans \
--header 'Authorization: Bearer <token>'

Backoffice route: a staff session, or ADMIN_TOKEN; never a customer’s session. Every plan version, grandfathered ones included, with the Stripe ids attached to each.

The catalogue as stored.

Media typeapplication/json
object
plans
required
Array<object>
object
key
additional properties
packs
required
Array<object>
object
key
additional properties
Examplegenerated
{
"plans": [
{
"additionalProperty": "example"
}
],
"packs": [
{
"additionalProperty": "example"
}
]
}

A bearer that is neither the token nor a live session (code: AUTH_REQUIRED).

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"
}

A customer’s session, an API token, or no bearer at all — not staff, and not the ADMIN_TOKEN (code: ADMIN_REQUIRED).

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"
}