Batch check on an entitlement grant
Checks multiple features for one subject in the same entitlement snapshot.
Checks multiple features for one subject in the same entitlement snapshot.
- Path
POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/entitlement_grants:batchCheck - 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 | The subject shared by every check. Required. |
features | string[] | Feature keys to check. Duplicate keys are allowed and count toward the cap. 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 |
|---|---|---|
results | CheckEntitlementResponse[] | One decision per input position, in request order, including duplicates and features with no active grant. |
CheckEntitlementResponse
| 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. |
decision | EntitlementDecision | Always set on success, including when no active grant exists. Missing or unspecified is not an authoritative answer. Output only. One of entitled, not_entitled. |
start_time | timestamp | Inclusive effective start of the answering windowed grant. Output only. |
subject | Subject | Subject of the answering grant when a windowed term answers. Output only. |
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. |
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:batchCheck" \
-H "Authorization: Bearer $SYLPHX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"features":["…"],"subject":{}}'