Skip to main content
← All documentationContents ↓

Workforce Time Clock API

Use delegated Team User OAuth for self-punches, onboard staff and bind them to Team Users, and read permissioned Workforce status, entries, Sites, review, and reports.

Access Boundary

Workforce API routes are dedicated service paths over the same Time Clock engine used by the webapp and constituent portal. A delegated Team User OAuth token may clock itself in or out when the actor has the matching Workforce permission and OAuth scope. For this MVP, that delegated token uses the existing runtime-enabled Simply OAuth teamData grant with the reviewed Workforce scope. Marketplace userDelegated and teamInstallation grant modes remain CONTRACT_DEFINED and do not authorize these Workforce routes. An integration API key cannot impersonate a staff member and receives a typed authorization error for self-punch routes.

OAuth self-punch results use the API_REPORTED surface label. Browser GPS labels are reserved for browser punches that pass server validation. Client-supplied staff identity, Team identity, timestamps, Site, distance, trust tier, decision, and status are never trusted as authority.

Routes

RoutePurposeScope / permission
GET /v1/time-clock/statusCurrent actor's open-entry status.workforce:read + own view.
GET /v1/time-clock/sitesSites available to the actor.workforce:read.
GET /v1/time-clock/entriesOwn history with optional month, entry-state, review-state, and exception filters.workforce:read + own view.
POST /v1/time-clock/clock-inSelf clock-in with a Site and idempotency key.workforce:clock-own + own clock.
POST /v1/time-clock/clock-outSelf clock-out with an idempotency key.workforce:clock-own + own clock.
GET/PATCH /v1/time-clock/configurationRead or update Team Time Clock configuration.workforce:manage + manage.
POST/PATCH/DELETE /v1/time-clock/sitesManage Sites.workforce:manage + manage.
GET /v1/time-clock/staffList staff. Enrolled staff by default; enrollment=NOT_ENROLLED lists people who can be enrolled; enrollment=ALL lists both (both need manage). Archived people are left out unless includeArchived=true. Optional search (name, or email when the caller may read the email field), limit, and offset.workforce:manage + view, and read on the staff person collection.
POST /v1/time-clock/staffCreate a new person and enroll them with an explicit access binding. Send an Idempotency-Key header.workforce:manage + manage, and create on the staff person collection.
GET /v1/time-clock/staff/{staffMemberSimplyId}One person in the staff person root (access is null until enrolled). A person who is not enrolled is visible only with manage.workforce:manage + view, and read on the staff person collection.
GET /v1/time-clock/team-usersTeam Users a staff member can be bound to (accepted invitation, not deactivated): names and whether each is already bound, never contact details. Optional search, limit, and offset.workforce:manage + manage.
PATCH /v1/time-clock/staff/{staffMemberSimplyId}Update active state, default Site, payroll ID, and access. Sending access enrolls a person who is not enrolled yet, and switching to CONSTITUENT unbinds a Team User.workforce:manage + manage, and read on the staff person collection.
GET /v1/time-clock/manager/entriesManager entry list with optional month, entry-state, review-state, and exception filters.workforce:manage + view.
POST /v1/time-clock/entries/{timeEntrySimplyId}/correctionCorrect an entry with explicit times and required reason.workforce:manage + approve.
POST /v1/time-clock/entries/reviewBulk review selected entries.workforce:manage + approve.
GET /v1/time-clock/attempts/{attemptSimplyId}/evidencePurpose-built raw evidence detail.workforce:manage + raw-evidence authorization.
GET /v1/time-clock/staff/{staffMemberSimplyId}/pinSafe PIN status for one active enrolled person: whether set, failed-attempt count, lock expiry, and set time. Never returns a PIN or hash.workforce:manage + read on the staff person collection.
GET /v1/time-clock/reports/monthlyPermissioned monthly report query.workforce:manage + analyze.

Use public Simply IDs at every API boundary. Numeric database IDs and internal *Id values are never accepted or returned by these routes.

Entry-list filters use month=YYYY-MM, state=OPEN|COMPLETED|CORRECTED|AUTO_CLOSED, reviewState=UNREVIEWED|APPROVED|NEEDS_CORRECTION, and exceptionOnly=true|false. Pagination remains explicit through limit and offset.

Rota API

Rota reads and writes use the same Workforce service and authorization model. The REST and SDK operations cover shift lists and creation, bounded recurring creation, update/delete, assignments, staff accept/decline, unfilled shifts, conflict checks, and availability blocks. Hosted MCP and TeamAgent provide permissioned reads and proposal-first management tools. The manager rota page is available at Workforce → Rota for callers with WORKFORCE_VIEW; mutations require WORKFORCE_MANAGE. The source includes the staff-facing My Shifts page and response controls for the authenticated bound person; only invited assignments offer accept or decline.

RoutePurposePermission
GET /v1/time-clock/rota/shiftsList shifts visible to the caller.workforce:read + team view.
GET /v1/time-clock/rota/shifts/mineList the authenticated Team User's own assignments.workforce:read + own view and explicit staff identity binding.
GET /v1/time-clock/rota/shifts/unfilledList upcoming shifts below required headcount.workforce:read + team view.
POST /v1/time-clock/rota/shifts, /shifts/bulk, PATCH|DELETE /shifts/{shiftSimplyId}Create, recur, update, or delete shifts. Bulk recurrence is capped at 366 occurrences and uses the Work Site timezone.workforce:manage.
POST /v1/time-clock/rota/assignments, DELETE /assignments/{shiftAssignmentSimplyId}, POST /assignments/{shiftAssignmentSimplyId}/responseAssign or unassign staff, or accept/decline an assignment.Manage for assignment changes; own assignment for the staff response.
POST /v1/time-clock/rota/conflictsCheck availability overlap, double booking, and headcount warnings.Workforce read.
GET|POST /v1/time-clock/rota/availability-blocks, PATCH|DELETE /availability-blocks/{availabilityBlockSimplyId}Read and maintain availability blocks.Own block or manager access as enforced by route policy.

Conflict results are warnings, not assignment blockers. Time Clock links an eligible punch to the earliest accepted shift at the same Site inside the configured early window. The service derives lateness from server receipt time, completes a linked assignment at clock-out, and the maintenance worker marks a missed shift NO_SHOW after the configured threshold. Shift-linked reports summarize scheduled versus actual time; they are not payroll calculations. Simply Bookings appointments remain a separate product concept.

GET /v1/time-clock/rota/shifts/mine accepts a Gregorian fromDate and bounded pagination. If omitted, it starts from today in the Team timezone. Results include actual shifts ending on or after the start of that Team-local day, including overnight overlap; copied assignment dates do not control eligibility. The count and page use the same exact-Team and live-record membership checks. A punch after the no-show threshold remains an unlinked entry while the assignment stays NO_SHOW; the intended reporting treatment remains an open product point.

Hosted MCP and Ask Simply expose draft_create_workforce_shift for one exact API start/end window, including seconds and multi-day duration, and draft_create_workforce_shifts for recurrence. Both use the existing approval and manager-permission path and canonical Shift writer. Workforce recurrence accepts only RETURN_TO_EDIT: unassigned Shifts may overlap, while assignment conflicts are reported by the assignment operation. Booking-only FAIL_ALL and SKIP_CONFLICTS choices are refused rather than silently ignored.

Kiosk And Action Tag API Availability

The source API defines POST and GET /v1/time-clock/kiosk-devices and POST /v1/time-clock/kiosk-devices/{kioskDeviceSimplyId}/revoke. Registration binds a labeled device to one active Work Site and returns a one-time pairing code that expires after 10 minutes. The branded kiosk page exchanges it once for a browser-held device credential. The browser retains the pairing for up to 30 days; the backend device credential has no 30-day expiry and remains valid until the device is revoked. For replacement or lost browser storage, register and pair the replacement, then revoke the old device. Public device endpoints support pairing, roster lookup, and kiosk clock-in/out using the device credential and a staff PIN. The roster contains current eligible staff for that Site and exposes display names and Simply IDs only. Release qualification remains pending, and production still serves an earlier release without kiosk registration, pairing, roster reads, or punches. Endpoint presence in source does not establish deployment or production availability.

GET /v1/time-clock/staff/{staffMemberSimplyId}/pin returns safe PIN status (set state, failed attempts, lock expiry, and set time) to an authorized manager with person-record read access; it never returns the PIN or its hash. Hosted MCP provides the read-only get_time_clock_staff_pin_status tool under the same authority. An authenticated staff member can change their own PIN with PATCH /v1/time-clock/pin from the personal Time Clock surface. PINs are convenience-grade credentials, not payroll identity proof. Five consecutive failures lock a PIN for 15 minutes; newly chosen PINs reject repeated-digit, ascending/descending consecutive, and repeated-short-pattern examples. Kiosk requests have a per-device cap of 30 clock attempts per minute, including successful attempts.

The Action Tag source implementation awaits release qualification. After it is released and verified, manager-authorized GET, POST, and DELETE /v1/time-clock/manager/sites/{workSiteSimplyId}/action-tag read, provision, and deprovision one Site-bound URL Action. Provisioning uses the Team's normal Simply Action Tags entitlement and managed Action capacity; deprovisioning archives only an exclusively bound Action. The SDK exposes getSiteActionTag, provisionSiteActionTag, and deprovisionSiteActionTag.

The public GET /v1/time-clock/action-tag/{workSiteSimplyId} accepts signed resolver attribution in s360_at. Current exact Site, Action, and successful human interaction custody is required for a five-minute, single-use token delivered only in the portal fragment. The portal strips the fragment and retains the token in memory, then sends actionTagScanToken with an explicitly confirmed clock-in. Token consumption and entry/evidence writes commit together. Do not log or store either credential or send them through hosted MCP or Ask Simply. Provisioning and token-bearing punches stay in REST/SDK and the authorized browser flow.

Missing or invalid attribution opens the ordinary portal with the Site preselected; it does not mint a scan token. Infrastructure or mapping failures return an error without a fallback redirect. The ACTION_TAG trust label means that the tagged URL was opened within five minutes before the punch; it does not prove physical presence. The Action Tag path does not request GPS. A tokenless portal punch uses browser evidence. Endpoint presence in source does not establish deployment.

Staff Onboarding And Access Binding

A staff member is a person in the Team's staff person root, which can be a shared root such as a CRM's constituents. A person is enrolled for Time Clock once it has a Time Clock identity. The access binding is always explicit: the request names it, and Workforce never infers it from an email address or a name.

accessMeaning
{ "mode": "TEAM_USER", "teamUserLinkSimplyId": "..." }The person is tied to exactly one Team User (a TeamUserLink Simply ID) of the same Team. That Team User clocks as this person in the webapp or with delegated OAuth. A Team User can be tied to one person only.
{ "mode": "CONSTITUENT" }No Team User. The person uses the staff portal (email one-time code, so the person needs an email) or a kiosk with a PIN. Kiosks are refused in production for now.

A staff member reads back as staffMemberSimplyId, displayName, email, isArchived, isActiveStaff, defaultWorkSiteSimplyId, defaultWorkSiteName, payrollId, access (for TEAM_USER it adds teamUserLinkSimplyId and a display-only teamUserDisplayName), and hasOpenTimeEntry. Lists use the standard envelope with meta.pagination; the total counts only people the caller may read under their SecurityScope grants.

Who can see what. The staff person collection is often shared (a CRM, church, guardian, or players collection), so Workforce permission alone never opens it. Every staff route also needs the caller's ordinary data permission on that collection, exactly as /v1/data-records checks it (including marketplace installation and managed-connector limits): read for any staff read, enroll, or update, and create for a new person. email is null, and is never searched, unless the caller may read the email field. Listing or reading people who are not enrolled needs manage: a view-only caller sees only enrolled staff, and a person who is not enrolled reads as not found. Field-level read restrictions apply to the person's contact field (email) only; the Workforce-owned fields (payrollId, isActiveStaff, default Site, access) follow the caller's Workforce permissions. A list's total counts every matching person; a person row that cannot be shown is logged and left out of its page, so a page can hold fewer than limit items while hasMore is true.

Archived people. Archiving a person's record keeps their Time Clock identity, so a Team User bound to them would stay taken. GET /v1/time-clock/team-users reports the holder of each bound Team User the caller may read (boundStaffMemberSimplyId, boundStaffMemberDisplayName, boundStaffMemberIsArchived). Release it with PATCH /v1/time-clock/staff/{staffMemberSimplyId} and exactly { "access": { "mode": "CONSTITUENT" } }: Workforce rewrites only the identity and the clock access mode field on the archived record. Any other change to an archived person is 409 STAFF_MEMBER_ARCHIVED.

Create. POST /v1/time-clock/staff takes firstName, lastName, optional email, isActiveStaff (default true), optional defaultWorkSiteSimplyId and payrollId, and a required access. It answers 201. The person is created through the ordinary record-creation path, so billing record capacity, the Team's duplicate rules for the person root, required fields, and the record audit trail all apply. Send an Idempotency-Key header (1 to 64 visible ASCII characters). The key is claimed in the same database transaction as the create and bound to the caller and the request body: a retry with the same key and body, even one that arrives while the first is still running, returns the person the first created (X-Idempotency-Replayed: true) instead of creating a second one, and the same key with a different body is refused with 409 IDEMPOTENCY_CONFLICT. Use a new key for each different person. Keys are kept for 90 days.

Update, enroll, and unbind. PATCH /v1/time-clock/staff/{staffMemberSimplyId} takes any of isActiveStaff, defaultWorkSiteSimplyId, payrollId, and access, at least one; an omitted field is left unchanged. To enroll an existing person, find them with GET /v1/time-clock/staff?enrollment=NOT_ENROLLED&search=... and send access. To unbind a Team User, send { "access": { "mode": "CONSTITUENT" } }: the identity stays (it holds punch history, the PIN, and the open-entry lock), so there is no separate "no access" state. To stop all clocking for a person, set isActiveStaff to false.

  • An access change or deactivation is refused with 409 STAFF_HAS_OPEN_TIME_ENTRY while the person is clocked in. Other settings can still change.
  • A deactivated Team User cannot be bound (422 TEAM_USER_DEACTIVATED), and neither can one whose invitation is still pending (422 TEAM_USER_NOT_ACTIVATED). Use GET /v1/time-clock/team-users to pick an explicit, bindable teamUserLinkSimplyId.
  • Hosted MCP and Ask Simply expose the same flow as list_time_clock_staff, list_time_clock_staff_team_users, draft_create_time_clock_staff_member, and draft_update_time_clock_staff_member. The assistant boundary refuses non-Simply-ID *Id keys, so these tools name the payroll ID payrollReference in both their input and their results. The approval card shows the person and the chosen Team User by name, resolved on the server.
  • Workforce writes the system-managed staff fields (isActiveStaff, default Site, clock access mode, payroll ID) and the identity in one transaction, so they cannot drift apart. The generic /v1/data-records routes refuse those fields with 400 SYSTEM_FIELD_READ_ONLY, naming each field. Use the staff routes instead.
  • Each binding change is recorded on the person's record history.
StatusCodes
400VALIDATION_ERROR (malformed request, or person fields in details.validationErrors with dataFieldSimplyId and fieldName; only fields the request supplied or the caller may read are named), TEAM_USER_REQUIRED, TEAM_USER_NOT_ALLOWED.
402BILLING_RECORD_LIMIT_EXCEEDED: the Team cannot create another record.
403PERMISSION_DENIED (missing Workforce permission), STAFF_MANAGE_REQUIRED (people who are not enrolled, without manage), PERSON_COLLECTION_FORBIDDEN (no read, or no create, on the staff person collection), STAFF_MEMBER_FORBIDDEN (the person is outside the caller's update scope).
404STAFF_MEMBER_NOT_FOUND, PERSON_NOT_FOUND. A person the caller may not read is reported as not found.
409TEAM_USER_ALREADY_BOUND, STAFF_HAS_OPEN_TIME_ENTRY, STAFF_NOT_ENROLLED (PATCH without access on a person who is not enrolled), DUPLICATE_PERSON_BLOCKED, DUPLICATE_ENTRY (a unique value already exists; enroll the existing person instead), IDEMPOTENCY_CONFLICT, STAFF_MEMBER_ARCHIVED (only a release to CONSTITUENT is allowed), STAFF_CONFIGURATION_CHANGED (retry), NOT_CONFIGURED, RECORD_ARCHIVED.
422TEAM_USER_NOT_FOUND, TEAM_USER_NOT_ACTIVATED, TEAM_USER_DEACTIVATED, WORK_SITE_NOT_FOUND, WORK_SITE_INACTIVE.
503DUPLICATE_CHECK_UNAVAILABLE: the Team's duplicate rules could not be checked; nothing was created.

Punch Requests And Replay

Clock-in accepts a workSiteSimplyId, optional coords (lat, lng, accuracyMeters, capturedAt), and a client-generated idempotencyKey. Clock-out accepts optional coordinates and an idempotency key; the server uses the Site snapshotted on the open entry.

Server receipt instants are authoritative. Device capturedAt is evidence only and must be within the service's freshness/future bounds. A same-key, same-input replay returns the original terminal result with replayed: true. Reusing a key with different semantic input returns IDEMPOTENCY_CONFLICT. Handle ALREADY_CLOCKED_IN and NOT_CLOCKED_IN as state responses, not as invitations to create generic DataRecords.

Evidence And Privacy Contract

Canonical Work Site geocoding coordinates may appear in an authorized Site configuration response; they describe the configured work location and are not employee punch evidence. Derived distance, accuracy, trust, geofence result, exception flags, receipt time, and surface may appear in permissioned entry/report responses. Raw employee device latitude/longitude, exact device capture time, IP fingerprint, and user-agent summary are excluded from ordinary API responses and all exports. The raw evidence endpoint is purpose-built, Cognito-manager-authorized, exposes an expiry, and returns private no-store response headers so browsers and intermediaries do not cache the evidence.

API clients must not log request coordinates, copy raw evidence into telemetry, or treat browser GPS as payroll-grade proof. The service HMACs normalized IP material and bounds the user-agent summary; no plaintext IP is part of the API contract. Retention clears raw location and device capture time after the Team's 30-, 90-, or 365-day policy while retaining derived outcome and audit evidence.

SDK, MCP, TeamAgent, And Mobile

@simply360/sdk exposes a typed workforce client over these routes. Hosted MCP and TeamAgent tools use the same service and permission checks for self status/punch, allowed entry reads, Site management, review, and monthly reports. Staff onboarding has a read tool (list_time_clock_staff) and two proposal tools (draft_create_time_clock_staff_member and draft_update_time_clock_staff_member, which also enrolls an existing person and unbinds). Nothing changes until the authenticated Team User approves the proposal, and no tool carries a PIN, pairing code, or credential. They do not expose raw evidence or require a browser handoff. Use OAuth for a user-bound integration; API keys are appropriate for server-to-server reads only when their Team Role and feature permissions allow the requested operation.

The MVP does not add native Simply Anywhere, Admin, or branded constituent-app punch screens. The supported constituent mobile surface is the online browser portal, because native/offline/background-location behavior would require a separately approved trust and privacy contract. If a client needs native punching, it must not emulate these routes with generic record writes.

Billing And Operations

Workforce has no usage meter, paid package, or new third-party dependency. Existing shared-platform, report snapshot, messaging, and mapping-provider usage remains governed by its normal billing and entitlement paths. Reads through SDK, MCP, and TeamAgent are billing-neutral unless they invoke an existing billable downstream capability.

Workers report aggregate counts and durations, not raw evidence. Use request IDs, typed error codes, and public Simply IDs for support and observability. Follow the platform's normal CloudWatch/Lambda incident procedure and do not include personal coordinates or IP material in tickets.

Related Documentation

↑