Grant
Grant =
object
One grant that gives this user access on the site the client is pinned to.
The list includes the user’s own grants and the grants of user organizations they hold a seat in, limited to grants that reach this site. The same user can see a different list on another site.
A grant carries no price, currency or billing interval. Paid, free, gifted and organization access all have the same shape.
Properties
Section titled “Properties”expiresAt
Section titled “expiresAt”expiresAt:
string|null
id:
string
offer: {
code:string;id:string;name:string; } |null
The offer the grant was bought through. Null for a grant that was never sold, and for an imported or manually created grant with no matching offer.
organization
Section titled “organization”organization: {
id:string;name:string; } |null
The user organization the grant belongs to, when this user has access through a seat in it. Null when the grant is the user’s own. Show it, so the user does not read their employer’s grant as one they bought.
product
Section titled “product”product:
object
The product: what the grant gives access to. Carries no price.
id:
string
name:
string
slug:
string
reason
Section titled “reason”reason:
string|null
Why it was created: purchase, gift, promo, winback and others.
Null on older grants.
source
Section titled “source”source:
string
What created the grant: recurly, comp, import, api. An open list, not an enum.
startsAt
Section titled “startsAt”startsAt:
string|null
UTC ISO 8601 timestamps. All three can be null, startsAt included. A
null expiresAt means the grant does not expire.
state:
GrantState
status
Section titled “status”status:
string
active, suspended or revoked. Expiry shows only in GrantState.
trialEndsAt
Section titled “trialEndsAt”trialEndsAt:
string|null
Access before this time was free: a trial, however the grant was created.