> ## 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 Device Codes

> Lists all DeviceCodes associated with the merchant.

`square.listDeviceCodes` lists all DeviceCodes associated with the merchant.

## Example

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

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

  square.listDeviceCodes({
    cursor: "cursor",
    locationId: "location_id",
    productType: "TERMINAL_API",
    status: "UNKNOWN",
  })
})
```

## Inputs

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

| Field         | Type                              | Required | Default | Description                                                                                                                                                                                                                                                  |
| ------------- | --------------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `cursor`      | `string \| null`                  | No       | —       | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Paginating results](https://developer.squareup.com/docs/working-with-apis/pagination) for more information. |
| `locationId`  | `string \| null`                  | No       | —       | If specified, only returns DeviceCodes of the specified location. Returns DeviceCodes of all locations if empty.                                                                                                                                             |
| `productType` | `Square.ProductType \| null`      | No       | —       | If specified, only returns DeviceCodes targeting the specified product type. Returns DeviceCodes of all product types if empty.                                                                                                                              |
| `status`      | `Square.DeviceCodeStatus \| null` | No       | —       | If specified, returns DeviceCodes with the specified statuses. Returns DeviceCodes of status `PAIRED` and `UNPAIRED` if empty.                                                                                                                               |

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

## Output

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