Ready-to-use code for common operations in cURL, PHP, Python, and Node.js. All examples include error handling and use environment variables for API keys.
Pull timesheet data for a specific week, handling pagination to fetch all results. Uses GET /timesheets.php.
# Fetch timesheets for the first week of March 2026curl-X GET \"https://tempclock.com/api/v1/timesheets.php?date_from=2026-03-01&date_to=2026-03-07&limit=100"\-H"Authorization: Bearer $TEMPCLOCK_API_KEY"
Submit GPS coordinates and the worker's pre-clock-in survey answers in a single POST /clock.php. Handles the three v1.1 refusal cases: blocked_by_survey, outside_geofence, and standard 409 "already clocked in".
Poll GET /on-site-now.php every minute to mirror the dashboard's live occupancy panel inside your own CRM. The endpoint already excludes forgotten clock-outs (anything older than 14 hours) so you don't have to clean up.