Skip to main content
GET
Retrieve a subscription grant

Authorizations

X-SALESBRICKS-KEY
string
header
required

API key for authentication

Path Parameters

grant_id
string
required
Pattern: ^([a-zA-Z\d\-]+)$
subscription_id
string
required
Pattern: ^([a-zA-Z\d\-]+)$

Response

id
string<uuid>
required

ID of the grant.

grant_type
enum<string>
required

What granted the units. TOP_UP: units sold on their own invoice. ROLLOVER: unused committed units rolled over when a commitment period ended, not charged for. More types will be added, so treat an unknown value as a grant you can read but not act on.

  • TOP_UP - Top-up
  • ROLLOVER - Rollover
Available options:
TOP_UP,
ROLLOVER
subscription_id
string<uuid>
required

The subscription the grant is on.

status
enum<string>
required

VOIDED when it or its invoice is voided; else EXPIRED when it is active and every line has expired; else ACTIVE once its units cover usage; else PENDING.

  • PENDING - Pending
  • ACTIVE - Active
  • EXPIRED - Expired
  • VOIDED - Voided
Available options:
PENDING,
ACTIVE,
EXPIRED,
VOIDED
activates
enum<string> | null
required

When the units start to cover overage. Null for a ROLLOVER, which covers overage as it is created.

  • ON_PAYMENT - On payment
  • ON_ISSUE - On issue
Available options:
ON_PAYMENT,
ON_ISSUE
effective_at
string<date>
required

The first day the units cover usage. A date (YYYY-MM-DD) in the subscription's time zone.

activated_at
string<date-time> | null
required

When the grant became active.

voided_at
string<date-time> | null
required

When it or its invoice was voided. Null unless status is VOIDED.

created_at
string<date-time>
required

When the grant was created.

invoice
object | null
required

The invoice that bills the grant. Null for a ROLLOVER.

lines
object[]
required

One line per brick.