<- Labor API

Labor API

All versions ->

Publish scheduled shiftBeta

POST

 /v2/labor/scheduled-shifts/{id}/publish

Publishes a scheduled shift.

When a scheduled shift is published, Square keeps the draft_shift_details field as is and copies it to the published_shift_details field.

Permissions:TIMECARDS_WRITE
Try in API Explorer
Link to section

Path parameters

Example code

Link to section

id

string

Required

The ID of the scheduled shift to publish.

Link to section

Request body

Link to section

idempotency_key

string

Required

A unique identifier for the PublishScheduledShift request, used to ensure the idempotency of the operation.

Link to section

version

integer(32-bit)

The current version of the scheduled shift, used to enable optimistic concurrency control. If the provided version doesn't match the server version, the request fails. If omitted, Square executes a blind write, potentially overwriting data from another publish request.

Link to section

scheduled_shift_notification_audience

string

Indicates whether Square should send an email notification to team members and which team members should receive the notification. The default value is AFFECTED.

Link to section

Response fields

Link to section

scheduled_shift

The published scheduled shift.

Link to section

errors

Any errors that occurred during the request.