Grant a partner entitlement
GrantPartnerEntitlement activates a reseller order without collecting payment.
GrantPartnerEntitlement activates a reseller order without collecting payment.
- Path
POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/reseller_channels/reseller-channel/partner_entitlements:grant - Scope
money:partner_resold:write - Effect
write— a successful call changes state. - Collection partner_entitlements
Request
| Field | Type | What it is |
|---|---|---|
parent | string | Reseller channel name. Required. |
partner_order_id | string | Stable reseller-assigned order identifier. Required. |
subject | Subject | Provider-side account or customer organization that receives access. Required. |
price_key | string | Price key from the environment catalog. Required. |
seats | int32 | Total seats in this receipt. 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 |
|---|---|---|
name | string | Canonical resource name. |
uid | string | Immutable resource identifier. Output only. |
meta | ResourceMeta | Resource metadata. Output only. |
provider_entity_id | string | Legal provider that owns this channel and its orders. Output only. |
reseller_id | string | Reseller identifier in this environment. Output only. |
partner_order_id | string | Stable reseller-assigned order identifier. Output only. |
billing_channel | string | Always partner_resold; Money charges no payment method. Output only. |
price_key | string | Price key from the environment catalog. Output only. |
seats | int32 | Total seats in this receipt. Output only. |
active_seats | int32 | Seats currently covered by this order. Output only. |
revoked_seats | int32 | Seats removed at revocation. Output only. |
disposition | string | Business state of this receipt, not a payment status. Output only. |
revision | int64 | Monotonic entitlement revision. Output only. |
ResourceMeta
| Field | Type | What it is |
|---|---|---|
generation | int64 | Increases by one on every change to spec. Output only. |
etag | string | Strong ETag (AIP-154): changes on any change to spec, status, or metadata. Send it back as If-Match or etag to make Update and Delete conditional; a mismatch fails with ABORTED / 409 ETAG_MISMATCH. Output only. |
create_time | timestamp | When the Resource was created. Output only. |
update_time | timestamp | When the Resource last changed. Output only. |
delete_time | timestamp | Set while the Resource is being deleted. Output only. |
labels | map<string, string> | Caller-writable, indexed labels (AIP-122 label rules). |
annotations | map<string, string> | Caller-writable, unindexed annotations. |
display_name | string | Caller-writable human-readable name. |
creator | string | The principal that created the Resource. Output only. |
Errors
PERMISSION_DENIED— The key lacks the method's permission.RESOURCE_NOT_FOUND— The named Resource does not exist or is not visible.INVALID_FIELD— A field failed validation.FAILED_PRECONDITION— A released manifest owns a requested resource field. Change the declaration in the named file and key path, then release.RESOURCE_IN_USE— The Resource is attached to or held by another Resource, for example a volume attached to a running lease.RESOURCE_ALREADY_EXISTS— A Resource with this name exists.IDEMPOTENCY_KEY_REUSED— An Idempotency-Key was reused with another body.UNAVAILABLE— The Resource store, the owning service's backend, or the key verifier's snapshot is unavailable; retry after Retry-After.
Every error arrives in the body Errors describes.
Examples
curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/reseller_channels/reseller-channel/partner_entitlements:grant" \
-H "Authorization: Bearer $SYLPHX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"partner_order_id":"…","price_key":"…","seats":1,"subject":{}}'