Skip to main content
POST
http://localhost:5001
/
{collection}
/
filter
curl -X POST "http://YOUR_BLNK_INSTANCE_URL/transactions/filter" \
  -H "X-Blnk-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filters": [
      { "field": "status", "operator": "eq", "value": "APPLIED" },
      { "field": "currency", "operator": "in", "values": ["USD", "EUR"] }
    ],
    "sort_by": "created_at",
    "sort_order": "desc",
    "include_count": true,
    "limit": 20,
    "offset": 0
  }'
{
  "data": [
    {
      "transaction_id": "txn_abc123",
      "amount": 15000,
      "currency": "USD",
      "status": "APPLIED",
      "source": "bln_source123",
      "destination": "bln_dest456",
      "created_at": "2024-01-15T10:30:00Z"
    }
  ],
  "total_count": 150
}
The Filter API lets you retrieve records from any collection using server-side filters with a clean JSON interface. Use it when you need precise, composable queries without the overhead of Typesense.

Authorization

If set, the API uses an API key for authentication. Include the following header in your requests: X-blnk-key: <api-key>. Replace <api-key> with your secret API key. Ensure the key is kept secure and not exposed in public repositories or client-side code. See also: Secure your Blnk server

Path Parameters

collection
string
required
The collection to filter. Supported values:
  • ledgers - Filter ledgers by name or metadata
  • balances - Filter balance records across all ledgers
  • transactions - Filter transaction records
  • identities - Filter customer identity records

Body

filters
array
required
Array of filter objects. Each object has field, operator, and optionally value or values. Learn more: Search via DB docsExamples:
  • [{"field": "status", "operator": "eq", "value": "APPLIED"}] - Exact match
  • [{"field": "currency", "operator": "in", "values": ["USD", "EUR"]}] - Multiple values
sort_by
string
Field to sort by. Only indexed fields are sortable. Default: created_at. Learn more: Performance Tuning
sort_order
string
Sort direction: asc or desc. Default: desc.
include_count
boolean
Include total count in response. May impact performance on large datasets. Default: false.
limit
integer
Max records to return. Default: 20, max: 100.
offset
integer
Records to skip for pagination. Default: 0.

Response

data
array
Array of matching records. Structure varies by collection type (ledger, balance, transaction, or identity).
total_count
integer
Total number of matching records. Only present when include_count is true.
curl -X POST "http://YOUR_BLNK_INSTANCE_URL/transactions/filter" \
  -H "X-Blnk-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filters": [
      { "field": "status", "operator": "eq", "value": "APPLIED" },
      { "field": "currency", "operator": "in", "values": ["USD", "EUR"] }
    ],
    "sort_by": "created_at",
    "sort_order": "desc",
    "include_count": true,
    "limit": 20,
    "offset": 0
  }'
{
  "data": [
    {
      "transaction_id": "txn_abc123",
      "amount": 15000,
      "currency": "USD",
      "status": "APPLIED",
      "source": "bln_source123",
      "destination": "bln_dest456",
      "created_at": "2024-01-15T10:30:00Z"
    }
  ],
  "total_count": 150
}
For full-text search, advanced faceting, or querying across millions of records, use Search via Typesense instead.

Need help?

We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool. To ask questions or discuss issues, please contact us or join our Discord community.
Tip: Connect to Blnk Cloud to see your Core data.You can view your transactions, manage identities, create custom reports, invite other team members to collaborate, and perform operations on your Core — all in one dashboard.Check out Blnk Cloud →