v1

latestOpenAPI 3.0.0Apache 2.02026-07-142008071.1 MB
Labor

SearchShifts

Returns a paginated list of Shift records for a business. The list to be returned can be filtered by:

  • Location IDs.
  • Employee IDs.
  • Shift status (OPEN and CLOSED).
  • Shift start.
  • Shift end.
  • Workday details.

The list can be sorted by:

  • start_at.
  • end_at.
  • created_at.
  • updated_at.
post/v2/labor/shifts/search

Request body

cursorstring

An opaque cursor for fetching the next page.

limitinteger

The number of resources in a page (200 by default).

Example request

{
  "request_body": {
    "limit": 100,
    "query": {
      "filter": {
        "workday": {
          "date_range": {
            "end_date": "2019-02-03",
            "start_date": "2019-01-20"
          },
          "default_timezone": "America/Los_Angeles",
          "match_shifts_by": "START_AT"
        }
      }
    }
  }
}

Response

Success

cursorstring

An opaque cursor for fetching the next page.

Example response

{
  "shifts": [
    {
      "breaks": [
        {
          "break_type_id": "REGS1EQR1TPZ5",
          "end_at": "2019-01-21T06:11:00-05:00",
          "expected_duration": "PT10M",
          "id": "SJW7X6AKEJQ65",
          "is_paid": true,
          "name": "Tea Break",
          "start_at": "2019-01-21T06:11:00-05:00"
        }
      ],
      "created_at": "2019-01-24T01:12:03Z",
      "employee_id": "ormj0jJJZ5OZIzxrZYJI",
      "end_at": "2019-01-21T13:11:00-05:00",
      "id": "X714F3HA6D1PT",
      "location_id": "PAA1RJZZKXBFG",
      "start_at": "2019-01-21T03:11:00-05:00",
      "status": "CLOSED",
      "team_member_id": "ormj0jJJZ5OZIzxrZYJI",
      "timezone": "America/New_York",
      "updated_at": "2019-02-07T22:21:08Z",
      "version": 6,
      "wage": {
        "hourly_rate": {
          "amount": 1100,
          "currency": "USD"
        },
        "title": "Barista"
      }
    },
    {
      "breaks": [
        {
          "break_type_id": "WQX00VR99F53J",
          "end_at": "2019-01-23T14:40:00-05:00",
          "expected_duration": "PT10M",
          "id": "BKS6VR7WR748A",
          "is_paid": true,
          "name": "Tea Break",
          "start_at": "2019-01-23T14:30:00-05:00"
        },
        {
          "break_type_id": "P6Q468ZFRN1AC",
          "end_at": "2019-01-22T12:44:00-05:00",
          "expected_duration": "PT15M",
          "id": "BQFEZSHFZSC51",
          "is_paid": false,
          "name": "Coffee Break",
          "start_at": "2019-01-22T12:30:00-05:00"
        }
      ],
      "created_at": "2019-01-23T23:32:45Z",
      "employee_id": "33fJchumvVdJwxV0H6L9",
      "end_at": "2019-01-22T13:02:00-05:00",
      "id": "GDHYBZYWK0P2V",
      "location_id": "PAA1RJZZKXBFG",
      "start_at": "2019-01-22T12:02:00-05:00",
      "status": "CLOSED",
      "team_member_id": "33fJchumvVdJwxV0H6L9",
      "timezone": "America/New_York",
      "updated_at": "2019-01-24T00:56:25Z",
      "version": 16,
      "wage": {
        "hourly_rate": {
          "amount": 1600,
          "currency": "USD"
        },
        "title": "Cook"
      }
    }
  ]
}