Add Shift
Adds a new shift to your company. Shared rules: see Writing data.
namemust be unique in the company, ignoring upper/lower case and outer spaces. A second shift with the same name is refused with400, so repeating is harmless.start_timeandend_timeare 24-hourHH:MM. Ifend_timeis the same as or earlier thanstart_time, the shift runs overnight (for example 22:00-06:00); this needs the Night Shift plan feature.min_punch_in_minutesis how many minutes before the shift starts a punch-in is accepted;max_punch_out_minutesis how many minutes after it ends a punch-out is accepted. Leave out for no limit. Either needs the Shift Time Limits plan feature.GET /attendance/shiftreturns these limits asmin_punch_in_duration/max_punch_out_durationin seconds; writes use minutes.
Authentication
AuthorizationApi-Key
Format: “Api-Key {api-key}”
Request
This endpoint expects an object.
name
Shift name. Unique in the company, ignoring case.
start_time
Start time, 24-hour HH:MM.
end_time
End time, 24-hour HH:MM. Same as or earlier than start_time means an overnight shift (needs Night Shift).
min_punch_in_minutes
Minutes before the shift starts that a punch-in is accepted. Leave out for no limit (needs Shift Time Limits).
max_punch_out_minutes
Minutes after the shift ends that a punch-out is accepted. Leave out for no limit (needs Shift Time Limits).
Response
The shift was created.
message
status
data
Errors
400
Bad Request Error
403
Forbidden Error
