Skip to main content

Challenge Service Events 1.0.0 documentation

Published Messages (goalCompleted)

The service publishes one of these messages below.

goalCompleted

Contains fields from and the following payload.

Example value
{
"payload": {
"namespace": "string",
"challengeCode": "string",
"goalCode": "string",
"completedAt": "2019-08-24T14:15:22Z",
"userId": "string",
"scheduleId": "string",
"scheduleStart": "2019-08-24T14:15:22Z",
"scheduleEnd": "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",
"spanContext": "string"
}

payload

NameTypeDescription
namespacestringnamespace origin of completed goal
challengeCodestringassociated challengeCode from completed goal
goalCodestringcompleted goalCode
completedAtstring (date-time)timestamp of completion
userIdstringuserId that completes the goal
scheduleIdstringscheduleId which the goal completed
scheduleStartstring (date-time)timestamp of the schedule's start time
scheduleEndstring (date-time)timestamp of the schedule's end time (optional)

Published Messages (rewardsClaimed)

The service publishes one of these messages below.

rewardsClaimed

Contains fields from and the following payload.

Example value
{
"payload": {
"namespace": "string",
"challengeCode": "string",
"goalCode": "string",
"claimedAt": "2019-08-24T14:15:22Z",
"rewardIds": [
"string"
],
"userId": "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",
"spanContext": "string"
}

payload

NameTypeDescription
namespacestringnamespace origin of claimed reward's goal
challengeCodestringassociated challengeCode from claimed reward's goal
goalCodestringclaimed reward goalCode
claimedAtstring (date-time)timestamp of reward(s) claimed
rewardIdsarraylist of reward ID(s) claimed
userIdstringuserId that got the reward(s)

Schemas