POST /api/v2/login
Authenticate users using email and password.Headers
application/json
Request Body
User’s email address
User’s password
Local cart data to sync with server cart
Local wishlist items to sync with server wishlist
Response
JWT authentication token (use in Authorization header for subsequent requests)
User’s full name (firstname + lastname)
Login status (1 = success)
Cart count
Merged cart data after syncing local and server carts
Merged wishlist data after syncing
Whether this is the user’s first login (always false for existing users)
Error Responses
401 UnauthorizedCode Examples
POST /api/v3/login
Authenticate users using email and password with Google reCAPTCHA verification (enhanced security).Headers
application/json
Request Body
User’s email address (validated)
User’s password
Google reCAPTCHA response token
Local cart data to sync with server cart
Local wishlist items to sync
Response
JWT authentication token
User’s full name
Login status (1 = success)
Cart count
Merged cart data
Merged wishlist data
First login indicator
Error Responses
400 Bad Request (Invalid Captcha)Code Examples
POST /api/v2/login-tfa
Email login with two-factor authentication support.Headers
application/json
Request Body
User’s email address
User’s password
Google reCAPTCHA token
Local cart to sync
Local wishlist to sync
Response
JWT token (prefixed with “2f.” for 2FA users)
User’s full name
Login status
Synced cart data
Synced wishlist data
First login flag
Code Examples
POST /api/v2/login-mobile
Authenticate users via mobile number with OTP verification.Headers
application/json
Query Parameters
Platform identifier (“web” or “mobile”)
Request Body
User’s mobile number (10 digits)
Whether this is a shopper login
Response
Success message: “OTP sent successfully”
Whether OTP was sent successfully
Whether the user is registered
Error Responses
400 Bad Request (Invalid Phone)Code Examples
Notes
- OTP is valid for a limited time (configured in
REDIS_OBJECT_EXPIRY_IN_SEC) - Maximum OTP requests per day is limited (configured in
RESEND_COUNT) - After receiving OTP, use
/api/v1/verify-otp-loginto complete authentication - OTP is sent via SMS to the provided mobile number