Retrieve comprehensive attendance and work session data for your field team.
/api/integrations/crm/attendance
Step-by-step guide to integrate attendance tracking and work session data into your HR or management system
Contact us to get your API key and secret key for accessing attendance data
Download our ready-to-use attendance dashboard components from the UI Components page - just copy and paste!
Add the API integration code to your HR dashboard or management system using the examples in the right sidebar
Your system will now show real-time attendance data, work hours, location tracking, and performance metrics
const apiKey = 'your_api_key_here'; const secretKey = 'your_secret_key_here'; async function getAttendance() { const response = await fetch('/api/integrations/crm/attendance?status=present&start_date=2024-01-01&end_date=2024-12-31&limit=25', { method: 'GET', headers: { 'X-API-Key': apiKey, 'X-Secret-Key': secretKey, 'Content-Type': 'application/json' } }); if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } const data = await response.json(); console.log(data.data.attendance); console.log(data.data.summary); } getAttendance().catch(console.error);
{ "success": true, "data": { "attendance": [ { "id": "4fa01136-af10-4b32-b870-ba05b2689b82", "merchandiser_id": "acdb6c04-5fcc-4199-9457-4255ab2cb679", "login_date": "2024-01-15", "login_time": "2024-01-15T07:06:50.239Z", "logout_time": "2024-01-15T18:30:15.123Z", "total_hours": 8.5, "total_distance_km": 25.5, "stores_visited": 12, "status": "present", "notes": "Completed all scheduled visits", "photo_url": "https://cloudinary.com/attendance/photo.jpg", "latitude": 19.0760, "longitude": 72.8777, "is_completed": true, "profiles": { "id": "acdb6c04-5fcc-4199-9457-4255ab2cb679", "fullname": "John Smith", "email": "john@example.com", "phone": "+91-9876543210" } } ], "summary": { "total_records": 150, "present_count": 120, "absent_count": 15, "late_count": 10, "early_departure_count": 5, "average_hours": 8.2, "total_distance": 3825.5, "total_stores_visited": 1800 }, "pagination": { "total": 150, "limit": 50, "offset": 0, "has_more": true } } }