Overview
The Data API lets you read, query, and filter data stored in a Blnk Core instance through Blnk Cloud. It provides read-only access to Core data and is commonly used for dashboards, analytics, reporting, and back-office operations.How it works
- All requests go through Blnk Cloud, not directly to Core.
- Every request must target a specific Core instance using instance_id.
- You authenticate using a Cloud access token.
- Blnk Cloud routes the request to the correct Core instance and returns the response.
URL structure
Base URL:instance_id as a query parameter.
Listing resources
To list ledgers, balances, transactions, or identities, the general pattern is:page and pageSize are optional. If you omit them, defaults apply:page=1pageSize=30for ledgers,pageSize=20for balances, transactions, and identities.
| Resource | Path |
|---|---|
| Ledgers | /ledgers |
| Balances | /balances |
| Transactions | /transactions |
| Identities | /identities |
Fetch resource details
To retrieve details for a single ledger, balance, transaction, or identity by ID, use the detail routes. The general pattern is:| Resource | Path |
|---|---|
| Ledger | /data/ledgers/:ledger_id |
| Balance | /data/balances/:balance_id |
| Transaction | /data/transactions/:transaction_id |
| Identity | /data/identities/:identity_id |
Working with filters
The Data API uses suffixes on field names to express filter operators. Instead of sending operators as separate parameters, you append a suffix to the field name to indicate how the value should be compared.Supported operators
| Operator | Suffix | Meaning | Example |
|---|---|---|---|
| Equal | _eq | equals | currency_eq=USD |
| Not equal | _ne | not equals | status_ne=PENDING |
| Greater than | _gt | > | amount_gt=100 |
| Greater/eq | _gte | ≥ | amount_gte=50 |
| Less than | _lt | < | amount_lt=500 |
| Less/eq | _lte | ≤ | amount_lte=500 |
| In | _in | in list | status_in=APPLIED,SCHEDULED |
| Between | _between | between | created_at_between=2025-01-01T00:00:00Z|2025-01-31T23:59:59Z |
| Like | _like | pattern match | reference_like=ref_% |
| ILike | _ilike | case-insensitive | description_ilike=%fee% |
Operator-specific rules
-
BETWEEN:
- Provide two values separated by a single pipe
| - Encode the pipe as
%7Cin URLs
Example - Provide two values separated by a single pipe
-
IN:
- Provide comma-separated values
Example -
LIKE / ILIKE:
- Use SQL-style wildcards.
%matches any sequence of characters._matches a single character.
Example
Example: Filtering transactions
Here’s an example of how filter operators can be used together in a request:Filterable fields by resource
The table below lists the fields you can use for filtering on each Data API resource.| Resource | Fields |
|---|---|
| Ledgers | ledger_id, name, created_at, meta_data, meta_data.<path> |
| Balances | balance_id, ledger_id, identity_id, indicator, currencybalance, credit_balance, debit_balanceinflight_balance, inflight_credit_balance, inflight_debit_balancecreated_at, meta_data |
| Transactions | transaction_id, parent_transaction, amount, currencysource, destination, balance_id, referencestatus, created_at, effective_date, precision, meta_data |
| Identities | identity_id, first_name, last_name, other_names, gender, dobemail_address, phone_number, nationality, street, countrystate, organization_name, category, identity_typepost_code, city, created_at, meta_data |
Nestedmeta_datakeys use dot notation, and the operator suffix goes at the end. Example:meta_data.myApp.channel_eq=web.