Skip to main content
PUT
/
api
/
Modulo
/
{id}
curl --request PUT \
  --url https://your-api-host/api/Modulo/4 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "strNombreModulo": "Reportes Avanzados",
    "Ruta": "/Module/Reporte",
    "Clave": "reporte"
  }'
{
  "IdModulo": 4,
  "strNombreModulo": "Reportes Avanzados",
  "Ruta": "/Module/Reporte",
  "Clave": "reporte"
}
Updates an existing module’s fields. All three body fields are required.

Authentication

Requires a valid Bearer token.
Authorization: Bearer <token>

Permissions

Requires the modulo.editar permission. Returns 403 Forbidden if the authenticated user’s profile does not have this permission.

Path parameters

id
integer
required
ID of the module to update.

Request body

strNombreModulo
string
required
Updated display name for the module.
Ruta
string
required
Updated frontend route for the module.
Clave
string
required
Updated unique key for the module. Changing this value affects the permission strings used for this module.

Validation

The same uniqueness checks applied on creation are enforced on update, but the current module (identified by id) is excluded from the comparison:
  • Returns 400 Bad Request with "Ya existe un módulo con la misma clave." if another module already uses the same Clave.
  • Returns 400 Bad Request with "Ya existe un módulo con la misma clave y ruta." if another module already uses the same Clave and Ruta combination.
Changing the Clave of an existing module will break any permission strings that reference the old key. Update profile permissions accordingly after renaming a module’s key.

Response fields

IdModulo
integer
required
Module ID.
strNombreModulo
string
required
Updated display name.
Ruta
string
required
Updated frontend route.
Clave
string
required
Updated unique key.

Examples

curl --request PUT \
  --url https://your-api-host/api/Modulo/4 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "strNombreModulo": "Reportes Avanzados",
    "Ruta": "/Module/Reporte",
    "Clave": "reporte"
  }'
{
  "IdModulo": 4,
  "strNombreModulo": "Reportes Avanzados",
  "Ruta": "/Module/Reporte",
  "Clave": "reporte"
}

Build docs developers (and LLMs) love