Skip to content

Search Allocations

transactions.search_allocations(TransactionSearchAllocationsParams**kwargs) -> TransactionSearchAllocationsResponse
POST/transactions/allocations/search

Searches transaction allocations by filter criteria

ParametersExpand Collapse
filter: Filter

Filter criteria for searching transaction allocations.

invoice_id: FilterInvoiceID
any: SequenceNotStr[str]

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

ReturnsExpand Collapse
class TransactionSearchAllocationsResponse:

Search results for transaction allocations.

data: List[Data]
id: str

Allocation ID.

amount: str

Allocated amount in smallest currency unit as stringified bigint.

invoice_id: str

The invoice this allocation is applied against.

posted: datetime

Posted timestamp of the parent transaction in ISO 8601 format.

formatdate-time
transaction: DataTransaction

Reference to a transaction by encoded ID and external ID.

id: str

Encoded transaction ID.

external_id: str

External transaction ID.

type: Literal["invoice_payin", "invoice_payout"]

The type of allocation.

Accepts one of the following:
"invoice_payin"
"invoice_payout"
user: DataUser

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

id: str

FRAGMENT generated ID of the user

external_id: str

External ID of the user

Search Allocations

from fragment import Fragment

client = Fragment()
response = client.transactions.search_allocations(
    filter={
        "invoice_id": {
            "any": ["inv_abc123"]
        }
    },
)
print(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"
      }
    }
  ]
}