AVAILABLE WITH BUSINESS SUBSCRIPTION

Request: GET /enrollments

You can get all the account enrollments, enrollments related to certain learners or to certain courses, or both.

Permissions to Run the Request

 Account Owner, Account Administrators, Department Administrators, or a custom role.

Department Administrators and users with a custom role can get a list of enrollments assigned to learners belonging to the departments they manage and their sub-departments.

Existing customers may continue using ispringlearn.com, and new customers should use ispring.com.

Request Headers

Header

Description

Authorization (required)Access token. You can obtain a token by making a request
Accept: application/json (required)Format of the response data: JSON
ParameterDescription
learnerIds (optional)

The IDs of the users whose enrollments you want to retrieve

courseIds (optional)The IDs of the courses whose enrollments you want to retrieve
enrollmentIds (optional)The IDs of the enrollments you want to retrieve
pageSize (optional)The number of entries per page. If not indicated, equal to 1000
pageToken (optional)The token to continue to the next page

Response Parameters

ParameterDescription

enrollments

An array containing enrollment data
enrollmentIdThe ID of the enrollment
courseIdThe ID of the course
learnerIdThe ID of the user enrolled in the course
accessDateThe date the learner is supposed to start studying the course
dueDate (optional)

Course completion date. This parameter appears in the response if a due date is specified

expirationDate (optional)

Course completion date. This parameter appears in the response if a due date is specified and shouldLockAfterDueDate is true

shouldLockAfterDueDate

Possible values:

false — access is granted.

true — access is denied.

certificate

Certificate info

issuedCertificateIdThe certificate ID (token) from the list of enrollments
issueDateThe date the certificate was issued
expiryDateThe certificate’s expiration date
enrollmentTypeGroupPossible values:

0 — assigned by an administrator

1 — added from the catalog
nextPageTokenThe token to continue to the next page

The date of issue and expiration of the certificate can only be received for active enrollments. When using this method, you cannot get the data for archived or deleted enrollments.

Response Codes

Code

Text

Description

200OKThe request has been successfully processed. The response body contains enrollment data in JSON format
400Bad RequestA request error
401UnauthorizedAn authorization error
403Permission DeniedThe user doesn't have enough permissions to retrieve a list of enrollments

Sample Request

GET /enrollments?courseIds[]=c74b4059-f593-11e9-a66a-0a580af40186&learnerIds[]=e9e1b906-0614-11ea-9f83-0a580af40788&pageSize=1000&pageToken=YzljNmM1MTEtZjU5My0xMWU5LWE2NmEtMGE1ODBhZjQwMddddTg28 HTTP/1.1
Host: api-learn.ispringlearn.com
Accept: application/json
Authorization: p-1sJDjmULL5DdpXPJTcbm4jVIaWVHvNmrjAxATRbNE
XML

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "enrollments": [
    {
      "enrollmentId": "9156819c-b0cd-c058-65aa-bbc9d453fdd1",
      "courseId": "ffe42df9-35a0-f23b-4e3a-17ec5f59a254",
      "learnerId": "9b6dd9bb-57cb-24de-353f-b5856b1885d1",
      "accessDate": "1979-12-06",
      "shouldLockAfterDueDate": true,
      "enrollmentTypeGroup": 1,
      "dueDate": "1974-09-29",
      "expirationDate": "2015-10-28",
      "certificate": {
        "issuedCertificateId": "50388ed9-5faa-1ac5-70bd-c869344c1b50",
        "issueDate": "1977-12-17",
        "expiryDate": "1978-09-12"
      }
    },
    {
      "enrollmentId": "7283d3f5-61b8-7acf-109b-93ebfd2095c3",
      "courseId": "ca9eefc6-92d6-9db3-d857-8cd2f3768305",
      "learnerId": "759abc04-a6a1-debf-801c-3fdc298cdb24",
      "accessDate": "1993-12-29",
      "shouldLockAfterDueDate": false,
      "enrollmentTypeGroup": 1,
      "dueDate": "1979-04-16",
      "expirationDate": "1963-05-28",
      "certificate": {
        "issuedCertificateId": "459e8e2c-86f5-b4d9-0f13-f8ecf88ede47",
        "issueDate": "1994-12-12",
        "expiryDate": "2012-12-17"
      }
    }
  ],
  "nextPageToken": "string"
}
XML