Authenticate to the When I Work API using the login service at https://api.login.wheniwork.com/login and capture the W-Token.
Retrieve existing site/location records (GET /2/sites) to identify which locations have geofencing settings; each site object includes address and GPS coordinate fields.
Update a site's geofence settings via PUT /2/sites/{id} by providing the latitude, longitude, and radius fields that define the allowed clock-in boundary.
Enable the geofencing enforcement option in the site object so that the When I Work mobile app blocks or flags clock-ins outside the defined radius.
Test clock-in behavior from a device outside the configured radius to confirm enforcement is active; the mobile app will display an error or warning to the employee.
Monitor time punch records (GET /2/timeclock or equivalent attendance endpoint) for location metadata attached to each punch to audit geofence compliance.
Known gotchas
Geofencing enforcement is applied at the mobile app level; employees using the web version of When I Work may not be subject to the same location check depending on account settings.
GPS accuracy on mobile devices varies; a very tight geofence radius (e.g., under 50 meters) can cause false denials for employees who are physically on-site but whose device GPS is slightly off.
Changing geofence parameters via the API takes effect immediately for new clock-in attempts but does not retroactively alter historical attendance records.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp