Search Transactions

POST /api/v1/transactions/search

Search transactions using rule-engine style conditions. This provides more powerful filtering than the basic List endpoint.

Request Body

FieldTypeDefaultDescription
conditionsarray-Required. Array of condition objects (combined with AND)
currencystring-Filter by account currency code (e.g. USD). Resolved to the org's accounts of that currency and AND-combined with conditions.
pagenumber1Page number
limitnumber100Items per page (max 500)
sort_bystringdateField to sort by
sort_orderstringdescSort order: asc or desc
fieldsarrayallArray of field names to return

Condition Object

Each condition in the conditions array:

FieldTypeRequiredDescription
fieldstringYesTransaction field to filter on
operatorstringYesComparison operator
valueany*Value to compare against
case_sensitivebooleanNoCase sensitivity for string ops (default: false)

*Value is required for all operators except is_null and is_not_null.

Allowed Fields

FieldDescription
particularsTransaction description
inflowCredit amount
outflowDebit amount
balanceAccount balance
dateTransaction date
typeTransaction type
categoryCategory name
entityEntity name
accountAccount ID
commentsNotes
poPurchase order

Operators

String Operators

OperatorDescription
equalsExact match (case-insensitive by default)
not_equalsDoes not match
containsSubstring match
not_containsDoes not contain substring
starts_withStarts with prefix
ends_withEnds with suffix
regexRegular expression match

Numeric Operators

OperatorDescription
equalsEqual to
not_equalsNot equal to
greater_thanGreater than
less_thanLess than
greater_than_or_equalGreater than or equal
less_than_or_equalLess than or equal

Null Operators

OperatorDescription
is_nullField is null/empty
is_not_nullField has value

Date Operators

OperatorDescription
within_last_daysDate within last N days
older_than_daysDate older than N days

Examples

Find ATM Withdrawals Over 1000

curl -X POST "https://statements.finopsbricks.com/api/v1/transactions/search" \
  -H "api-key: fob_stm_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "conditions": [
      {"field": "particulars", "operator": "contains", "value": "ATM"},
      {"field": "outflow", "operator": "greater_than", "value": 1000}
    ],
    "limit": 50
  }'

Find Uncategorized Transactions

curl -X POST "https://statements.finopsbricks.com/api/v1/transactions/search" \
  -H "api-key: fob_stm_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "conditions": [
      {"field": "category", "operator": "is_null"}
    ]
  }'

Find Transactions from Last 30 Days

curl -X POST "https://statements.finopsbricks.com/api/v1/transactions/search" \
  -H "api-key: fob_stm_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "conditions": [
      {"field": "date", "operator": "within_last_days", "value": 30}
    ],
    "sort_by": "date",
    "sort_order": "desc"
  }'

Find USD Transactions Over 100 (Currency Filter)

curl -X POST "https://statements.finopsbricks.com/api/v1/transactions/search" \
  -H "api-key: fob_stm_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "conditions": [
      {"field": "inflow", "operator": "greater_than", "value": 100}
    ],
    "currency": "USD"
  }'

Find Transactions Using Regex

curl -X POST "https://statements.finopsbricks.com/api/v1/transactions/search" \
  -H "api-key: fob_stm_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "conditions": [
      {"field": "particulars", "operator": "regex", "value": "INV-\\d{4,6}"}
    ]
  }'

Response

Same format as List Transactions:

{
  "data": [
    {
      "id": "abc123xyz789",
      "date": "2025-01-05",
      "particulars": "ATM WITHDRAWAL",
      "inflow": 0,
      "outflow": 5000.00,
      "balance": 45000.00,
      "entity": null,
      "category": "cash_withdrawal",
      "type": "expense",
      "po": null,
      "comments": null,
      "account_id": "acc123",
      "account_name": "Main Account",
      "account_currency": "INR",
      "statement": "stmt123"
    }
  ],
  "page_context": {
    "count": 25,
    "page": 1,
    "per_page": 100,
    "total": 150,
    "has_more": true
  }
}

Errors

CodeDescription
400Invalid conditions, unknown field, or invalid operator
401Invalid or missing API credentials
403API key lacks transactions:read permission

See Also