Overview

The EmployeeControler provides REST endpoints for employee-related operations.

Endpoints

GET /employees/{id}

Retrieves an employee by their ID.

Path Parameters

Table 1. /employees/{id}
Parameter Description

id

The ID of the employee to retrieve

Response

Returns the following fields:

Path Type Description

id

Number

The ID of the employee

firstName

String

The first name of the employee

middleName

String

The middle name of the employee, if any

lastName

String

The last name of the employee

email

String

The email address of the employee

mobileNumber

String

The mobile number of the employee

position

String

The position of the employee

level

String

The level of the employee

employmentType

String

The employment type of the employee (e.g. REGULAR, PART_TIME)

basicPay

Number

The basic pay of the employee. Available only for PART_TIME employment type.

overtimeEligibility

String

The overtime eligibility of the employee (e.g. WITH_PAY, OFFSET, NONE)

employmentStartDate

Null

The employment start date of the employee

roles

Array

A list of roles assigned to the employee

workingDays

Array

A list of working days for the employee

approverId

Null

The ID of the employee’s approver, if any

deactivatedAt

Null

The timestamp of when the employee was deactivated, if applicable

createdAt

String

The timestamp of when the employee was created

lastModifiedAt

String

The timestamp of when the employee was last modified

createdBy

Object

The creator of the employee record, containing user details

createdBy.id

Number

The ID of the user who created the employee record

createdBy.firstName

String

The first name of the user who created the employee record

createdBy.middleName

String

The middle name of the user who created the employee record, if any

createdBy.lastName

String

The last name of the user who created the employee record

createdBy.email

String

The email address of the user who created the employee record

lastModifiedBy

Object

The user who last modified the employee record, containing user details

lastModifiedBy.id

Number

The ID of the user who last modified the employee record

lastModifiedBy.firstName

String

The first name of the user who created the employee record

lastModifiedBy.middleName

String

The middle name of the user who created the employee record, if any

lastModifiedBy.lastName

String

The last name of the user who created the employee record

lastModifiedBy.email

String

The email address of the user who last modified the employee record

Example Request

$ curl 'http://localhost:8080/employees/1' -i -X GET \
    -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJyb2xlcyI6WyJBRE1JTiJdLCJpc3MiOiJ0ZXN0LWlzc3VlciIsImdpdmVuX25hbWUiOiJDYWxlbiIsIm1pZGRsZV9uYW1lIjoiTWlkZGxlIiwicGljdHVyZSI6Imh0dHA6Ly9leGFtcGxlLmNvbS9waWMuanBnIiwiYXVkIjoidGVzdC1hdWRpZW5jZSIsIm5hbWUiOiJDYWxlbiBMZWdhenBpIiwicGhvbmVfbnVtYmVyIjoiKzYzOTEyMzQ1Njc4OSIsImV4cCI6MTc0ODA4ODc2NSwiZmFtaWx5X25hbWUiOiJMZWdhenBpIiwiZW1haWwiOiJjYWxlbkBvcmFuZ2VhbmRicm9uemUuY29tIn0.0YwodEkTPEizJy16U9HoMx4evFi2DrNUkMFS3K2oR_Q'

Example Response

{"id":1,"firstName":"Calen","middleName":"Middle","lastName":"Legazpi","email":"calen@orangeandbronze.com","mobileNumber":"+639999999999","position":"CHAIRMAN","level":"N/A","employmentType":"REGULAR","basicPay":200000.00,"overtimeEligibility":"WITH_PAY","employmentStartDate":null,"roles":[],"workingDays":["WEDNESDAY","THURSDAY","MONDAY","TUESDAY","FRIDAY"],"approverId":null,"deactivatedAt":null,"createdAt":"2025-05-24T11:12:45.594138300Z","lastModifiedAt":"2025-05-24T11:12:45.594138300Z","createdBy":{"id":1,"firstName":"Calen","middleName":"Middle","lastName":"Legazpi","email":"calen@orangeandbronze.com"},"lastModifiedBy":{"id":1,"firstName":"Calen","middleName":"Middle","lastName":"Legazpi","email":"calen@orangeandbronze.com"}}