---
title: "Set a complete clocking record in one call"
method: POST
path: "/v1/public/time-clock/set"
tags: ["time-clock"]
---

# Set a complete clocking record in one call

`POST /v1/public/time-clock/set`

Sets clock-in, clock-out, and optional breaks for the event that best matches the member and the provided time.
Supports three input variants:1. TIMESTAMPS (unix ms)2. ISO_DATE (ISO-8601 date time + optional worked hours)3. SHIFT_DATE (date + HH:mm:ss times). 
Use conflictBehavior to control what happens when clocking already exists. NOTE: event matching uses a ±12-hour window around the date and time specified by in at. If no event AND allowCreateUnplannedShift is true, a new shift will be created.

## Request body

- SetClockingRequest
  - `memberCode` string, required — Employee code
  - `conflictBehavior` 'THROW_EXCEPTION' | 'THROW_EXCEPTION_ONLY_IF_SET_BY_EMPLOYEE' | 'OVERRIDE' — What to do when the matched event already has an existing clocking data. Default: THROW_EXCEPTION.
  - `allowCreateUnplannedShift` boolean — When true, an unplanned shift is created if no shift exists near the requested start date and time. If false, an exception is thrown.
  - `teamId` string — The ID of the team used to match or assign a team to the shift. **If provided:** The system looks for a corresponding shift under this team. If none exists, the new shift is linked to this team. **If omitted, the system applies these fallback rules:** 1. **Primary Team:** Uses the member's primary team (if set). 2. **Single Team:** If no primary team is set, but the member belongs to exactly one team, that team is used. 3. **Validation Error:** If the member has multiple teams (and no primary), you *must* explicitly specify a team.
  - `teamCode` string — An optional team, referred by code. See teamId for more details
  - `locationId` string — The ID of the location used to match or assign a location to the shift. **If provided:** The system looks for a corresponding shift under this location. If none exists, the new shift is linked to this location. **If omitted, the system applies these fallback rules:** 1. **Primary Location:** Uses the member's primary location (if set). 2. **Single Location:** If no primary location is set, but the member belongs to exactly one location, that location is used. 3. **Validation Error:** If the member has multiple locations (and no primary), you *must* explicitly specify a location.
  - `locationCode` string — An optional location, referred by code. See locationId for more details
  - `skillId` string — The ID of the skill used to match or assign a skill to the shift. **If provided:** The system looks for a corresponding shift under this skill. If none exists, the new shift is linked to this skill. **If omitted, the system applies these fallback rules:** 1. **Primary Skill:** Uses the member's primary skill (if set). 2. **Single Skill:** If no primary skill is set, but the member belongs to exactly one skill, that skill is used. 3. **Validation Error:** If the member has multiple skill (and no primary), you *must* explicitly specify a skill.
  - `skillCode` string — An optional skill, referred by code. See skillId for more details
  - `variant` 'TIMESTAMPS' | 'ISO_DATE' | 'SHIFT_DATE', required
  - `inAt` number — [TIMESTAMPS] Clock-in unix timestamp in ms
  - `outAt` number — [TIMESTAMPS] Clock-out unix timestamp in ms
  - `breaks` SetClockingBreak[] — [TIMESTAMPS] Unpaid break entries
    - `inAt` number, required — Break start — unix timestamp in ms
    - `outAt` number, required — Break end — unix timestamp in ms
  - `startDate` string — [ISO_DATE] Clock-in — ISO-8601 datetime
  - `endDate` string — [ISO_DATE] Clock-out — ISO-8601 datetime
  - `workedHours` number — [ISO_DATE / SHIFT_DATE] Total paid hours. Mutually exclusive with unpaidBreakMinutes.
  - `unpaidBreakMinutes` number — Total unpaid break in minutes. Mutually exclusive with workedHours.
  - `shiftDate` string — [SHIFT_DATE] Date of the shift — YYYY-MM-DD
  - `startTime` string — [SHIFT_DATE] Clock-in time — HH:mm:ss (24h)
  - `endTime` string — [SHIFT_DATE] Clock-out time — HH:mm:ss (24h). Next day inferred when < startTime.
  - `timeZone` string — [SHIFT_DATE] When using SHIFT_DATE mode the shiftDate time zone cannot be determined. You should provide one. If none is provided, the company time zone is used.

## Response `200`

- PublicEvent
  - `uid` string, required — unique event id
  - `externalId` string — The unique event externalId. The externalId is often used as a mapping value between Evolia and an external system
  - `startsAt` string, required — date and time of the start of the event. In ISO-8601 format.
  - `endsAt` string, required — date and time of the end of the event. In ISO-8601 format.
  - `hideEndsAt` boolean, required — if true the event has an undetermined end time. endsAt is still initialised but represent more a suggested end time
  - `timeZone` string, required — event time zone, ex: America/New_York
  - `memberFirstName` string — when assigned, contains the member (employee) first name
  - `memberLastName` string — when assigned, contains the member (employee) first name
  - `memberId` string — when assigned, contains the member (employee) UID
  - `memberCode` string — when assigned, contains the member (employee) code
  - `memberHourlyWage` number — when assigned, contains the member hourly wage specific to the skill of the shift
  - `openShiftCount` number — a shift is considered open when memberId is undefined. When a shift is open, openShiftCount indicates the number of places available
  - `skillId` string, required — the event skill UID (position)
  - `skillName` string, required — the event skill name (position)
  - `skillCode` string — the event skill code (position)
  - `locationId` string — the event location UID
  - `locationName` string — the event location name
  - `locationCode` string — the event location code
  - `subLocationId` string — the event sub-location UID
  - `subLocationName` string — the event sub-location name
  - `subLocationCode` string — the event sub-location code
  - `divisionId` string — the event division UID
  - `teamId` string, required — the event team UID
  - `teamCode` string — the event team code
  - `teamName` string — the event team name
  - `isStandby` boolean — if true this event is in stand-by
  - `isCancelled` boolean — if true this event is cancelled
  - `cancelledReason` string — the reason of the cancellation
  - `isDraft` boolean, required — if true this event is draft
  - `note` string — This note is visible to the assigned employee and to shift team managers
  - `internalNote` string — The internalNote field is a private property restricted to shift team managers. This information is never visible to the assigned employee.
  - `paidPreparationTimeInM` number, required — The paid preparation time in minutes.
  - `assignedBy` object, required — when assigned, member (employee) UID that assigned the event.
  - `assignedAt` string, required — when assigned, date and time of the assignment of the event. In ISO-8601 format.
  - `splitFromEventId` string, required — when event is split from another event, contains the source event UID
  - `clocking` PublicEventClocking
    - `in` PublicEventClockingEntry, required
      - `at` string — Adjusted time from company rules. This value is use to calculate the total worked hours.
      - `originalAt` string — The actual time when employee clocked.
    - `out` PublicEventClockingEntry, required
      - `at` string — Adjusted time from company rules. This value is use to calculate the total worked hours.
      - `originalAt` string — The actual time when employee clocked.
    - `clockedBreaks` string[], required — Clocked breaks information
    - `paidDurationInM` number, required — Paid duration in minutes
    - `updatedByMemberId` string — Uid of the employee who update clocking
    - `updatedByMemberCode` string — Code of the employee who update clocking
    - `updatedAt` string — Clocking update date and time. In ISO-8601 format.
    - `validatedBy` 'MEMBER' | 'SMART_PUNCH' — The clocking can be validated by the smart punch or by an manager
    - `validatedByMemberId` string — Uid of the employee who validated clocking
    - `validatedByMemberCode` string — Code of the employee who validated clocking
    - `validatedAt` string — clocking validate date and time. In ISO-8601 format.
    - `paidBreaks` string[] — This optional property contains an array of planned paid breaks. If null or undefined, the shift has no planned paid breaks.
    - `unpaidBreak` PublicBreak
      - `paid` boolean, required — if true the break is a paid break otherwise an unpaid break
      - `durationInM` number, required — the break duration in minutes
      - `startInM` number — an optional value in minutes from the beginning of the shift indicating when the break should start
    - `paidAmount` number — The amount paid calculated from the employee's hourly wage multiplied by hours worked minus the sum of all unpaid break time plus extra paid time (if specified).
    - `locked` boolean — True if the Timesheet have been locked
    - `lockedByMemberId` string — Uid of the employee who locked clocking
    - `lockedByMemberCode` string — Code of the employee who locked clocking
    - `lockedAt` string — Clocking update date and time. In ISO-8601 format.
  - `premiums` PublicEventPremium[] — Array of premium apply on the event
    - `uid` string, required — Unique premium id
    - `adHoc` boolean — Premium created specifically for this shift
    - `names` object, required — Multilingual premium name as a map indexed by locale ("en" or "fr")
    - `calculationType` 'AMOUNT' | 'HOURS' | 'HOURLY_MULTIPLIER' | 'HOURLY_BONUS', required — Type of calculation for the premium
    - `calculationAmount` number, required — Amount used to calculate the premium from the calculationType
    - `paidAmount` number — Paid amount for this premium
    - `plannedPaidAmount` number — Planed paid amount for this premium
    - `paidDurationInM` number — Paid duration in minutes
    - `plannedPaidDurationInM` number — Planned paid duration in minutes
    - `code` string — Premium code
  - `request` PublicEventRequest[] — If present, indicates that there is a request on an open shift or a swap/replacement has been requested
    - `type` 'REPLACEMENT' | 'SWAP' | 'OPEN_SHIFT', required — Type of the request
    - `reason` string — Request reason
    - `memberId` string — Member UID of the employee requesting a replacement or a swap
    - `createdAt` string, required — Request creation date and time. In ISO-8601 format
    - `updatedAt` string — Request last modification date and time. In ISO-8601 format
    - `approval` PublicEventApproval
      - `status` 'NEEDS_APPROVAL' | 'APPROVED' | 'REFUSED', required — Approval status
      - `updatedAt` string — Modification date and time of the status. In ISO-8601 format
      - `updatedByMemberId` string — UID of the member who updated the status
      - `refusalReason` string — Refusal reason
    - `openShiftCount` number — Number of places available for an open shift
    - `swapEventIds` string[] — Event UIDs of the events to swap
  - `initialRequest` PublicEventInitialRequest[] — Last request information performed on this shift
    - `type` 'REPLACEMENT' | 'SWAP' | 'OPEN_SHIFT', required — Type of the request
    - `memberId` string — Member UID related to the request. If present, indicates the member UID of the employee being replaced or swapped. If not present, the shift was originally an open shift
    - `reason` string — Request reason
    - `createdAt` string, required — Creation date and time of the initial request when the employee asked for a replacement or a swap. Or in the case of an open shift the creation date and time of when the open shift was published
    - `acceptedAt` string — Date and time when the request was accepted. In ISO-8601 format
    - `swapEventId` string — Event UID of the other shift being swapped
    - `approval` PublicEventApproval
      - `status` 'NEEDS_APPROVAL' | 'APPROVED' | 'REFUSED', required — Approval status
      - `updatedAt` string — Modification date and time of the status. In ISO-8601 format
      - `updatedByMemberId` string — UID of the member who updated the status
      - `refusalReason` string — Refusal reason

## Other responses

- `400` — Invalid variant fields, negative break duration, or shift ≥ 24h
- `403` — Event clocking is locked
- `404` — No member found with the given code
- `406` — Member is not active
- `409` — Clocking already exists and conflictBehavior is THROW_EXCEPTION (default)

---

[API](https://skmtc.dev/evolia/apis/public-evolia.md) · [All operations](https://skmtc.dev/evolia/apis/public-evolia/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/evolia/public-evolia/revisions/91b80f2b4802/schema)
