v1

latestOpenAPI 3.0.0Apache 2.02026-07-143281,4552.1 MB
Labor

SearchScheduledShifts

Returns a paginated list of scheduled shifts, with optional filter and sort settings. By default, results are sorted by start_at in ascending order.

post/v2/labor/scheduled-shifts/search

Request body

limitinteger

The maximum number of results to return in a single response page. The default value is 50.

cursorstring

The pagination cursor returned by the previous call to this endpoint. Provide this cursor to retrieve the next page of results for your original request. For more information, see Pagination.

Example request

{
  "cursor": "xoxp-1234-5678-90123",
  "limit": 2,
  "query": {
    "filter": {
      "assignment_status": "ASSIGNED",
      "scheduled_shift_status": [
        "PUBLISHED",
        "DRAFT"
      ]
    },
    "sort": {
      "field": "CREATED_AT",
      "order": "ASC"
    }
  }
}

Response

Success

cursorstring

The pagination cursor used to retrieve the next page of results. This field is present only if additional results are available.

Example response

{
  "cursor": "xoxp-123-2123-123232",
  "scheduled_shifts": [
    {
      "created_at": "2019-02-25T03:11:00-05:00",
      "draft_shift_details": {
        "end_at": "2019-01-25T13:11:00-05:00",
        "is_deleted": false,
        "job_id": "FzbJAtt9qEWncK1BWgVCxQ6M",
        "location_id": "PAA1RJZZKXBFG",
        "notes": "Dont forget to prep the vegetables",
        "start_at": "2019-01-25T03:11:00-05:00",
        "team_member_id": "ormj0jJJZ5OZIzxrZYJI",
        "timezone": "America/New_York"
      },
      "id": "K0YH4CV5462JB",
      "updated_at": "2019-02-25T03:11:00-05:00",
      "version": 1
    }
  ]
}