This endpoint validates a user’s credentials and, on success, returns a signed JSON Web Token (JWT) along with the user’s profile data. The token must be included in theDocumentation 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.
Authorization header as a Bearer token for all protected endpoints. Tokens are valid for 365 days from the time of issue.
Endpoint
Request Body
The registered email address of the user.
The account password.
Response
200 — Login successful
"Bienvenido!"true on success.A signed JWT Bearer token. Valid for 365 days. Pass this in the
Authorization header as Bearer <token> on subsequent requests.The authenticated user’s profile snapshot.
203 — Missing fields or wrong password
Returned whenemail or password are not provided, or when the password does not match.
403 — Invalid email or inactive account
Returned when the email is not found in the database, or when the account has not been verified.Token Payload
The JWT contains the following claims, encoded at sign-in time:| Claim | Description |
|---|---|
_id | User’s database ID |
name | Full name |
email | Email address |
status | Account status array |
roles | Roles array |
membership | Membership object |
codeseller | User’s own referral code |
meseller | Referrer’s seller code |
address | Address |
phone_number | Phone number |
typeIdentification | ID type |
identification | ID number |
avatar | Avatar array |
The token payload reflects the user’s data at the time of login. Profile updates made via
POST /api/user/update will not be reflected in the token until the user logs in again.Using the Token
Include the token in theAuthorization header for all endpoints that require authentication: