Added
Time Clock: Lock Days API
5 days ago by ReadMe API
You can now lock or unlock individual timesheet days for a user on a Time Clock programmatically.
New Endpoint
PUT /time-clock/v1/time-clocks/{timeClockId}/users/USERID/lock-days— Lock or unlock up to 50 dates for a user in a single call
Key Features
- Idempotent: Re-sending the same payload is safe. Dates already in the requested state are silently skipped, and the response always reflects the final state.
- Single user, single Time Clock scope: Changes only affect the user/Time Clock combo in the path; other users and other Time Clocks are untouched.
- Up to 50 dates per request: Loop over chunks of 50 to cover larger date ranges.
- Approved-period safe: Unlock requests that touch an approved payroll period are rejected with
409 DAYS_IN_APPROVED_PERIODso payroll integrity is preserved. Reopen the period from the dashboard before retrying. - Settings-gated: Requires "Timesheet Approval (Lock Days)" to be enabled on the Time Clock; otherwise the API returns
403 LOCK_DAYS_DISABLED.
Authentication
- API Key (
X-API-KEYheader), or - OAuth 2.0 with scope
time_clock.write
Use Cases
- Payroll workflow automation: Lock all approved days for a pay period after your payroll run completes, preventing accidental edits to historical data.
- Mid-period corrections: Selectively unlock a single day, push a correction, and re-lock — without unlocking the whole period.
- Compliance audits: Lock a date range during an audit window to freeze the record set.
For full details and examples, see the Lock Days Guide.
