<- Labor API

Labor API

All versions ->

Bulk publish scheduled shiftsBeta

POST

 /v2/labor/scheduled-shifts/bulk-publish

Publishes 1 - 100 scheduled shifts.

This endpoint takes a map of individual publish requests and returns a map of responses. When a scheduled shift is published, Square keeps the draft_shift_details field as is and copies it to the published_shift_details field.

The minimum start_at and maximum end_at timestamps of all shifts in a BulkPublishScheduledShifts request must fall within a two-week period.

Permissions:TIMECARDS_WRITE
Try in API Explorer
Link to section

Request body

Example code

Link to section

scheduled_shifts

Required

A map of 1 to 100 key-value pairs that represent individual publish requests.

  • Each key is the ID of a scheduled shift you want to publish.
  • Each value is a BulkPublishScheduledShiftsData object that contains the version field or is an empty object.
Link to section

scheduled_shift_notification_audience

string

Indicates whether Square should send email notifications to team members and which team members should receive the notifications. This setting applies to all shifts specified in the bulk operation. The default value is AFFECTED.

Link to section

Response fields

Link to section

responses

A map of key-value pairs that represent responses for individual publish requests. The order of responses might differ from the order in which the requests were provided.

  • Each key is the scheduled shift ID that was specified for a publish request.
  • Each value is the corresponding response. If the request succeeds, the value is the published scheduled shift. If the request fails, the value is an errors array containing any errors that occurred while processing the request.
Link to section

errors

Any top-level errors that prevented the bulk operation from succeeding.