Last updated
GET
GetChallengesInfoForUserThe GetChallengesInfoForUser
API endpoint retrieves a paginated list of challenges available to a specific user, with optional filtering by search query, category, and order.
Retrieve User-Specific Challenges:
This API can be used to get a list of all challenges that are available for a specific user.
Filter Challenges by Category:
Users can filter challenges by a specific category using the CategoryId
parameter.
Search Challenges by Name:
Users can search for challenges by their names using the SearchQuery
parameter.
Paginate Results:
Large sets of challenges can be paginated using the Page
and ItemsPerPage
parameters.
Sort Challenges:
Challenges can be sorted by a specific field, either in ascending or descending order, using the OrderBy
and IsAscending
parameters.
X-ClientId and X-Message are only required with V1 API.
Returns a challenge 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.
Category: Category information of the challenge.
Notes
The API supports pagination and sorting to handle large datasets efficiently.
Challenge images are retrieved with pre-signed URLs for secure access.
Challenges are filtered to exclude those that are not visible or limited challenges that have claimed milestones.
Attribute | Type | Options | Description |
---|---|---|---|
Property | Type | Options | Description |
---|---|---|---|
Property | Type | Description |
---|---|---|
Property | Type | Description |
---|---|---|
X-ClientId
Provided Client Id.
X-Message
Provided encrypted message.
Accept-language
Selected language for response.
UserId
The phone number of the user for whom challenges are being retrieved.
CategoryId
The ID of the category to filter challenges by.
Page
The page number of the results to retrieve. Default is 1.
ItemsPerPage
The number of items per page. Default is 10.
SearchQuery
A search string to filter challenges by name.
OrderBy
The field to order the results by. Default is Id
.
IsAscending
A flag indicating whether the results should be ordered in ascending order. Default is true
.
Id
Unique identifier for the challenge.
Name
The name of the challenge.
Description
Brief summary of the challenge.
Startdate
Challenge start date.
Enddate
Challenge end date.
EndsAfter
Days left until the challenge ends.
PeopleFinished
Number of people that completed the challenge.
IsLocked
If isLocked
equals 1 it waits until the parent challenge is achieved.
Category*
Category info of the challenge.
Image
The URL for the challenge's image.
Id
Unique identifier of the category.
Name
Name of the category.