GEThttps://api.spirestock.com/api/v1/users#
List users. Use tab for the user-management tabs — primary (distributors, user_type 2), secondary (retailers, 3), employee (staff, 0 and 1) — or the older type filter. Rows include role, basic details, contact person, outstanding_amount and platform (App, Web or -).
Access: API key read scope; staff need Manage Users (3) or Create User (4) — list.
Pagedpage and limit (max 100), id as the final sort key. How pagination works
Parameters
tabstring- primary, secondary or employee
typestring- Without tab: distributor, retailer, super_stockist, employee or driver
statusnumber- 1 active (default without tab), 0 inactive; empty for all
searchstring- Name, store, SAP id, email or phone
role_idnumber- Role
town_idnumber- Town
pagenumber- Page number; junk or a value below 1 reads as 1 Default
1. limitnumber- Page size, default 20, max 100 (larger values are clamped)
curl "https://api.spirestock.com/api/v1/users?tab=primary&limit=20" \
-H "X-API-Key: YOUR_API_KEY"{
"response_code": 200,
"data": [
{
"id": 51850,
"salutation": "Mr",
"first_name": "Sample",
"middle_name": "",
"last_name": "User",
"store_name": "Demo Store F",
"store_image": null,
"official_email": null,
"primary_contact_number": "9876500003",
"emp_sap_id": "CUST-018",
"organization_id": 6,
"organization_name": "Demo Dairy",
"department_id": 131,
"department_name": "Sales and Marketing",
"role_id": 396,
"role_name": "Distributor",
"reporting_to_id": null,
"reporting_to_name": "",
"reporting_to_emp_id": null,
"profile_image": null,
"device_id": null,
"last_login": null,
"last_auth_method": null,
"auth_methods_used": [],
"onboarding_state": null,
"last_ip": null,
"status": 1,
"user_type": 2,
"is_distributor": 1,
"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": null,
"oauth_provider": null,
"portal_onboarding_completed_at": null,
"app_version": null,
"createdAt": "2024-06-11T12:38:40.000Z",
"updatedAt": "2024-06-11T12:40:24.000Z",
"sp_role": {
"id": 396,
"role_name": "Distributor"
},
"basicDetails": {
"id": 51824,
"organization_id": 6,
"user_id": 51850,
"father_name": "Sample Parent",
"mother_name": "Sample Parent",
"date_of_birth": "1990-01-01",
"gender": "male",
"blood_group": "",
"aadhaar_nubmer": "000000000000",
"pan_number": "AAAAA0000A",
"cin": "U00000AA2020PTC000001",
"gstin": "22AAAAA0000A1Z5",
"fssai": "10000000000001",
"working_shift_id": 10,
"working_shift_name": "Morning",
"order_timing": "18:08",
"date_of_joining": "2024-06-11",
"personal_email": null,
"outlet_owned": null,
"outstanding_amount": 0,
"security_amount": 0,
"opening_crates": null,
"production_unit_id": "17",
"tcs_applicable": 0,
"tcs_value": 0,
"per_crate_incentive": 0,
"leave_count": null,
"week_of_day": null,
"status": 1,
"createdAt": "2024-06-11T12:38:40.000Z",
"updatedAt": "2024-06-11T12:40:24.000Z"
},
"contact_person": "Sample Contact",
"outstanding_amount": 0,
"platform": "-"
}
],
"pagination": {
"total": 307,
"page": 1,
"limit": 1,
"total_pages": 307
}
}