> ## 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.

# List Devices

> List devices associated with the merchant.

`square.listDevices` list devices associated with the merchant.

## Example

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

export default automation("List Square Devices", () => {
  onDashboardRun({ title: "List Square Devices" })

  square.listDevices({
    cursor: "cursor",
    sortOrder: "DESC",
    limit: 1,
    locationId: "location_id",
  })
})
```

## Inputs

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

| Field        | Type                       | Required | Default | Description                                                                                                                                                                                                                                                               |
| ------------ | -------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cursor`     | `string \| null`           | No       | —       | A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of results for the original query. See [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information. |
| `sortOrder`  | `Square.SortOrder \| null` | No       | —       | The order in which results are listed. - `ASC` - Oldest to newest. - `DESC` - Newest to oldest (default).                                                                                                                                                                 |
| `limit`      | `number \| null`           | No       | —       | The number of results to return in a single page.                                                                                                                                                                                                                         |
| `locationId` | `string \| null`           | No       | —       | If present, only returns devices at the target location.                                                                                                                                                                                                                  |

Use the official [ListDevices reference](https://developer.squareup.com/reference/square/devices-api/list-devices) for provider field semantics and limits.

## Output

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