Skip to main content
Retrieves beneficiarios filtered by their time unit (HORAS or MESES).

Endpoint

GET /beneficiarios/filtrar

Authentication

This endpoint requires a valid JWT token.
Authorization: Bearer YOUR_JWT_TOKEN

Query Parameters

unidad
string
required
Time unit to filter by. Must be one of:
  • HORAS - Filter beneficiarios assigned hours
  • MESES - Filter beneficiarios assigned months

Response

Returns an array of beneficiario objects matching the filter.
id
number
Unique identifier for the beneficiario
nombre
string
Full name of the beneficiario
fechaIngreso
string
Date of entry
tiempoAsignado
number
Assigned time amount
unidadTiempo
string
Time unit (HORAS or MESES)
creadoEn
string
Timestamp when record was created

Example Request

curl -X GET "http://localhost:3000/beneficiarios/filtrar?unidad=HORAS" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Example Response

[
  {
    "id": 2,
    "nombre": "María López Ruiz",
    "fechaIngreso": "2026-03-02",
    "tiempoAsignado": 120,
    "unidadTiempo": "HORAS",
    "creadoEn": "2026-03-02T11:30:00.000Z"
  },
  {
    "id": 5,
    "nombre": "Ana Martínez",
    "fechaIngreso": "2026-03-04",
    "tiempoAsignado": 80,
    "unidadTiempo": "HORAS",
    "creadoEn": "2026-03-04T14:20:00.000Z"
  }
]
This endpoint is useful for separating beneficiarios based on their service type - those assigned hours vs. those assigned months.

Build docs developers (and LLMs) love