The workspace's billing
const url = 'https://api.pealboard.com/v1/billing';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.pealboard.com/v1/billing \ --header 'Authorization: Bearer <token>'The standing, the plan, what the plan includes and what the workspace is using, and the plan table itself so a client does not repeat the prices. standing is the only field that decides anything: only lapsed refuses a write.
Access. Requires the admin role or above (admin, owner). The plan, what it includes and how much of it the workspace is using is what an administrator needs before they decide anything about it. API-key scope: workspace:read.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The billing.
object
Only lapsed refuses a write, with a 402. past_due still writes: Stripe is retrying and moves it on when it gives up.
A workspace may take the 14-day trial once.
Owners, admins and members. Viewers are free.
What Stripe is currently charging for.
object
object
object
object
Example
{ "standing": "free", "plan": "free", "interval": "monthly", "plans": [ { "id": "free" } ]}No valid credentials.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}Authenticated, but not permitted.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}No such resource, or it is not visible to you.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}The request conflicts with the current state.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}The request did not match the expected shape.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}Rate limited. Retry after the interval in the header.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}GitHub or another dependency refused or did not answer. Nothing in the workspace changed.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}