Skip to content

Search Allocations

client.transactions.searchAllocations(TransactionSearchAllocationsParams { filter } body, RequestOptionsoptions?): TransactionSearchAllocationsResponse { data }
POST/transactions/allocations/search

Searches transaction allocations by filter criteria

ParametersExpand Collapse
body: TransactionSearchAllocationsParams { filter }
filter: Filter

Filter criteria for searching transaction allocations.

invoice_id: InvoiceID { any }
any: Array<string>

Match allocations where invoice_id is any of these values (OR).

ReturnsExpand Collapse
TransactionSearchAllocationsResponse { data }

Search results for transaction allocations.

data: Array<Data>
id: string

Allocation ID.

amount: string

Allocated amount in smallest currency unit as stringified bigint.

invoice_id: string

The invoice this allocation is applied against.

posted: string

Posted timestamp of the parent transaction in ISO 8601 format.

formatdate-time
transaction: Transaction { id, external_id }

Reference to a transaction by encoded ID and external ID.

id: string

Encoded transaction ID.

external_id: string

External transaction ID.

type: "invoice_payin" | "invoice_payout"

The type of allocation.

Accepts one of the following:
"invoice_payin"
"invoice_payout"
user: User { id, external_id }

User reference in API responses: Fragment user id and external_id.

id: string

FRAGMENT generated ID of the user

external_id: string

External ID of the user

Search Allocations

import Fragment from '@fragment-dev/ts-node';

const client = new Fragment();

const response = await client.transactions.searchAllocations({
  filter: { invoice_id: { any: ['inv_abc123'] } },
});

console.log(response.data);
{
  "data": [
    {
      "id": "alloc_abc123",
      "amount": "1000",
      "invoice_id": "inv_abc123",
      "posted": "2026-02-12T00:00:00.000Z",
      "transaction": {
        "id": "txn_dHhuX2ZyYWdfMDAx",
        "external_id": "bank_txn_123"
      },
      "type": "invoice_payin",
      "user": {
        "id": "user_abc123",
        "external_id": "user-ext-001"
      }
    }
  ]
}
Returns Examples
{
  "data": [
    {
      "id": "alloc_abc123",
      "amount": "1000",
      "invoice_id": "inv_abc123",
      "posted": "2026-02-12T00:00:00.000Z",
      "transaction": {
        "id": "txn_dHhuX2ZyYWdfMDAx",
        "external_id": "bank_txn_123"
      },
      "type": "invoice_payin",
      "user": {
        "id": "user_abc123",
        "external_id": "user-ext-001"
      }
    }
  ]
}