List All Employees
Retrieve a list of employees with optional filtering criteria.
Query Parameters
Filter employees by supervisor ID
Filter employees by position ID
Filter employees by zone ID
Filter by employee code (partial match)
Filter employees by business unit ID
Filter by employee status (e.g., “A” for active)
Filter by responsible person ID
Filter to show only active employees (true) or all employees (false/null)
Filter by specific employee ID
Request Example
curl --request GET \
--url 'https://api.integra.com/empleados?unidadId=5&activos=true' \
--header 'Authorization: Bearer {token}'
Response
Array of employee objects Show Employee object structure
Position information (id, nombre, activo)
Department information (id, nombre)
Business unit information
Contact information (telefono, email)
Termination date (YYYY-MM-DD)
List of assigned managers
Response message (e.g., “Empleado”)
Response Example
{
"success" : true ,
"data" : [
{
"id" : 1 ,
"codigo" : "EMP001" ,
"nombre" : "Juan" ,
"apellidoPaterno" : "García" ,
"apellidoMaterno" : "López" ,
"nombreCompleto" : "Juan García López" ,
"puesto" : {
"id" : 10 ,
"nombre" : "Desarrollador" ,
"activo" : true
},
"departamento" : {
"id" : 5 ,
"nombre" : "Tecnología"
},
"unidad" : {
"id" : 2 ,
"clave" : "TI" ,
"nombre" : "Tecnologías de la Información" ,
"nombreCompleto" : "Unidad de TI" ,
"activo" : true
},
"contacto" : {
"telefono" : "555-1234" ,
"email" : "[email protected] "
},
"fechaAlta" : "2022-01-15" ,
"fechaBaja" : null ,
"fechaReingreso" : null ,
"estatus" : "A" ,
"sexo" : "M" ,
"gestores" : []
}
],
"message" : "Empleado"
}
Get Supervisors
Retrieve a list of employees who have supervisor roles.
Query Parameters
Filter to show only active supervisors (true) or all supervisors (false/null)
Request Example
curl --request GET \
--url 'https://api.integra.com/empleados/supervisores?activos=true' \
--header 'Authorization: Bearer {token}'
Response
Array of supervisor employee objects (same structure as employee objects)
Response message (e.g., “Supervisores activos”)
Response Example
{
"success" : true ,
"data" : [
{
"id" : 25 ,
"codigo" : "SUP001" ,
"nombre" : "María" ,
"apellidoPaterno" : "Rodríguez" ,
"apellidoMaterno" : "Martínez" ,
"nombreCompleto" : "María Rodríguez Martínez" ,
"puesto" : {
"id" : 15 ,
"nombre" : "Supervisor de Área" ,
"activo" : true
},
"departamento" : {
"id" : 5 ,
"nombre" : "Tecnología"
},
"contacto" : {
"telefono" : "555-5678" ,
"email" : "[email protected] "
},
"estatus" : "A"
}
],
"message" : "Supervisores activos"
}
Get Employee Details
Retrieve comprehensive details for a specific employee, including organizational relationships and assigned managers.
Path Parameters
The unique identifier of the employee
Request Example
curl --request GET \
--url 'https://api.integra.com/empleados/123/detalles' \
--header 'Authorization: Bearer {token}'
Response
Detailed employee object Show Complete employee details
Position details
id (integer): Position ID
nombre (string): Position name
activo (boolean): Active status
Department details
id (integer): Department ID
nombre (string): Department name
Business unit details including supervisor information
Complete contact information
telefono (string): Phone number
email (string): Email address
direccion (string): Physical address
localizacion (string): Location
estado (object): State/province information
zona (object): Zone/region information
Termination date (YYYY-MM-DD)
List of managers assigned to this employee
id (integer): Manager ID
nombreCompleto (string): Manager’s full name
nivel (integer): Authorization level
proceso (string): Process type
Response message (e.g., “Detalles de empleado”)
Response Example
{
"success" : true ,
"data" : {
"id" : 123 ,
"codigo" : "EMP123" ,
"nombre" : "Carlos" ,
"apellidoPaterno" : "Hernández" ,
"apellidoMaterno" : "Pérez" ,
"nombreCompleto" : "Carlos Hernández Pérez" ,
"puesto" : {
"id" : 12 ,
"nombre" : "Analista Senior" ,
"activo" : true
},
"departamento" : {
"id" : 3 ,
"nombre" : "Operaciones"
},
"unidad" : {
"id" : 8 ,
"clave" : "OPS-01" ,
"nombre" : "Operaciones Norte" ,
"nombreCompleto" : "Unidad de Operaciones Norte" ,
"activo" : true ,
"operativa" : true ,
"supervisor" : {
"id" : 25 ,
"nombreCompleto" : "María Rodríguez Martínez"
}
},
"contacto" : {
"telefono" : "555-9876" ,
"email" : "[email protected] " ,
"direccion" : "Av. Principal 123" ,
"localizacion" : "Edificio A, Piso 3" ,
"estado" : {
"id" : 1 ,
"codigo" : "NL" ,
"nombre" : "Nuevo León"
},
"zona" : {
"id" : 5 ,
"nombre" : "Norte"
}
},
"fechaAlta" : "2021-03-10" ,
"fechaBaja" : null ,
"fechaReingreso" : null ,
"estatus" : "A" ,
"sexo" : "M" ,
"gestores" : [
{
"id" : 25 ,
"nombreCompleto" : "María Rodríguez Martínez" ,
"nivel" : 1 ,
"proceso" : "Vacaciones"
},
{
"id" : 45 ,
"nombreCompleto" : "Roberto González Díaz" ,
"nivel" : 2 ,
"proceso" : "Permisos"
}
]
},
"message" : "Detalles de empleado"
}
Error Responses
All endpoints may return error responses in the following format:
{
"success" : false ,
"message" : "Error description" ,
"data" : null
}
Common Error Scenarios
Returned when an employee with the specified ID does not exist. {
"success" : false ,
"message" : "Empleado no encontrado" ,
"data" : null
}
Returned when the authentication token is missing or invalid. {
"success" : false ,
"message" : "Token de autenticación inválido" ,
"data" : null
}
Returned when request parameters are invalid. {
"success" : false ,
"message" : "Parámetros de solicitud inválidos" ,
"data" : null
}
500 Internal Server Error
Returned when an unexpected server error occurs. {
"success" : false ,
"message" : "Error interno del servidor" ,
"data" : null
}
Notes
The controller currently only provides read operations (GET endpoints). Create, update, and delete operations are not yet implemented in the EmpleadoController.
The employee list endpoint supports multiple filter combinations. You can combine any of the query parameters to narrow down your search results.
When filtering by activos=true, only employees with status “A” (Active) will be returned. Make sure to handle cases where the filtered list might be empty.
For better performance when retrieving employee lists, use specific filters (like unidadId or idPuesto) rather than fetching all employees and filtering on the client side.
Authentication Learn how to authenticate API requests
Departments Manage department information
Positions Manage position definitions
Business Units Manage business unit structure