Enroll user in course
Resource URL
URL: enrollment/enrollUserInCourse
Parameters
string username | Username |
string password | Password |
int courseId | Unique course identifier. |
string courseExternalId | Unique external course identifier. Either courseId or courseExternalId must be filled |
int userId | Unique identifier of an user being enrolled |
string userExternalId | Unique external identifier of a user being enrolled. Either userId or userExternalId must be filled. |
string comment | Enrollment comment |
int enrolledById | Unique identifier of a user that will be used as enroller. |
string enrolledByExternalId | Unique external identifier of a user that will be used as enroller. Only one of parameters (enrolledById or enrolledByExternalId) can be filled. If both enrolledById and enrolledByExternalId are empty, user whose credentials were used to authenticate will be considered the enroller. |
string poNumber | Purchase order number |
string invoiceComment | Invoice comment |
Return value
enrollmentStatus | Status of newly created enrollment. Possible values are:
|
enrollmentReferenceId | Unique identifier of either an existing enrollment (if no new enrollment is needed) or to a newly created enrollment. enrollmentReferenceId is used in other functionalities. |
Example request
URL | https://www.trainingportal.no/mintra/rest/enrollment/enrollUserInCourse |
POST DATA | courseId=1234&username=username&password=secret&userId=5678 |
{
"enrollmentStatus": "APPROVED",
"enrollmentReferenceId": "73e0a2b9-979f-4745-a840-93c5935b89e1"
}