Recalculate learner completion in a course.

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

Starts a background job that recalculates the completion percentage of every learner in a course. The response type is success when started, or inProgress when a job is already running.

Endpoint

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

OAuth Scope

TrainerCentral.courseapi.UPDATECopied!

Headers

tc-orgIdstring(Required)

ID of the academy (orgId).

Example
51517414

Path Parameters

courseIdstring(Required)

ID of the course.

Request Example

cURL
cURL
Java
Python
Deluge
Copied!
curl --request PUT \
  --url https://trainercentral.zoho.com/tc/api/v1/trainer/course/{courseId}/recalculateCompletion.json \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'tc-orgId: 51517414'

Response Parameters

messagestring

Result message.

typestring

Result type. Allowed: success, error, warning, info, inProgress.

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_94

INVALID_COURSE - Course not found or deleted. Pass a valid courseId. Do not retry unchanged.

ST_102

UNAUTHORISED_ACCESS - No access to this course, or it is not a normal course (type 0). Do not retry unchanged.

Response Example

Recalculation started.

Recalculation started.

Recalculation already running.

200
200
400
500
Copied!
  {
    "message": "Recalculate started in background",
    "type": "success"
  }
                
  {
    "message": "Recalculation already in progress please wait!",
    "type": "inProgress"
  }
                
  {
    "error": {
      "code": "string",
      "codeStr": "string",
      "message": "string"
    }
  }
                
500 Request failed; see the error code.
▼ Show full

Rate Limits

Duration1 minute
Threshold10
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.