Entitlements update notifications
Last updated on October 23, 2024
備考
- The Entitlement Update Notification API is only available and enabled by default in AGS Private Cloud environments.
- Currently, notifications are turned on or off globally and not configurable by game namespace. To request assistance in configuring the Entitlement Update Notification API, contact your AccelByte Technical Producer or submit a request through the AccelByte Customer Support Portal.
Introduction
The AccelByte Gaming Services (AGS) Entitlement Update Notification API provides real-time updates on players' entitlements, ensuring they are promptly informed of any changes, including those occurring outside the game client.
Supported notification type
The AGS Entitlement Update Notification API supports entitlementUpdated
notifications.
Updated entitlements notifications
The following is a sample payload for entitlementUpdated
notifications.
{
"type": "entitlementUpdated",
"payload": {
"action": "grant",
"data": [
{
"id": "c1a2b3c4d5e6f7890123456789abcdef",
"namespace": "gaming",
"clazz": "ENTITLEMENT",
"type": "CONSUMABLE",
"status": "Active",
"sku": "premium_subscription",
"userId": "u1a2b3c4d5e6f7890123456789abcdef",
"itemId": "i1a2b3c4d5e6f7890123456789abcdef",
"itemNamespace": "items",
"name": "Premium Subscription",
"useCount": 10,
"source": "Purchase",
"startDate": "2023-01-01T00:00:00Z",
"endDate": "2024-01-01T00:00:00Z",
"grantedAt": "2023-01-01T00:00:00Z",
"createdAt": "2023-01-01T00:00:00Z",
"updatedAt": "2023-06-01T00:00:00Z",
"collectionId": "col1a2b3c4d5e6f7890123456789abcdef",
"stackable": true,
"stackedUseCount": 20
}
]
}
}
The following table describes the function and supported values for each field in the payload.
Field | Type | Description | Value |
---|---|---|---|
type | String | Notification type | entitlementUpdated |
action | String | Action taken on the wallet | Grant: grantEntitlements or grantUserEntitlement Sell: sell or publicSell Split: publicSplit Delete: this is triggered by the delete account action from the PlayStation platform. Update: udpateEntitlement Transfer: publicTransfer Consume: publicConsumeUserEntitlement or consumeUserEntitlement Revoke: revokeEntitlements , revokeAllEntitlements , revokeUserCount , revokeUserEntitlements , revokeUserEntitlement , or revokeUserEntitlementByUseCount Disable: disable Enable: enable |
data | Array | Contains the entitlement update details | |
data.id | String | Unique identifier for the entitlement | |
data.namespace | String | Namespace where the entitlement is in | |
data.clazz | String | Class of the entitlement | |
data.type | String | Type of the entitlement | |
data.status | String | Status of the entitlement | |
data.sku | String | SKU of the entitlement | |
data.userId | String | Identifier of the user associated with the entitlement | |
data.itemId | String | Identifier of the item associated with the entitlement | |
data.itemNamespace | String | Namespace where the item associated with the entitlement is in | |
data.name | String | Name of the entitlement | |
data.useCount | Integer | Remaining use count of the entitlement | |
data.source | String | Source of the entitlement | |
data.startDate | DateTime | Start date of the entitlement validity period | |
data.endDate | DateTime | End date of the entitlement validity period | |
data.grantedAt | DateTime | Date and time when the entitlement was granted | |
data.createdAt | DateTime | Date and time when the entitlement was created | |
data.updatedAt | DateTime | Date and time when the entitlement was last updated | |
data.collectionId | String | Identifier of the collection associated with the entitlement | |
data.stackable | Boolean | Indicates whether the entitlement is stackable or not | |
data.stackedUseCount | Integer | The stacked use count in the entitlement |