List the chapters of 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

Returns all chapters (sections) of a course in display order, with the lesson count of each. The list is not paginated.

Endpoint

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

OAuth Scope

TrainerCentral.sectionapi.READCopied!

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 GET \
  --url https://trainercentral.zoho.com/tc/api/v1/trainer/course/{courseId}/sections.json \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'tc-orgId: 51517414'

Response Parameters

sectionsJSON Array

Chapters of the course, ordered by sectionIndex.

Hide Sub-Attributes
JSON Object
Show Sub-Attributes
sectionIdstring

ID of the chapter (sectionId).

idstring

Same as sectionId.

namestring

Name of the chapter.

sectionNamestring

Name of the chapter (returned by Create Course Chapter).

sectionIndexstring

Position of the chapter, starting at 0.

statusstring

Status of the chapter. Allowed: 0=Default (visible), 1=Draft.

courseIdstring

ID of the course.

coursestring

Same as courseId.

sessionsCountstring

Number of lessons in the chapter.

createdBystring

User ID of the creator.

createdTimestring

Creation time in epoch milliseconds.

lastUpdatedBystring

User ID of the last editor.

lastUpdatedTimestring

Last update time in epoch milliseconds.

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 - The user is not an academy owner, admin or trainer of this course. Do not retry with the same token.

Response Example

Course with two chapters.

200
200
400
500
Copied!
  {
    "sections": [
      {
        "sectionId": "3000000000050",
        "id": "3000000000050",
        "name": "Getting Started",
        "sectionIndex": "0",
        "status": "0",
        "courseId": "3000000000022",
        "course": "3000000000022",
        "sessionsCount": "3",
        "createdBy": "51456901",
        "createdTime": "1782727609141",
        "lastUpdatedBy": "51456901",
        "lastUpdatedTime": "1782727609141"
      },
      {
        "sectionId": "3000000000060",
        "id": "3000000000060",
        "name": "Object-Oriented Python",
        "sectionIndex": "1",
        "status": "0",
        "courseId": "3000000000022",
        "course": "3000000000022",
        "sessionsCount": "0",
        "createdBy": "51456901",
        "createdTime": "1782727610141",
        "lastUpdatedBy": "51456901",
        "lastUpdatedTime": "1782727610141"
      }
    ]
  }
                
  {
    "error": {
      "code": "string",
      "codeStr": "string",
      "message": "string"
    }
  }
                
500 Request failed; see the error code.
▼ Show full

Rate Limits

Duration1 minute
Threshold20

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