Skip to main content
Retrieves details of a specific activity by its ID.

Endpoint

GET /actividades/:id

Authentication

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

Path Parameters

id
number
required
The unique identifier of the activity

Response

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/1 \
  -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
}

Error Responses

Not Found

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

Invalid ID

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

Build docs developers (and LLMs) love