Editing an Enrollment
AVAILABLE WITH BUSINESS SUBSCRIPTION
Request: POST /enrollment/{enrollment_id}
Permissions to Run the Request
Account Owner, Account Administrators, Department Administrators, Publishers, or custom roles.
Department Administrators, Publishers, and users with a custom role can edit enrollments assigned to learners belonging to the departments they manage and their sub-departments.
Request Headers
Header | Description |
---|---|
X-Auth-Account-Url (required) | The base URL of the account, e.g. https://myaccount.ispringlearn.com |
X-Auth-Email (required) | The login of Account Owner, Administrator, Department Administrator, Publisher, or a user with a custom role. |
X-Auth-Password (required) | The password of Account Owner, Administrator, Department Administrator, Publisher or a user with a custom role. |
Parameter | Description |
enrollmentId (required) | The ID of the enrollment you want to edit. |
accessDate (required) | 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) | 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) | This parameter is required if dueDateType is equal to due_date. |
duePeriod (required) | This parameter is required if dueDateType is equal to due_period. It is measured in hours. |
lockAfterDueDate (required) | This 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. |
Response Codes
Code | Text | Description |
---|---|---|
200 | OK | The enrollment has been successfully edited. |
400 | Bad Request | A request error. |
401 | Unauthorized | An authorization error. |
403 | Permission denied | The user doesn't have enough permissions to edit enrollments. |
Sample Request
POST /enrollment/d48bd4fa-5b70-11e9-b12b-22e9fbac4a59 https/1.1
Host: api-learn.ispringlearn.com
X-Auth-Account-Url: https://myaccount.ispringlearn.com
X-Auth-Email: email@email.com
X-Auth-Password: password
Content-Type:application/xml
<?xml version="1.0" encoding="UTF-8"?>
<request>
<accessDate>2019-09-26 10:30:00</accessDate>
<dueDateType>unlimited</dueDateType>
<dueDate>2019-09-26</dueDate>
<duePeriod>0</duePeriod>
<lockAfterDueDate>true</lockAfterDueDate>
</request>
XML
Sample Response
https/1.1 200 OK
XML