Practical examples of using Blnk’s Filter API to query transactions, balances, ledgers, and other collections.
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
}'
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
}'
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" }
]
}'
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"
}'
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
}'
Was this page helpful?