Skip to main content

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​

ParamDescription
questIdThe unique ID of the quest in YGG's system. YGG will provide your questId to you.
yggUserIdThe 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 200 response 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 400 response 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"