TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ttpullima/RomsoftBackEnd2021_v2/llms.txt
Use this file to discover all available pages before exploring further.
SEG_USUARIO controller exposes the full lifecycle management surface for system user accounts in Romsoft Gestión Clínica. Through these endpoints you can create new operator accounts, query individual users or filtered lists, page through the full user directory, look up credentials by username, apply updates to existing records, and perform soft-deletes — all within a consistent JsonResponse envelope.
The
[Authorize] attribute is present in the source but commented out (//[Authorize] //DeComentar par recibir token). In the current build, these endpoints do not enforce token validation at the framework level. When the attribute is uncommented, all actions will require an Authorization: Bearer <token> header obtained from POST /api/Account/Login.SEG_USUARIODTO — Shared Data Shape
Most endpoints in this controller both accept and return objects that conform to theSEG_USUARIODTO shape. Understanding its fields upfront makes it easier to construct requests and interpret responses.
POST /api/SEG_USUARIO/Add
Creates a new user account. Before inserting, the controller callsExists() on the business layer to check for duplicate records. If a matching user is already present, the operation is rejected with a warning rather than creating a duplicate.
POST /api/SEG_USUARIO/Add
Request Body
The role to assign to the new user. Obtain valid role IDs from
/api/SEG_ROL/GetAllActives.Desired login username. Must be unique — the endpoint will reject the request if a user with this username already exists.
Account password.
Surname(s) of the user.
Given name(s) of the user.
National identity document number.
Sex code (
"M" or "F").Email address.
Mobile phone number.
Initial account status. Use
"A" to create an active account.Username of the operator performing the creation. Written to the audit log.
Response
| Scenario | Success | Warning | Message |
|---|---|---|---|
| Record created | true | false | "Se registró satisfactoriamente." |
| Duplicate found | true | true | "El registro ya existe." |
| Insert failed | true | true | "No se pudo realizar el registro." |
| Server error | false | — | "Hubo un error, inténtelo más tarde." |
POST /api/SEG_USUARIO/GetAllFilters
Returns a list of user records filtered by whicheverSEG_USUARIODTO fields are populated in the request body. Fields that are left null or empty are not applied as filter criteria. Use this endpoint to search for users by role, status, document number, or any combination of the available fields.
POST /api/SEG_USUARIO/GetAllFilters
Request Body
Send aSEG_USUARIODTO object with any combination of the following filter fields:
Filter by role assignment.
Filter by username (exact or partial match depends on the database query implementation).
Filter by surname.
Filter by given name.
Filter by document number.
Filter by account status (
"A" for active, "I" for inactive).Response
Data contains an array of SEG_USUARIODTO objects matching the applied filters.
POST /api/SEG_USUARIO/GetAllPaging
Returns a paginated slice of the full user list. Use this endpoint when rendering paginated data grids or tables that need to handle large user directories efficiently.POST /api/SEG_USUARIO/GetAllPaging
Request Body
The 1-based page index to retrieve.
The maximum number of records to include in the returned page.
Response
Data contains an array of SEG_USUARIODTO objects representing the requested page of results. The Cantidad field on each record may indicate the total row count, which can be used to calculate total page count on the client side.
POST /api/SEG_USUARIO/GetById
Retrieves a specific user record by its primary key. Returns a single-element list wrapped in the standardData array. If no user with the given id_usuario is found, a warning is returned.
POST /api/SEG_USUARIO/GetById
Request Body
The primary key of the user record to retrieve.
Response
| Scenario | Success | Warning | Data |
|---|---|---|---|
| User found | true | false | Array with one SEG_USUARIODTO |
| Not found | true | true | null |
| Server error | false | — | null |
POST /api/SEG_USUARIO/GetByUsername
Looks up a user by username and password. This is the administrative counterpart to the public login endpoint — it returns a fullSEG_USUARIODTO (rather than the slimmer SEG_USUARIOLoginDTO) and is intended for use in back-office user management screens rather than authentication flows.
POST /api/SEG_USUARIO/GetByUsername
Request Body
The username to look up.
The password to validate against the stored credential.
Response
On a successful match,Data contains a single SEG_USUARIODTO object. If no matching record is found, Warning is set to true and Message is "El usuario no pertenece al sistema.".
POST /api/SEG_USUARIO/Update
Applies changes to an existing user record. The entireSEG_USUARIODTO object is submitted, so populate all fields — not only the ones being changed — to avoid inadvertently blanking out values.
POST /api/SEG_USUARIO/Update
Request Body
Primary key of the record to update. Must match an existing user.
Updated role assignment.
Updated username.
Updated password.
Updated surname(s).
Updated given name(s).
Updated document number.
Updated sex code.
Updated email address.
Updated mobile phone number.
Updated account status.
Username of the operator performing the update. Written to the audit log.
Response
| Scenario | Success | Warning | Message |
|---|---|---|---|
| Update applied | true | false | "Se actualizó satisfactoriamente." |
| No rows affected | true | true | "No se pudo realizar la actualización." |
| Server error | false | — | "Hubo un error, inténtelo más tarde." |
POST /api/SEG_USUARIO/Delete
Performs a soft-delete on the specified user record. The record is not physically removed from the database; instead, the business layer updates its status to reflect deletion. The audit log entry is written usingUsuarioModificacion from the request body.
POST /api/SEG_USUARIO/Delete
This is a soft-delete operation. The user record remains in the database and can be recovered by directly updating the
estado field via the Update endpoint.Request Body
Primary key of the user record to delete.
Username of the operator performing the deletion. Written to the audit log.
Response
| Scenario | Success | Warning | Message |
|---|---|---|---|
| Delete applied | true | false | "Se eliminó satisfactoriamente." |
| No rows affected | true | true | "No se pudo realizar la eliminación." |
| Server error | false | — | "Hubo un error, inténtelo más tarde." |