POST /api/v2/register
Register a new user account with email, password, and phone number.Headers
application/json
Query Parameters
Platform identifier (“web” or “mobile”) - used for analytics
Request Body
User’s email address (must be valid format)
User’s password (will be hashed with bcrypt)
User’s mobile number (10 digits, validated)
User’s first name
User’s last name
User’s gender
User’s birthdate
Referral code from another user (earns TSS Money rewards)
Local cart data to sync after registration
Local wishlist items to sync after registration
Response
JWT authentication token for the new user
User’s full name
Registration status (1 = success)
Cart count
Newly created user ID
Synced cart data
Synced wishlist data
Always true for new registrations
Error Responses
400 Bad Request (Already Registered)Code Examples
Referral Rewards
When a validreferral_code is provided:
- New user receives TSS Money (configured in
REFERRAL_EARNING_AMT) - Referral code owner receives rewards after the new user’s first order
- Rewards expire based on
REFERRAL_EARNING_EXPIRYsetting
POST /api/v3/register
Register with Google reCAPTCHA verification (enhanced security endpoint).Headers
application/json
Request Body
User’s email address
User’s password
Mobile number
First name
Last name
Google reCAPTCHA response token
Referral code
Cart to sync
Wishlist to sync
Error Responses
400 Bad Request (Invalid Captcha)Code Examples
POST /api/v2/register-otp
Initiate registration with OTP verification (step 1 of 2).Headers
application/json
Query Parameters
Platform: “web” or “mobile”
Request Body
Email address
Mobile number (10 digits)
First name
Last name
Password
Gender
Birthdate
Referral code
Response
“OTP sent successfully”
true if OTP was sent
Error Responses
400 Bad Request (Already Registered)Code Examples
POST /api/v2/sendotp
Send OTP for registration (legacy endpoint). Deprecation Status: May be deprecated based onIS_REGISTER_API_DEPRECATED setting.
Request Body
Mobile number
Email address (checked for uniqueness)
Whether this is for registration
Response
“OTP sent successfully”
Error Responses
400 Bad Request (Phone Exists)POST /api/v2/verifyotp
Verify OTP sent to mobile number during registration.Request Body
Mobile number that received the OTP
4-digit OTP code
Response
Success (200)Code Examples
POST /api/v2/resendotp
Resend OTP for login or registration.Request Body
Mobile number
“login”, “register”, “enable_2fa”, “disable_2fa”, or “changemobile”
Whether this is for registration
Previous phone number (for change mobile flow)
Email address (for 2FA flows)
Cart data (for login flow)
Wishlist data (for login flow)
Response
“OTP sent successfully”
true if successful
Error Responses
400 Bad Request (Rate Limited)Code Examples
Notes
- OTP resend is rate-limited to prevent abuse (30 second cooldown)
- Maximum resends per day limited by
RESEND_COUNTconfiguration - Different OTP messages for web vs mobile platforms
- OTP is stored in Redis with expiration