You can create a new enrollment with the enrollLearnersInCourses method.
Permissions to run the request: Account Owner, Administrators, Department Administrators, Publishers, or users with a role with custom settings allowing to create enrollments.
|credentials (required)||credentials||Read the description of the Credentials object.|
The IDs of the courses you want to assign.
|learnerIds (required)||string||The IDs of the learners you want to enroll in the courses.|
|accessDate (optional)||dateTime||The date and time when learners are supposed to start studying the course. If the start date and time aren't indicated, the current date and time will be auto-populated.|
|dueDateType (required)||string||This parameter indicates if the course has a due date or it isn't time-limited. Possible values of the parameter are unlimited, default, due_date, due_period.|
|dueDate (required)||date||This parameter is required if dueDateType is equal to due_date.|
This parameter is required if dueDateType is equal to due_period. It is measured in hours.
After the request has been successfully processed, the system returns an object with the following properties:
The ID of a created enrollment.
|Permission denied||The user has no permissions to create enrollments.|
|Wrong parameters||The system failed to process the request because it did not contain all necessary parameters.|