Client API
Documentation
Integrate your systems with the Human Focus platform. Manage users, organisations, training records, and groups programmatically via our REST API.
Obtain a Bearer token to authenticate all subsequent API requests. Include this token as Authorization: Bearer <token> on every request.
# Content-Type: application/x-www-form-urlencoded
grant_type=password
&username=johndoe
&password=••••••••••
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "bearer",
"expires_in": 86399
}
Returns the numeric OrganID for an organisation, identified by its OrganisationIdentifier string passed as a URL parameter.
{
"OrganID": 12345
}
Returns all user groups belonging to an organisation.
{
"UserGroups": [
{
"UserGroupID": 30,
"UserGroup": "-"
},
{
"UserGroupID": 31,
"UserGroup": "Manual Work"
}
]
}
Creates a new user within the organisation. Returns the PersonIdentifier on success.
| SuperUser Value | Role |
|---|---|
| 1 | Normal |
| 3 | Contractor |
| 4 | Champion |
| 5 | Supervisor |
| 6 | Sub-Manager |
| 7 | Manager (account main admin) |
{
"OrganID": 12345,
"PersonIdentifier": "john123",
"TraineeName": "John Legend",
"FirstName": "John",
"LastName": "Legend",
"Email": "john123@example.com",
"PhoneNumber": "+443231234567",
"CountryCode": "+44",
"SuperUser": 1,
"SiteLocation": "-",
"Department": "-",
"TrainingSet": "",
"UserGroup": [{ "id": 31, "itemName": "Manual Work" }],
"DefaultPassword": false,
"Password": "••••••••",
"ModifiedByUserID": 0,
"PageModifiedOn": "",
"Username": "john123",
"JobTitle": "",
"JobRole": ""
}
{
"Status": true,
"Result": "john123"
}
Returns the numeric UserID for a user, identified by their PersonIdentifier.
{
"UserID": 110022
}
Updates an existing user's data. Both OrganID and UserID are required as primary keys.
{
"OrganID": 12345,
"UserID": 123456,
"PersonIdentifier": "john",
"TraineeName": "John Legend",
"Email": "john123@example.com",
"PhoneNumber": "+443231234567",
"CountryCode": "+44",
"TraineeType": "",
"SuperUser": 7,
"SiteLocation": "-",
"Department": "-",
"TrainingSet": "",
"UserGroup": [{ "id": 54321, "itemName": "-" }],
"Password": "",
"Username": "john",
"Date_Created": null
}
{
"Status": true,
"PersonIdentifier": "john"
}
Archives or restores a user. Set IsArchive to true to archive, or false to restore.
{
"UserIds": "12345",
"IsArchive": true,
"ModifiedByUserID": null,
"PageModifiedOn": ""
}
{
"Status": true,
"ErrorMessage": "Person archived successfully"
}
Returns full profile details for a single user.
- WorksIdent is the same as the person identifier , just a different term used for the same value.
- CustIdent is the same as OrganIdentifier / Organisation Identifier — again, different terminology referring to the same value.
{
"Status": true,
"Result": [
{
"OrganID": 12345,
"CustIdent": "test",
"UserID": 123456,
"WorksIdent": "Johnsmith",
"TraineeAKA": "John Smith",
"FirstName": "John",
"LastName": "Smith",
"Email": "Johnsmith@example.com",
"PhoneNumber": "-",
"CountryCode": "-",
"TraineeType": "Manager",
"SiteLocation": "-",
"Department": "-",
"TrainingSet": "-",
"UserGroups": "-",
"JobRole": "",
"JobDepartment": null
}
]
}
Returns a list of all users in an organisation, optionally filtered by SuperUser role level.
- WorksIdent is the same as the person identifier , just a different term used for the same value.
- CustIdent is the same as OrganIdentifier / Organisation Identifier — again, different terminology referring to the same value.
{
"Status": true,
"Result": [
{
"UserID": "110022",
"Worksident": "john123",
"TraineeAKA": "John Legend",
"EMail": "john123@example.com",
"Department": "-",
"SiteLocation": "-",
"TraineeType": "Normal"
},
{
"UserID": "110023",
"Worksident": "Mikel123",
"TraineeAKA": "Mikel Broke",
"EMail": "mikel123@example.com",
"Department": "-",
"SiteLocation": "-",
"TraineeType": "Normal"
}
]
}
Assigns or removes user groups for a specific user. Set IsAssign to true to assign, false to unassign. Pass comma-separated IDs in CompetencyGroupIds.
{
"UserId": 110023,
"CompetencyGroupIds": "30,31,32",
"IsAssign": true,
"Username": "john.doe",
"ModifiedByUserID": 0,
"SuperUser": 0,
"isAssignmentByUGAllowed": false
}
{
"Status": true,
"ErrorMessage": "User group(s) are successfully assigned to the selected user.",
"AssignedCompetencyGroupList": [
{
"CompetencyGroupID": 30,
"CompetencyGroup": "-"
}
]
}
Returns all completed training results (Passed / Failed) across an organisation. OrganID and UserStatus are required; all other fields are optional filters. Use FromDate and ToDate to filter by completion date range.
{
"OrganID": "12345", // required
"UserID": "", // optional filter
"UserStatus": "Act", // required — "Act" = active users
"UserName": "", // optional filter
"TrainingID": "", // optional filter
"SiteLocation": "", // optional filter
"Department": "", // optional filter
"UserGroup": "", // optional filter
"FromDate": "2024-02-04 01:00:00", // optional
"ToDate": "2025-04-09 01:00:00", // optional
"Status": "", // optional filter
"APIUserName": "", // optional filter
"JobRole": "", // optional filter
"JobTitle": "" // optional filter
}
{
"Status": true,
"Result": [
{
"Person_Identifier": "john",
"Person_Name": "John Legend",
"Site_Location": "-",
"Department": "-",
"User_Group": "-",
"Training_Provider": "Human Focus",
"Training_Title": "Sample Training Title",
"Status": "Passed",
"ExpiryDate": "30-07-2023 02:48",
"ResultDate": "30-07-2020 02:48",
"ContentID": "1650"
}
]
}
Returns full training history for a single user, including certificate file paths and expiry dates.
- WorksIdent is the same as the person identifier , just a different term used for the same value.
- CustIdent is the same as OrganIdentifier / Organisation Identifier — again, different terminology referring to the same value.
{
"Status": true,
"GetUserTrainingResultDetail": {
"ResultSet1": [
{
"UserID": 123456,
"OrganID": 12345,
"TrainingID": "Test",
"ExtTrainID": 0,
"TrainingTitle": "Test",
"DisplayTitle": "Test",
"LastActivityDate": null,
"ReportStatus": "Todo",
"Founder": "Human Focus ",
"ProviderName": "Human Focus ",
"ProviderID": 0,
"ValidDuration": 0,
"ExpiryDate": "-",
"ProgrammeResultDate": null,
"LastResponseID": null,
"LastResponseScore": null,
"CertificateFileName": "",
"LastResponsePercentageRating": null,
"LastPassScore": null,
"LastTotalQuestions": null,
"LastTotalCorrect": null,
"ResponseID": null,
"CertificateLink": null,
"Dependency": null,
"OldResult": "",
"OldCertPath": "",
"Type": 1,
"UserGroups": "",
"TrainingType": "Normal",
"TrainingStartTime": null,
"NewSystem": true,
"IsSpecial": false,
"LastResponseDate": null,
"ResponseDate": "",
"IDTS": null,
"CssClass": "todo",
"RTDate": null,
"CompletionDate": "1900-01-01T00:00:00",
"FailedScore": "0%",
"IsMigrated": null,
"AssignmentDate": "2026-01-23T11:45:13.073",
"RiskLevel": "",
"ResponseStateID": null,
"IsTelematic": false,
"TotalRunningTime": null,
"QuizType": null,
"IsMandatory": true
}
],
"ResultSet2": [], // same data as ResultSet1
"ResultSet3": [], // same data as ResultSet1
"ResultSet4": [ // contains user detail
{
"UserID": 123456,
"Username": "John Smith",
"EMail": "johnsmith@example.com",
"Rid": "LFUHYCC1L1",
"SiteLocations": "-",
"Departments": "-",
"UserGroups": "-",
"Active": 9,
"OrganId": 12345,
"OrganName": null,
"SelectedOrgan": null,
"WorksIdent": "johnsmith"
}
]
}
}
Returns a paginated list of all trainings available to an organisation. Supports filtering by UserStatus and pagination via PageSize and PageIndex. Also returns the total record count.
{
"OrganID": 12345,
"UserStatus": "Act",
"SortBy": "",
"PageSize": 10,
"PageIndex": 0,
"UserID": 123456
}
{
"GetAllTrainingsByOrganID": [
{
"ContentID": "Test",
"ContentTitle": "Test Training",
"CourseFounderID": null,
"CourseFounderTitle": "Human Focus"
},
{
"ContentID": "Test2",
"ContentTitle": "Test Training 2",
"CourseFounderID": null,
"CourseFounderTitle": "Human Focus"
},
{
"ContentID": "Test3",
"ContentTitle": "Test Training 3",
"CourseFounderID": null,
"CourseFounderTitle": "Human Focus"
}
],
"TotalRecords": [
{
"Total": 4518
}
],
"Status": ""
}
Creates a new external training provider for an organisation. Returns the generated ProviderId on success.
{
"PrvName": "Warm",
"CreatedBy": 123456,
"ModifiedBy": null,
"Status": null,
"OrganId": 12345
}
{
"Status": true,
"Result": {
"ProviderId": 1673
}
}
Adds one or more external training detail records. Each item in trainingDetailsList represents a training course linked to an external provider.
{
"trainingDetailsList": [
{
"ExtTrainTitle": "external",
"ExtTrainDuration": 2,
"ExtTrainPrvID": 249,
"CreatedBy": 123456
}
]
}
{
"Status": true,
"Result": ""
}
Returns a paginated list of uploaded (external) training records for an organisation. Supports optional text search and pagination via PageSize and PageIndex.
{
"OrganID": 12345,
"PageSize": 10,
"PageIndex": 1,
"SearchText": ""
}
{
"UploadedTrainings": {
"TotalRecords": 1,
"UploadedTraining": [
{
"OrganID": 12345,
"TrainingId": 123456,
"ProviderId": 451,
"ProviderName": "test",
"TrainingCourse": "test",
"UserGroupId": null,
"UserGroup": null,
"ValidDuration": -1,
"TrainingDescription": null,
"HasUserGroup": "Yes"
}
]
},
"Status": true
}
Uploads a certificate or image file to the specified S3 bucket and directory. Returns a signed CloudFront URL for the uploaded file.
// values bucket = ftp-hfcbtbyb-cert directory = CBTbyB_Cert/CertImage{OrganID} // File sent as multipart/form-data in request body
{
"lstAttachments": [
{
"imgName": "O2U1306002Photo.png",
"imgPath": "https://d31bsqfluwtpi8.cloudfront.net/CBTbyB_Cert/CertImage02/cert.png&...",
"fileType": "Photo",
"CloudFrontSrc": ""
}
],
"Status": true
}
Uploads an external training record for a user. Use this to log off-platform certifications and completions.
{
"UserID": 123456,
"OrganID": 12345,
"ProviderID": 22,
"TrainingID": 210,
"ProviderName": "Test",
"TrainingTitle": "Test training",
"CertImageURL": "https://d31bsqfluwtpi8.cloudfront.net/CBTbyB_Cert/CertImage02/cert.png&...",
"CompletionDateMonth": "04", // optional
"CompletionDateYear": "2026", // optional
"ValidityDuration": 24,
"ByUserID": null,
"CompletionDate": "2026-04-16T00:00:00.000Z",
"ExpiryDate": null,
}
{
"Status": true,
"Result": "Training Uploaded Successfully"
}
Creates a new user group within an organisation.
{
"OrganID": 12345,
"GroupName": "Warehouse Team",
"GroupID": 0,
"UserID": "844155",
"UserName": "john.doe",
"OriginalGroupID": 0
}
{
"UserGroupData": {
"GroupID": 5432,
"ResponseMessage": "User Group Created Successfully."
},
"Status": true
}
Renames an existing user group.
{
"OrganID": 12345,
"GroupName": "Updated Group Name",
"GroupID": 1235,
"UserID": "12345",
"UserName": "john.doe",
"OriginalGroupID": 0
}
{
"UserGroupData": {
"GroupID": 5432,
"ResponseMessage": "User Group Updated Successfully."
},
"Status": true
}
Assigns one or more users to a user group. Pass comma-separated user IDs in UserIds.
{
"UserIds": "12343,12445",
"CompetencyGroupIds": 12346
}
{
"UserGroupData": "User(s) assigned to user group successfully",
"Status": true
}
Creates a new site location group.
{
"OrganID": 12345,
"GroupName": "London HQ",
"GroupID": 0,
"UserID": "1234",
"UserName": "john.doe",
"OriginalGroupID": 0
}
{
"UserGroupData": {
"GroupID": 28,
"ResponseMessage": "Site Location Created Successfully."
},
"Status": true
}
Updates the name of an existing site location group.
{
"OrganID": 12345,
"GroupName": "Manchester Office",
"GroupID": 28,
"UserID": "1234",
"UserName": "john.doe",
"OriginalGroupID": 0
}
{
"UserGroupData": {
"GroupID": 28,
"ResponseMessage": "Site Location Updated Successfully."
},
"Status": true
}
Assigns one or more users to a site location group.
{
"UserIds": "110022,110023",
"OrganID": 12345,
"GroupId": 28,
"GroupName": "London HQ"
}
{
"UserGroupData": "User(s) assigned to site location successfully",
"Status": true
}
Creates a new department group within an organisation.
{
"OrganID": 12345,
"GroupName": "Operations",
"GroupID": 0,
"UserID": "12345",
"UserName": "john.doe",
"OriginalGroupID": 0
}
{
"UserGroupData": {
"GroupID": 40658,
"ResponseMessage": "Department Created Successfully."
},
"Status": true
}
Updates the name of an existing department group.
{
"OrganID": 12345,
"GroupName": "HR & Compliance",
"GroupID": 40658,
"UserID": "12345",
"UserName": "john.doe",
"OriginalGroupID": 0
}
{
"UserGroupData": {
"GroupID": 40658,
"ResponseMessage": "Department Updated Successfully."
},
"Status": true
}
Assigns one or more users to a department group.
{
"UserIds": "12345,12346",
"OrganID": 12345,
"GroupId": 40658,
"GroupName": "Operations"
}
{
"UserGroupData": "User(s) assigned to department successfully",
"Status": true
}