This series of guides, will provide information on how to build a data integration with a 3rd party system, using the OneFile API:
- Initial data download using API
- Creating and managing users via the API
- Assigning users to learners via the API
- Assigning Framework Templates, Standards and Units via the API
Users can be created by calling the POST /api/v2.1/User endpoint.
The following roles are supported in the API:
| User Role | Role ID |
|---|---|
| Learner | 1 |
| Trainee Assessor | 4 |
| Assessor / Tutor | 5 |
| IV / IQA | 10 |
| Employer | 40 |
| Observer | 45 |
When creating learners, there are more required fields, than when create any other type of user. The required fields are shown below:
Create User (Learner)
POST /api/v2.1/User
//Mandatory Fields
{
"OrganisationID": {Id}
"FirstName": {First Name}
"LastName": {Last Name} "Email": {Email}
"Role": 1
"DefaultAssessorID": {Id}
"ClassroomID": {Id}
"PlacementID": {Id}
} //Optional Fields { "MISID": "string", "CreatedOn": "2022-02-23T12:49:33.150Z", "CompanyName": "string", //Displayed on Profile "MobileNumber": "string", "Telephone": "string", "Website": "string", "WorkAddress": "string", "ProviderID": 0, "DefaultEmployerID": 0, "ULN": "string", "NINO": "string", "EpisodeName": "string", "HomeAddress": "string", "CentreRegister": "2022-02-23T12:49:33.150Z", "DOB": "2022-02-23T12:49:33.150Z", "StartOn": "2022-02-23T12:49:33.150Z", //Episode Start Date "PlannedEndDate": "2022-02-23T12:49:33.150Z", "L12": "string", //Ethnicity "L13": "string", //Sex "L14": "string", //Learning Difficulties/Disabilities/Health Problems "L15": "string", //Disability "L16": "string", //Learning Difficulty "SupportFunding": true, "LearnerStatusID": 0 }
Create User (All other User Roles)
POST /api/v2.1/User
//Mandatory Fields
{
"OrganisationID": {Id}
"FirstName": {First Name}
"LastName": {Last Name} "Email": {Email}
"Role": {Role} //see table above
} //Additional mandatory field for Employers and Observers
{
"PlacementID": {Id} } //Optional Fields { "MISID": "string", "CreatedOn": "2022-02-23T12:49:33.150Z", "MobileNumber": "string", "Telephone": "string", "Website": "string", "WorkAddress": "string", "HomeAddress": "string", "DOB": "2022-02-23T12:49:33.150Z" }
Login Details
The API will only return a 200 OK status. The account will be added to a new/existing Keychain and the user will receive an email to verify their account.
Response:
{
"ID": 5740,
"Name": "Example Organisation - Business",
"KeychainCreationForNewUserActive": true,
"KeychainEmailSuppression": false
}Updating Users
POST /api/v2.1/User/137945
{
"MISID": "NewMISID"
}
When updating users, only include the fields you want to change in the body of the call. In the example above, UserID 137945 will have their MISID updated to the specified value.