Enroll user in class
Resource URL
URL: enrollment/enrollUserInClass
Parameters
string username | Username |
string password | Password |
int classId | Unique course class identifier |
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) cane be filled. If both enrolledById and enrolledByExternalId are empty, user whose credentials were used to authenticate will be considered 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 newly created enrollment. enrollmentReferenceId is used in other functionalities. |
Example request
URL | https://www.trainingportal.no/mintra/rest/enrollment/enrollUserInClass |
POST DATA | classId=1234&username=username&password=secret&userId=5678 |
{
"enrollmentStatus": "APPROVED",
"enrollmentReferenceId": "73e0a2b9-979f-4745-a840-93c5935b89e1"
}