The API provides three distinct password-related endpoints: one to request a recovery code by email, one to set a new password using that code (no authentication required), and one to change the password while already logged in. Choose the flow that matches your situation.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/ecommerce-delivery/llms.txt
Use this file to discover all available pages before exploring further.
Password Recovery Flow
Use these steps when a user has forgotten their password and needs to reset it without logging in.Request a recovery code
Call
POST /api/user/recover-password-code with the account email. A 6-digit code is generated and sent to that address.Reset the password
Call
POST /api/user/update-password-widthout-token with the email, the received code, and the desired new password.1 — Request Password Recovery Code
Request Body
The email address associated with the account that needs a password reset.
Response
200 — Code sent
"Hemos enviado un codigo de 6 digitos a tu correo para confimar tu cambio de contraseña"true on success.203 — Email not found
Example
2 — Reset Password With Recovery Code (No Auth)
Use this endpoint after receiving the 6-digit code from the recovery email. No JWT token is needed.Request Body
The email address of the account being recovered.
The 6-digit recovery code received by email.
The new password to set for the account. It will be hashed with bcrypt before being stored.
Response
200 — Password updated
"Tu contraseña ha sido cambiada correctamente"true on success.400 — Wrong recovery code
404 — Email not found
Example
3 — Change Password While Logged In
Use this endpoint when a user is already authenticated and wants to update their password. BothnewPassword and newPasswordConfirmed must be identical.
Authorization: Bearer <token>
Request Body
The email address of the authenticated user. Must match the email stored in the database for the account.
The desired new password.
Confirmation of the new password. Must be identical to
newPassword.Response
200 — Password changed
"Contraseña actualizada correctamente"true on success.404 — User not found
Returned when no account exists for the providedemail.
403 — Emails do not match
Returned when theemail in the request body does not match the email stored in the database for the user found.
403 — Passwords do not match
Returned whennewPassword and newPasswordConfirmed are not identical.