Menu
Platform
AI
App store purchases
Credits
Database
Flags
Generated Assets
Monitoring
Notifications
Organizations
Payments
- Payments
- Payments quickstart
- Checkout policies
- Checkout sessions
- Customer subscriptions
- Entitlement grants
- Exchange rates
- Licence keys
- Licence tokens
- Merchant accounts
- Portal sessions
- Price catalogs
- Revenue
- Revenue facts
- Revenue sources
- Tax threshold statuses
- Usage events
- Usage invoices
- Usage meter prices
- Usage meters
- Usage reservations
- Usage settings
- Usage tiers
Queues
Realtime
Sandboxes
Webhooks
Getting Started
Authentication
KV Store
Deploy & Infrastructure
Reference
Check an entitlement grant
Answers whether a subject holds a feature now, and how much of it.
Answers whether a subject holds a feature now, and how much of it.
- Path
POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/entitlement_grants:check - Scope
billing:read - Effect
read— nothing is written. - Collection entitlement_grants
#Request
| Field | Type | What it is |
|---|---|---|
parent | string | The environment to check in. Required. |
subject | Subject | Who. Required. |
feature | string | The feature key. Required. |
#Subject
| Field | Type | What it is |
|---|---|---|
end_user | string | An end user's id (Sylphx Auth, or the app's own OIDC issuer). One of the kind group. |
customer_organization | string | A customer organization's id. One of the kind group. |
#Response
| Field | Type | What it is |
|---|---|---|
entitled | bool | Whether the subject holds the feature now. |
limit | string | For a limit feature, the largest allowance the subject holds. |
entitlement_grant | string | The grant that answers, when entitled. |
expire_time | timestamp | When the answering grant ends; unset for no end. A caller may cache the answer until then. |
source | string | The answering grant's source, for example <checkout session>/line_items/<n>: the grant claim of an offline licence token. |
#Errors
UNAUTHENTICATED— No valid key or token was presented.PERMISSION_DENIED— The key lacks the method's permission.INVALID_FIELD— A field failed validation.
Every error arrives in the body Errors describes.
#Examples
curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/entitlement_grants:check" \
-H "Authorization: Bearer $SYLPHX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"feature":"…","subject":{}}'