CreateClassEnrollment
POST /tp-api/classes/:classId/enrollments
Create a new enrollment for a class.
Path Parameters
- classId string required
Class ID
Header Parameters
- training-provider-id string required
- application/json
Request Body required
- employerId string required
Employer ID
newLearner object
New learner information. Note: One of
learnerId
andnewLearner
is required. If both are provided,newLearner
will be ignored.firstname string requiredLearner firstname
lastname string requiredLearner lastname
email emailLearner email
phone stringPossible values: Value must match regular expression
^[1-9][0-9]{0,3} [0-9]{8,11}(x[0-9]+)?$
Learner phone number
- learnerId string
Training provider learner identifier. Note: One of
learnerId
andnewLearner
is required. If both are provided,newLearner
will be ignored. - enrolledAt date-time
The enrollment timestamp, should be in ISO8601 format. If not provided, the system will use the earlier of the current date and time or the class start date and time.
Responses
- 200
- 400
Default Response
- application/json
- Schema
- Example (from schema)
Schema
- id string required
{
"id": "string"
}
Default Response
- application/json
- Schema
- Example (from schema)
Schema
- anyOf
- MOD1
- MOD2
statusCode number requiredcode stringError code
error string requiredError key
message string requiredError message
error object required
key string requiredError key
message string requiredError message
{
"statusCode": 0,
"code": "string",
"error": "string",
"message": "string"
}
Loading...