Publishes draft shifts

Publishes the draft shifts and rest days of the selected employees between two dates, so employees can see them. It publishes the same set as the "Publish" action of the shifts planner, and optionally notifies the employees. If the filters match no employee, nothing is published. Only the drafts included in the request are checked for conflicts, against each other and against the employee's leaves and rest days. A draft that overlaps a shift that is already published is not detected. When a conflict blocks the publish, nothing is published and the 409 response lists each conflict in messages.shift_conflicts as a JSON string with shift_id, employee_id, conflicting_shift_ids, conflicting_leave_ids and conflicting_rest_day_ids. With skip_conflicts, the employees with conflicts are left out instead. Returns the shifts that were published. Up to 31 days can be published per request.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required

First day to publish. Shifts starting on or after this day, in the shift's local time, are included

string
required

Last day to publish, inclusive. Shifts starting on or before this day, in the shift's local time, are included. The range can span up to 31 days

employee_ids
array of strings

Publishes only the shifts of these employees. An empty list publishes nothing. If not provided, publishes the shifts of every employee whose shifts you can manage

employee_ids
location_ids
array of strings

Publishes only the shifts of employees assigned to these locations. An empty list publishes nothing

location_ids
team_ids
array of strings

Publishes only the shifts of employees in these teams. An empty list publishes nothing

team_ids
shift_ids
array of strings

Publishes only these draft shifts. Each draft must start within the date range and match the other filters, otherwise nothing is published and the 422 error lists the shifts that do not. Ids of shifts you cannot access fail the request with a 400 that does not list them. Ids of shifts that are already published are accepted and left as they are, even if they fall outside the dates and filters, so a retried request succeeds. Rest days are not published when shift_ids is provided. If not provided, every draft shift and rest day in the range is published, including the ones created from the shifts planner

shift_ids
boolean

When true, employees with a conflicting shift in the range are left out and everything else is published. Their shifts and rest days stay in draft and are not returned. When false, a single conflict stops the whole publish

boolean

When true, notifies the employees whose shifts were published

Responses

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json