Skip to main content

Time Clock

The time clock records actual hours worked — distinct from shifts, which are the scheduled roster. A time entry is created when a staff member clocks in and closed when they clock out. Breaks can be tracked inside an entry, and worked time is always (clock out − clock in) − break minutes.

When a staff member clocks in, the entry is automatically linked to their scheduled shift for that day (in the supplier's timezone) when one exists. Unscheduled staff can still clock in — the entry simply stands alone.

The time entry object​

FieldTypeDescription
idintegerUnique identifier
staff_idintegerThe staff member
staffobjectStaff summary (id, first_name, last_name) when loaded
staff_shift_idinteger | nullAuto-matched scheduled shift, if any
clock_in_atstring (ISO 8601)Actual start of work (UTC)
clock_out_atstring (ISO 8601) | nullActual end of work — null means currently on the clock
is_on_breakbooleanWhether a break is in progress
break_started_atstring (ISO 8601) | nullWhen the in-progress break started
break_minutesintegerAccumulated break time (deducted from worked time)
worked_minutesintegerDerived worked time; open entries count up to now
sourcestringWhere the punch came from: kiosk, app, or manager
clocked_in_by / clocked_out_by / edited_byinteger | nullUser IDs for manager punches and corrections
notesstring | nullFree-text note (e.g. "forgot to clock out — corrected")

Endpoints​

MethodEndpointDescription
GET/v1/staff/time-entriesList time entries
GET/v1/staff/time-entries/{id}Get a time entry
POST/v1/staff/time-entries/clock-inClock a staff member in
POST/v1/staff/time-entries/{id}/clock-outClock an entry out
POST/v1/staff/time-entries/{id}/break/startStart a break
POST/v1/staff/time-entries/{id}/break/endEnd a break
POST/v1/staff/time-entriesCreate a complete manual entry
PATCH/v1/staff/time-entries/{id}Adjust an entry
DELETE/v1/staff/time-entries/{id}Delete an entry
GET/v1/staff/timesheetAggregated hours per staff member for a date range
POST/v1/staff/timesheet/send-to-payrollSend hours for the open pay period to Xero Payroll now

Scopes​

Reading uses staff:read; clocking and corrections use staff:write.