GET
GetChallengesInfoForUser
GET
GetChallengesInfoForUserOverview
The GetChallengesInfoForUser
API endpoint retrieves a paginated list of challenges available to a specific user, with optional filtering by search query, category, and order.
Use Cases Examples:
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
andItemsPerPage
parameters.
Sort Challenges:
Challenges can be sorted by a specific field, either in ascending or descending order, using the
OrderBy
andIsAscending
parameters.
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.
Query Parameters
Property | Type | Options | Description |
---|---|---|---|
UserId | string | Required | The phone number of the user for whom challenges are being retrieved. |
CategoryId | int | Optional | The ID of the category to filter challenges by. |
Page | int | Optional | The page number of the results to retrieve. Default is 1. |
ItemsPerPage | int | Optional | The number of items per page. Default is 10. |
SearchQuery | string | Optional | A search string to filter challenges by name. |
OrderBy | string | Optional | The field to order the results by. Default is |
IsAscending | bool | Optional | A flag indicating whether the results should be ordered in ascending order. Default is |
Request Example
Response
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.
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. |
EndsAfter | int | Days left until the challenge ends. |
PeopleFinished | int | Number of people that completed the challenge. |
IsLocked | bool | If |
Category* | object | Category info of the challenge. |
Image | string | The URL for the challenge's image. |
Category: Category information of the challenge.
Property | Type | Description |
---|---|---|
Id | int | Unique identifier of the category. |
Name | string | Name of the category. |
Response Sample
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.
Last updated