Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

The /1/learner endpoint provides for the creation of new learners.

...

Info
titleRequired Headers


<the user code>
KeyValueExample
Acceptapplication/json
AuthorizationBearer <your token>Bearer wV1MLk5+sFzioJw/3M5r9A==
Content-Typeapplication/json
X-UserId<the user id>The DMTD-supplied identifier that identifies the owner of the learner
X-UserCodeA REST-client-supplied identifier that identifies the owner of the learner



Info
titleFields


FieldTypeOptionalDescription
codeStringOptionalA unique code that correlates the student to an external database and/or obfuscates the student's name (maximum length 191 chars); correlates to X-LearnerCode
colorStringOptionalA CSS color to associate with the client (e.g. #ffffff)
dateOfBirthDateRequiredThe date of birth for the learner
firstNameStringOptional
lastNameStringOptional
genderIntegerOptional1 = male, 2 = female
isActiveBoolOptionalA flag that indicates whether the learner is being actively assesses assessed (default = true)



Info
titleExample
curl -X POST \
  -H 'Authorization: Bearer wV1MLk5+sFzioJw/3M5r9A==' \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
-H "X-UserId: 1" \
  -d '{ "code": "Code: 1234", "color": "#ffff", "dateOfBirth": "2014-01-01", "firstName": "Fred", "gender": 1, "isActive": true, "lastName": "value" }' \
  https://data-sandbox.datamtd.com/1/learner

...