Create enrolment key(s) which can be given to users to enrol themselves on courses. If multiple CourseIDs (and DurationIDs) are specified then each key will enrol a user on multiple courses.
Payload Parameters & Defaults... [CourseIDs]: (no default, mandatory) [DurationIDs]: (no default, mandatory) Must have a value for each CourseID Quantity: 1 (the number of keys to create) LoginID: (null - the user creating the keys) ValidFrom: today ValidUntil: one year from yesterday PurchaseOrder: (null - a string identifying the transaction) Group: (null - the name of the Group the keys will assign the learners into *, the LoginID will be made a manager of this group **) * new learners only - existing learners will remain in their current group ** if no LoginID is specified the Group is ignored (for an existing Group you need to specify the current or a new manager - a new manager will also manage the group, they won't replace the current manager)
Example payload... { "CourseIDs":[12345,65432], "DurationIDs":[4,3], "ValidUntil":"2021-12-31" }
When creating multiple keys and/or a key for multiple courses a partial success is possible so check the Errors array in the data property of the response if the main error property of the response is empty.