Show agency billing

GET /agencies/{agencyId}/billing

GET https://zanpki.com/agencies/{agencyId}/billing

Operation ID agencies.agencyId.billing.get
Access Browser session signed in through ZanAuth, using the access token cookie alongside its ID token and refresh token cookies. Or: An access token issued for this site by its ZanAuth issuer, or a static key.

Parameters

NameInTypeDescription
agencyId Path Required string (snowflake) Agency ID.

Responses

StatusDescriptionSchemaContent type
200 The agency's billing status and organizations. B2bAgencyBillingPage application/json, text/html, text/markdown
403 Your roles here do not allow this. Problem application/json, text/html, text/markdown
422 The request input was rejected. The errors object lists each validation failure. ValidationProblem application/json, text/html, text/markdown
Any other status The request was rejected. The problem type identifies the error, and the detail field provides a human-readable explanation. Problem application/json, text/html, text/markdown

200 The agency's billing status and organizations.

PropertyTypeDescription
agency_id string (snowflake) Required The agency's ID.
agency_name string Required The agency's display name.
pricing_summary string Required Summary of the site's paid plan pricing.
organizations list of B2bBillingOrganizationLine Required Organizations in this agency and their billing coverage.
organization_count integer (int64) Required Total number of organizations in this agency.
paid_organization_count integer (int64) Required Number of organizations covered by a paid subscription.
granted_organization_count integer (int64) Required Number of organizations with operator-granted paid access.
billing_url string, or null Optional URL of the hosted billing portal for this agency.
renewing boolean Required Whether the agency's paid subscription is set to renew.
current_period_end integer (int64), or null Optional Unix timestamp when the current billing period ends.
billing_available boolean Required Whether the agency's billing details could be loaded. When false, each organization's plan is unknown and billing_url is null.
paid_plan_on_sale boolean Required Whether the Paid plan can be bought for this agency now. While it can't and nothing is paid, the page shows no paid count.
in_demo boolean Required Whether this is a demo sandbox's agency, which has no billing. When true, the page shows only that.

403 Your roles here do not allow this.

PropertyTypeDescription
type string Required A URL that identifies the kind of problem. Its last segment, such as auth_required or input_invalid, is the code your app should check.
title string Required The HTTP status as text, such as Not Found.
status integer (int32) Required The HTTP status code of the response.
detail string Required A human-readable explanation of what went wrong.
instance string Required The path the request was sent to.

422 The request input was rejected. The errors object lists each validation failure.

PropertyTypeDescription
type string Required A URL that identifies the kind of problem. Its last segment, such as auth_required or input_invalid, is the code your app should check.
title string Required The HTTP status as text, such as Not Found.
status integer (int32) Required The HTTP status code of the response.
detail string Required A human-readable explanation of what went wrong.
instance string Required The path the request was sent to.
errors InputErrors Required Validation errors for each rejected value. Parameter errors are returned as a list, and body errors as a tree matching the request body structure.

Any other status: The request was rejected. The problem type identifies the error, and the detail field provides a human-readable explanation.

PropertyTypeDescription
type string Required A URL that identifies the kind of problem. Its last segment, such as auth_required or input_invalid, is the code your app should check.
title string Required The HTTP status as text, such as Not Found.
status integer (int32) Required The HTTP status code of the response.
detail string Required A human-readable explanation of what went wrong.
instance string Required The path the request was sent to.

Example

curl -X GET 'https://zanpki.com/agencies/{agencyId}/billing' \
  -H 'Authorization: Bearer <access token>'

All documentation