Enrolling Learners in an E-Learning Course
In order to enroll learners in an e-learning course four key pieces of information are required; The "courseId", used in the path of the call, as well as "employerId", "learnerId", and "enrolledAt" fields which are used in the request body. The endpoints below will describe how to get the course, learner, and employer information.
A new learner can be enrolled in the course by including the "newLearner" field instead of "learnerId". Creating a new learner will add them to the list of learners in the network, return an "id" associated with the learner, and trigger an email notification asking them to register with SkillsPass.
Request Body Example and Schema
- Example
{
"employerId": "string",
"newLearner": {
"trainingProviderId": "string",
"firstname": "string",
"lastname": "string",
"email": "user@example.com",
"phone": "1 99999999999"
},
"learnerId": "string",
"enrolledAt": "2023-11-02T12:20:06.054Z"
}
Getting an e-learning "courseId"
This endpoint is used to retrieve a list of E-Learning courses in the training provider network. Other useful details about the course such as "name", "certificateExpiry", "courseDuration", "licenseDuration", and more are returned along with the essential "courseId".
Response Example and Schema
- Example
[
{
"id": "string",
"certificateExpiry": 0,
"courseDuration": 0,
"deliveryMethod": "E-LEARNING",
"description": "string",
"externalRegistrationUrl": "string",
"licenseDuration": 0,
"name": "string",
"price": 0,
"publishedToMarketplace": true
}
]
Getting a "learnerId"
This endpoint is used to retrieve a list of learners in the training provider network. These learners can be enrolled an e-learning course by their "learnerId". Results can be filtered using case-insensitive, partial matching query parameters such as name, and email.
Response Example and Schema
- Example
[
{
"id": "string",
"firstname": "string",
"lastname": "string",
"uniqueSystemIdentifier": "string",
"email": "string",
"phone": "string",
"created": "string"
}
]
Getting an "employerId"
Use this endpoint to view a list of employers in the training provider network. We can filter the results using the query parameter employerName to check case-insensitive partial matches for valid employers.
For leaners who don't have an employer, or employer is unknown; the "id" for "Employer Unspecified" can be used. Call this end point while filtering the results using the value employer unspecified in the employerName query parameter to get this "id".
Response Example and Schema
- Example
[
{
"id": "string",
"name": "string"
}
]
Once learners have been enrolled in an e-learning course we can move on to the final step of creating a learning record for them.