Overview
The User Progress API tracks completion status for learning resources. Progress is global per user per resource - when a resource is marked complete, it appears complete across all instances.Key Concepts
Global Progress
Progress is tracked globally, not per-instance:- Completing a resource in one study plan instance marks it complete everywhere
- User can have multiple instances of the same plan, but resource completion is shared
- Progress records store
userIdandresourceId(noinstanceId)
Progress Fields
completed- Boolean completion statusprogress- Numeric progress (0-100)timeSpent- Time spent in minutesnotes- User notes on the resourcecompletedAt- Timestamp when marked completelastAccessedAt- Last interaction timestamp
Get User Progress
GET /api/user-progress
Get user’s progress records. Requires authentication.
Query Parameters
Filter by specific resource ID
Response
Array of progress objects
Update Progress
POST /api/user-progress
Create or update progress for a resource. Requires authentication.
Request Body
Instance ID (used for verification and updating instance’s completedResources)
Resource ID
Mark as completed/incomplete
Progress percentage (0-100)
Time spent in minutes
User notes about the resource
Response
“Progress created successfully” or “Progress updated successfully”
The created/updated progress object
Behavior
- If progress record exists: Updates the existing record
- If progress record doesn’t exist: Creates new record
- When
completedchanges fromfalsetotrue: SetscompletedAttimestamp - When
completedchanges fromtruetofalse: ClearscompletedAt - Updates instance’s
completedResourcesarray accordingly - Always updates
lastAccessedAtto current time
Check Completion Status
GET /api/user-progress/check
Check completion status for multiple resources. Requires authentication.
Query Parameters
Comma-separated list of resource IDs
Response
Returns an object mapping resource IDs to completion status:Completion status for each resource
Bulk Update
POST /api/user-progress/bulk
Mark multiple resources as complete or incomplete. Requires authentication.
Request Body
Array of resource IDs to update
Completion status to set for all resources
Response
“Bulk update completed”
Array of result objects for each resource
Behavior
- Creates progress records if they don’t exist
- Updates existing records
- Sets
completedAttimestamp when marking complete - Clears
completedAtwhen marking incomplete - Processes all resources, returns individual success/failure for each
Progress and Instances
While progress is global, it affects instances:- Instance Creation: New instance starts with no completed resources
- Marking Complete: Updates global progress AND adds to instance’s
completedResourcesarray - Instance Queries: Instance endpoints automatically populate completion status from global progress
- Multiple Instances: Same resource can appear in multiple instances, completion shared