> ## 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 Order Custom Attributes

> Lists the [custom attributes](entity:CustomAttribute) associated with an order.

`square.listOrderCustomAttributes` lists the [custom attributes](entity:CustomAttribute) associated with an order.

## Example

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

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

  square.listOrderCustomAttributes({
    orderId: "order_id",
    visibilityFilter: "ALL",
    cursor: "cursor",
    limit: 1,
    withDefinitions: true,
  })
})
```

## Inputs

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

| Field              | Type                              | Required | Default | Description                                                                                                                                                                                                                                                                                                                           |
| ------------------ | --------------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `orderId`          | `string`                          | Yes      | —       | The ID of the target order.                                                                                                                                                                                                                                                                                                           |
| `visibilityFilter` | `Square.VisibilityFilter \| null` | No       | —       | Requests that all of the custom attributes be returned, or only those that are read-only or read-write.                                                                                                                                                                                                                               |
| `cursor`           | `string \| null`                  | No       | —       | The cursor returned in the paged response from 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/working-with-apis/pagination).                                                      |
| `limit`            | `number \| null`                  | No       | 20      | The maximum number of results to return in a single paged response. This limit is advisory. The response might contain more or fewer results. The minimum value is 1 and the maximum value is 100. The default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
| `withDefinitions`  | `boolean \| null`                 | No       | `false` | Indicates whether to return the custom attribute definition in the `definition` field of each custom attribute. Set this parameter to `true` to get the name and description of each custom attribute, information about the data type, or other definition details. The default value is `false`.                                    |

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

## Output

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