> ## 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 Card Activities

> Lists gift card activities.

`square.listGiftCardActivities` lists gift card activities.

## Example

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

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

  square.listGiftCardActivities({
    giftCardId: "gift_card_id",
    type: "type",
    locationId: "location_id",
    beginTime: "begin_time",
    endTime: "end_time",
    limit: 1,
    cursor: "cursor",
    sortOrder: "sort_order",
  })
})
```

## Inputs

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

| Field        | Type             | Required | Default                         | Description                                                                                                                                                                                                                                                                                                                                  |
| ------------ | ---------------- | -------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `giftCardId` | `string \| null` | No       | —                               | If a gift card ID is provided, the endpoint returns activities related to the specified gift card. Otherwise, the endpoint returns all gift card activities for the seller.                                                                                                                                                                  |
| `type`       | `string \| null` | No       | —                               | If a type is provided, the endpoint returns gift card activities of the specified type. Otherwise, the endpoint returns all types of gift card activities.                                                                                                                                                                                   |
| `locationId` | `string \| null` | No       | —                               | If a location ID is provided, the endpoint returns gift card activities for the specified location. Otherwise, the endpoint returns gift card activities for all locations.                                                                                                                                                                  |
| `beginTime`  | `string \| null` | No       | the current time minus one year | The timestamp for the beginning of the reporting period, in RFC 3339 format. This start time is inclusive. The default value is the current time minus one year.                                                                                                                                                                             |
| `endTime`    | `string \| null` | No       | the current time                | The timestamp for the end of the reporting period, in RFC 3339 format. This end time is inclusive. The default value is the current time.                                                                                                                                                                                                    |
| `limit`      | `number \| null` | No       | 50                              | If a limit is provided, the endpoint returns the specified number of results (or fewer) per page. The maximum value is 100. The default value is 50. 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). |
| `sortOrder`  | `string \| null` | No       | —                               | The order in which the endpoint returns the activities, based on `created_at`. - `ASC` - Oldest to newest. - `DESC` - Newest to oldest (default).                                                                                                                                                                                            |

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

## Output

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