_new
Creates a new User Clock-in
Parameters
user_id
The ID of the user creating the Clock-in
date
The date of the Clock-in, formatted as Y-M-D (e.g 2023-06-27)
clockin
The time of day the user is expected to clock into work This is in an epoch time format (e.g 1687856400, meaning 10:00am on 27th June 2023)
clockout
The time of day the user is expected to clock out of work This is also in an epoch time format (e.g 1687883400, meaning 17:30pm on 27th June 2023)
Example
Results
On Success
"id" value will vary
On Failure
If "user_id" is not given a value, or has a value less than 1:
If the "date" parameter is not given a date, or it is not in the correct format:
If both the "clockin" and "clockout" parameters are not given values:
If a User Clock-in creation is attempted for a user who already has another Clockin scheduled for the same date:
Last updated