Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/LizandroCanul/back_sdo/llms.txt

Use this file to discover all available pages before exploring further.

DELETE /dependencias/:id

Performs a soft delete on a government dependency by setting its activo field to false. The dependency is not permanently removed from the database, allowing for data preservation and potential reactivation.

Authentication

No authentication required in the current implementation.
This endpoint should be protected with authentication and admin authorization in production environments.

Path Parameters

id
number
required
The unique identifier of the dependency to deleteExample: 1

Response

Returns the dependency object with activo set to false.
id
number
required
Unique identifier for the dependency
nombre
string
required
Full name of the dependency
siglas
string
Acronym or abbreviation for the dependency
activo
boolean
required
Will always be false after a successful delete operation

Example Request

curl -X DELETE http://localhost:3000/dependencias/1

Example Responses

200 - Success
{
  "id": 1,
  "nombre": "Secretaría de Desarrollo Urbano",
  "siglas": "SDU",
  "activo": false
}
404 - Not Found
{
  "statusCode": 404,
  "message": "Dependencia #999 no encontrada",
  "error": "Not Found"
}
Soft Delete BehaviorThis endpoint implements a soft delete pattern, which means:
  • The dependency record is not permanently removed from the database
  • The activo field is set to false
  • The dependency will not appear in default list responses (unless ver_todo=true is used)
  • The dependency can be reactivated by using the PATCH endpoint to set activo: true
  • All historical data and relationships are preserved
To view inactive dependencies in list operations, use the ver_todo=true query parameter:
GET /dependencias?ver_todo=true

Build docs developers (and LLMs) love