The login endpoint validates a user’s credentials and returns a signed JSON Web Token (JWT) that grants access to all protected endpoints. The token is valid for 365 days from the time of issue and must be included in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/Ecommerce/llms.txt
Use this file to discover all available pages before exploring further.
token-access header on every authenticated request. No authentication token is required to call this endpoint itself.
The account must be verified and active before login is permitted. If you have not yet verified your account, call
POST /api/user/verify-account with the 5-digit code sent to your email at registration.Endpoint
Method:POSTPath:
/api/user/loginAuth required: No
Prerequisites
The user account must have an activation status of{ name: "Activado", value: "1" } and a confirmed login_code_confirmed value. Accounts that have not completed email verification will be rejected with a 403 response. Complete the account verification flow first if needed.
Request Body
The email address used when registering the account.
The account password. Compared against the stored bcrypt hash.
Response — 200 OK
A successful login returns a JWT and the full user profile. Store thetoken securely — it is required for all protected endpoints.
Always
"Bienvenido!" on success.Always
true on success.A signed JWT string, valid for 365 days. Pass this value in the
token-access header on all subsequent authenticated requests.The authenticated user’s profile data, embedded in the JWT payload and returned in the response body.
Example Request
Example Response
Using the Token in Subsequent Requests
Once you have the token, include it in thetoken-access header for every protected endpoint call:
Error Responses
| Status Code | Meaning |
|---|---|
203 | Wrong password, or one or more required fields are missing from the request. |
403 | The account exists but is not yet activated. Verify the account before attempting to log in. |
500 | An unexpected server error occurred. |