Employees
Employees
Section titled “Employees”Empleados asociados a miembros de empresa con datos laborales.
POST /api/companies/{companyId}/employees/v1
Section titled “POST /api/companies/{companyId}/employees/v1”Crear empleado
Parámetros
Section titled “Parámetros”| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
companyId | string | ✅ |
Request Body (requerido ✅)
Section titled “Request Body (requerido ✅)”{ "memberId": "00000000-0000-0000-0000-000000000000", "position": "Cajero", "department": "Ventas", "startDate": "2024-01-15" }Respuestas
Section titled “Respuestas”Empleado creado exitosamente
{ "id": "00000000-0000-0000-0000-000000000000", "memberId": "00000000-0000-0000-0000-000000000000", "position": "position", "department": "department", "startDate": "2024-01-15", "status": "ACTIVE", "createdAt": "2024-01-15T10:00:00Z", "updatedAt": "2024-01-15T10:00:00Z" }GET /api/companies/{companyId}/employees/v1
Section titled “GET /api/companies/{companyId}/employees/v1”Listar empleados activos
Parámetros
Section titled “Parámetros”| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
companyId | string | ✅ |
Respuestas
Section titled “Respuestas”Lista de empleados
{ "id": "00000000-0000-0000-0000-000000000000", "memberId": "00000000-0000-0000-0000-000000000000", "position": "position", "department": "department", "startDate": "2024-01-15", "status": "ACTIVE", "createdAt": "2024-01-15T10:00:00Z", "updatedAt": "2024-01-15T10:00:00Z" }GET /api/companies/{companyId}/employees/v1/{id}
Section titled “GET /api/companies/{companyId}/employees/v1/{id}”Obtener empleado por ID
Parámetros
Section titled “Parámetros”| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
companyId | string | ✅ | |
id | string | ✅ |
Respuestas
Section titled “Respuestas”Datos del empleado
{ "id": "00000000-0000-0000-0000-000000000000", "memberId": "00000000-0000-0000-0000-000000000000", "position": "position", "department": "department", "startDate": "2024-01-15", "status": "ACTIVE", "createdAt": "2024-01-15T10:00:00Z", "updatedAt": "2024-01-15T10:00:00Z" }PATCH /api/companies/{companyId}/employees/v1/{id}
Section titled “PATCH /api/companies/{companyId}/employees/v1/{id}”Actualizar empleado
Parámetros
Section titled “Parámetros”| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
companyId | string | ✅ | |
id | string | ✅ |
Request Body (requerido ✅)
Section titled “Request Body (requerido ✅)”{ "position": "position", "department": "department", "startDate": "2024-01-15" }Respuestas
Section titled “Respuestas”Empleado actualizado
{ "id": "00000000-0000-0000-0000-000000000000", "memberId": "00000000-0000-0000-0000-000000000000", "position": "position", "department": "department", "startDate": "2024-01-15", "status": "ACTIVE", "createdAt": "2024-01-15T10:00:00Z", "updatedAt": "2024-01-15T10:00:00Z" }DELETE /api/companies/{companyId}/employees/v1/{id}
Section titled “DELETE /api/companies/{companyId}/employees/v1/{id}”Dar de baja empleado
Parámetros
Section titled “Parámetros”| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
companyId | string | ✅ | |
id | string | ✅ |
Respuestas
Section titled “Respuestas”Empleado dado de baja exitosamente
Schemas
Section titled “Schemas”CreateEmployeeRequest
Section titled “CreateEmployeeRequest”| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
memberId | string (uuid) | ✅ | ID del CompanyMember |
position | string ej: “Cajero” | ❌ | |
department | string ej: “Ventas” | ❌ | |
startDate | string (date) ej: “2024-01-15” | ❌ |
EmployeeResponse
Section titled “EmployeeResponse”| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
id | string (uuid) | ❌ | |
memberId | string (uuid) | ❌ | |
position | string | ❌ | |
department | string | ❌ | |
startDate | string (date) | ❌ | |
status | EmploymentStatus | ❌ | |
createdAt | string (date-time) | ❌ | |
updatedAt | string (date-time) | ❌ |
UpdateEmployeeRequest
Section titled “UpdateEmployeeRequest”| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
position | string | ❌ | |
department | string | ❌ | |
startDate | string (date) | ❌ |