Human Focus · REST API

Client API
Documentation

Integrate your systems with the Human Focus platform. Manage users, organisations, training records, and groups programmatically via our REST API.

REST / JSON
Bearer Auth
HTTPS Only
Base URL https://e-label.humanfocus.org.uk/CBT_APIStg
Authentication
POST
Token

Obtain a Bearer token to authenticate all subsequent API requests. Include this token as Authorization: Bearer <token> on every request.

POST /Token
Set Content-Type to application/x-www-form-urlencoded for this request only.
Request Body
# Content-Type: application/x-www-form-urlencoded

grant_type=password
&username=johndoe
&password=••••••••••
Response 200
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type":   "bearer",
  "expires_in":   86399
}
Organisation
GET
GetOrganID

Returns the numeric OrganID for an organisation, identified by its OrganisationIdentifier string passed as a URL parameter.

GET /api/cbt/GetOrganID/{OrganisationIdentifier}
Response 200
{
  "OrganID": 12345
}
GET
GetUserGroups

Returns all user groups belonging to an organisation.

GET /api/cbt/GetUserGroups/{OrganisationIdentifier}
Response 200
{
  "UserGroups": [
    {
      "UserGroupID": 30,
      "UserGroup":   "-"
    },
    {
      "UserGroupID": 31,
      "UserGroup":   "Manual Work"
    }
  ]
}
Users
POST
AddUser

Creates a new user within the organisation. Returns the PersonIdentifier on success.

POST /api/cbt/AddUser
SuperUser Value Role
1 Normal
3 Contractor
4 Champion
5 Supervisor
6 Sub-Manager
7 Manager (account main admin)
Request Body
{
  "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":          ""
}
Response 200
{
  "Status": true,
  "Result": "john123"
}
GET
GetUserID

Returns the numeric UserID for a user, identified by their PersonIdentifier.

GET /api/cbt/GetUserID/{OrganisationIdentifier}/{PersonIdentifier}
Response 200
{
  "UserID": 110022
}
POST
EditUser

Updates an existing user's data. Both OrganID and UserID are required as primary keys.

POST /api/cbt/EditUser
Request Body
{
  "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
}
Response 200
{
  "Status":            true,
  "PersonIdentifier": "john"
}
POST
ArchiveUser

Archives or restores a user. Set IsArchive to true to archive, or false to restore.

POST /api/cbt/ArchiveUsersUM
Request Body
{
  "UserIds":          "12345",
  "IsArchive":        true,
  "ModifiedByUserID": null,
  "PageModifiedOn":   ""
}
Response 200
{
  "Status":       true,
  "ErrorMessage": "Person archived successfully"
}
GET
GetUserDetails

Returns full profile details for a single user.

GET /api/cbt/GetUserDetails/{OrganID}/{UserID}
  • 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.
Response 200
{
  "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
    }
  ]
}
GET
GetUsersList

Returns a list of all users in an organisation, optionally filtered by SuperUser role level.

GET /api/cbt/GetUsersList/{OrganID}/{SuperUser}
  • 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.
Response 200
{
  "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"
    }
  ]
}
POST
AssignUnAssignUserGroupsUM

Assigns or removes user groups for a specific user. Set IsAssign to true to assign, false to unassign. Pass comma-separated IDs in CompetencyGroupIds.

POST /api/cbt/AssignUnAssignUserGroupsUM
Request Body
{
  "UserId":                  110023,
  "CompetencyGroupIds":     "30,31,32",
  "IsAssign":               true,
  "Username":               "john.doe",
  "ModifiedByUserID":       0,
  "SuperUser":              0,
  "isAssignmentByUGAllowed": false
}
Response 200
{
  "Status": true,
  "ErrorMessage": "User group(s) are successfully assigned to the selected user.",
  "AssignedCompetencyGroupList": [
    {
      "CompetencyGroupID": 30,
      "CompetencyGroup":   "-"
    }
  ]
}
Training
POST
GetAllCompletedTrainingDetails

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.

⚠️ Access level: This endpoint is not available on the Basic Access plan. Please contact Human Focus to discuss upgrading your API access if you require bulk training result exports.
POST /api/cbt/GetAllCompletedTrainingDetails
Request Body
{
  "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
}
Response 200
{
  "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"
    }
  ]
}
GET
GetUserTrainingResultDetail

Returns full training history for a single user, including certificate file paths and expiry dates.

⚠️ Note: ResultSet2, ResultSet3 will contain the same data as ResultSet1. ResultSet4 contains user details.
GET /api/cbt/GetUserTrainingResultDetail/{UserID}
  • 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.
Response 200
{
  "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"
      }
    ]
  }
}
POST
GetAllTrainingsByOrganID

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.

POST /api/cbt/GetAllTrainingsByOrganID
Request Body
{
  "OrganID":    12345,
  "UserStatus": "Act",
  "SortBy":     "",
  "PageSize":   10,
  "PageIndex":  0,
  "UserID":     123456
}
Response 200
{
  "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": ""
}
POST
AddTrainingProvider

Creates a new external training provider for an organisation. Returns the generated ProviderId on success.

POST /api/cbt/AddTrainingProvider
Request Body
{
  
  "PrvName":    "Warm",
  "CreatedBy":  123456,
  "ModifiedBy": null,
  "Status":     null,
  "OrganId":    12345
}
Response 200
{
  "Status": true,
  "Result": {
    "ProviderId": 1673
  }
}
POST
AddTrainingDetail

Adds one or more external training detail records. Each item in trainingDetailsList represents a training course linked to an external provider.

POST /api/cbt/AddTrainingDetail
Request Body
{
  "trainingDetailsList": [
    {
      "ExtTrainTitle":    "external",
      "ExtTrainDuration": 2,
      "ExtTrainPrvID":    249,
      "CreatedBy":        123456
    }
  ]
}
Response 200
{
  "Status": true,
  "Result": ""
}
POST
GetUploadedTraining

Returns a paginated list of uploaded (external) training records for an organisation. Supports optional text search and pagination via PageSize and PageIndex.

POST /api/cbt/GetUploadedTraining
Request Body
{
  "OrganID":    12345,
  "PageSize":   10,
  "PageIndex":  1,
  "SearchText": ""
}
Response 200
{
  "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
}
POST
UploadAttachments

Uploads a certificate or image file to the specified S3 bucket and directory. Returns a signed CloudFront URL for the uploaded file.

⚠️ Note: Supported formats: jpg, png, gif, heic, and pdf. Maximum file size: 20 MB. The file should be sent as multipart/form-data in the request body.
POST /api/cbt/UploadAttachments/{bucket}/{directory}
URL Parameters
// values
bucket    = ftp-hfcbtbyb-cert
directory = CBTbyB_Cert/CertImage{OrganID}

// File sent as multipart/form-data in request body
Response 200
{
  "lstAttachments": [
    {
      "imgName":      "O2U1306002Photo.png",
      "imgPath":      "https://d31bsqfluwtpi8.cloudfront.net/CBTbyB_Cert/CertImage02/cert.png&...",
      "fileType":     "Photo",
      "CloudFrontSrc": ""
    }
  ],
  "Status": true
}
POST
AddUploadedTrainingUM

Uploads an external training record for a user. Use this to log off-platform certifications and completions.

POST /api/cbt/AddUploadedTrainingUM
Note: The CertImageURL value should be the imgPath returned from the UploadAttachments API response.
Request Body
{
  "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,
}
Response 200
{
  "Status": true,
  "Result": "Training Uploaded Successfully"
}
User Groups
POST
CreateUserGroup

Creates a new user group within an organisation.

POST /api/cbt/CreateUserGroup
Request Body
{
  "OrganID":          12345,
  "GroupName":        "Warehouse Team",
  "GroupID":          0,
  "UserID":           "844155",
  "UserName":         "john.doe",
  "OriginalGroupID":  0
}
Response 200
{
  "UserGroupData": {
    "GroupID":          5432,
    "ResponseMessage": "User Group Created Successfully."
  },
  "Status": true
}
POST
UpdateUserGroup

Renames an existing user group.

POST /api/cbt/UpdateUserGroup
Request Body
{
  "OrganID":         12345,
  "GroupName":       "Updated Group Name",
  "GroupID":         1235,
  "UserID":          "12345",
  "UserName":        "john.doe",
  "OriginalGroupID": 0
}
Response 200
{
  "UserGroupData": {
    "GroupID":          5432,
    "ResponseMessage": "User Group Updated Successfully."
  },
  "Status": true
}
POST
AssignUsersToUserGroup

Assigns one or more users to a user group. Pass comma-separated user IDs in UserIds.

POST /api/cbt/AssignUsersToUserGroup
Request Body
{
  "UserIds":            "12343,12445",
  "CompetencyGroupIds": 12346
}
Response 200
{
  "UserGroupData": "User(s) assigned to user group successfully",
  "Status": true
}
Site Location Groups
POST
CreateSiteLocationGroup

Creates a new site location group.

POST /api/cbt/CreateSiteLocationGroup
Request Body
{
  "OrganID":         12345,
  "GroupName":       "London HQ",
  "GroupID":         0,
  "UserID":          "1234",
  "UserName":        "john.doe",
  "OriginalGroupID": 0
}
Response 200
{
  "UserGroupData": {
    "GroupID":          28,
    "ResponseMessage": "Site Location Created Successfully."
  },
  "Status": true
}
POST
UpdateSiteLocationGroup

Updates the name of an existing site location group.

POST /api/cbt/UpdateSiteLocationGroup
Request Body
{
  "OrganID":         12345,
  "GroupName":       "Manchester Office",
  "GroupID":         28,
  "UserID":          "1234",
  "UserName":        "john.doe",
  "OriginalGroupID": 0
}
Response 200
{
  "UserGroupData": {
    "GroupID":          28,
    "ResponseMessage": "Site Location Updated Successfully."
  },
  "Status": true
}
POST
AssignUsersToSiteLocationGroup

Assigns one or more users to a site location group.

POST /api/cbt/AssignUsersToSiteLocationGroup
Request Body
{
  "UserIds":   "110022,110023",
  "OrganID":  12345,
  "GroupId":  28,
  "GroupName": "London HQ"
}
Response 200
{
  "UserGroupData": "User(s) assigned to site location successfully",
  "Status": true
}
Department Groups
POST
CreateDepartmentGroup

Creates a new department group within an organisation.

POST /api/cbt/CreateDepartmentGroup
Request Body
{
  "OrganID":         12345,
  "GroupName":       "Operations",
  "GroupID":         0,
  "UserID":          "12345",
  "UserName":        "john.doe",
  "OriginalGroupID": 0
}
Response 200
{
  "UserGroupData": {
    "GroupID":          40658,
    "ResponseMessage": "Department Created Successfully."
  },
  "Status": true
}
POST
UpdateDepartmentGroup

Updates the name of an existing department group.

POST /api/cbt/UpdateDepartmentGroup
Request Body
{
  "OrganID":         12345,
  "GroupName":       "HR & Compliance",
  "GroupID":         40658,
  "UserID":          "12345",
  "UserName":        "john.doe",
  "OriginalGroupID": 0
}
Response 200
{
  "UserGroupData": {
    "GroupID":          40658,
    "ResponseMessage": "Department Updated Successfully."
  },
  "Status": true
}
POST
AssignUserToDepartmentGroup

Assigns one or more users to a department group.

POST /api/cbt/AssignUsersToDepartmentGroup
Request Body
{
  "UserIds":   "12345,12346",
  "OrganID":  12345,
  "GroupId":  40658,
  "GroupName": "Operations"
}
Response 200
{
  "UserGroupData": "User(s) assigned to department successfully",
  "Status": true
}