Overview
The EmployeeControler provides REST endpoints for employee-related operations.
Endpoints
GET /employees/{id}
Retrieves an employee by their ID.
Path Parameters
| Parameter | Description |
|---|---|
|
The ID of the employee to retrieve |
Response
Returns the following fields:
| Path | Type | Description |
|---|---|---|
|
|
The ID of the employee |
|
|
The first name of the employee |
|
|
The middle name of the employee, if any |
|
|
The last name of the employee |
|
|
The email address of the employee |
|
|
The mobile number of the employee |
|
|
The position of the employee |
|
|
The level of the employee |
|
|
The employment type of the employee (e.g. REGULAR, PART_TIME) |
|
|
The basic pay of the employee. Available only for PART_TIME employment type. |
|
|
The overtime eligibility of the employee (e.g. WITH_PAY, OFFSET, NONE) |
|
|
The employment start date of the employee |
|
|
A list of roles assigned to the employee |
|
|
A list of working days for the employee |
|
|
The ID of the employee’s approver, if any |
|
|
The timestamp of when the employee was deactivated, if applicable |
|
|
The timestamp of when the employee was created |
|
|
The timestamp of when the employee was last modified |
|
|
The creator of the employee record, containing user details |
|
|
The ID of the user who created the employee record |
|
|
The first name of the user who created the employee record |
|
|
The middle name of the user who created the employee record, if any |
|
|
The last name of the user who created the employee record |
|
|
The email address of the user who created the employee record |
|
|
The user who last modified the employee record, containing user details |
|
|
The ID of the user who last modified the employee record |
|
|
The first name of the user who created the employee record |
|
|
The middle name of the user who created the employee record, if any |
|
|
The last name of the user who created the employee record |
|
|
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"}}