Employee Endpoints
API endpoints for employee management, profiles, and statistics.
Employee CRUDโ
List Employeesโ
GET /api/employee?take=10&skip=0&relations[]=user&relations[]=organization
Authorization: Bearer {token}
Response (200 OK):
{
"items": [
{
"id": "...",
"firstName": "John",
"lastName": "Doe",
"billRateValue": 50,
"billRateCurrency": "USD",
"startedWorkOn": "2024-01-01T00:00:00.000Z",
"isActive": true,
"user": { "id": "...", "email": "john@example.com" },
"organization": { "id": "...", "name": "Engineering" }
}
],
"total": 42
}
Get Employee by IDโ
GET /api/employee/{id}
Authorization: Bearer {token}
Create Employeeโ
POST /api/employee
Authorization: Bearer {token}
Content-Type: application/json
{
"firstName": "John",
"lastName": "Doe",
"startedWorkOn": "2024-01-01",
"billRateValue": 50,
"billRateCurrency": "USD",
"userId": "user-uuid",
"organizationId": "org-uuid"
}
Update Employeeโ
PUT /api/employee/{id}
Authorization: Bearer {token}
Content-Type: application/json
{
"firstName": "John",
"lastName": "Updated",
"billRateValue": 60
}
Delete Employeeโ
DELETE /api/employee/{id}
Authorization: Bearer {token}
Employee Statisticsโ
Get Employee Statisticsโ
GET /api/employee/{id}/statistics
Authorization: Bearer {token}
Response: aggregated time tracking, income, and expense data for the employee.
Get Working Statisticsโ
GET /api/employee/statistics/months
Authorization: Bearer {token}
Returns monthly aggregated working hours, income, and bonuses.
Employee Levelsโ
List Employee Levelsโ
GET /api/employee-level
Authorization: Bearer {token}
Create Employee Levelโ
POST /api/employee-level
Authorization: Bearer {token}
Content-Type: application/json
{
"level": "Senior Developer",
"organizationId": "org-uuid"
}
Employee Awardsโ
List Awardsโ
GET /api/employee-award?where[employeeId]={employee-id}
Authorization: Bearer {token}
Create Awardโ
POST /api/employee-award
Authorization: Bearer {token}
Content-Type: application/json
{
"name": "Employee of the Month",
"year": "2024",
"employeeId": "employee-uuid",
"organizationId": "org-uuid"
}
Employee Settingsโ
Get Employee Settingsโ
GET /api/employee-setting?where[employeeId]={employee-id}
Authorization: Bearer {token}
Update Employee Settingsโ
PUT /api/employee-setting/{id}
Authorization: Bearer {token}
Content-Type: application/json
{
"isTrackingEnabled": true,
"isScreenshotEnabled": true,
"screenshotFrequency": 10,
"trackOnSleep": false
}
Employee Recurring Expensesโ
List Recurring Expensesโ
GET /api/employee-recurring-expense?where[employeeId]={employee-id}
Authorization: Bearer {token}
Create Recurring Expenseโ
POST /api/employee-recurring-expense
Authorization: Bearer {token}
Content-Type: application/json
{
"employeeId": "employee-uuid",
"categoryName": "Internet",
"value": 50,
"currency": "USD",
"startDate": "2024-01-01",
"organizationId": "org-uuid"
}
Required Permissionsโ
| Endpoint | Permission |
|---|---|
GET /api/employee | EMPLOYEES_VIEW |
POST /api/employee | EMPLOYEES_EDIT |
PUT /api/employee/:id | EMPLOYEES_EDIT |
DELETE /api/employee/:id | EMPLOYEES_EDIT |
GET /api/employee/:id/statistics | EMPLOYEES_VIEW |