Skip to main content
A single endpoint that both clocks in (creates a new open time entry) and clocks out (completes the open entry and computes hours), selected by the action field.
POST /api/v1/employee/timesheet/entry
Authentication: requires an employee JWT. The employee is taken from the token’s userId.

Request body

action
string
required
Either clock_in or clock_out.
notes
string
Free-text note. On clock out, if omitted the existing entry’s notes are kept.
jobCode
string
Optional job code (recorded on clock in).
taskCode
string
Optional task code (recorded on clock in).
breakMinutes
integer
default:"0"
Unpaid break minutes deducted from total hours on clock out. Minimum 0.
clockInIp
string
Optional client IP to record. Used for both the clock-in and clock-out IP fields.
clockInDevice
string
Optional device identifier to record.

Behavior

Creates a new time entry with status: "PENDING" and clockIn set to now. It is associated with the company’s current unlocked pay period (if one exists). If the employee already has an open entry, returns 400 Already clocked in (with the existing entry’s id and clockIn).

Response

Both actions return 200 with data.timeEntry (including its payPeriod summary) and a data.message. Clock out additionally returns data.summary with totalHours, regularHours, overtimeHours, and breakMinutes.

Examples

curl -X POST https://app.paypunch.io/api/v1/employee/timesheet/entry \
  -H "Authorization: Bearer <employee-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "clock_in",
    "jobCode": "JOB-204",
    "notes": "Site A framing"
  }'

Errors

StatuserrorCause
400Already clocked inclock_in while an open entry exists.
400No open time entryclock_out with nothing to close.
400Invalid action / Invalid time entry dataaction not clock_in/clock_out, or body validation failed.
401Authentication requiredMissing/invalid employee token.
404Employee not found or inactiveToken user missing or deactivated.
500Failed to create time entryUnexpected server error.