Documentation Index
Fetch the complete documentation index at: https://docs.sunschool.xyz/llms.txt
Use this file to discover all available pages before exploring further.
Get Learner Settings
Authentication Required: Any authenticated user
GET /api/learner-settings/:learnerId
Learner user ID
Response
Response Example
Whether double-or-loss mode is enabled for this learner
Update Double-or-Loss Setting
Authentication Required: PARENT or ADMIN role
PUT /api/learner-settings/:learnerId/double-or-loss
Learner user ID
Enable or disable double-or-loss mode
Double-or-loss mode allows learners to risk their points for higher rewards on quiz questions.
Response
Activities (Legacy Rewards)
Authentication Required: Any authenticated user
GET /api/activities
Response
Response Example
Allocate Tokens to Activities
Authentication Required: Any authenticated user
POST /api/awards/allocate
Array of allocation objects with activityId and tokens
Response
Error Codes
- 400 - allocations must be an array
- 400 - Not enough tokens (INSUFFICIENT_TOKENS)
- 500 - Server error
Cash In Award
Authentication Required: Any authenticated user
POST /api/awards/:awardId/cash-in
Award ID to cash in
Response
Toggle Award Sharing
Authentication Required: Any authenticated user
POST /api/awards/:awardId/share
Award ID to share
Enable or disable sharing
Share title
Share description
Response
Get Public Award Share
No Authentication Required - Public endpoint
GET /users/:username/award/:hash
Username of the award owner
Unique share hash
Response
Response Example
Error Codes
- 404 - Not found (share doesn’t exist or is not active)