Create schedules
Changed onUp to 25 schedules in one call, each a kind of day, the days it falls on, and the people it is for. type is per item, so a rota and the absences inside it go together.
There are no repeat patterns: send the dates. If you want every Monday, say which Mondays.
Send the rota as one call, not as twenty. Everyone named is notified, once per call — so the same twenty schedules sent one at a time buzz in somebody's pocket twenty times.
This is the write to send an Idempotency-Key with. A schedule carries no key of yours, so a retry after a timeout files the rota a second time unless the header tells us it is the same attempt.
Schedules carry no key you own, so a resend duplicates rather than converges. A 422 means none of the batch landed and is safe to fix and send again; a timeout is not — read back before retrying. The answer lists what was created, in the order sent.
type decides what else is required. work needs timezone and either start/end or shifts. free — a day with hours to make up rather than hours to keep — needs timezone, start, end, and takes time_planned. leave needs only leave_type.
start and end are clock times, HH:MM:SS, read in timezone — not instants, whatever a generated client calls the field. timezone is a fixed offset, +05:00 or Z.
The answer is not an echo of the request, so read it. A day with two or more shifts takes its start, end and time_planned from them and comes back with is_split true. A day with exactly one shift is not a split day: the hours move onto the day itself and shifts comes back empty. time_planned for a worked day is always computed — the hours less the break — never taken from what you sent.
Every span is seconds, break_time and grace_start/grace_end included. Grace is stored to the minute, so send a multiple of 60; the maximum is 3600.
Grace is not the same as a boundary. It is how far past the start a person may arrive and still be credited from the shift boundary. How far outside the shift a punch is collected at all is a company setting and is not on this endpoint.
There is no title — one is generated and it means nothing to you. One schedule takes up to 366 dates, 200 people and 8 shifts.
Request
- Base URL: https://api.clockster.com
- URL: https://api.clockster.com/company/v3/schedules
- Auth: HTTP bearer
Headers
A value you choose, unique per attempt. Send the same one when retrying and the first answer is replayed instead of the write happening twice. Optional, and only on the writes that carry no key of your own.
Request body
Response
Created
Changes
- info
the endpoint scheme security
companyTokenwas added to the API
- info
- breaking
added the pattern
^(?:Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9])$to the request property////// - breaking
added the pattern
^(?:Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9])$to the request property//////
- breaking