> ## 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 Gift Cards

> Lists all gift cards.

`square.listGiftCards` lists all gift cards.

## Example

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

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

  square.listGiftCards({
    type: "type",
    state: "state",
    limit: 1,
    cursor: "cursor",
    customerId: "customer_id",
  })
})
```

## Inputs

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

| Field        | Type             | Required | Default | Description                                                                                                                                                                                                                                                                                                                                  |
| ------------ | ---------------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type`       | `string \| null` | No       | —       | If a type is provided, the endpoint returns gift cards of the specified type. Otherwise, the endpoint returns gift cards of all types.                                                                                                                                                                                                       |
| `state`      | `string \| null` | No       | —       | If a state is provided, the endpoint returns the gift cards in the specified state. Otherwise, the endpoint returns the gift cards of all states.                                                                                                                                                                                            |
| `limit`      | `number \| null` | No       | 30      | If a limit is provided, the endpoint returns only the specified number of results per page. The maximum value is 200. The default value is 30. For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).                                                                                     |
| `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. If a cursor is not provided, the endpoint returns the first page of the results. For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
| `customerId` | `string \| null` | No       | —       | If a customer ID is provided, the endpoint returns only the gift cards linked to the specified customer.                                                                                                                                                                                                                                     |

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

## Output

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