POST
GetDetailsById
POST
GetDetailsByIdOverview
The GetDetailsById
API endpoint retrieves the detailed information of a specific challenge based on the provided ChallengeId
and UserId
.
The returned data includes challenge metadata, milestones, prizes, rewards, group progress, and trigger progress, along with additional details about any locked parent challenges.
This API works only with challenges that have points and voucher reward types. For Badge challenge details check GetBadgeDetailsById.
Use Cases Examples:
Basic Challenge Retrieval: Retrieve details for a specific challenge using the challenge ID and user ID.
Locked Challenge Handling: Fetch and display challenge details, even when it is locked, showing parent challenge information.
User Progress Tracking: Track user progress, including milestones, rewards, and triggers within a challenge.
Multi-Language Support: Retrieve challenge resources like name and description based on the user's preferred language.
Request
Header Parameters
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.
Body Parameters
Property | Type | Options | Description |
---|---|---|---|
UserId | string | Required | The phone number of the user for whom challenges are being retrieved. |
ChallengeId | int | Required | Unique identifier for the challenge. |
Body Sample
Response
Returns a challenge object if success. Otherwise, return status Code message error.
Response Fields:
data
(List): Challenge object.pagesNum
(int): The current page number.count
(int): The total number of challenges matching the criteria.
Response Parameters
Property | Type | Description |
---|---|---|
Id | int | Unique identifier for the challenge. |
Name | string | The name of the challenge. |
Description | string | Brief summary of the challenge. |
Startdate | datetime | Challenge start date. |
Enddate | datetime | Challenge end date. |
PeopleFinished | int | Number of people that completed the challenge. |
EndsAfter | int | Days left until the challenge ends. |
IsLocked | bool | If |
LockedEvent | object | Details of the parent challenge if the current challenge is locked. |
Category* | object | Category info of the challenge. |
Image | string | The URL for the challenge's image. |
Prizes* | list | List of milestones that users have on that challenge. |
GroupProgress* | list | An object that shows user progress over the triggers group. |
Rewards* | object | List of rewards that user won over that challenge. |
Category: Category information of the challenge.
Property | Type | Description |
---|---|---|
Id | int | Unique identifier of the category. |
Name | string | Name of the category. |
Rewards (Object): List of rewards that user won over that challenge.
Property | Type | Description |
---|---|---|
RewardId | int | The unique identifier of the reward. |
RewardName | string | The name of the reward. |
Duration | int | The duration for which the reward is valid. |
DurationType* | enum | The type of duration (e.g., |
RewardType* | enum | The type of reward (e.g., |
RewardValue | string | The value of the reward (e.g., |
Prizes (List of Milestones): The milestones won on the challenge.
Property | Type | Description |
---|---|---|
User ID | string | User phone number associated with the milestone. |
MilestoneId | int | ID of the milestone associated with the prize |
Prizes* | list | List of prize details, The prize appears only when it is not claimed, once claimed, it moves to history. |
Prizes (List of Prizes): List of prize details
Property | Type | Description |
---|---|---|
Value | string | Value of the prize, either be points amount or voucher code. |
ExpirationDate | datetime | Expiration date of the prize. |
Description | string | Description of the prize. |
RewardType* | enum | Type of reward. |
LockedEvent (Object): Details of the parent challenge if the current challenge is locked.
Property | Type | Description |
---|---|---|
Id | int | The unique identifier of the parent challenge. |
Name | string | The name of the parent challenge. |
Description | string | A brief description of the parent challenge. |
StartDate | datetime | The start date of the parent challenge. |
EndDate | datetime | The end date of the parent challenge. |
Image | string | URL to the parent challenge image. |
GroupProgress (List of Triggers Groups): Progress of triggers groups within the challenge.
Property | Type | Description |
---|---|---|
GroupId | int | Unique identifier of the group. |
GroupOrder | int | Order of the group. |
Operator* | enum | Logical operator used between groups (e.g., AND, OR). |
TriggersProgress* | list | List of triggers within the group. |
TriggersProgress (List of Triggers Progress): Progress of individual triggers within the challenge.
Property | Type | Description |
---|---|---|
TriggerId* | int | Unique identifier of the trigger. |
TriggerType* | enum | Type of the trigger (e.g., Voucher, Points). |
TriggerName | string | Name of the trigger. |
TriggerOrder | int | Order of the trigger within the group. |
Operator* | enum | Logical operator used between triggers (e.g., AND, OR). |
TriggerFrequency | decimal | The amount of actions required to complete the trigger. |
ActionLeft | decimal | Number of actions left to complete the trigger. |
Progress | decimal | Progress percentage of the trigger. |
TriggerId Values
Earned Points =
1
Subscribe Vouchers Count =
2
Redeemed Points =
3
Redeemed Vouchers Count =
4
Total Points Balance =
5
Hit tier =
6
Enums
Response Sample
Additional notes
Prizes object only holds the prize if it is not claimed, once claimed it will be empty and prize moves to history.
Last updated