GET
https://api.spirestock.com/api/v1/usersList all users in the organization with pagination and type filtering. User types: 0 (admin), 1 (employee), 2 (distributor).
Parameters
page(number) — Page number (default: 1)limit(number) — Items per page (default: 20, max: 100)type(string) — Filter by type: admin, employee, distributorsearch(string) — Search by name, email, or phonestatus(number) — Filter by status: 1 (active), 0 (inactive)
Example request
curl "https://api.spirestock.com/api/v1/users?type=distributor&page=1" \ -H "Authorization: Bearer YOUR_TOKEN"
Example response
{
"response_code": 200,
"data": [
{
"id": 42,
"first_name": "Rajesh",
"last_name": "Gupta",
"official_email": "[email protected]",
"primary_contact_number": "+919876543210",
"role_id": 3,
"role_name": "Distributor",
"user_type": 2,
"status": 1,
"store_name": "Gupta Dairy Store",
"organization_id": 5,
"createdAt": "2026-01-15T10:00:00Z"
}
],
"pagination": {
"total": 42,
"page": 1,
"limit": 20,
"total_pages": 3
}
}