> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Search Scheduled Shifts

> Returns a paginated list of scheduled shifts, with optional filter and sort settings.

`square.searchScheduledShifts` returns a paginated list of scheduled shifts, with optional filter and sort settings.

## Example

```ts automations/square-search-scheduled-shifts.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { square } from "automate.ax/square"

export default automation("Search Square Scheduled Shifts", () => {
  onDashboardRun({ title: "Search Square Scheduled Shifts" })

  square.searchScheduledShifts({
    query: {
      filter: {
        assignmentStatus: "ASSIGNED",
      },
      sort: {
        field: "CREATED_AT",
        order: "ASC",
      },
    },
    limit: 2,
    cursor: "xoxp-1234-5678-90123",
  })
})
```

## Inputs

Every input accepts a compatible signal. It requires `TIMECARDS_READ`.

| Field    | Type                         | Required | Default | Description                                                                                                                                                                                                                                                                        |
| -------- | ---------------------------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `query`  | `Square.ScheduledShiftQuery` | No       | —       | Query conditions used to filter and sort the results.                                                                                                                                                                                                                              |
| `limit`  | `number`                     | No       | 50      | The maximum number of results to return in a single response page. The default value is 50.                                                                                                                                                                                        |
| `cursor` | `string`                     | No       | —       | 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](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |

Use the official [SearchScheduledShifts reference](https://developer.squareup.com/reference/square/labor-api/search-scheduled-shifts) for provider field semantics and limits.

## Output

Returns the official `Square.SearchScheduledShiftsResponse` response as a codec-safe object. Square integer money amounts remain `bigint` values.
