Skip to main content

Overview

This page provides practical examples of using Blnk’s Filter API. For information about filter syntax, operators, and available fields, see Database Filtering.

High-value applied transactions

Retrieve all applied transactions above $10,000, sorted by amount:
curl -X POST "https://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": "amount", "operator": "gte", "value": 10000 }
    ],
    "sort_by": "amount",
    "sort_order": "desc",
    "limit": 50
  }'

USD balances with positive balance

Find all USD balances with a positive balance and include the total count:
curl -X POST "https://YOUR_BLNK_INSTANCE_URL/balances/filter" \
  -H "X-Blnk-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filters": [
      { "field": "currency", "operator": "eq", "value": "USD" },
      { "field": "balance", "operator": "gt", "value": 0 }
    ],
    "include_count": true
  }'

Transactions in date range

Retrieve transactions from Q1 2024:
curl -X POST "https://YOUR_BLNK_INSTANCE_URL/transactions/filter" \
  -H "X-Blnk-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filters": [
      { "field": "created_at", "operator": "gte", "value": "2024-01-01" },
      { "field": "created_at", "operator": "lt", "value": "2024-04-01" }
    ]
  }'

Find all ledgers with “savings” in the name, sorted alphabetically:
curl -X POST "https://YOUR_BLNK_INSTANCE_URL/ledgers/filter" \
  -H "X-Blnk-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filters": [
      { "field": "name", "operator": "ilike", "value": "%savings%" }
    ],
    "sort_by": "name",
    "sort_order": "asc"
  }'

Transactions by balance

Find all transactions for a specific balance with pagination:
curl -X POST "https://YOUR_BLNK_INSTANCE_URL/transactions/filter" \
  -H "X-Blnk-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filters": [
      { "field": "balance_id", "operator": "eq", "value": "bln_abc123" }
    ],
    "include_count": true,
    "limit": 100
  }'

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 →