Skip to main content
Retrieves details of a specific beneficiario by their ID.

Endpoint

GET /beneficiarios/:id

Authentication

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

Path Parameters

id
number
required
The unique identifier of the beneficiario

Response

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/1 \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Example Response

{
  "id": 1,
  "nombre": "Juan Pérez García",
  "fechaIngreso": "2026-03-01",
  "tiempoAsignado": 6,
  "unidadTiempo": "MESES",
  "creadoEn": "2026-03-01T10:00:00.000Z"
}

Error Responses

Not Found

{
  "statusCode": 404,
  "message": "Beneficiario not found"
}

Invalid ID

{
  "statusCode": 400,
  "message": "Validation failed (numeric string is expected)",
  "error": "Bad Request"
}

Build docs developers (and LLMs) love