Skip to main content
POST
Record a punch (clock in/out) for the current employee

Authorizations

Authorization
string
header
required

Issue keys in Settings → API. Send them as Authorization: Bearer ont_… (an X-Api-Key: ont_… header is also accepted). Session-cookie routes are used by the OnTime web apps and are shown for completeness.

Body

application/json
direction
enum<string>
required
Available options:
IN,
OUT
source
enum<string>
default:Web
Available options:
MobileGPS,
SelfieGPS,
Biometric,
Web
lat
number | null
lng
number | null
accuracyMeters
integer | null
Required range: -9007199254740991 <= x <= 9007199254740991
geofenceStatus
enum<string>
Available options:
Inside,
Outside,
Pending
reason
string | null
selfieRef
string | null

Response

200 - application/json

Success

id
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
employeeId
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
employeeName
string
required
employeeCode
string
required
timestamp
string
required
direction
enum<string>
required
Available options:
IN,
OUT
source
enum<string>
required
Available options:
MobileGPS,
SelfieGPS,
Biometric,
Web
deviceId
string<uuid> | null
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
deviceCode
string | null
required
lat
number | null
required
lng
number | null
required
accuracyMeters
integer | null
required
Required range: -9007199254740991 <= x <= 9007199254740991
geofenceStatus
enum<string>
required
Available options:
Inside,
Outside,
Pending
selfieRef
string | null
required
reason
string | null
required
status
enum<string>
required
Available options:
Approved,
Pending,
Rejected
conflictFlag
boolean
required