Skip to main content

List All Employees

Retrieve a list of employees with optional filtering criteria.

Query Parameters

idSupervisor
integer
Filter employees by supervisor ID
idPuesto
integer
Filter employees by position ID
idZona
integer
Filter employees by zone ID
clave
string
Filter by employee code (partial match)
unidadId
integer
Filter employees by business unit ID
estatus
string
Filter by employee status (e.g., “A” for active)
idResponsable
integer
Filter by responsible person ID
activos
boolean
Filter to show only active employees (true) or all employees (false/null)
id
integer
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

success
boolean
Operation success status
data
array
Array of employee objects
message
string
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

activos
boolean
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

success
boolean
Operation success status
data
array
Array of supervisor employee objects (same structure as employee objects)
message
string
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

id
integer
required
The unique identifier of the employee

Request Example

curl --request GET \
  --url 'https://api.integra.com/empleados/123/detalles' \
  --header 'Authorization: Bearer {token}'

Response

success
boolean
Operation success status
data
object
Detailed employee object
message
string
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
}
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

Build docs developers (and LLMs) love