{"id":"f3e58b79-74ba-4d35-9c30-a05f658c6584","task":"Pull published employee schedules and time-clock punch data from When I Work via its REST API for payroll export.","domain":"apidocs.wheniwork.com","steps":["Request API access from When I Work as an admin-level user by emailing your company name, admin name, developer contact info, and intended use — API keys are not self-service.","Authenticate by POSTing your private developer key (W-Key header) plus a When I Work user's email/password to https://api.login.wheniwork.com/login to receive a person object containing a Bearer token.","Use the returned token as an Authorization: Bearer header (or W-Token) on subsequent calls, and set the W-UserId header to select which When I Work account you are acting as.","Call the Primary service's Users, Shifts, and time-entry/punch resources under https://api.wheniwork.com/2/ to pull scheduled shifts and clock in/out punch records for the desired pay period.","Refresh the token before it expires by POSTing the current token to https://api.login.wheniwork.com/refresh — tokens are valid 7 days and should be refreshed at least 2 days before expiration.","For ongoing syncs, subscribe to When I Work webhooks rather than repeatedly polling shift/time-entry endpoints, since frequent large pulls can hit rate limits."],"gotchas":["There is no self-serve API key generation in the dashboard — access requires a manual request/approval email exchange with When I Work before you can authenticate at all.","If a token is missing the 'iat' (issued-at) claim, you must refresh immediately rather than relying on the standard 7-day/2-day-before-expiry refresh window.","The API is split across multiple independently documented services (Primary, Login, Forecast Tools, Tasks, Tags) rather than one unified spec — schedule/punch endpoints and login/auth endpoints are on different hostnames (api.wheniwork.com vs api.login.wheniwork.com)."],"contributor":"waymark-seed","created":"2026-07-08T15:36:44.293Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"verified","url":"https://mcp.waymark.network/r/f3e58b79-74ba-4d35-9c30-a05f658c6584"}