Skip to main content
Retrieves activities filtered by their category.

Endpoint

GET /actividades/categoria

Authentication

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

Query Parameters

cat
string
required
Activity category to filter by. Must be one of:
  • TRABAJO_COMUNITARIO - Community work
  • LIDERAZGO_COMUNITARIO - Community leadership
  • ATENCION_SUSTANCIAS - Substance abuse treatment
  • EDUCACION_PARA_LA_VIDA - Life education
  • PROMOCION_CULTURAL_DEPORTIVA - Cultural and sports promotion

Response

Returns an array of activity objects matching the specified category.
id
number
Unique identifier for the activity
nombre
string
Name of the activity
descripcion
string
Description of the activity
objetivo
string
Objective of the activity
categoria
string
Activity category
activo
boolean
Whether the activity is active

Example Request

curl -X GET "http://localhost:3000/actividades/categoria?cat=TRABAJO_COMUNITARIO" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Example Response

[
  {
    "id": 1,
    "nombre": "Limpieza de parques públicos",
    "descripcion": "Actividad de limpieza y mantenimiento de áreas verdes",
    "objetivo": "Contribuir al mejoramiento del entorno comunitario",
    "categoria": "TRABAJO_COMUNITARIO",
    "activo": true
  },
  {
    "id": 3,
    "nombre": "Reparación de instalaciones comunitarias",
    "descripcion": "Mantenimiento de espacios públicos",
    "objetivo": "Mejorar infraestructura comunitaria",
    "categoria": "TRABAJO_COMUNITARIO",
    "activo": true
  }
]
This endpoint is useful for organizing activities by their type and purpose.

Build docs developers (and LLMs) love