---
title: "A simplified clock in and clock out endpoint"
method: POST
path: "/v1/public/time-clock/clock"
tags: ["time-clock"]
---

# A simplified clock in and clock out endpoint

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

This clock in and out endpoint allow an easy implementation for IT departments to link an on promise time clock device to Evolia. It only requires a member code (employee id). If a corresponding shift intersect with the clocked time, this shift is be used to register clock in and clock out values. Otherwise a new unplanned shift will be created.

## Request body

- TimeClockClockAtRequest
  - `memberCode` string, required — The member code of the employee clocking in or out
  - `at` number — A unix timestamp of the clocked time. If not specified the current time is used
  - `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 fo 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

## 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

- `404` — Unable to find the employee with the specified code
- `406` — The member must be active
- `409` — A team, a location or a skill must be specified if the member has more than one team, location or skill AND no primary team, location or skill.

---

[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)
