> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fluz.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Bulk Transactions

> Return recent transactions across up to 100 connected users in one call, newest first, defaulting to the last 90 days.

Returns recent transactions across up to **100 connected users** in one call — at most **20 per target**, newest first, defaulting to the **last 90 days**.

## Requirements

* `Authorization: Basic <API_KEY>` (your application API key)
* The **bulk API capability** on your application
* The `LIST_PAYMENT` and `LIST_PURCHASES` scopes on each target user's grant

Failures are reported per target and never fail the whole request. See [Bulk API Overview](/bulk-api) for the targeting model and error codes.

## Query

```graphql theme={null}
query GetBulkTransactions(
  $targetSpec: BulkTargetSpecInput!
  $createdGte: DateTime
  $createdLte: DateTime
  $includeMetadata: Boolean
) {
  getBulkTransactions(
    targetSpec: $targetSpec
    createdGte: $createdGte
    createdLte: $createdLte
    includeMetadata: $includeMetadata
  ) {
    targetCount
    successCount
    failureCount
    results {
      externalReferenceId
      accountId
      success
      error { code message }
      totalCount
      hasNextPage
      transactions {
        recordId
        transactionType
        amount
        status
        createdAt
        memo
        transactionCategory
      }
    }
  }
}
```

### Variables

```json theme={null}
{
  "targetSpec": { "mode": "SELECTED", "targets": ["your-user-001"] },
  "createdGte": null,
  "createdLte": null,
  "includeMetadata": false
}
```

## Response

```json theme={null}
{
  "data": {
    "getBulkTransactions": {
      "targetCount": 1,
      "successCount": 1,
      "failureCount": 0,
      "results": [
        {
          "externalReferenceId": "your-user-001",
          "accountId": "8f3c…",
          "success": true,
          "error": null,
          "totalCount": 42,
          "hasNextPage": true,
          "transactions": [
            {
              "recordId": "rec-1",
              "transactionType": "GIFT_CARD_PURCHASE",
              "amount": 25.0,
              "status": "SETTLED",
              "createdAt": "2026-07-01T00:00:00.000Z",
              "memo": null,
              "transactionCategory": null
            }
          ]
        }
      ]
    }
  }
}
```

## Arguments

| Argument          | Type                   | Description                                                                                    |
| ----------------- | ---------------------- | ---------------------------------------------------------------------------------------------- |
| `targetSpec`      | `BulkTargetSpecInput!` | Target selection. Max 100 targets. See [Overview](/bulk-api).                                  |
| `createdGte`      | `DateTime`             | Only include transactions created at/after this time. Defaults to 90 days before `createdLte`. |
| `createdLte`      | `DateTime`             | Only include transactions created at/before this time. Defaults to now.                        |
| `includeMetadata` | `Boolean`              | Also return `memo` and `transactionCategory`. Slower; defaults to `false`.                     |

## Response fields

| Field                                           | Description                                                                                                                                   |
| ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `results[].transactions`                        | Up to 20 most-recent transactions in the window, newest first. Restricted to permitted spend accounts when the grant is spend-account-scoped. |
| `results[].totalCount`                          | Total transactions matching the window for this target.                                                                                       |
| `results[].hasNextPage`                         | `true` when the target has more than the 20 returned.                                                                                         |
| `targetCount` / `successCount` / `failureCount` | Request-level summary.                                                                                                                        |

## Limits & getting complete history

* **20 transactions per target** and a **maximum 90-day window** per request. A window wider than 90 days is rejected — narrow the range or use the export.
* When `hasNextPage` is `true` or `totalCount` exceeds what's returned, there's more data. This bounded query never silently truncates; for complete history use the **asynchronous transactions export** (coming soon).
* `includeMetadata: true` adds `memo` and `transactionCategory` per transaction at some latency cost. Attachment links aren't included on the bulk path — use the export for full metadata.
