Skip to main content

AsyncAPI for campaign service 0.0.1 documentation

Published Messages (campaignManagement)

The service publishes one of these messages below.

campaignCreated

Message is sent when campaign is created. Contains fields from event and the following payload.

Example value
{
"payload": {
"campaign": {
"id": "string",
"type": "REDEMPTION",
"namespace": "string",
"name": "string",
"description": "string",
"tags": [
"string"
],
"status": "ACTIVE",
"redeemStart": "2019-08-24T14:15:22Z",
"redeemEnd": "2019-08-24T14:15:22Z",
"maxRedeemCountPerCode": 0,
"maxRedeemCountPerCodePerUser": 0,
"maxRedeemCountPerCampaignPerUser": 0,
"maxSaleCount": 0,
"redeemType": "ITEM",
"items": [
{
"itemId": "string",
"itemName": "string",
"quantity": 0,
"extraSubscriptionDays": 0
}
],
"boothName": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
},
"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
campaigncampaign-

campaignUpdated

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

Example value
{
"payload": {
"campaign": {
"id": "string",
"type": "REDEMPTION",
"namespace": "string",
"name": "string",
"description": "string",
"tags": [
"string"
],
"status": "ACTIVE",
"redeemStart": "2019-08-24T14:15:22Z",
"redeemEnd": "2019-08-24T14:15:22Z",
"maxRedeemCountPerCode": 0,
"maxRedeemCountPerCodePerUser": 0,
"maxRedeemCountPerCampaignPerUser": 0,
"maxSaleCount": 0,
"redeemType": "ITEM",
"items": [
{
"itemId": "string",
"itemName": "string",
"quantity": 0,
"extraSubscriptionDays": 0
}
],
"boothName": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
},
"oldCampaign": {
"id": "string",
"type": "REDEMPTION",
"namespace": "string",
"name": "string",
"description": "string",
"tags": [
"string"
],
"status": "ACTIVE",
"redeemStart": "2019-08-24T14:15:22Z",
"redeemEnd": "2019-08-24T14:15:22Z",
"maxRedeemCountPerCode": 0,
"maxRedeemCountPerCodePerUser": 0,
"maxRedeemCountPerCampaignPerUser": 0,
"maxSaleCount": 0,
"redeemType": "ITEM",
"items": [
{
"itemId": "string",
"itemName": "string",
"quantity": 0,
"extraSubscriptionDays": 0
}
],
"boothName": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
},
"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
campaigncampaign-
oldCampaigncampaign-

codeCreated

Message is when redeem codes are created. Contains fields from event and the following payload.

Example value
{
"payload": {
"codeCreate": {
"campaignId": "string",
"campaignName": "string",
"quantity": 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
codeCreateobject-
payload.codeCreate
NameTypeDescription
campaignIdstringcampaign id of the code belong to
campaignNamestringthe campaign name
quantityintegerquantity of code created

codeDisabled

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

Example value
{
"payload": {
"codeCondition": {
"campaignId": "string",
"batchNo": 0,
"value": "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
codeConditioncodeCondition-

codeEnabled

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

Example value
{
"payload": {
"codeCondition": {
"campaignId": "string",
"batchNo": 0,
"value": "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
codeConditioncodeCondition-

codeBulkDisabled

Message is sent when bulk codes are disabled. Contains fields from event and the following payload.

Example value
{
"payload": {
"codeCondition": {
"campaignId": "string",
"batchNo": 0,
"value": "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
codeConditioncodeCondition-

codeBulkEnabled

Message is sent when bulk codes are enabled. Contains fields from event and the following payload.

Example value
{
"payload": {
"codeCondition": {
"campaignId": "string",
"batchNo": 0,
"value": "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
codeConditioncodeCondition-

Published Messages (keyGroupManagement)

The service publishes one of these messages below.

keyGroupCreated

Message is sent when key group is created. Contains fields from event and the following payload.

Example value
{
"payload": {
"keyGroup": {
"id": "string",
"namespace": "string",
"name": "string",
"description": "string",
"tags": [
"string"
],
"status": "ACTIVE",
"boothName": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
},
"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
keyGroupkeyGroup-

keyGroupUpdated

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

Example value
{
"payload": {
"keyGroup": {
"id": "string",
"namespace": "string",
"name": "string",
"description": "string",
"tags": [
"string"
],
"status": "ACTIVE",
"boothName": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
},
"oldKeyGroup": {
"id": "string",
"namespace": "string",
"name": "string",
"description": "string",
"tags": [
"string"
],
"status": "ACTIVE",
"boothName": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
},
"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
keyGroupkeyGroup-
oldKeyGroupkeyGroup-

keyUploaded

Message is sent when upload keys. Contains fields from event and the following payload.

Example value
{
"payload": {
"keyUpload": {
"keyGroupId": "string",
"keyGroupName": "string",
"quantity": 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
keyUploadobject-
payload.keyUpload
NameTypeDescription
keyGroupIdstringkey group id
keyGroupNamestringthe key group name
quantityintegerquantity of key uploaded

Published Messages (codeRedemption)

The service publishes one of these messages below.

codeRedeemed

Message is sent when code is redeemed. Contains fields from event and the following payload.

Example value
{
"payload": {
"codeRedemption": {
"userId": "string",
"campaignId": "string",
"campaignName": "string",
"code": "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
codeRedemptionobject-
payload.codeRedemption
NameTypeDescription
userIdstringuser id
campaignIdstringthe campaign id
campaignNamestringthe campaign name
codestringthe code value

Published Messages (ticketSale)

The service publishes one of these messages below.

ticketAcquired

Message is sent when ticket is acquired, for example, when user buy a code type item. Contains fields from event and the following payload.

Example value
{
"payload": {
"ticketAcquisition": {
"userId": "string",
"boothName": "string",
"count": 0,
"orderNo": "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
ticketAcquisitionobject-
payload.ticketAcquisition
NameTypeDescription
userIdstringuser id
boothNamestringbooth name
countintegerpurchase count
orderNostringorder no

Schemas

campaign

NameTypeDescription
idstringcampaign id
typestringcampaign type
namespacestringnamespace of this campaign
namestringname of this campaign
descriptionstringdescription of this campaign
tagsarraytags of this campaign
statusstringstatus of this campaign
redeemStartstring (date-time)redeem start time
redeemEndstring (date-time)redeem end time
maxRedeemCountPerCodeinteger (int32)max redeem count per code, -1 means UNLIMITED
maxRedeemCountPerCodePerUserinteger (int32)max redeem count per code per user, -1 mean UNLIMITED
maxRedeemCountPerCampaignPerUserinteger (int32)max redeem count per campaign per user, -1 mean UNLIMITED
maxSaleCountinteger (int32)max sale count, -1 mean UNLIMITED
redeemTypestringredeem type
itemsarray<object>-
boothNamestringbooth name for sale
createdAtstring (date-time)time when campaign is created
updatedAtstring (date-time)time when campaign is updated

items[number]

NameTypeDescription
itemIdstringThe redeemable item id
itemNamestringThe redeemable item name
quantityinteger (int32)The redeemable item quantity, 1 for default
extraSubscriptionDaysinteger (int32)Extra subscription days if the item is a subscription, 0 by default

codeCondition

NameTypeDescription
campaignIdstringcampaign id of the codes belong to
batchNointegercode batch number
valuestringcode value

keyGroup

NameTypeDescription
idstringkey group id
namespacestringnamespace of this key group
namestringname of key group
descriptionstringdescription of key group
tagsarraytags of key group
statusstringstatus of key group
boothNamestringbooth name for sale
createdAtstring (date-time)time when key group was created
updatedAtstring (date-time)time when key group was updated

event

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