Skip to main content
PUT /api/perfil/:id Updates the strNombrePerfil and bitAdministrador fields of an existing profile. The endpoint also manages permisos_perfil records automatically based on the change in administrator status:
  • Was not admin → now admin: all existing permissions for this profile are deleted and replaced with full permissions for every existing module.
  • Was admin → no longer admin: all permissions for this profile are deleted, leaving the profile with no module access.
  • No change to admin flag: existing permissions are left unchanged.

Path parameters

number
required
Primary key of the profile to update.

Request body

string
required
Updated profile name. Cannot be empty or whitespace-only.
boolean
required
Updated administrator flag.

Response

boolean
required
true when the update completes without error.
object
required
The updated profile record as returned by the database.

Error responses

Examples

Success response

200

Error response (404)

404