Skip to content

Marks a lesson complete or incomplete for the current user and returns the recalculated course progress track.

state must be completed or incomplete. The caller must already be enrolled, and both the course and the lesson must be published. When the update takes progress to 100 per cent the course completion routine runs and is_completed comes back true. A lesson gated behind a video watch threshold returns an error with a video_watch_required code and the required percentage.

Endpoint ​

  • Method: PUT
  • Path: /courses/{course_id}/lessons/{lesson_id}/completion
  • Edition: Core
  • Controller: CourseController@updateCompletionLesson
  • Route source: fluent-community/Modules/Course/Http/course_api.php:15
  • Controller source: fluent-community/Modules/Course/Http/Controllers/CourseController.php

Live sample

The request and response below were recorded against a running FluentCommunity install and then anonymised — member names, emails, avatars and post content are fictional, and long collections are trimmed to a few entries.

PUT Update Lesson Completion​

PUT
/courses/{course_id}/lessons/{lesson_id}/completion

Marks a lesson complete or incomplete for the current user and returns the recalculated course progress track.

Controller: CourseController@updateCompletionLesson
Route source: fluent-community/Modules/Course/Http/course_api.php:15

Authorizations​

ApplicationPasswords

WordPress Application Passwords — use Basic auth with username:application_password.

Type
API Key (header: Authorization)

Parameters​

Path Parameters

course_id*

Course ID extracted from the URL path.

Type
integer
Required
lesson_id*

Lesson ID extracted from the URL path.

Type
integer
Required

Request Body​

application/json
JSON
{
  
"state": "string"
}

Responses​

Successful response

application/json
JSON
{
  
"is_completed": true,
  
"message": "string",
  
"track": {
  
  
"completed_lessons": [
  
  
  
{
  
  
  
  
"additionalProperties": "string"
  
  
  
}
  
  
],
  
  
"isEnrolled": true,
  
  
"progress": 0
  
}
}

Playground​

Authorization
Variables
Key
Value
Body

Samples​

Powered by VitePress OpenAPI

FluentCommunity developer documentation