Skip to main content
The sdk.courses namespace provides access to digital courses purchased by the customer. All methods require authentication (Bearer token set via sdk.setAuthToken()).

Methods

courses.getAll(params?)

Get a paginated list of courses available to the customer.
Parameters: Returns: { data: Course[]; pagination?: Pagination }

courses.getById(id)

Get details for a specific course, including its modules.
Returns: Course

courses.getProgress(courseId)

Get the customer’s progress for a specific course.
Returns: CourseProgress

courses.getModule(courseId, moduleId)

Get the content of a specific module within a course.
Returns: CourseModule

courses.completeModule(courseId, moduleId)

Mark a module as completed.
Returns: { success: boolean }

Legacy Customer Endpoints

For backward compatibility, the SDK also provides these legacy methods that use the /customer/courses endpoints:

Types

Example: Course Player