Your Basket

Enroll user in course

Resource URL

URL: enrollment/enrollUserInCourse


Parameters

string username
required

Username

string password
required

Password

int courseId
optional

Unique course identifier.

string courseExternalId
optional

Unique external course identifier. Either courseId or courseExternalId must be filled

int userId
optional

Unique identifier of an user being enrolled

string userExternalId
optional

Unique external identifier of a user being enrolled. Either userId or userExternalId must be filled.

string comment
optional

Enrollment comment

int enrolledById
optional

Unique identifier of a user that will be used as enroller.

string enrolledByExternalId
optional

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
optional

Purchase order number

string invoiceComment
optional

Invoice comment

string payingCompany

optional

Company paying for the enrolment. If the course is paid by the portal owner, this can be ignored
date-time dueDate

optional

If a due date shall be applied to the enrolment, apply it using the ISO format and only apply a date, not a time


Return value

enrollmentStatus

Status of newly created enrollment. Possible values are:

  • FOR_APPROVAL
  • ON_WAITING_LIST
  • APPROVED

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"
}