Last updated
GET
GetBadgeChallengesThe GetBadgeChallenges
API endpoint Retrieves a list of challenges with badge rewards for a specific user, including information about each challenge's status, rewards, and whether it has been achieved or locked.
Once the badge is achieved in the SDK, its image turned into colored.
Use Cases Examples:
Retrieving Badge Challenges for a User:
This API fetches a list of badge challenges available to a specific user, including details on whether they have been achieved or are still locked.
Display Challenges in User Profile:
The response can be used to display the user's progress in challenges, showing which badges have been earned and which ones are still pending.
Challenge Filtering:
The API filters challenges based on visibility rules, ensuring that only relevant challenges are returned based on the user's progress and configuration settings.
Attribute | Type | Options | Description |
---|---|---|---|
X-ClientId | string | Required | Provided Client Id. |
X-Message | string | Required | Provided encrypted message. |
Accept-language | string | Optional | Selected language for response. |
X-ClientId and X-Message are only required with V1 API.
Property | Type | Options | Description |
---|---|---|---|
UserId | string | Required | The phone number of the user for whom the badge challenges are being retrieved. |
Returns a list of challenges object if successful. Otherwise, return status Code message error.
Response Fields:
data
(List): A list of challenges.
pagesNum
(int): The current page number.
count
(int): The total number of challenges matching the criteria.
Property | Type | Description |
---|---|---|
Name | string | The name of the challenge. |
Id | int | The unique identifier for the challenge. |
IsLocked | bool | Indicates whether the challenge is locked. |
IsAchieved | bool | Indicates whether the user has achieved this challenge. |
Image | string | The URL for the badge's image. |
Rewards* | list | A list of rewards associated with the challenge. |
Rewards (List): A list of rewards associated with the challenge.
Property | Type | Description |
---|---|---|
Id | int | The unique identifier for the reward. |
Name | string | The name of the reward. |
RewardType* | list | The type of reward (e.g., Badge = |