Skip to main content
Reactivates a previously deactivated activity, making it active again in the system.

Endpoint

PATCH /actividades/:id/reactivar

Authentication

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

Path Parameters

id
number
required
The unique identifier of the activity to reactivate

Response

Returns the updated activity object with activo set to true.
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 (will be true)

Example Request

curl -X PATCH http://localhost:3000/actividades/1/reactivar \
  -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"
}
Reactivated activities will immediately appear in the /actividades endpoint (which only returns active activities).
To deactivate an activity again, use the Deactivate Actividad endpoint.

Build docs developers (and LLMs) love