You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Method: changeEnrollment 

Permissions to Run the Request

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

Department Administrators and users with a custom role can edit enrollments assigned to the users from the departments they manage and their sub-departments.

Request Headers

Parameter

Type

Description

token (required)stringAccess token. You can obtain a token by making a request
enrollmentId (required)string

The ID of the enrollment you want to edit. You can obtain an enrollment ID with the Getting a List of Enrollments method

accessDate (required)dateTimeThe date when learners are supposed to start studying the course. If the start date isn't indicated, the current date 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)intThis parameter is required if dueDateType is equal to due_period. It is measured in hours
lockAfterDueDate (required)boolThis parameter is required if dueDateType is equal to due_date/due_period. It indicated if the access to the course will remain open when the due date expires or will be locked

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 edited

Possible Errors

TypeDescription
Unknown EnrollmentThe enrollment wasn't found
Permission denied

The user has no permissions to edit enrollments

Wrong ParametersThe system failed to process the request because it did not contain all necessary parameters

Sample Request

POST /api/v2/soap/2.0 https/1.1
SOAPAction: "ChangeEnrollment"

<?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>
      <ChangeEnrollmentRequest>
        <credentials>
           <token>p-1sJDjmULL5DdpXPJTcbm4jVIaWVHvNmrjAxATRbNE</token>
        </credentials>
        <enrollmentId>2bbc2ed0-8841-11e9-93c1-0242c0a85016</enrollmentId>
        <accessDate>2019-09-24 10:30:00</accessDate>
        <dueDateType>string</dueDateType>
        <duePeriod>int</duePeriod>
        <lockAfterDueDate>true</lockAfterDueDate>
      </ChangeEnrollmentRequest>
    </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>

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>
  • No labels