Endpoint
Filters accounts using a JSON request body. This endpoint provides more advanced filtering capabilities than the GET endpoint, including complex queries and result counting.
Request Body
Array of filter objects to apply. Each filter specifies a field, operator, and value The field name to filter on (e.g., “currency”, “created_at”, “bank_name”)
The comparison operator. Supported values:
eq: Equals
ne: Not equals
gt: Greater than
gte: Greater than or equal
lt: Less than
lte: Less than or equal
in: In array
like: Pattern matching
ilike: Case-insensitive pattern matching
The value to compare against. Type depends on the field
The maximum number of accounts to return
The number of accounts to skip
Whether to include the total count of matching records in the response
Response
When include_count is false, returns an array of account objects.
When include_count is true, returns an object with data and total_count.
Array of account objects matching the filter criteria The unique identifier for the account
The bank or financial institution name
The ID of the associated balance
The ID of the identity that owns this account
Total number of accounts matching the filter (only when include_count: true)
Example Request
{
"filters" : [
{
"field" : "currency" ,
"operator" : "eq" ,
"value" : "USD"
},
{
"field" : "created_at" ,
"operator" : "gte" ,
"value" : "2024-01-01"
}
],
"limit" : 20 ,
"offset" : 0 ,
"include_count" : true
}
Example Response (with count)
{
"data" : [
{
"account_id" : "acc_789ghi" ,
"name" : "Main Account" ,
"number" : "1234567890" ,
"bank_name" : "Blnk Bank" ,
"currency" : "USD" ,
"balance_id" : "bln_321xyz" ,
"identity_id" : "idt_123abc" ,
"ledger_id" : "ldg_456def" ,
"created_at" : "2024-03-04T12:00:00Z" ,
"meta_data" : {
"account_type" : "savings"
}
}
],
"total_count" : 145
}
Example Response (without count)
[
{
"account_id" : "acc_789ghi" ,
"name" : "Main Account" ,
"number" : "1234567890" ,
"bank_name" : "Blnk Bank" ,
"currency" : "USD" ,
"balance_id" : "bln_321xyz" ,
"identity_id" : "idt_123abc" ,
"ledger_id" : "ldg_456def" ,
"created_at" : "2024-03-04T12:00:00Z" ,
"meta_data" : {
"account_type" : "savings"
}
}
]
Complex Filter Examples
Multiple Currency Filter
{
"filters" : [
{
"field" : "currency" ,
"operator" : "in" ,
"value" : [ "USD" , "EUR" , "GBP" ]
}
],
"limit" : 50
}
Date Range with Pattern Matching
{
"filters" : [
{
"field" : "created_at" ,
"operator" : "gte" ,
"value" : "2024-01-01"
},
{
"field" : "created_at" ,
"operator" : "lte" ,
"value" : "2024-12-31"
},
{
"field" : "bank_name" ,
"operator" : "ilike" ,
"value" : "%main%"
}
],
"limit" : 100 ,
"include_count" : true
}
Error Responses
Error message describing what went wrong
Common Errors
400 Bad Request : Invalid filter syntax or unsupported operator