Improved

Time Clock: Shift Attachments on Clock-Out

Clock out now accepts shift attachment values. Integrations can clock out users on time clocks that have required shift attachments, which the API used to reject.

What's New

  • Updated guide: Real-Time Clocking — new Shift Attachments on Clock-Out section, a shiftAttachments example, and new error rows
  • Updated guide: Settings & Configuration — shows which attachment types can be set on clock-out
  • Updated guide: Time Clock Overview — clock-out endpoint row and validation rules

Key Improvements

  • shiftAttachments on clock-out: POST /time-clock/v1/time-clocks/{timeClockId}/clock-out takes an optional shiftAttachments array. Each item has a shiftAttachmentId and an attachment value. Get the IDs from Get shift attachments.
  • Supported types: dropdownList (itemId), freeText (freeText), and number (number). image, file, and signature can't be set via API.
  • Existing values are kept: values the employee filled in during the shift stay on the shift. A value you send for the same attachment replaces it.
  • Required attachments: every enabled, required shift attachment must have a value after merging. Otherwise the clock-out returns 400 and the shift stays open. A time clock with a required image, file, or signature attachment that has no value still can't be clocked out via API.
  • Validation: shiftAttachmentId must be an enabled shift attachment on the time clock, the value field must match the attachment type, and itemId must be an enabled item of the dropdown list.
  • Backward compatible: shiftAttachments is optional. Existing clock-out calls on time clocks without required shift attachments behave as before.

For full details and examples, see Real-Time Clocking and the Clock Out API Reference.