Labor API

Troubleshoot Problems with the Labor API

Find problems and solutions related to opening shifts, adding breaks, and closing shifts using the Labor API.

I cannot create a new open Shift for a team member Permalink Get a link to this section

Square's error response says that the new Shift overlaps other shifts for a team member who has no other shifts on this day.


The team member has an open shift from a previous day that needs to be closed.


Find the previous shift and verify that the end_at field is null or missing. Close the shift by setting an end_at value and sending an UpdateShift request for the shift to be closed.

When checking for an open shift, use code like the following example and provide the ID of the team member associated with the open shift:

Search Shifts
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
curl \
  -X POST \
  -H 'Square-Version: 2021-10-20' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": {
      "filter": {
        "status": "OPEN",
        "team_member_ids": [

The response to the shift search request is an empty object if the team member does not have an OPEN shift:


My createShift call returns the shift I opened in a previous create operation Permalink Get a link to this section


A new idempotency key was not generated for this operation.


Generate a new idempotency key and retry the operation.

On closing a shift, the API was unable to service the request Permalink Get a link to this section

There are no overlapping shifts for the employee and the body of the close request is formed correctly.


The Shift to be closed has an open Break.


Iterate the Break objects in the shift. When a Break with no end_at property is found, set the property to the current time.

My shift query returns too many shifts Permalink Get a link to this section


A filter field is invalid (REST only) or an enum value is invalid (REST and SDK). When the search endpoint receives a filter field or enum value it does not recognize, the related filter criteria is ignored.


Enums and JSON field names are case-sensitive. Confirm that the field name is correct and lowercase (REST) and the provided enum values match their definition in the Technical Reference.

Related topics Permalink Get a link to this section