Skip to main content
GET
Get Customer Campaigns Progress
This API retrieves a customer’s progress within Gameball’s reward campaigns, providing insights into their achievements and current status in each campaign. By accessing completion percentages and unlock statuses, you can track how customers are engaging with various reward opportunities. For a mission, the response also lists each task in dashboard order, with its name, rules, reward, and the customer’s progress on that task. This endpoint is also available on v4.1.
Security: Requires apikey and secretkey headers.

Filter by Campaign ID

Use the optional campaignId query parameter to return progress for a single campaign instead of retrieving the full campaign list. The value must be a positive integer and should match the campaign ID returned in rewardsCampaignId or rewardCampaignConfiguration.id. When campaignId is provided, the response is still a JSON array. A matching campaign returns an array with one item. If the campaign does not exist, is not visible to the customer, or the customer is not eligible for it, the endpoint returns 200 OK with an empty array ([]), not 404. You can combine campaignId with campaignType. When both filters are provided, both must match. For example, ?campaignId=123&campaignType=game returns the campaign only if campaign 123 is also a game campaign; otherwise, the response is an empty array.

Validation

Example: Single Campaign

Example response:

Example: Campaign ID and Type

Example: Invalid Campaign ID

Streak campaign progress

For streak campaigns, the response includes the customer’s current streak plus step-level progress against each reward. The step unit matches streakIntervalUnit on rewardCampaignConfiguration (Day, Week, or Month).

Example: Daily streak progress

In this example the customer is on day 1 of a daily streak:
  • currentStreak is 1 and currentTierStep is 1 (the days 1–6 range)
  • nextMilestoneStep is 7 (the 10-point reward)
  • stepsToNextMilestone is 6
  • Only the first tierProgress entry has isReached: true

Mission task progress

For mission campaigns, the response includes each task so a custom loyalty page can show a checklist, such as finished tasks ticked and “1 of 3 tasks done” at the top. Tasks are returned in dashboard order. stepNumber starts at 1. rewardsCampaignName, rewardsCampaignId, isUnlocked, completionPercentage, achievedCount, and canAchieve are unchanged. completionPercentage is still the mission’s overall progress. completedStepsCount and totalStepsCount are the task counts behind that percentage.
Partial progress: AccumulativeTotal is the only operator that reports progress before the task is finished. After orders totaling 300 toward a target of 1,000, currentValue is 300 and completionPercentage is 30. Every other task stays at 0 until the customer finishes it. Then currentValue equals targetValue and completionPercentage is 100.
What Accumulative total counts: It adds up a numeric event property across events, such as order value. It does not count how many times an event occurred. A task such as “place 3 orders” is not supported.
Completion window: When a mission’s completion window ends and progress resets, task progress resets too. completedStepsCount returns to 0, and each task returns isCompleted: false, currentValue: 0, and completionPercentage: 0.

Rule operators

steps[].trigger.conditions[].operator is one of the following. value is always a string. Between takes "min,max". IsEmpty and IsNotEmpty do not take a value.

Example: Mission with three tasks

The response is still a JSON array. With campaignId set, the array contains one mission. highScoreAmount, streak fields, and rewardCampaignConfiguration are unchanged and left out of this example.
In this example the customer has finished 1 of 3 tasks, so completionPercentage is 33.333. Task 3 has no rules and no reward, so conditions and reward are omitted. An AccumulativeTotal task that has accumulated 300 of a 1,000 target looks like this:

Authorizations

apikey
string
header
required
secretkey
string
header
required

Headers

lang
string

If the lang header is provided, the response will be returned in the specified language (e.g., en for English, fr for French). If this header is not included, the system will use the default language.

Path Parameters

customerId
string
required

Unique identifier for the customer that you can reference across the customer's whole lifetime. Could be a database ID, random string, email, or anything that uniquely identifies the customer.

Query Parameters

campaignType
enum<string>

Filter campaigns by type. Use reward to return only reward-type campaigns (points multipliers, missions, spending milestones, streaks, etc.), or game for game-type campaigns (Spin the Wheel, Slot Machine, Quiz, Scratch & Win, Match Cards, etc.). Omit to return all campaigns. Any other value results in a validation error.

Available options:
reward,
game
campaignId
integer

Filter the response to a single campaign by its ID. When provided, the response array contains at most one item: the matching campaign's progress, or an empty array if the campaign does not exist or is not available to this customer. Must be a positive integer. Use the campaign ID returned in rewardsCampaignId or rewardCampaignConfiguration.id. Can be combined with campaignType, in which case both filters apply.

Required range: x >= 1

Response

Customer campaigns progress retrieved successfully

rewardsCampaignName
string

The name of the rewards campaign.

rewardsCampaignId
number

The unique ID of the rewards campaign.

isUnlocked
boolean

Indicates if the customer has unlocked the campaign.

highScoreAmount
number | null

The highest score achieved by the customer. This value is applicable only in the context of a high score rewards campaign.

currentStreak
number | null

The customer's current consecutive streak count. Returned only for streak campaigns. The unit matches streakIntervalUnit on the campaign configuration (Day, Week, or Month).

highestStreak
number | null

The highest consecutive streak count this customer has reached for this campaign. Returned only for streak campaigns. The unit matches streakIntervalUnit on the campaign configuration (Day, Week, or Month).

completionPercentage
number

The percentage of the campaign the customer has completed. For example, in a second-order campaign where the customer must make 2 orders, if they have only placed 1 order, the completion percentage will be 50%.

achievedCount
number

The number of times the customer has achieved the campaign.

canAchieve
boolean

A flag that determines whether the customer is currently eligible to participate in and achieve this reward campaign. It provides a quick indication of the customer's ability to meet the campaign's conditions based on their current status.

rewardCampaignConfiguration
object

Comprehensive description of the reward campaign configuration.

currentTierStep
number | null

The startStep of the reward tier the customer is currently in. Returned only for streak campaigns. Example: if the customer is on day 1 of a daily streak whose first reward covers steps 1–6, currentTierStep is 1.

nextMilestoneStep
number | null

The startStep of the next unreached reward tier. Returned only for streak campaigns. Null if the customer has already reached the last tier.

stepsToNextMilestone
number | null

The number of remaining streak steps until nextMilestoneStep. Returned only for streak campaigns. Example: with currentStreak 1 and nextMilestoneStep 7, stepsToNextMilestone is 6.

tierProgress
object[] | null

Per-tier progress for a streak campaign. One entry per reward, using that reward's startStep. Returned only for streak campaigns.

completedStepsCount
integer | null

The number of mission tasks the customer has finished. Returned for mission campaigns. Use with totalStepsCount to show progress such as 1 of 3 tasks done.

totalStepsCount
integer | null

The number of tasks in the mission. Returned for mission campaigns.

steps
object[] | null

Mission tasks in dashboard order, starting at stepNumber 1. Returned for mission campaigns. One entry per task. When a mission completion window ends and progress resets, every task in this array resets as well.