GET /rol/listar
Retrieves a list of all available roles in the system.Request
No parameters required.Request Example
Response
Returns an array of role objects.List of all available roles
Unique identifier for the role
Role name enum value. Possible values:
ADMIN- Administrator with full system accessUSER- Standard user with limited permissionsALMACENERO- Warehouse manager with inventory permissions
Human-readable description of the role and its permissions
Response Example
Status Codes
200 OK- Roles retrieved successfully
Role Types
The system supports the following predefined roles:ADMIN
Administrator role with complete system access. Can manage users, roles, inventory, sales, purchases, and all other system functions. Typical Permissions:- Create, update, and delete users
- Assign roles to users
- Full access to all modules
- System configuration
USER
Standard user role with limited permissions. Suitable for sales representatives or basic system users. Typical Permissions:- View products and inventory
- Process sales
- View reports
- Limited modification capabilities
ALMACENERO
Warehouse manager role focused on inventory management. Typical Permissions:- Manage product inventory
- Process purchase orders
- Update stock levels
- Generate inventory reports
- Limited access to sales and financial data
Using Roles in User Management
When creating or updating users, reference roles by theiridRol:
Role-Based Access Control
Roles determine which endpoints and features users can access. The authentication service returns user permissions as part of the login response:accesos array contains all menu items and features the user can access based on their assigned role.