The Users API controls who can log in to the system and what they can do. Access control is organized into three layers: users (credentials + linked employee), roles (named permission sets), and modules (navigation items available to each role). Permissions are stored as a bitmask in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/CLINTONARMANDO/apiregistropendientes/llms.txt
Use this file to discover all available pages before exploring further.
permisos field of each role.
All endpoints require a valid Bearer token unless otherwise noted. Include
Authorization: Bearer <token> in every request header.Users
List active users
GET /api/usuarios
Returns all users where vigente = true.
Response fields
Unique user ID.
Display name.
Identity document number.
Login email address.
true if the account is active.Assigned role.
Linked employee record. See EmpleadoResponse for field details.
Create a user
POST /api/usuarios
Creates a new user account linked to an existing employee.
Display name for the user.
Identity document number.
Login email address. Must be unique.
Initial password. Stored as a bcrypt hash.
Role ID to assign (e.g.,
ADMIN, TECNICO). Use GET /api/usuarios/roles to retrieve valid IDs.ID of the employee record to link. Each employee can only be linked to one active user.
Get current user
GET /api/usuarios/usuario
Returns the profile of the authenticated user derived from the Bearer token. Useful for populating the UI with the logged-in user’s details.
Get user by ID
GET /api/usuarios/{id}
Returns a single user record by ID.
Numeric user ID.
Update a user
PUT /api/usuarios/{id}
Updates user account details.
Numeric ID of the user to update.
Delete a user
DELETE /api/usuarios/{id}
Soft-deletes a user account. The record is retained but the user can no longer log in.
Numeric ID of the user to deactivate.
Roles
Roles define what actions a user is permitted to take. Thepermisos field is a bitmask — an integer computed by adding together individual permission values.
List active roles
GET /api/usuarios/roles
Returns all roles that are currently active.
Create a role
POST /api/usuarios/roles
Creates a new role with a set of permissions encoded as a bitmask.
Unique string identifier for the role (e.g.,
TECNICO, SUPERVISOR). Used as the foreign key in user records.Human-readable role name.
Description of the role’s purpose.
Bitmask integer encoding the granted permissions. Sum the values of all desired permissions. See Permission bitmask reference.
Update a role
PUT /api/usuarios/roles/{id}
Updates an existing role’s name, description, or permissions.
The string ID of the role to update (e.g.,
TECNICO).Delete a role
DELETE /api/usuarios/roles/{id}
Deletes a role. This operation is blocked if any active users are currently assigned to the role.
The string ID of the role to delete.
Modules
Modules represent navigation items or feature areas within the application. Each role is associated with a set of modules that controls what the user can see.List all modules
GET /api/usuarios/modulos
Returns all registered modules.
Response fields
Module ID.
Module name.
Module description.
Icon identifier (e.g.,
home, users).Application route (e.g.,
/dashboard).Parent module, if this is a sub-module. Same structure as ModuloResponse.
null for top-level modules.true if the module is active.Get module by ID
GET /api/usuarios/modulos/{id}
Returns a single module record.
Numeric module ID.
Get modules for a role
GET /api/usuarios/modulos/rol/{id}
Returns the list of modules accessible to a specific role.
The role ID (e.g.,
ADMIN, TECNICO).Get modules for current user
GET /api/usuarios/modulos/usuario
Returns the list of modules accessible to the authenticated user, based on their assigned role.
Create a module
POST /api/usuarios/modulos
Registers a new application module.
Module name.
Description of what this module provides.
Icon identifier string (e.g.,
home, clipboard-list).Application route path (e.g.,
/pendientes).ID of the parent module if this is a sub-module. Pass
null for top-level modules.Update a module
PUT /api/usuarios/modulos/{id}
Updates an existing module’s details.
Numeric ID of the module to update.
Sync modules for a role
POST /api/usuarios/modulos/sync
Replaces the full set of modules assigned to a role. Any modules not included in moduloIds will be unlinked from the role.
The role ID to update module access for (e.g.,
ADMIN).Complete list of module IDs to assign to the role. This is a full replacement, not an append.
Delete a module
DELETE /api/usuarios/modulos/{id}
Soft-deletes a module by setting vigente = false.
Numeric ID of the module to deactivate.
Permission bitmask reference
Thepermisos field in a role is a Long integer where each bit value maps to a specific permission. To grant multiple permissions, sum their bit values.
| Bit value | Permission | Description |
|---|---|---|
| 1 | REGISTRAR_PENDIENTE | Create new work orders |
| 2 | EDITAR_PENDIENTE | Edit existing work order fields |
| 4 | VER_DETALLE_PENDIENTE | View full detail of a single work order |
| 8 | VER_TODOS_PENDIENTES | List and search all work orders |
| 16 | ASIGNAR_TECNICO | Assign a technician to a work order |
| 32 | ASIGNAR_PPOE | Assign PPPoE credentials |
| 64 | ASIGNAR_VLAN | Assign VLAN configuration |
| 128 | COMENZAR_TRABAJO | Start field work (move to EN_PROGRESO) |
| 256 | PARAR_TRABAJO | Pause field work |
| 512 | CONTINUAR_TRABAJO | Resume paused field work |
| 1024 | FINALIZAR_TRABAJO | Mark field work as finished |
| 2048 | VER_PENDIENTES_HISTORIAL | View all work orders in history |
| 4096 | REVISAR_GASTOS | Review associated expenses |
| 8192 | REVISAR_FINALIZADOS | Review finalized work orders |
- Full admin access:
1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 + 256 + 512 + 1024 + 2048 + 4096 + 8192= 16383 - Technician (start/stop work + view detail):
128 + 256 + 512 + 1024 + 4= 1924 - Read-only viewer:
4 + 8 + 2048= 2060