The Login endpoint is the entry point into every authenticated workflow in the Romsoft Gestión Clínica API. It accepts a username and password, validates them against the system’s user store, and — on success — returns a session object containing the user’s identity, role assignment, and a security token that must be forwarded with every subsequent request. Because authentication must be reachable before any token exists, this route is decorated withDocumentation 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.
[AllowAnonymous] and requires no Authorization header.
Endpoint
This is the only endpoint in the API that does not require an
Authorization header. Every other controller action expects Authorization: Bearer <token> once a session has been established.Request Body
Send a JSON object that matches theLoginDTO shape. Both fields are required for a successful credential look-up.
The system username assigned to the user account. Case-sensitivity depends on the underlying database collation.
The account password. Transmitted in the request body — always use HTTPS in production to protect credentials in transit.
Optional flag indicating whether to validate the user against Active Directory instead of the local credential store. Defaults to
false when omitted.Example Request
Response Envelope
All API responses are wrapped in aJsonResponse envelope before the Data payload is returned. The envelope fields are consistent across every endpoint.
true when the request was processed without a server-side exception. A true value does not necessarily mean credentials were valid — inspect Warning and Message for authentication outcomes.Set to
true when the request completed successfully from an infrastructure perspective but the business rule was not satisfied — for example, when the supplied credentials do not match any user in the system.A human-readable status message in Spanish. Populated on warnings and errors.
On a successful login, contains a
SEG_USUARIOLoginDTO object with the authenticated user’s session data. null when authentication fails.Response Scenarios
✅ Successful Authentication
When credentials are found in the system,Success is true, Warning is absent (or false), and Data contains the SEG_USUARIOLoginDTO object.
⚠️ Invalid Credentials
When no matching user is found for the supplied username and password combination, the API responds withSuccess: true (no server error occurred) but sets Warning: true and populates Message with the Spanish-language rejection message.
❌ Server Error
If an unhandled exception occurs while processing the request,Success is set to false and a generic retry message is returned. The error is logged internally by the BaseController.
Using the Token in Subsequent Requests
Once you have retrieved thetoken value from the Data object, attach it to the Authorization header of every protected request: