POSThttps://api.spirestock.com/api/v1/auth/login#
Authenticate with email and password. Returns a JWT token, user profile, navigation modules, and workspace details. Accounts imported from a previous system sign in with their existing password: a Django pbkdf2_sha256 hash is verified and transparently upgraded to bcrypt on the first successful login, with no change to the request or response. In production the request must also carry a Cloudflare Turnstile token, so servers should use an API key instead. Five failed attempts lock the account for 30 minutes.
Request body
emailstringrequired- User email address
passwordstringrequired- Account password
curl -X POST https://api.spirestock.com/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "your-password"
}'{
"response_code": 200,
"message": "Login successful",
"token": "eyJhbGciOiJIUzI1NiIs...",
"user": {
"id": 1,
"salutation": "Mr",
"first_name": "John",
"middle_name": "",
"last_name": "Doe",
"store_name": null,
"store_image": null,
"official_email": "[email protected]",
"primary_contact_number": "9876500020",
"emp_sap_id": "EMP-001",
"organization_id": 5,
"organization_name": "Acme Dairy",
"department_id": 129,
"department_name": "Sales and Marketing",
"role_id": 1,
"role_name": "Admin",
"reporting_to_id": null,
"reporting_to_name": "Sample Manager",
"reporting_to_emp_id": null,
"profile_image": "https://media.example.com/sample.png",
"device_id": "",
"last_login": "2026-10-22T09:02:36.636Z",
"last_auth_method": "password",
"auth_methods_used": [
"password"
],
"onboarding_state": {
"tour": {
"variant": "admin",
"last_step": 3,
"completed_at": null,
"dismissed_at": null,
"remind_after": "2026-10-25T08:47:20.675Z"
},
"checklist": {
"dismissed_at": "2026-10-22T08:47:20.682Z"
}
},
"last_ip": "203.0.113.10",
"status": 1,
"user_type": 0,
"is_distributor": 0,
"is_super_stockist": 0,
"is_retailer": 0,
"is_tagged": 0,
"tagged_by": null,
"tagged_date": null,
"periphery": null,
"timing": null,
"latitude": null,
"longitude": null,
"self_owned": 0,
"other_brand_id": null,
"other_brand_name": null,
"retailer_type_id": null,
"retailer_class_type_id": null,
"purchase_milk_from_org": 0,
"visit_date_time": null,
"created_by": 41500,
"oauth_provider": null,
"portal_onboarding_completed_at": null,
"app_version": null,
"createdAt": "2020-10-10T05:08:33.000Z",
"updatedAt": "2026-10-22T09:02:36.636Z",
"sp_role": {
"id": 0,
"role_name": "Super Admin"
},
"basicDetails": null
},
"modules": [
{
"id": 1,
"name": "Orders",
"icon": "shopping-cart",
"link": "/orders",
"subModules": [
{
"id": 10,
"name": "All Orders",
"link": "/orders/all",
"icon": "list"
}
]
}
],
"workspace": {
"workspace_id": "ws_abc123",
"slug": "acme-dairy",
"display_name": "Acme Dairy",
"domain": null,
"plan": "professional",
"status": 1,
"logo": null,
"bg_image": null,
"primary_color": "#1e40af",
"secondary_color": "#f59e0b"
},
"platform_token": null,
"platform_admin": null,
"latitude": "12.9716000",
"longitude": "77.5946000",
"periphery": "",
"timing": "",
"tracking_time": "60",
"mark_attendance_time": "6:00 AM",
"battery_percentage": "1",
"contact_number": "9876500020"
}