The Users API lets you manage the staff accounts that operate the Don Mamino bakery system. Each user is assigned a role (such asDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/luisllatas-dev/Proyecto_Pasteleria_DonMamino/llms.txt
Use this file to discover all available pages before exploring further.
administrador or vendedor) and is linked to a specific bakery location (id_sede). All five endpoints require a valid JWT Bearer token.
GET /api/usuarios
Returns a list of all users registered in the system. Auth required: YesResponse fields
Unique identifier for the user.
Full name of the user.
Email address of the user. Must be unique across the system.
Role assigned to the user, for example
administrador or vendedor.ID of the bakery location this user belongs to. References the
Sedes table.The
contraseña field is never returned in API responses. Passwords are stored securely and are write-only.Example response
GET /api/usuarios/:id
Returns a single user by their unique ID. Auth required: YesPath parameters
The
id_usuario of the user to retrieve.Response fields
Unique identifier for the user.
Full name of the user.
Email address of the user.
Role assigned to the user.
ID of the bakery location this user belongs to.
Example response
Error responses
| Status | Description |
|---|---|
404 | No user found with the given ID. Response body: { "message": "Usuario no encontrado" } |
500 | Internal server error. |
POST /api/usuarios
Creates a new user. The password is stored securely — you do not need to hash it before sending. Auth required: YesRequest body
Full name of the new user.
Email address of the new user. Must be unique across the system.
Role for the new user, for example
administrador or vendedor.Password for the new user. Send as plain text — it is hashed before storage and never returned in responses.
ID of the bakery location to associate this user with. References the
Sedes table.Response fields
The auto-generated
id_usuario of the newly created user.Confirmation message:
"Usuario creado exitosamente".Example response
PUT /api/usuarios/:id
Updates all fields of an existing user. All body fields must be provided. Auth required: YesPath parameters
The
id_usuario of the user to update.Request body
Updated full name of the user.
Updated email address. Must remain unique across the system.
Updated role for the user.
New password. Send as plain text — it is hashed before storage.
Updated bakery location ID for the user.
Response fields
Confirmation message:
"Usuario actualizado exitosamente".Example response
Error responses
| Status | Description |
|---|---|
404 | No user found with the given ID. Response body: { "message": "Usuario no encontrado" } |
500 | Internal server error. |
DELETE /api/usuarios/:id
Permanently deletes a user from the system. Auth required: YesPath parameters
The
id_usuario of the user to delete.Response fields
Confirmation message:
"Usuario eliminado exitosamente".Example response
Error responses
| Status | Description |
|---|---|
404 | No user found with the given ID. Response body: { "message": "Usuario no encontrado" } |
500 | Internal server error. |