Search
Search via DB
Filter ledgers, balances, transactions, and identities with the Go SDK.
POST
/{collection}/filterUse Filter on the relevant service to query records in a collection. The Go SDK does not expose a unified Search.filter helper like the TypeScript SDK.
Call the method
result, _, _ := client.Transaction.Filter(
blnkgo.FilterParams{
Filters: []blnkgo.Filter{
{
Field: "status",
Operator: blnkgo.OpEqual,
Value: "APPLIED",
},
},
SortBy: "created_at",
SortOrder: "desc",
IncludeCount: true,
Limit: 20,
Offset: 0,
},
)
| Field | Type | Description |
|---|---|---|
Filters | []blnkgo.Filter | Array of filter conditions, each with a Field, Operator, and a Value or Values. |
SortBy | string | Field to sort by. Defaults to created_at. |
SortOrder | string | Sort direction, asc or desc. Defaults to desc. |
IncludeCount | bool | Return TotalCount in the response. Defaults to false. |
Limit | int | Maximum records to return. Defaults to 20, max 100. |
Offset | int | Records to skip for pagination. Defaults to 0. |
Response
{
"data": [
{
"transaction_id": "txn_c4e70eb8-e4d6-4e04-a2e2-92a43b969e0c",
"amount": 15000,
"currency": "USD",
"status": "APPLIED",
"source": "bln_source123",
"destination": "bln_dest456",
"created_at": "2024-01-15T10:30:00Z"
}
],
"total_count": 150
}Go response (*blnkgo.FilterResponse)
| Field | Type | Description |
|---|---|---|
Data | interface{} | Array of matching records. Shape varies by collection. |
TotalCount | *int64 | Total matching records. Only present when IncludeCount is true. |