Skip to main content
POST
Grant buyer access
Gives a buyer access without a payment. Requires the WRITE_INVENTORY scope.
  • The buyer must already have a shopper account in the store (they have signed in once). Otherwise the call returns 404.
  • Send either productId or allAccess: true. The all-access pass can only be granted as a pass. lifetime takes no days.
  • A pass defaults to 30 days (1 to 3650).
  • If that buyer already has a record for the same product and kind, it is extended or reactivated instead of duplicated.
  • Send the same grantId (an ObjectId you generate) on a retry and the repeat changes nothing. Without a grantId, every call applies again.
The response is 201 when a record was created, 200 otherwise. The buyer does not get an email from this call.
Granting access changes what a buyer can download. It uses the same WRITE_INVENTORY scope as editing products, so only request it for apps that are meant to manage buyers.
These endpoints only work on a store whose type is digital. On any other store they return 403 with This is only available on digital stores. See Digital stores.

Authorizations

Authorization
string
header
required

Installed-app access token (prefix app_), issued by the OAuth install flow. The store is bound to the token server-side , never send a shop id.

Body

application/json
email
string<email>
required

The buyer's email address. Must belong to an existing shopper account.

kind
enum<string>
required

lifetime never expires. pass runs for days.

Available options:
lifetime,
pass
productId
string

The digital product to grant. Omit when allAccess is true.

allAccess
boolean

Grant the store-wide all-access pass instead of one product. Only valid with kind: "pass".

days
integer

Length of a pass in days. Default 30. Not allowed with lifetime.

Required range: 1 <= x <= 3650
grantId
string

Optional ObjectId you generate. Makes a retried request a no-op.

Response

Grant buyer access: an existing record was extended, or this grantId was already applied (Access was already granted).

status
integer
required
Example:

200

success
boolean
required
Example:

true

message
string
required
Example:

"Access granted"

data
object
required

One buyer's access record. There is one record per buyer, product (or the all-access pass) and kind, so buying a pass again extends the same record.

Example: