Skip to main content

Employees

Employees represent the individuals reported under the Management Control pillar of a BEEtoolkit Scorecard. This API allows you to fetch and upsert employees for a specific scorecard.

Employees are always scoped to a single scorecard and are stored against that scorecard's ID.


Endpoints

MethodPathPurpose
GET/api/public/v1/scorecards/{scorecard_id}/employeesRetrieve all employees for a scorecard
POST/api/public/v1/scorecards/{scorecard_id}/employeesUpsert (create or update) employees in bulk
DELETE/api/public/v1/scorecards/{scorecard_id}/employees/{employee_id}Delete an employee by ID
Authentication

Include the following headers on every request:

  • Authorization: HMAC <signature>
  • X-Api-Key: <your account key>
  • Accept: application/json

See Authentication.


Attributes

Unless otherwise stated, all fields are optional from the API's perspective. However, some are required in practice to create valid B-BBEE records (see notes below).

Core Identity & Classification

FieldTypeRequiredDescription
full_namestringyesEmployee full name.
id_numberstringyes13-digit SA ID. Required unless foreign = true. Used as a primary external identifier.
foreignbooleannoMarks the individual as a foreign national. If true, id_number may be omitted or replaced with a passport number.
genderstringyesSee Gender values.
racestringyesSee Race values.
designationstringyesOccupational level. See Designation values. Required when creating a new employee.
disabledbooleannoIndicates whether the employee is a person with a disability.

Employment & Structure

FieldTypeRequiredDescription
hire_datestringnoEmployment start date (YYYY-MM-DD).
termination_datestring | nullnoEmployment end date, if applicable.
latest_promotion_datestring | nullnoMost recent promotion date.
employee_codestringnoYour internal employee identifier. Used as a secondary external identifier.
locationstringnoSite/branch, e.g. "HO", "Plant 1".
business_unitstringnoDepartment or business unit.
provincestringnoProvince used for reporting.
ageintegernoAge of the employee (typically at period end).
voting_rightsnumber | stringnoVoting rights percentage (for Ownership/MC linkage where applicable).

System Fields (Response Only)

FieldTypeDescription
idintegerInternal ID of the employee record.
created_atdatetimeCreation timestamp.
updated_atdatetimeLast update timestamp.

Enumerations

The API expects values that align with your B-BBEE configuration. The lists below show typical values; your environment may be configured with a subset or variant of these.

Gender values

  • Male
  • Female

Race values

  • African
  • Coloured
  • Indian
  • White

Designation values

  • Executive Director
  • Non-executive Director
  • Other Executive Manager
  • Senior Manager
  • Middle Manager
  • Junior Manager
  • Semi-skilled
  • Unskilled

Notes

  • All dates must be in ISO 8601 format (YYYY-MM-DD). null is accepted where a date is not applicable.
  • Each employee record must include at least one external identifier: id_number or employee_code.
  • Upserts match by id_number first, then by employee_code. If no match is found, a new record is created.

List employees

Retrieve all employees captured against a specific scorecard.

GET /api/public/v1/scorecards/{scorecard_id}/employees

Path parameters

NameTypeRequiredDescription
scorecard_idstringyesThe scorecard identifier.

Code examples

curl -X GET "https://www.beetoolkit.co.za/api/public/v1/scorecards/{scorecard_id}/employees" \
-H "Accept: application/json" \
-H "X-Api-Key: <your account key>" \
-H "Authorization: HMAC <your signature>"

Response

[
{
"id": 54981057,
"gender": "Male",
"designation": "Semi-skilled",
"disabled": true,
"foreign": false,
"race": "Indian",
"full_name": "John Smith",
"id_number": "8801010120001",
"hire_date": null,
"termination_date": null,
"latest_promotion_date": null,
"employee_code": "333",
"location": "HO",
"business_unit": "HR",
"province": "Gauteng",
"age": 24,
"voting_rights": "0.0",
"created_at": "2026-01-15T07:59:32.000Z",
"updated_at": "2026-01-15T07:59:32.000Z"
}
]

Upsert employees (bulk)

Create or update multiple employees at once via a batch payload. Records are matched by id_number first, then by employee_code. If no match is found, a new record is created.

POST /api/public/v1/scorecards/{scorecard_id}/employees

Path parameters

NameTypeRequiredDescription
scorecard_idstringyesThe scorecard identifier.

Request body

Send a JSON object with an employees array:

{
"employees": [
{
"gender": "Male",
"designation": "Semi-skilled",
"disabled": true,
"foreign": false,
"race": "Indian",
"full_name": "John Smith",
"id_number": "8801010120001",
"hire_date": null,
"termination_date": null,
"latest_promotion_date": null,
"employee_code": "333",
"location": "HO",
"business_unit": "HR",
"province": "Gauteng",
"age": 24,
"voting_rights": 0
}
]
}

Code examples

curl -X POST "https://www.beetoolkit.co.za/api/public/v1/scorecards/{scorecard_id}/employees" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <your account key>" \
-H "Authorization: HMAC <your signature>" \
-d '{
"employees": [
{
"gender": "Male",
"designation": "Semi-skilled",
"disabled": true,
"foreign": false,
"race": "Indian",
"full_name": "John Smith",
"id_number": "8801010120001",
"employee_code": "333",
"location": "HO",
"business_unit": "HR",
"province": "Gauteng",
"age": 24,
"voting_rights": 0
}
]
}'

Response

On success, the API returns the upserted employees as an array:

[
{
"id": 54981057,
"gender": "Male",
"designation": "Semi-skilled",
"disabled": true,
"foreign": false,
"race": "Indian",
"full_name": "John Smith",
"id_number": "8801010120001",
"hire_date": null,
"termination_date": null,
"latest_promotion_date": null,
"employee_code": "333",
"location": "HO",
"business_unit": "HR",
"province": "Gauteng",
"age": 24,
"voting_rights": "0.0",
"created_at": "2026-01-15T07:59:32.000Z",
"updated_at": "2026-01-15T07:59:32.000Z"
}
]
Recalculate after loading employees

After creating or updating employees, call the scorecard recalculate endpoint to refresh scores: Recalculate a scorecard.

Errors

StatusDescription
422One or more employee records are invalid, or missing required external identifiers.

Missing external identifier:

{
"error": {
"message": "Employee records must include at least one external identifier (id_number or employee_code).",
"invalid_records": [
{
"full_name": "John NoId",
"gender": "Male"
}
]
}
}

Invalid field values:

{
"error": {
"message": "One or more employee records are invalid.",
"invalid_records": [
{
"errors": [
"Id number needs to be a valid 13-digit SA ID number or individual should be marked as foreign"
],
"id_number": "888888877789",
"employee_code": "333",
"full_name": "John Smith"
}
]
}
}

Delete an employee

Delete a single employee by ID.

DELETE /api/public/v1/scorecards/{scorecard_id}/employees/{employee_id}

Path parameters

NameTypeRequiredDescription
scorecard_idstringyesThe scorecard identifier.
employee_idintegeryesThe BEEtoolkit-assigned employee ID.

Code examples

curl -X DELETE "https://www.beetoolkit.co.za/api/public/v1/scorecards/{scorecard_id}/employees/{employee_id}" \
-H "Accept: application/json" \
-H "X-Api-Key: <your account key>" \
-H "Authorization: HMAC <your signature>"

Response

Returns 204 No Content on success.

Recalculate after deleting employees

After deleting employees, call the scorecard recalculate endpoint to refresh scores: Recalculate a scorecard.