Get all user rewards by userId
GET/userRewards
Get all user rewards by userId
Request
Query Parameters
startDate date-time
Search by start date since claimedAt
endDate date-time
Search by end date until claimedAt
page integer
Possible values: >= 1
Default value: 1
Specify the page number for pagination (default is 1).
limit integer
Default value: 10
Specify the number of projects per page (default is 10, 0 gets all results).
sortBy string
Possible values: [createdAt
, claimedAt
]
Field to order the results by (e.g., 'createdAt', 'numMonthlyUsers'). Default is 'createdAt'.
sortOrder string
Possible values: [asc
, desc
]
Default value: desc
'asc' for ascending or 'desc' for descending order. Default is 'desc'.
Responses
- 200
- 403
- 404
- 500
UserRewards retrieved successfully
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
expiresAt date-time
state userRewardState (string)
Possible values: [pending
, redeemed
, cancelled
]
rewardId string
userId string
remainingUses integer
id userRewardId (string)
Unique identifier for UserReward
createdAt date-time
[
{
"userId": "83688660-e49e-4b3c-9ad2-22fa1ee69288",
"remainingUses": 1,
"id": "URdef4567",
"rewardId": "r135HCrJs",
"status": "pending",
"createdAt": "2024-10-30T12:00:00Z"
},
{
"userId": "83688660-e49e-4b3c-9ad2-22fa1ee69288",
"createdAt": "2024-10-29T09:30:00Z",
"id": "UR0123abc",
"status": "redeemed",
"rewardId": "rJLy6qcRz"
}
]
Forbidden
- application/json
- Schema
- Example (from schema)
- Example
Schema
error string
{
"error": "string"
}
{
"error": "Forbidden access"
}
NotFound
- application/json
- Schema
- Example (from schema)
- Example
Schema
error string
{
"error": "string"
}
{
"error": "A mandatory item was not found"
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
- Example
Schema
error string
{
"error": "string"
}
{
"error": "Internal Server Error"
}
Loading...