The Users module manages the two-layer identity model used in Kantuta POS: a Usuario (system account with credentials and a role) and a Persona (personal identity record with name and demographic data). EveryDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Eleazarguitar18/kantuta_pos_front/llms.txt
Use this file to discover all available pages before exploring further.
Usuario is backed by exactly one Persona. Registration creates both records in a single call. Update operations are split — account-level fields (email, password, role) go to /usuario/:id, while personal details go to /persona. The mail endpoint provides a simple transactional email utility for notifications.
TypeScript Interfaces
User Endpoints
Register a New User
POST /usuario/register — Creates a new Usuario and its associated Persona in a single request.
This endpoint is public — no
Authorization header is required. It is the only user endpoint that can be called without an existing authenticated session, allowing admin-driven onboarding flows.Unique email address for the new account. Must be a valid email format.
Account password. Should be provided for all standard registrations.
First name(s) of the person (e.g.,
"María Elena").First (paternal) surname (e.g.,
"García").Second (maternal) surname (e.g.,
"López"). Optional.Date of birth in
YYYY-MM-DD format (e.g., "1992-04-15").Gender identifier (e.g.,
"M" for male, "F" for female).Optional display name shown in the POS UI. If omitted, the backend may derive it from
nombres.Initial account status. Defaults to
true (active) if omitted.Role ID to assign to the new user. If omitted, the backend assigns the default role.
Usuario — the full user object including the created Persona and assigned Role.
List All Users
GET /usuario — Returns all registered user accounts with their associated persona and role data.
Update a User
PATCH /usuario/:id — Partially updates an existing user’s account-level fields. Only the fields provided in the request body are changed.
Updated display name.
Updated email address.
New password. Will be hashed before storage.
Set to
false to deactivate the account without deleting it.Reassign the user to a different role by ID.
Usuario (updated object)
Persona Endpoints
Create a Persona
POST /persona — Creates a standalone Persona record without an associated Usuario. Useful for tracking individuals who are not system users.
First name(s).
Paternal surname.
Maternal surname.
Date of birth in
YYYY-MM-DD format.Gender code (e.g.,
"M" or "F").List All Personas
GET /persona — Returns all persona records (requires authentication).
status, message, and data: Persona[].
Get Persona by ID
GET /persona/:id — Returns a single persona record by its ID.
Persona
Update a Persona
PUT /persona — Updates an existing persona’s personal details. The target persona ID is passed in the request body (not as a URL path parameter). Uses PUT semantics.
ID of the persona to update.
ID of the user performing the update. Auto-injected by the frontend service from the logged-in session.
Updated first name(s).
Updated paternal surname.
Updated maternal surname.
Updated date of birth in
YYYY-MM-DD format.Updated gender code.
Persona (updated object)
Mail Endpoint
Send a Transactional Email
POST /mail — Sends a plain-text email through the configured SMTP transport. Useful for confirmations, notifications, and password recovery flows.
This endpoint is public — no
Authorization header is required. Protect your usage at the application layer to avoid abuse.Recipient’s email address.
Email subject line.
Plain-text body of the email.
Recipient’s display name, used in the email greeting.