Skip to main content
GET
/
course_students
/
{id}
JavaScript
import Whop from '@whop/sdk';

const client = new Whop({
  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});

const courseStudent = await client.courseStudents.retrieve('id');

console.log(courseStudent.id);
{
  "id": "<string>",
  "completed_lessons_count": 42,
  "completion_rate": 6.9,
  "total_lessons_count": 42,
  "first_interaction_at": "2023-12-01T05:00:00.401Z",
  "last_interaction_at": "2023-12-01T05:00:00.401Z",
  "user": {
    "id": "user_xxxxxxxxxxxxx",
    "name": "John Doe",
    "username": "johndoe42"
  },
  "course": {
    "id": "cors_xxxxxxxxxxxxx",
    "title": "Introduction to Technical Analysis",
    "experience": {
      "id": "exp_xxxxxxxxxxxxxx"
    }
  }
}

Authorizations

Authorization
string
header
required

A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************

Path Parameters

id
string
required

The unique identifier of the course student record to retrieve.

Response

A successful response

An enrollment record for a student in a course, including progress and completion metrics.

id
string
required

The unique identifier for the course student type.

completed_lessons_count
integer
required

The total number of lessons this student has marked as completed in the course.

Example:

42

completion_rate
number
required

The percentage of available lessons the student has completed, as a value from 0 to 100 rounded to two decimal places.

Example:

6.9

total_lessons_count
integer
required

The total number of visible lessons available to this student in the course.

Example:

42

first_interaction_at
string<date-time>
required

The timestamp when the student first interacted with this course, as a Unix timestamp.

Example:

"2023-12-01T05:00:00.401Z"

last_interaction_at
string<date-time>
required

The timestamp when the student most recently interacted with this course, as a Unix timestamp.

Example:

"2023-12-01T05:00:00.401Z"

user
object
required

The user profile of the enrolled student.

course
object
required

The course this student is enrolled in.