Skip to main content

AsyncAPI for fulfillment service 0.0.1 documentation

info

In this document, PUB means "publish" and SUB means "subscribe". This refers to the "publish/subscribe" (pub/sub) messaging framework, where "publish" means that the service sends data to Kafka topics, and "subscribe" means the service acts as a consumer that subscribes to specific Kafka topics to receive data.

Table of Contents

Operations

PUB fulfillment Operation

Message fulfillmentCompleted

message is sent when fulfillment is completed

Payload
NameTypeDescriptionValueConstraintsNotes
(root)object allOf---additional properties are allowed
payloadobject---additional properties are allowed
payload.fulfillmentobject---additional properties are allowed
payload.fulfillment.userIdstringuserId---
payload.fulfillment.orderNostringorderNo---
payload.fulfillment.codestringredeemed code---
payload.fulfillment.sourcestring-allowed ("PURCHASE", "IAP", "PROMOTION", "ACHIEVEMENT", "REFERRAL_BONUS", "REDEEM_CODE", "REWARD", "GIFT", "DLC", "OTHER")--
payload.fulfillment.fulfillItemsarray<object>items should do fulfillment---
payload.fulfillment.fulfillItems.itemIdstringitem id---
payload.fulfillment.fulfillItems.itemNamestringitem name---
payload.fulfillment.fulfillItems.quantityintegeritem quantity-format (int32)-
payload.fulfillment.fulfillItems.storeIdstringstore id---
payload.fulfillment.fulfillItems.itemSkustringitem sku---
payload.fulfillment.fulfillItems.extraSubscriptionDaysintegerextra subscription days-format (int32)-
payload.fulfillment.fulfillItems.itemTypestringitem type---
payload.fulfillment.grantedItemIdsarray<string>item ids already granted---
payload.fulfillment.grantedItemIds (single item)string----
payload.fulfillment.entitlementSummariesarray<object>entitlement granted---
payload.fulfillment.entitlementSummaries.idstringentitlement id---
payload.fulfillment.entitlementSummaries.namespacestringentitlement namespace---
payload.fulfillment.entitlementSummaries.userIdstringuser id---
payload.fulfillment.entitlementSummaries.clazzstringentitlement clazzallowed ("APP", "ENTITLEMENT", "CODE", "SUBSCRIPTION", "MEDIA", "OPTIONBOX", "LOOTBOX")--
payload.fulfillment.entitlementSummaries.typestringentitlement typeallowed ("DURABLE", "CONSUMABLE")--
payload.fulfillment.entitlementSummaries.stackablebooleana flag indicates whether the consumable entitlement is stackable---
payload.fulfillment.entitlementSummaries.stackedUseCountintegerconsumable entitlement stacked use count-format (int32)-
payload.fulfillment.entitlementSummaries.storeIdstringstore id---
payload.fulfillment.entitlementSummaries.itemIdstringitem id---
payload.fulfillment.entitlementSummaries.grantedCodestringgranted code---
payload.fulfillment.entitlementSummaries.createdAtstring--format (date-time)-
payload.fulfillment.entitlementSummaries.updatedAtstring--format (date-time)-
payload.fulfillment.entitlementSummaries.startDatestringtime when the entitlement becomes active-format (date-time)-
payload.fulfillment.entitlementSummaries.endDatestringtime when the entitlement becomes expired-format (date-time)-
payload.fulfillment.creditSummariesarray<object>credit granted---
payload.fulfillment.creditSummaries.walletIdstringwallet id---
payload.fulfillment.creditSummaries.namespacestringnamespace---
payload.fulfillment.creditSummaries.userIdstringuser id---
payload.fulfillment.creditSummaries.amountintegeramount to be paid-format (int64)-
payload.fulfillment.statusstringfulfillment status---
payload.fulfillment.fulfillmentErrorobject---additional properties are allowed
payload.fulfillment.fulfillmentError.httpStatusintegerhttp status-format (int32)-
payload.fulfillment.fulfillmentError.codeintegererror code-format (int32)-
payload.fulfillment.fulfillmentError.messagestringerror message---
payload.fulfillment.metadataobject---additional properties are allowed
0 (allOf item)object---additional properties are allowed
idstringevent id---
versioninteger----
namestringevent name---
namespacestringevent namespace---
parentNamespacestring----
timestampstring--format (date-time)-
clientIdstringclient id---
userIdstringthe operator id---
traceIdstringtrace id---
sessionIdstringsession id---

Examples of payload (generated)

{
"payload": {
"fulfillment": {
"userId": "string",
"orderNo": "string",
"code": "string",
"source": "PURCHASE",
"fulfillItems": [
{
"itemId": "string",
"itemName": "string",
"quantity": 0,
"storeId": "string",
"itemSku": "string",
"extraSubscriptionDays": 0,
"itemType": "string"
}
],
"grantedItemIds": [
"string"
],
"entitlementSummaries": [
{
"id": "string",
"namespace": "string",
"userId": "string",
"clazz": "APP",
"type": "DURABLE",
"stackable": true,
"stackedUseCount": 0,
"storeId": "string",
"itemId": "string",
"grantedCode": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"startDate": "2019-08-24T14:15:22Z",
"endDate": "2019-08-24T14:15:22Z"
}
],
"creditSummaries": [
{
"walletId": "string",
"namespace": "string",
"userId": "string",
"amount": 0
}
],
"status": "string",
"fulfillmentError": {
"httpStatus": 0,
"code": 0,
"message": "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"
}