AVAILABLE WITH BUSINESS SUBSCRIPTION

Method: enrollLearnersInCourses

Notes:

  1. This method only allows you to enroll users in courses. You can't enroll a user in a training using this method.

  2. With this method, you can enroll a user in a course containing a training, but without selecting a session to attend. The user will be able to choose a session in their portal.

Permissions to Run the Request

The Account Owner, Account Administrators, Department Administrators, or custom roles

Department Administrators and users with a custom role can enroll in courses only users from the departments they manage and their sub-departments.

Parameters

Parameter

Type

Description

token (required)stringAccess token. You can obtain a token by making a request.
courseIds (required)string[]

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)dateTimeThe 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)stringThis 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)dateThis parameter is required if dueDateType is equal to due_date. 
duePeriod (required)int

This parameter is required if dueDateType is equal to due_period. It is measured in hours.

lockAfterDueDate (optional)boolThis parameter indicates whether the course will be blocked after the due date. Possible values of the parameter are true or false.

Return Value

After the request has been successfully processed, the system returns an object with the following properties:

ParameterTypeDescription
successboolTrue if the enrollment has been successfully created.

Possible Errors

Type

Description

Permission deniedThe user has no permissions to create enrollments.
Wrong parametersThe system failed to process the request because it did not contain all the necessary parameters.

Sample Request

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="https://schemas.xmlsoap.org/soap/envelope/"
                   xmlns="https://ispringlearn.com/go/services/api/soap">
  <SOAP-ENV:Body>
      <EnrollLearnersInCoursesRequest>
        <credentials>
            <token>p-1sJDjmULL5DdpXPJTcbm4jVIaWVHvNmrjAxATRbNE</token>
         </credentials>
         <courseIds>
            <id>146ac240-d54f-11e9-9b88-0a580af40973</id>
         </courseIds>
         <learnerIds>
            <id>8363b098-e031-11e9-89cf-0a580af40b0f</id>
         </learnerIds>
         <accessDate>2019-09-24 10:30:00</accessDate>
         <dueDateType>unlimited</dueDateType>
         <dueDate>2019-09-25</dueDate>
         <duePeriod>10</soap:duePeriod>
      </EnrollLearnersInCoursesRequest>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="https://schemas.xmlsoap.org/soap/envelope/"
                   xmlns="https://ispringlearn.com/go/services/api/soap">
  <SOAP-ENV:Body>
    <ns1:SuccessResult>
      <ns1:success>true</ns1:success>
    </ns1:SuccessResult>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML