LEAD LMS API

LEAD LMS API

Headers

These headers should be included in all requests (with the exception of Authorization, which is only required for authenticated requests)

  • Content-Type: application/json

  • Accept: application/json

  • Authorization: Bearer <JWT_token>

Authentication

Issuing an API token may be done by submitting a POST request to the /api/login endpoint with the form-data parameters used to authenticate a user via the web interface. The response will be a JSON object containing the token, which should be stored and used for all subsequent requests. Access Tokens will expire in 48 hours.

  • POST /api/login

    • Parameters

      • email: string, required - The email address of the user.

      • password: string, required - The password of the user.

    • Response
      HTTP 200

    { "access_token": "4|xnx8AhAoRt1BgQOqYwaGjvHtyKo0WLe4ViHyHjUZ", "token_type": "Bearer" }
    • Errors
      HTTP 401

    { "message": "Invalid login details" }

Revoking an API token may be done by submitting a GET request to the /api/revoke-tokens/{user_id} endpoint with the token in the Authorization header. The response will be a JSON object containing a success message. Note: given the 48 hour expiry it is unlikely you need to manage tokens on this level.

  • GET /api/revoke-tokens{user_id}

    • Where user_id is the ID of the user whose token is being revoked.

    • Response
      HTTP 200

    { "message": "Tokens revoked" }

Users

  • GET api/users/email/lookup?email=[email]

    • Returns an existing User record with the given email or 404s

    • Note: email should be URL-encoded (or will have issues with certain characters)

    • Response

    { "user": { "id": 1, "email": "nathan@fivable.com", "role": "admin", "salutation": null, ... }, }
  • POST api/users

    • Returns a paginated list of users.

    • Response

    { "users": { "current_page": 1, "data": [ { "id": 1, "email": "nathan@fivable.com", "role": "admin", "salutation": null, "first_name": "Nathan", "last_name": "Williams", "suffix": null, "impersonating_user_id": null, "stackable_person_id": 7824, "virtus_id": null, "virtus_status": 0, "learner_type": null, "phone": null, "last_login": "2023-08-28 19:08:08", "language": "en-US", "time_zone": "America/New_York", "enrolled_in_academy": 0, "sms_opt_in": 0, "disable_notifications": 1, "stripe_customer_id": "cus_123", "profile_picture": null, "email_verified_at": "2021-06-08T15:14:25.000000Z", "email_verification_redirect": null, "created_at": "2020-02-18T02:17:55.000000Z", "updated_at": "2023-08-28T19:08:08.000000Z", "deleted_at": null, "name": "Nathan Williams", "full_name": "Nathan Williams", "profile_picture_url": "<url>" }, ... ], "first_page_url": "<http://localhost:8060/api/users?page=1",> "from": 1, "last_page": 334, "last_page_url": "<http://localhost:8060/api/users?page=334",> "links": [ { "url": null, "label": "&laquo; Previous", "active": false }, ... ], "next_page_url": "<url>", "path": "<url>", "per_page": 25, "prev_page_url": null, "to": 25, "total": 8350 }
  • POST api/users

    • Stores a new User record.

    • Form-Data Parameters

      • email: string, required - The email address of the user.

      • password: string, required - The password of the user.

      • role: string, required - The role of the user. Must be one of admin, global_leader, learner.

      • salutation: string, optional - The salutation of the user.

      • first_name: string, required - The first name of the user.

      • last_name: string, required - The last name of the user.

      • suffix: string, optional - The suffix of the user.

      • stackable_person_id: integer, optional - The Stackable ID of the user.

      • virtus_id: integer, optional - The Virtus ID of the user.

      • phone: string, optional - The phone number of the user.

      • language: string, required - The language of the user. Must be one of en-US, es-US.

      • time_zone: string, required - The time zone of the user. Must be a valid time zone string.

      • enrolled_in_academy: boolean, optional - Whether or not the user is enrolled in the Academy.

      • sms_opt_in: boolean, optional - Whether or not the user has opted in to receive SMS messages.

      • disable_notifications: boolean, optional - Whether or not the user has opted out of receiving notifications.

      • stripe_customer_id: string, optional - The Stripe Customer ID of the user.

      • profile_picture_file: file, optional - The profile picture of the user.

      • profile_picture: string, optional - The URL of the profile picture of the user.

      • learner_place_ids: array, optional - The IDs of the places the user is enrolled in.

      • local_leader_place_ids: array, optional - The IDs of the places the user is a local leader of.

      • address: JSON, optional - The address of the user.

        • street_1: string, optional - The first line of the address.

        • street_2: string, optional - The second line of the address.

        • city: string, optional - The city of the address.

        • state: string, optional - The state of the address.

        • zip: string, optional - The zip code of the address.

      • user_metas: JSON, optional - The meta data of the user.

        • slug: string, The slug of the meta data.

        • name: string, The key (name) of the meta data.

        • value: string, The value of the meta data.

      • Response
        HTTP 200

      { "status": 201, "message": "User successfully stored", "user": { "id": 8783, "email": "nathan+api@fivable.com", "role": "learner", "salutation": null, "first_name": "Nathan", "last_name": "Williams", "suffix": null, "impersonating_user_id": null, "stackable_person_id": 144, "virtus_id": null, "virtus_status": 0, "learner_type": null, "phone": null, "last_login": null, "language": "en-US", "time_zone": null, "enrolled_in_academy": 0, "sms_opt_in": 0, "disable_notifications": 0, "stripe_customer_id": "cus_OfPpGfJGhyBitw", "profile_picture": null, "email_verified_at": null, "email_verification_redirect": null, "created_at": "2023-09-19T14:33:20.000000Z", "updated_at": "2023-09-19T14:33:20.000000Z", "deleted_at": null, "name": "Nathan Williams", "full_name": "Nathan Williams", "profile_picture_url": "<url>", "team_roles": [], "cohorts": [], "subscriptions": [], "groups": [], "learning_paths": [], "courses": [], "course_containers": [] } }
  • PUT api/users/{user}

    • Updates a specified User

    • URL Parameters

      • user: int, required - The ID of the User to update.

    • Form-Data Parameters

      • email: string, required - The email address of the user.

      • password: string, required - The password of the user.

      • role: string, required - The role of the user. Must be one of admin, global_leader, learner.

      • salutation: string, optional - The salutation of the user.

      • first_name: string, required - The first name of the user.

      • last_name: string, required - The last name of the user.

      • suffix: string, optional - The suffix of the user.

      • stackable_person_id: integer, optional - The Stackable ID of the user.

      • virtus_id: integer, optional - The Virtus ID of the user.

      • phone: string, optional - The phone number of the user.

      • language: string, required - The language of the user. Must be one of en-US, es-US.

      • time_zone: string, required - The time zone of the user. Must be a valid time zone string.

      • enrolled_in_academy: boolean, optional - Whether or not the user is enrolled in the Academy.

      • sms_opt_in: boolean, optional - Whether or not the user has opted in to receive SMS messages.

      • disable_notifications: boolean, optional - Whether or not the user has opted out of receiving notifications.

      • stripe_customer_id: string, optional - The Stripe Customer ID of the user.

      • profile_picture_file: file, optional - The profile picture of the user.

      • profile_picture: string, optional - The URL of the profile picture of the user.

      • learner_place_ids: array, optional - The IDs of the places the user is enrolled in.

      • local_leader_place_ids: array, optional - The IDs of the places the user is a local leader of.

      • address: JSON, optional - The address of the user.

        • street_1: string, optional - The first line of the address.

        • street_2: string, optional - The second line of the address.

        • city: string, optional - The city of the address.

        • state: string, optional - The state of the address.

        • zip: string, optional - The zip code of the address.

      • user_metas: JSON, optional - The meta data of the user.

        • slug: string, The slug of the meta data.

        • name: string, The key (name) of the meta data.

        • value: string, The value of the meta data.

    • Response
      HTTP 200

      { "message": "User successfully updated", "user": { "id": 8784, "email": "nathan+api1@fivable.com", "role": "admin", "salutation": null, "first_name": "NathanUpdated", "last_name": "Williams", "suffix": null, "impersonating_user_id": null, "stackable_person_id": 145, "virtus_id": null, "virtus_status": 0, "learner_type": null, "phone": null, "last_login": null, "language": "en-US", "time_zone": null, "enrolled_in_academy": 0, "sms_opt_in": 0, "disable_notifications": 0, "stripe_customer_id": "cus_OfQEUcoYax3A4g", "profile_picture": null, "email_verified_at": null, "email_verification_redirect": null, "created_at": "2023-09-19T14:58:26.000000Z", "updated_at": "2023-09-19T15:06:58.000000Z", "deleted_at": null, "name": "NathanUpdated Williams", "full_name": "NathanUpdated Williams", "profile_picture_url": "<url>", "user_metas": [ { "id": 32969, "user_id": 8784, "slug": "address-object", "name": "Address Object", "value": "{\"street_1\":null,\"street_2\":null,\"city\":null,\"state\":null,\"zip\":null}", "created_at": "2023-09-19T14:58:29.000000Z", "updated_at": "2023-09-19T14:58:29.000000Z" } ] } }
  • DELETE api/users/{user}

    • Soft-deletes a specified User

    • ** URL Parameters**

      • user: int, required - The ID of the User to soft-delete.

    • Response

      • HTTP 200

      { "message": "User deleted" }
  • GET api/users/{user}/courses

    • List all of the specified User’s Courses

    • URL Parameters

      • user: int, required - The ID of the User to retrieve Courses for.

    • Response
      HTTP 200

    { "courses": [ { "id": 1, "name": "The Extraordinary Minister of Holy Communion", "type": null, "description": "The Extraordinary Minister of Holy Communion (EMHC) is...", "status": "published", "featured_image_id": 131, "instructor_id": null, "objectives": null, "length": "00:45:00", "completion_url": null, "experience_completion_urls": null, "custom_completion_message": null, "event_dates": null, "event_dates_requirement": null, "allow_local_leader_read_only": 0, "should_invite_users": 0, "due_date": null, "credit_value": null, "user_limit": null, "feedback_url": null, "feedback_label": null, "feedback_description": null, "language": null, "hidden": 0, "premium": 0, "registration_fee": null, "stackable_place_ids": null, "opens_at": null, "closes_at": null, "published_at": null, "created_at": "2020-02-19T17:09:39.000000Z", "updated_at": "2022-11-18T02:56:18.000000Z", "deleted_at": null, "class_name": "App\\Models\\Course", "image_url": "<url>", "excerpt": "The Extraordinary Minister of Holy Communion (EMHC) is...", "is_actionable": true, "pivot": { "user_id": 1, "course_id": 1, "term_id": null, "credit_id": null, "status_mask": 2, "has_paid": 0, "rsvp_time": null, "rsvp_id": null, "completed_by": null, "completed_at": null, "bookmarked_at": null, "created_at": "2020-03-06T03:53:39.000000Z", "updated_at": "2020-03-06T03:59:43.000000Z", "is_bookmarked": false }, "featured_image": {} }, ... ] }
  • GET api/users/{user}/assignments

    • List all of the specified User’s Assignments

    • URL Parameters

      • user: int, required - The ID of the User to retrieve Assignments for.

    • Response
      HTTP 200

    { "assignments": [ { "id": 3, "description": "<html>", "submission_option": "wysiwyg", "featured_image_id": 104, "language": null, "stackable_place_ids": null, "is_lor": 0, "created_at": "2020-03-16T15:36:24.000000Z", "updated_at": "2022-11-21T19:05:05.000000Z", "deleted_at": null, "name": "Catechist's Reflection", "enable_grouping": 0, "due_date": null, "learning_path_id": 2, "learning_path_name": "Catechist Formation", "status_label": "Submitted", "completion_date": null, "view_url": "<url>", "class_name": "App\\Models\\Assignment", "image_url": "<url>", "excerpt": "Watch Bishop Frank's invitation...", "featured_image": {} }, ... ], }
  • GET api/users/{user}/course-containers

    • List all of the specified User’s Course Containers

    • URL Parameters

      • user: int, required - The ID of the User to retrieve Course Containers for.

    • Response
      HTTP 200

    { "course_containers": [ { "id": 34, "name": "Nathan's Testing Course Container", "description": "<p>description</p>", "featured_image_id": 524, "instructor_id": 86, "objectives": [], "custom_completion_message": null, "credit_value": null, "feedback_url": null, "feedback_label": null, "feedback_description": null, "language": null, "hidden": 0, "premium": 0, "learners_receive_new_content": 0, "new_content_invalidates_completions": 0, "registration_fee": null, "stackable_place_ids": null, "created_at": "2023-06-06T01:38:26.000000Z", "updated_at": "2023-06-06T01:38:26.000000Z", "deleted_at": null, "class_name": "App\\Models\\CourseContainer", "excerpt": "description ", "image_url": "<url>", "featured_image": {} }, ... ] }
  • GET api/users/{user}/groups

    • List all of the specified User’s Groups

    • URL Parameters

      • user: int, required - The ID of the User to retrieve Groups for.

    • Response
      HTTP 200

    { "groups": [ { "id": 56, "name": "Mentees", "featured_image_id": null, "parent_group_id": null, "inherit_parent_properties": 0, "group_type_id": 11, "user_can_view": 1, "user_can_assign": 0, "has_authorization_status": 1, "authorization_interval": null, "authorization_renewal_notice_days": 0, "compliance_expiry_interval": null, "uses_virtus": 0, "created_at": "2023-03-09T15:05:41.000000Z", "updated_at": "2023-03-09T15:05:41.000000Z", "deleted_at": null, "class_name": "App\\Models\\Group", "image_url": "<url>", "pivot": { "user_id": 1, "group_id": 56, "authorization_expires_at": null, "authorization_status": null, "authorization_status_override": null, "authorization_status_override_reason": null, "authorized_at": null, "id": 7168, "initial_learning_path_id": 49, "is_manager": 0, "is_member": 1, "created_at": "2023-08-11T18:24:14.000000Z", "updated_at": "2023-08-11T18:24:14.000000Z" }, "featured_image": null }, ... ] }
  • GET api/users/{user}/terms

    • List all of the specified User’s Terms

    • URL Parameters

      • user: int, required - The ID of the User to retrieve Terms for.

    • Response
      HTTP 200

    { "groups": [ { "id": 2, "name": "EMHC Continuing Formation Part One", "description": "As an EMHC, we know you are committed to...", "include_users": "custom", "user_dependent_dates": 1, "start_date": null, "end_date": null, "minimum_start_date": "2022-06-02T00:00:00.000000Z", "length": 200, "learning_path_trigger_id": 1, "term_trigger_id": null, "override_credit_goal": 1, "credit_goal": 1, "featured_image_url": "terms/eucharist-g8193efb71_1280.jpg", "featured_image_id": 98, "language": null, "require_virtus": 1, "recognition_type": null, "recognition_template_id": null, "recognition_generation_type": null, "recognition_content": null, "allow_termable_addition_after_end_date": 1, "created_at": "2022-05-13T17:17:44.000000Z", "updated_at": "2023-01-17T20:20:59.000000Z", "deleted_at": null, "has_ended": false, "is_upcoming": false, "pivot": { "user_id": 115, "term_id": 2, "id": 1862, "term_start_date": "2022-06-02T00:00:00.000000Z", "term_end_date": "2022-11-29T00:00:00.000000Z", "created_at": "2022-05-31T19:25:56.000000Z", "updated_at": "2022-05-31T19:25:56.000000Z", "credits_goal": 1, "credits_added_completed_object": { "required_credits_added": 1, "required_credits_completed": 1, "total_credits_added": 1, "total_credits_completed": 1, "credits_added_percentage": 100, "credits_completed_percentage": 100 } } }, ... ] }
  • POST /api/users/{user}/send-reset-password

    • Sends a password reset email to the specified user. The user will receive an email with a link to reset their password. This allows administrators to trigger password resets on behalf of users.

    • URL Parameters:
      - user: int, required - The ID of the User to send the password reset email to

    • Request Example:

      • POST /api/users/123/send-reset-password

    • Response (Success - HTTP 200):

      { "message": "Password reset link sent successfully", "success": true }
    • Response (Failure - HTTP 400):

      { "message": "Failed to send password reset link", "success": false }
    • Response (Unauthorized - HTTP 403):

      { "error": "Not authorized to send password reset for this User" }
    • Response (User Not Found - HTTP 404):

      • Standard Laravel 404 response

    • Side Effects:

      • Creates a token in the password_resets table (expires after 24 hours)

      • Sends an email to the user with a password reset link

      • User receives standard password reset email with link

      • When user completes the reset, their email_verified_at timestamp is automatically set if not already verified

    • Notes:

      • Emails are queued and therefor API will return success even if the email is not able to be sent

Learning Paths

  • GET api/learning-paths

    • Returns a list of Learning Paths.

    • Response
      HTTP 200

    { "learning_paths": [ { "id": 1, "name": "Learning Path 1", "description": "Ut enim ad minima veniam, quis nostrum...", "featured_image_id": 42, "instructor_id": null, "objectives": [], "type": null, "recognition_type": null, "recognition_template_id": null, "visibility": "index", "language": null, "credit_value": 100, "required_electives": 0, "restrict_assignments": 0, "require_virtus": 0, "require_lor": 0, "is_featured": 0, "prereq_lp_id": null, "next_lp_id": null, "auto_enroll_in_academy": 0, "assigned_visibility": 0, "stackable_place_ids": null, "place_type": null, "mandate_team_role_id": null, "published_at": null, "created_at": "2021-04-01T00:14:28.000000Z", "updated_at": "2023-04-06T12:38:09.000000Z", "deleted_at": null, "certificate_content": null, "custom_completion_message": null, "group_size": 1, "premium": 1, "learners_receive_new_content": 1, "new_content_invalidates_completions": 0, "registration_fee": 0, "cpm_list_id": null, "hide_registration_ministries": 0, "class_name": "App\\Models\\LearningPath", "image_url": "<url>", "excerpt": "Ut enim ad minima veniam, quis...", "is_locked": false, "first_prereq": null, "featured_image": {}, "prereq_learning_path": null }, ... ] }
  • GET /api/learning-paths/{learningPath}

    • Returns a single Learning Path.

    • URL Parameters

      • learningPath: int, required - The ID of the Learning Path to retrieve.

    • Response
      HTTP 200

    { "learning_path": { "id": 10, "name": "Learning Path 10 - Academy Auto-Enroll", "description": null, "featured_image_id": null, "instructor_id": null, "objectives": null, "type": null, "recognition_type": null, "recognition_template_id": null, "visibility": "index", "language": null, "credit_value": null, "required_electives": 0, "restrict_assignments": 0, "require_virtus": 0, "require_lor": 0, "is_featured": 0, "prereq_lp_id": null, "next_lp_id": null, "auto_enroll_in_academy": 1, "assigned_visibility": 0, "stackable_place_ids": null, "place_type": null, "mandate_team_role_id": null, "published_at": null, "created_at": "2021-05-05T19:06:07.000000Z", "updated_at": "2021-05-05T19:06:07.000000Z", "deleted_at": null, "certificate_content": null, "custom_completion_message": null, "group_size": 1, "premium": 0, "learners_receive_new_content": 0, "registration_fee": 0, "cpm_list_id": null, "hide_registration_ministries": 0, "class_name": "App\\Models\\LearningPath", "image_url": "<url>", "excerpt": "", "is_locked": false, "first_prereq": null, "featured_image": null, "prereq_learning_path": null } }
  • GET api/learning-paths/{learningPath}/pathables

    • Returns a list of Pathables for a specified Learning Path.

    • URL Parameters

      • learningPath: int, required - The ID of the Learning Path to retrieve Pathables for.

    • Response
      HTTP 200

    { "pathables": [ { "id": 5, "name": "Course 5", "type": null, "description": "Lorem ipsum", "status": null, "featured_image_id": null, "instructor_id": null, "objectives": null, "length": "04:00:00", "completion_url": null, "experience_completion_urls": null, "custom_completion_message": null, "event_dates": null, "event_dates_requirement": null, "allow_local_leader_read_only": 0, "should_invite_users": 0, "due_date": null, "credit_value": null, "user_limit": null, "feedback_url": null, "feedback_label": null, "feedback_description": null, "language": null, "hidden": 0, "premium": 0, "registration_fee": null, "stackable_place_ids": null, "opens_at": null, "closes_at": null, "published_at": null, "created_at": "2021-04-01T00:14:45.000000Z", "updated_at": "2021-07-16T06:48:55.000000Z", "deleted_at": null, "order": 1, "is_unlocked": false, "is_complete": false, "elective": false, "class_name": "App\\Models\\Course", "image_url": "<url>", "excerpt": "Lorem ipsum", "is_actionable": true, "current_user_pivot": null, "is_live": false, "is_mentor_meeting": false, "mentee_user_pivots": null, "pivot": { "learning_path_id": 10, "learning_pathable_id": 5, "learning_pathable_type": "App\\Models\\Course", "order": "1", "prerequisite": 0, "elective": 0, "pathable_completion_url": null, "field_mapping": null, "created_at": "2021-06-21T13:15:03.000000Z", "updated_at": "2021-06-21T13:15:03.000000Z" }, "users": [], "featured_image": null } ] }
  • GET api/learning-paths/{learningPath}/assignments/{assignment}

    • Returns a single Assignment Pathable for a specified Learning Path.

    • URL Parameters

      • learningPath: int, required - The ID of the Learning Path to retrieve the Pathable for.

      • assignment: int, required - The ID of the Assignment to retrieve.

    • Response
      HTTP 200

      { "next_pathable": { "id": 9, "name": "Course 9 - YouTu.be", "type": null, "description": null, "status": null, "featured_image_id": null, "instructor_id": null, "objectives": null, "length": "02:00:00", "completion_url": null, "experience_completion_urls": null, "custom_completion_message": null, "event_dates": null, "event_dates_requirement": null, "allow_local_leader_read_only": 0, "should_invite_users": 0, "due_date": null, "credit_value": 50, "user_limit": null, "feedback_url": null, "feedback_label": null, "feedback_description": null, "language": null, "hidden": 0, "premium": 0, "registration_fee": null, "stackable_place_ids": null, "opens_at": null, "closes_at": null, "published_at": null, "created_at": "2021-04-01T21:33:07.000000Z", "updated_at": "2021-11-19T17:32:06.000000Z", "deleted_at": null, "order": 2, "is_unlocked": false, "is_complete": false, "elective": false, "class_name": "App\\Models\\Course", "image_url": "<url>", "excerpt": "", "is_actionable": true, "current_user_pivot": null, "is_live": false, "is_mentor_meeting": false, "mentee_user_pivots": null, "pivot": { "learning_path_id": 4, "learning_pathable_id": 9, "learning_pathable_type": "App\\Models\\Course", "order": "2", "prerequisite": 0, "elective": 0, "pathable_completion_url": null, "field_mapping": null, "created_at": "2021-04-05T18:14:00.000000Z", "updated_at": "2021-04-05T18:14:08.000000Z" }, "users": [], "featured_image": null }, "pathable": { "id": 1, "description": "<p>asdasdasdasdasdasa aaaaaaaaa</p>\n", "submission_option": "upload-wysiwyg", "featured_image_id": null, "language": null, "stackable_place_ids": null, "is_lor": 0, "created_at": "2021-04-01T22:30:19.000000Z", "updated_at": "2023-02-09T00:58:33.000000Z", "deleted_at": null, "name": "Assignment 1 - OEmbed", "enable_grouping": 0, "due_date": null, "class_name": "App\\Models\\Assignment", "image_url": "<url>", "excerpt": "asdasdasdasdasdasa aaaaaaaaa ", "featured_image": null }, "polling_url": "<url>" }
  • GET api/learning-paths/{learningPath}/courses/{course}

    • Returns a single Course Pathable for a specified Learning Path.

    • URL Parameters

      • learningPath: int, required - The ID of the Learning Path to retrieve the Pathable for.

      • course: int, required - The ID of the Course to retrieve.

    • Response
      HTTP 200

    { "next_pathable": { "id": 3, "description": null, "submission_option": "wysiwyg", "featured_image_id": null, "language": null, "stackable_place_ids": null, "is_lor": 0, "created_at": "2021-04-01T22:57:50.000000Z", "updated_at": "2021-04-08T18:42:23.000000Z", "deleted_at": null, "name": "Assignment 3 - Wistia", "enable_grouping": 0, "due_date": null, "order": 3, "is_unlocked": false, "displays_as_requirement": 0, "status": null, "is_complete": false, "elective": false, "class_name": "App\\Models\\Assignment", "image_url": "<url>", "excerpt": "", "pivot": { "learning_path_id": 4, "learning_pathable_id": 3, "learning_pathable_type": "App\\Models\\Assignment", "order": "3", "prerequisite": 0, "elective": 0, "pathable_completion_url": null, "field_mapping": null, "displays_as_requirement": 0, "created_at": "2021-04-05T18:14:19.000000Z", "updated_at": "2021-04-05T18:14:19.000000Z" }, "submissions": [], "featured_image": null }, "pathable": { "id": 9, "name": "Course 9 - YouTu.be", "type": null, "description": null, "status": "published", "featured_image_id": null, "instructor_id": null, "objectives": null, "length": "02:00:00", "completion_url": null, "experience_completion_urls": null, "custom_completion_message": null, "event_dates": null, "event_dates_requirement": null, "allow_local_leader_read_only": 0, "should_invite_users": 0, "due_date": null, "credit_value": 50, "user_limit": null, "feedback_url": null, "feedback_label": null, "feedback_description": null, "language": null, "hidden": 0, "premium": 0, "registration_fee": null, "stackable_place_ids": null, "opens_at": null, "closes_at": null, "published_at": null, "created_at": "2021-04-01T21:33:07.000000Z", "updated_at": "2021-11-19T17:32:06.000000Z", "deleted_at": null, "class_name": "App\\Models\\Course", "image_url": "<url>", "excerpt": "", "is_actionable": true, "featured_image": null }, "assets": [ { "id": 62, "type": "tincan", "url": "https://leadlms.com/asset-url", "rtmp_input_url": null, "rtmp_endpoint_url": null, "assetable_id": 19, "assetable_type": "App\\Models\\Course", "mentee_mentor_id": null, "date": null, "publicize_live_course": null, "rsvp_users_count": null, "created_at": "2020-05-15T19:35:17.000000Z", "updated_at": "2020-05-15T19:35:17.000000Z", "deleted_at": null, "meeting_calendar_link": null, "next_date_human_readable": null }, { "id": 63, "type": "image", "url": "images/LMS 2.jpg", "rtmp_input_url": null, "rtmp_endpoint_url": null, "assetable_id": 19, "assetable_type": "App\\Models\\Course", "mentee_mentor_id": null, "date": null, "publicize_live_course": null, "rsvp_users_count": null, "created_at": "2020-05-15T19:35:41.000000Z", "updated_at": "2020-05-15T19:35:41.000000Z", "deleted_at": null, "meeting_calendar_link": null, "next_date_human_readable": null } ], "polling_url": "<url>" }
  • GET api/learning-paths/{learningPath}/completion

    • Returns the currently authenticated User's Completion data for a specified Learning Path.

    • URL Parameters

      • learningPath: int, required - The ID of the Learning Path to retrieve the Completion data for.

    • Response
      HTTP 200

    { "completion": { "id": 17, "user_id": 1, "learning_path_id": 2, "progress_percentage": 60, "status_mask": 2, "created_at": "2020-03-25T20:28:56.000000Z", "updated_at": "2020-03-26T22:28:19.000000Z", "deleted_at": null }, "pathables_completed": 1, "pathables_total": 5 }
  • GET api/learning-paths/{learningPath}/join

    • Joins the currently authenticated User to the specified Learning Path

    • URL Parameters

      • learningPath: int, required - The ID of the Learning Path to join.

    • Response
      HTTP 200

    { "message": "You have joined the learning path." }
  • POST /api/learning-paths/{learningPath}/users/{user}/complete

    • Manually marks a Learning Path complete or incomplete for a user. This admin override bypasses normal requirements and completes all items in the path.

    • URL Parameters

      • learningPath: int, required - Learning Path ID
        user: int, required - User ID

    • Request Body Parameters

      • status: int, required - 1 to mark complete, 0 to mark incomplete

      • completed_at: string, optional - Completion datetime "YYYY-MM-DD HH:MM:SS".

        • Defaults to current timestamp.

    • Request Example
      POST /api/learning-paths/5/users/123/complete

      { "status": 1, "completed_at": "2025-01-15 14:30:00" }
    • Response (Success - HTTP 200)

      { "lp_formatted_for_table": { "id": 5, "name": "Initial Formation", "progress_percentage": 100, "status_mask": 4, "completed_at": "2025-01-15 14:30:00", "completion_date": "01/15/2025 2:30 PM (EST)", // ... additional learning path details }, "success": "Learning Path marked complete" }
    • Response (Mark Incomplete - HTTP 200)

      { "lp_formatted_for_table": { "id": 5, "name": "Initial Formation", "progress_percentage": 50, "status_mask": 1, "completed_at": null, // ... additional learning path details }, "success": "Learning Path marked incomplete" }
    • Response (Unauthorized - HTTP 403)

      { "message": "You are not authorized to complete this learning path" }