Skip to content

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

✅ Fields with specific validation rules

FieldTypeFormatDescription
has_timesheetsbooleanRequired if is_consultant = true
timesheets_frequency_codeintegerint32Required if has_timesheets = true
vehicle_type_codestringRequired if use_vehicle = true
vehicle_tax_horsepower_codestringRequired if use_vehicle = true
vehicle_registration_numberstringRequired if use_vehicle = true
vehicle_price_per_kmnumberdoubleRequired 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."
}