Skip to main content

Employees API

Endpoints for managing employee records, profiles, skills, education, and related employee data.

List Employees

Retrieves all employees. Admin users see all employees; managers see only their subordinates.

GET /employees

Response: 200 OK

{
"status": "SUCCESS",
"data": [
{
"id": 1,
"employee_id": "EMP001",
"first_name": "John",
"last_name": "Doe",
"work_email": "[email protected]",
"job_title": 5,
"department": 1,
"status": "Active"
}
]
}

Get Current Employee

Retrieves the employee record for the authenticated user.

GET /employees/me

Response: 200 OK

{
"status": "SUCCESS",
"data": {
"id": 1,
"employee_id": "EMP001",
"first_name": "John",
"last_name": "Doe",
"work_email": "[email protected]",
"department": 1,
"supervisor": 2
}
}

Get Employee by ID

Retrieves a specific employee by ID.

GET /employees/{id}

Response: 200 OK or 404 Not Found

Create Employee

Creates a new employee record. Admin users only.

POST /employees

Request Body:

{
"employee_id": "EMP002",
"first_name": "Jane",
"last_name": "Smith",
"work_email": "[email protected]",
"gender": "Female",
"joined_date": "2026-01-15",
"job_title": 3,
"department": 2,
"status": "Active"
}

Response: 200 OK

Update Employee

Updates an existing employee record.

PUT /employees/{id}

Request Body: Any subset of employee fields to update.

Response: 200 OK

Delete Employee

Deletes an employee record. Admin users only.

DELETE /employees/{id}

Response: 200 OK

Get Employee Skills

GET /employees/{id}/skills

Response: 200 OK with list of employee skills.

Get Employee Education

GET /employees/{id}/educations

Response: 200 OK

{
"status": "SUCCESS",
"data": [
{
"id": 1,
"institute": "MIT",
"date_start": "2010-09-01",
"date_end": "2014-06-01"
}
]
}

Get Employee Certifications

GET /employees/{id}/certifications

Response: 200 OK with list of employee certifications.

Get Employee Languages

GET /employees/{id}/languages

Response: 200 OK

{
"status": "SUCCESS",
"data": [
{
"id": 1,
"language_id": 1,
"reading": "Expert",
"speaking": "Expert",
"writing": "Advanced",
"understanding": "Expert"
}
]
}

Get Employee Status Message

GET /employees/{id}/status

Response: 200 OK with the employee status message.

Set Employee Status Message

POST /employees/{id}/status

Request Body:

{
"status": "Working from home today"
}

Response: 200 OK

Get Employee Attendance

Returns attendance records for the employee, including the work_from_home flag.

GET /employees/{id}/attendance

Response: 200 OK with attendance records.

Get Employee Attendance Summary

GET /employees/{id}/attendance/summary

Response: 200 OK with attendance summary statistics.

Get Employee Leave Requests

GET /employees/{id}/leaves

Response: 200 OK with the employee's leave request list.

Get Employee Leave Summary

GET /employees/{id}/leaves/summary

Response: 200 OK with leave balance summary.

Create User Account for Employee

Creates a login user account linked to an existing employee record.

POST /employees/{id}/create-user

Response: 200 OK

Employee Fields Reference

Common fields when creating or updating an employee:

  • employee_id: External employee identifier (string)
  • first_name, middle_name, last_name: Name fields
  • gender: Male, Female, or Other
  • marital_status: Marital status string
  • birthday, joined_date, confirmation_date, termination_date: Date fields (YYYY-MM-DD)
  • nationality, ssn_num, nic_num, other_id, driving_license: Identity fields
  • address1, address2, city, country, province, postal_code: Address fields
  • home_phone, mobile_phone, work_phone: Phone fields
  • work_email, private_email: Email fields
  • employment_status, job_title, pay_grade, department: Reference IDs
  • supervisor, approver1, approver2, approver3: Reference IDs to other employees
  • status: Active or Terminated