Get Quest Points History
Get a user's total Quest Points for a specific quest as well as a history of the points they have earned.
API Endpointβ
GET /group-quests/<questId>/points/<yggUserId>
Headersβ
You must include your API_KEY in the request header for authentication. The required header format is:
API_KEY: your-api-key-here
Path Parametersβ
| Param | Description |
|---|---|
questId | The unique ID of the quest in YGG's system. YGG will provide your questId to you. |
yggUserId | The unique ID of the user in YGG's system. If you need to retrieve the yggUserId for a particular user, you can use the Identify a User endpoint. |
Responsesβ
-
Success (200): If the Quest Points are successfully issued, you will receive a
200response with the following body:{
"success": true,
"data": {
"totalPoints": 4,
"history": [
{
"createdAt": "2024-11-01T23:19:16.341Z",
"eventPoints": 3,
"eventName": "ReturnToBase",
"eventDescription": "You got the opponent's flag back to your base"
},
{
"createdAt": "2024-11-01T23:19:00.072Z",
"eventPoints": 1,
"eventName": "CaptureFlag",
"eventDescription": "You got the opponent's flag"
}
]
}
} -
Error (400): If there is an error in the request, such as invalid data, you will receive a
400response with the following body:{
"success": false,
"message": "Description of the error"
}
Example Requestβ
Hereβs an example using curl to retrieve a user's total Quest Points for a specific quest:
curl -X GET /group-quests/quest123/points/user456 \
-H "API_KEY: your-api-key-here"