Mark a lesson completed for a learner.

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Marks one lesson completed or not completed for a learner and recalculates their progress. Note the inverted flag: isSessionComplete false marks the lesson completed.

Endpoint

post https://{TrainerCentral-API-Domain}/tc/api/v1/trainer/course/{courseId}/manualLessonCompletion.json

OAuth Scope

TrainerCentral.courseapi.CREATECopied!

Headers

tc-orgIdstring(Required)

ID of the academy (orgId).

Example
51517414

Path Parameters

courseIdstring(Required)

ID of the course.

Request Body

application/json
isSessionCompleteboolean(Required)

Inverted flag: false marks the lesson completed; true marks it not completed.

sessionJSON Object(Required)

Lesson occurrence and learner to update.

Hide Sub-Attributes
talkIdlong(Required)

Occurrence ID (talkId) of the lesson, not its sessionId.

courseMemberIdlong(Required)

courseMemberId of the learner (role 3).

Request Example

cURL
cURL
Java
Python
Deluge
Copied!
curl --request POST \
  --url https://trainercentral.zoho.com/tc/api/v1/trainer/course/{courseId}/manualLessonCompletion.json \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'content-type: application/json' \
  --header 'tc-orgId: 51517414' \
  --data '{"isSessionComplete":false,"session":{"courseMemberId":3000000000090,"talkId":3000000000052}}'

Body Parameters

Mark a lesson completed.

Mark a lesson completed.

Mark a lesson not completed.

Copied!
  {
    "isSessionComplete": false,
    "session": {
      "courseMemberId": 3000000000090,
      "talkId": 3000000000052
    }
  }
                
  {
    "isSessionComplete": true,
    "session": {
      "courseMemberId": 3000000000090,
      "talkId": 3000000000052
    }
  }
                
▼ Show full

Response Parameters

courseMemberJSON Object

The learner's course progress after the change.

Hide Sub-Attributes
idstring

courseMemberId of the learner.

completedLessonstring

Number of lessons completed.

completionPercentagestring

Course completion percentage (0-100).

isCourseCompletedByTrainerstring

true when a trainer marked the whole course completed.

isCompletedboolean

true when the lesson is now completed; false when not.

errorJSON Object

Error details.

Hide Sub-Attributes
codestring

Deprecated numeric error code (for example ST_202). Prefer codeStr; omitted from doc samples.

codeStrstring

Error code name (ShowtimeErrorCode / err_code_str), for example MISSING_PARAMETER.

messagestring

Error message.

Possible Error Codes

HTTP CodeError CodeDescription
500ST_102

UNAUTHORISED_ACCESS - The user is not an academy owner, admin or trainer of this course, or the course is not in this academy. Do not retry unchanged.

ST_84

INVALID_ACTION - No lesson progress for this talkId and learner. Check that talkId is in this course and the learner is enrolled. Do not retry unchanged.

Response Example

Lesson marked completed.

200
200
400
500
Copied!
  {
    "isCompleted": "true",
    "courseMember": {
      "id": "3000000000090",
      "completedLesson": "2",
      "completionPercentage": "50",
      "isCourseCompletedByTrainer": "false"
    }
  }
                
  {
    "error": {
      "code": "string",
      "codeStr": "string",
      "message": "string"
    }
  }
                
500 Request failed; see the error code.
▼ Show full

Rate Limits

Duration1 minute
Threshold20
Lock Period5 minutes

Duration - Time window for the threshold.
Threshold - Number of API calls allowed within the specified duration.
Lock Period - Wait time before consecutive API requests.