POST /api/v1/student/{studentId}/units/{studentUnitId}/progress

Update or create progress tracking for a specific lesson. Records completion percentage, updates last accessed time, and automatically updates the unit resume point. Use this endpoint whenever a student completes a section of a lesson or finishes the entire lesson.

Path parameters

  • studentId string Required

    Unique identifier of the student

  • studentUnitId string Required

    Unique identifier of the student unit enrollment

application/json

Body Required

  • lessonId string Required

    Lesson ID

  • progress number Required

    Progress percentage (0-100)

    Minimum value is 0, maximum value is 100.

  • remarks string

    Optional remarks or notes

Responses

  • 200 application/json

    Lesson progress updated successfully

    Hide response attributes Show response attributes object
    • message string Required

      Success message

    • success boolean Required

      Success status

    • progress object Required

      Updated progress information

      Hide progress attributes Show progress attributes object
      • id string Required

        Progress record ID

      • studentUnitId string Required

        Student unit ID

      • lessonId string Required

        Lesson ID

      • lessonTitle string Required

        Lesson title

      • progress number Required

        Progress percentage (0-100)

      • lastAccessedAt string Required

        Last accessed timestamp

      • remarks string

        Remarks or notes

      • createdAt string Required

        Created timestamp

      • updatedAt string Required

        Updated timestamp

    • overallProgress number Required

      Overall unit progress percentage

  • 400

    Invalid progress value or lesson does not belong to unit

  • 404

    Student unit not found or does not belong to this student

POST /api/v1/student/{studentId}/units/{studentUnitId}/progress
curl \
 --request POST 'http://localhost:3500/api/v1/student/uuid-string/units/uuid-string/progress' \
 --header "Content-Type: application/json" \
 --data '{"lessonId":"uuid-string","progress":75,"remarks":"Completed video section"}'
Request examples
{
  "lessonId": "uuid-string",
  "progress": 75,
  "remarks": "Completed video section"
}
Response examples (200)
{
  "message": "string",
  "success": true,
  "progress": {
    "id": "uuid-string",
    "studentUnitId": "uuid-string",
    "lessonId": "uuid-string",
    "lessonTitle": "Introduction to Arrays",
    "progress": 75,
    "lastAccessedAt": "2025-10-03T10:30:00.000Z",
    "remarks": "string",
    "createdAt": "2025-09-25T10:30:00.000Z",
    "updatedAt": "2025-09-25T10:30:00.000Z"
  },
  "overallProgress": 45
}