メインコンテンツまでスキップ
Last updated on October 14, 2025

AsyncAPI for entitlement service 0.0.1 documentation

Published Messages (entitlementManagement)​

The service publishes one of these messages below.

entitlementGranted​

Message is sent when user is granted with entitlement. Contains fields from event and the following payload.

Example value
{
"payload": {
"grants": [
{
"id": "string",
"namespace": "string",
"clazz": "string",
"type": "string",
"status": "string",
"appId": "string",
"appType": "string",
"sku": "string",
"userId": "string",
"itemId": "string",
"itemNamespace": "string",
"name": "string",
"useCount": 0,
"source": "string",
"startDate": "2019-08-24T14:15:22Z",
"endDate": "2019-08-24T14:15:22Z",
"grantedAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"stackable": true,
"stackedUseCount": 0,
"origin": "string",
"collectionId": "string"
}
],
"metadata": {}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

payload​

NameTypeDescription
grantsarray<object>-
metadataobject-
payload.grants[number]​
NameTypeDescription
idstringentitlement id
namespacestringentitlement namespace
clazzstringentitlement class
typestringentitlement type
statusstringentitlement status
appIdstringappId if entitlement is an app
appTypestringappType if entitlement is an app
skustringsku for purchased item
userIdstringuserId for this entitlement
itemIdstringitemId of the entitlement
itemNamespacestringitemNamespace for the purchased item
namestringentitlement name
useCountinteger (int32)useCount for entitlement
sourcestringentitlement source
startDatestring (date-time)entitlement start date
endDatestring (date-time)entitlement end date
grantedAtstring (date-time)entitlement granted at
createdAtstring (date-time)entitlement created at
updatedAtstring (date-time)entitlement updated at
stackablebooleanwhether the entitlement is stackable
stackedUseCountinteger (int32)the stacked use count in the entitlement
originstringentitlement origin
collectionIdstringentitlement collection id
payload.metadata​

This is a free-form object.

entitlementUpdated​

Message is sent when entitlement is updated. Contains fields from event and the following payload.

Example value
{
"payload": {
"entitlement": {
"id": "string",
"namespace": "string",
"clazz": "string",
"type": "string",
"status": "string",
"appId": "string",
"appType": "string",
"sku": "string",
"userId": "string",
"itemId": "string",
"itemNamespace": "string",
"name": "string",
"useCount": 0,
"source": "string",
"startDate": "2019-08-24T14:15:22Z",
"endDate": "2019-08-24T14:15:22Z",
"grantedAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"origin": "string",
"collectionId": "string"
},
"oldEntitlement": {
"id": "string",
"namespace": "string",
"clazz": "string",
"type": "string",
"status": "string",
"appId": "string",
"appType": "string",
"sku": "string",
"userId": "string",
"itemId": "string",
"itemNamespace": "string",
"name": "string",
"useCount": 0,
"source": "string",
"startDate": "2019-08-24T14:15:22Z",
"endDate": "2019-08-24T14:15:22Z",
"grantedAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"origin": "string",
"collectionId": "string"
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

payload​

NameTypeDescription
entitlemententitlement-
oldEntitlemententitlement-

entitlementRevoked​

Message is sent when entitlement is revoked. Contains fields from event and the following payload.

Example value
{
"payload": {
"entitlementRevocation": {
"entitlementIds": [
"string"
],
"userId": "string"
},
"metadata": {}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

payload​

NameTypeDescription
entitlementRevocationobject-
metadataobject-
payload.entitlementRevocation​
NameTypeDescription
entitlementIdsarrayentitlement ids
userIdstringuser id
payload.metadata​

This is a free-form object.

entitlementDisabled​

Message is sent when entitlement is disabled. Contains fields from event and the following payload.

Example value
{
"payload": {
"entitlementStatusChange": {
"entitlementId": "string",
"entitlementName": "string",
"userId": "string",
"status": "ACTIVE",
"previousStatus": "ACTIVE"
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

payload​

NameTypeDescription
entitlementStatusChangeentitlementStatusChange-

entitlementEnabled​

Message is sent when entitlement is enabled. Contains fields from event and the following payload.

Example value
{
"payload": {
"entitlementStatusChange": {
"entitlementId": "string",
"entitlementName": "string",
"userId": "string",
"status": "ACTIVE",
"previousStatus": "ACTIVE"
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

payload​

NameTypeDescription
entitlementStatusChangeentitlementStatusChange-

entitlementUseCountRevoked​

Message is sent when entitlement use count is revoked, only for consumable entitlement. Contains fields from event and the following payload.

Example value
{
"payload": {
"entitlementUseCountRevocation": {
"entitlementId": "string",
"entitlementName": "string",
"userId": "string",
"useCount": 0,
"count": 0
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

payload​

NameTypeDescription
entitlementUseCountRevocationobject-
payload.entitlementUseCountRevocation​
NameTypeDescription
entitlementIdstringentitlement id
entitlementNamestringentitlement name
userIdstringuser id
useCountintegerthe useCount after entitlement was revoked
countintegerthe count be revoked

Published Messages (entitlementConsumption)​

The service publishes one of these messages below.

entitlementConsumed​

Message is sent when user entitlement is consumed. Contains fields from event and the following payload.

Example value
{
"payload": {
"entitlementConsumption": {
"entitlementId": "string",
"entitlementName": "string",
"userId": "string",
"useCount": 0,
"count": 0
},
"metadata": {}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

payload​

NameTypeDescription
entitlementConsumptionobject-
metadataobject-
payload.entitlementConsumption​
NameTypeDescription
entitlementIdstringentitlement id
entitlementNamestringentitlement name
userIdstringuser id
useCountintegerthe useCount after entitlement was consumed
countintegerthe count be consumed
payload.metadata​

This is a free-form object.

Published Messages (entitlementSale)​

The service publishes one of these messages below.

entitlementSellback​

Message is sent when user sell entitlement. Contains fields from event and the following payload.

Example value
{
"payload": {
"entitlementSale": {
"entitlementId": "string",
"entitlementName": "string",
"entitlementType": "DURABLE",
"clazz": "string",
"userId": "string",
"useCount": 0,
"count": 0,
"creditSummaries": [
{
"walletId": "string",
"namespace": "string",
"userId": "string",
"amount": 0
}
]
}
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string"
}

payload​

NameTypeDescription
entitlementSaleobject-
payload.entitlementSale​
NameTypeDescription
entitlementIdstringentitlement id
entitlementNamestringentitlement name
entitlementTypestringentitlement type
clazzstringentitlement clazz
userIdstringuser id
useCountintegerthe useCount after entitlement was consumed
countintegerthe count be sold
creditSummariesarray<object>credit granted
payload.entitlementSale.creditSummaries[number]​
NameTypeDescription
walletIdstringwallet id
namespacestringnamespace
userIdstringuser id
amountinteger (int64)amount need to be paid

Schemas​

entitlement​

NameTypeDescription
idstringentitlement id
namespacestringentitlement namespace
clazzstringentitlement class
typestringentitlement type
statusstringentitlement status
appIdstringappId if entitlement is an app
appTypestringappType if entitlement is an app
skustringsku for purchased item
userIdstringuserId for this entitlement
itemIdstringitemId of the entitlement
itemNamespacestringitemNamespace for the purchased item
namestringentitlement name
useCountinteger (int32)useCount for entitlement
sourcestringentitlement source
startDatestring (date-time)entitlement start date
endDatestring (date-time)entitlement end date
grantedAtstring (date-time)entitlement granted at
createdAtstring (date-time)entitlement created at
updatedAtstring (date-time)entitlement updated at
originstring-
collectionIdstring-

entitlementStatusChange​

NameTypeDescription
entitlementIdstringentitlement id
entitlementNamestringentitlement name
userIdstringuser id
statusstringentitlement status
previousStatusstringentitlement status before change

event​

NameTypeDescription
idstringevent id
versioninteger-
namestringevent name
namespacestringevent namespace
parentNamespacestring-
timestampstring (date-time)-
clientIdstringclient id
userIdstringthe operator id
traceIdstringtrace id
sessionIdstringsession id