Create an employee
This page details the process of creating an employee via the API:
the endpoint, validation rules, and response examples.
🔧 Endpoint
Call the endpoint POST /HR/employees
✅ Fields with specific validation rules
| Field | Type | Format | Description |
|---|---|---|---|
has_timesheets | boolean | — | Required if is_consultant = true |
timesheets_frequency_code | integer | int32 | Required if has_timesheets = true |
vehicle_type_code | string | — | Required if use_vehicle = true |
vehicle_tax_horsepower_code | string | — | Required if use_vehicle = true |
vehicle_registration_number | string | — | Required if use_vehicle = true |
vehicle_price_per_km | number | double | Required if use_vehicle = true |
📬 API Responses
✔️ 201 — Success
json
{
"guid_employee": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"id_employee": 42,
"is_standby": true
}The is_standby property indicates that the employee is pending onboarding.
❌ 401 — Unauthorized
json
{
"error": "INCORRECT_DEPARTMENT",
"details": "The department is incorrect."
}❌ 409 — Conflict
json
{
"error": "BUSINESS_EMAIL_IN_USE",
"details": "The business email is already used."
}
