curl --request GET \
--url https://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/evaluate_rules \
--header 'x-api-key: <api-key>'[
{
"metric": {
"context": "higher_is_better",
"currency": "<string>",
"date_range": "last_180_days",
"description": "The number of unique transactions with a timestamp",
"group": "data_quality",
"label": "unique_transactions",
"status": "not_available",
"unit": "n",
"value": 42.42
},
"result": "PASS",
"rule": {
"condition": "equal",
"created": "2025-10-31T10:00:54.694064",
"date_range": "last_180_days",
"group": "data_quality_datasource",
"heron_id": "rul_HAL9mhrwYdTDiFY9znHhE7",
"last_updated": "2025-12-12T10:00:54.694106",
"metric_label": "unique_transactions",
"name": "notify_if_debt_investment_count_gt_0_last_180d",
"selector": {
"is_portfolio": true
},
"value": 42.42,
"value_str": "mrc_12345678ijwdd321d921"
}
}
]curl --request GET \
--url https://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/evaluate_rules \
--header 'x-api-key: <api-key>'[
{
"metric": {
"context": "higher_is_better",
"currency": "<string>",
"date_range": "last_180_days",
"description": "The number of unique transactions with a timestamp",
"group": "data_quality",
"label": "unique_transactions",
"status": "not_available",
"unit": "n",
"value": 42.42
},
"result": "PASS",
"rule": {
"condition": "equal",
"created": "2025-10-31T10:00:54.694064",
"date_range": "last_180_days",
"group": "data_quality_datasource",
"heron_id": "rul_HAL9mhrwYdTDiFY9znHhE7",
"last_updated": "2025-12-12T10:00:54.694106",
"metric_label": "unique_transactions",
"name": "notify_if_debt_investment_count_gt_0_last_180d",
"selector": {
"is_portfolio": true
},
"value": 42.42,
"value_str": "mrc_12345678ijwdd321d921"
}
}
]Ok
Show child attributes
Context for how to interpret the metric, e.g., whether a higher value is 'better' than a lower value
higher_is_better, lower_is_better, "higher_is_better"
The ISO currency code for metric, where applicable
Metric date range
latest, last_30_days, last_90_days, last_120_days, last_180_days, last_365_days, next_30_days, next_60_days, next_90_days, next_180_days, last_1_calendar_months, last_3_calendar_months, last_4_calendar_months, last_6_calendar_months, last_12_calendar_months, last_15_calendar_months, last_24_calendar_months, last_1_full_calendar_months, last_2_full_calendar_months, last_3_full_calendar_months, last_6_full_calendar_months, last_12_full_calendar_months, last_60_days, last_45_days, last_2_calendar_months "last_180_days"
Description of metric
"The number of unique transactions with a timestamp"
The type of metric
data_quality, processing_quality, balance, profit_and_loss, debt, risk_flag, forecast, heron, ml_feature "data_quality"
Metric label, slugified
"unique_transactions"
either 'calculated' or 'not_available' depending on the requested date range vs. date range of the data
available, partially_available, not_available, "not_available"
The unit of measurement for metric
n, day, ratio, amount, weekday, array, probability "n"
The metric value
42.42
PASS, FAIL, NOT_AVAILABLE Show child attributes
Key for how to compare metric value to rule value
equal, not_equal, greater_than, greater_than_or_equal, less_than, less_than_or_equal, contains "equal"
When the rule was created in Heron system
"2025-10-31T10:00:54.694064"
Date range corresponding to metric
latest, last_30_days, last_90_days, last_120_days, last_180_days, last_365_days, next_30_days, next_60_days, next_90_days, next_180_days, last_1_calendar_months, last_3_calendar_months, last_4_calendar_months, last_6_calendar_months, last_12_calendar_months, last_15_calendar_months, last_24_calendar_months, last_1_full_calendar_months, last_2_full_calendar_months, last_3_full_calendar_months, last_6_full_calendar_months, last_12_full_calendar_months, last_60_days, last_45_days, last_2_calendar_months "last_180_days"
Used to display rules by the stage in the underwriting workflow to which they apply.
data_quality_datasource, data_quality_account, data_quality_transaction, "data_quality_datasource"
Unique id for rule generated by Heron
"rul_HAL9mhrwYdTDiFY9znHhE7"
When the rule was last updated in Heron system
"2025-12-12T10:00:54.694106"
Label corresponding to metric
data_volume, date_range, date_range_with_data_sources, data_freshness, has_balance_ratio, data_coverage, accounts, potentially_duplicated_account_pairs, category_coverage, inflows, outflows, deposit_days, net_amount, inflow_monthly_avg_amount, inflow_amount, inflow_growth_rate, merchant_coverage, confidence, revenue_anomalies, last_debt_investment, last_debt_investment_days, merchant_heron_ids, distinct_mcas, distinct_mcas_from_outflows, distinct_mcas_from_inflows, latest_largest_mca_funding_amount, min_revenue_count_per_statement_ignoring_savings_and_loc_accounts, max_negative_balance_days_per_statement, min_total_revenue_per_statement, max_low_balance_days_per_statement, min_average_daily_balance_per_statement, has_unreconciled_data, revenue_daily_average, cogs_daily_average, opex_daily_average, debt_repayment_daily_average, debt_investment, debt_investors, nsf_fees, nsf_days, inflow_daily_average, average_monthly_revenue_sources, debt_investment_count, debt_collection, tax_payments, tax_payment_amount, unconnected_account_ratio, outflow_daily_average, revenue_sources, atm_withdrawals, revenue, annualized_revenue, cogs, average_credit_card_spend, opex, revenue_profit_and_loss, annualized_revenue_profit_and_loss, cogs_profit_and_loss, opex_profit_and_loss, revenue_monthly_average, number_months_revenue_less_monthly_target, min_number_of_revenue_deposits, debt_repayment, revenue_growth_rate, category_debt_repayment_count, category_other_expenses_count, category_revenue_count, category_postage_count, category_debt_investment_count, category_atm_cash_outflows_count, category_rent_count, insurance_in_out_ratio, rent_in_out_ratio, taxes_in_out_ratio, travel_in_out_ratio, company_investments_in_out_ratio, atm_cash_outflows_in_out_ratio, overdraft_nsf_fees_in_out_ratio, reconciled_intra_company_transfers_to_insurance_ratio, insurance_to_general_payment_ratio, insurance_to_advertising_ratio, insurance_to_credit_card_ratio, insurance_to_check_deposits_ratio, insurance_to_atm_cash_inflows_ratio, insurance_to_debt_repayment_ratio, insurance_to_charges_fees_ratio, insurance_to_travel_ratio, insurance_to_inventory_ratio, insurance_to_none_ratio, equity_investment_to_advertising_ratio, equity_investment_to_debt_repayment_ratio, equity_investment_to_charges_fees_ratio, equity_investment_to_unreconciled_intra_company_transfers_ratio, equity_investment_to_travel_ratio, equity_investment_to_company_investments_ratio, general_payment_to_credit_card_ratio, general_payment_to_p2p_transfers_ratio, general_payment_to_company_investments_ratio, general_payment_to_none_ratio, debt_investment_to_overdraft_nsf_fees_ratio, debt_investment_to_other_expenses_ratio, debt_investment_to_none_ratio, advertising_to_p2p_transfers_ratio, advertising_to_other_expenses_ratio, credit_card_to_check_deposits_ratio, credit_card_to_charges_fees_ratio, credit_card_to_travel_ratio, credit_card_to_inventory_ratio, credit_card_to_revenue_ratio, credit_card_to_payroll_and_consultants_ratio, credit_card_to_none_ratio, rent_to_check_deposits_ratio, rent_to_postage_ratio, rent_to_special_outflows_ratio, rent_to_travel_ratio, rent_to_p2p_transfers_ratio, rent_to_payroll_and_consultants_ratio, check_deposits_to_debt_repayment_ratio, check_deposits_to_postage_ratio, check_deposits_to_unreconciled_intra_company_transfers_ratio, check_deposits_to_revenue_ratio, special_inflows_to_charges_fees_ratio, special_inflows_to_utilities_ratio, special_inflows_to_unreconciled_intra_company_transfers_ratio, special_inflows_to_travel_ratio, special_inflows_to_revenue_ratio, special_inflows_to_atm_cash_outflows_ratio, special_inflows_to_payroll_and_consultants_ratio, refunds_to_atm_cash_inflows_ratio, refunds_to_charges_fees_ratio, refunds_to_utilities_ratio, refunds_to_unreconciled_intra_company_transfers_ratio, refunds_to_travel_ratio, refunds_to_overdraft_nsf_fees_ratio, refunds_to_atm_cash_outflows_ratio, atm_cash_inflows_to_charges_fees_ratio, atm_cash_inflows_to_utilities_ratio, atm_cash_inflows_to_unreconciled_intra_company_transfers_ratio, atm_cash_inflows_to_atm_cash_outflows_ratio, atm_cash_inflows_to_other_expenses_ratio, debt_repayment_to_taxes_ratio, debt_repayment_to_postage_ratio, debt_repayment_to_special_outflows_ratio, debt_repayment_to_atm_cash_outflows_ratio, debt_repayment_to_payroll_and_consultants_ratio, check_outflows_to_charges_fees_ratio, check_outflows_to_utilities_ratio, check_outflows_to_travel_ratio, check_outflows_to_p2p_transfers_ratio, check_outflows_to_revenue_ratio, check_outflows_to_other_expenses_ratio, check_outflows_to_payroll_and_consultants_ratio, taxes_to_travel_ratio, taxes_to_p2p_transfers_ratio, taxes_to_revenue_ratio, taxes_to_atm_cash_outflows_ratio, taxes_to_other_expenses_ratio, taxes_to_payroll_and_consultants_ratio, charges_fees_to_postage_ratio, charges_fees_to_overdraft_nsf_fees_ratio, charges_fees_to_revenue_ratio, charges_fees_to_company_investments_ratio, charges_fees_to_other_expenses_ratio, charges_fees_to_none_ratio, utilities_to_postage_ratio, utilities_to_special_outflows_ratio, utilities_to_travel_ratio, utilities_to_overdraft_nsf_fees_ratio, utilities_to_other_expenses_ratio, postage_to_unreconciled_intra_company_transfers_ratio, postage_to_p2p_transfers_ratio, postage_to_none_ratio, unreconciled_intra_company_transfers_to_travel_ratio, unreconciled_intra_company_transfers_to_p2p_transfers_ratio, unreconciled_intra_company_transfers_to_atm_cash_outflows_ratio, unreconciled_intra_company_transfers_to_other_expenses_ratio, special_outflows_to_p2p_transfers_ratio, special_outflows_to_atm_cash_outflows_ratio, travel_to_p2p_transfers_ratio, travel_to_inventory_ratio, travel_to_other_expenses_ratio, travel_to_payroll_and_consultants_ratio, travel_to_none_ratio, p2p_transfers_to_overdraft_nsf_fees_ratio, p2p_transfers_to_atm_cash_outflows_ratio, inventory_to_overdraft_nsf_fees_ratio, inventory_to_company_investments_ratio, inventory_to_atm_cash_outflows_ratio, inventory_to_other_expenses_ratio, overdraft_nsf_fees_to_other_expenses_ratio, revenue_to_payroll_and_consultants_ratio, latest_balance, balance_minimum, balance_maximum, balance_average, change_in_balance, negative_balance_days, negative_balance_days_by_account, mean_balance_velocity, mean_abs_balance_velocity, weekday_balance_average, weekday_with_highest_avg, weekday_with_lowest_avg, gross_operating_cashflow_daily_average, net_operating_cashflow_daily_average, gross_operating_cashflow, net_operating_cashflow, gross_operating_cashflow_profit_and_loss, net_operating_cashflow_profit_and_loss, net_operating_cashflow_monthly_average, debt_service_coverage_ratio, predicted_nsf_fees, predicted_balance_daily_average, heron_score "unique_transactions"
Description of rule. Sent with webhook response, so can be used as a reference to the rule
140"notify_if_debt_investment_count_gt_0_last_180d"
key-value pairs of the desired selector that should select whichend users to apply this rule. They are evaluated as an AND condition(all must be true to run this rule for an end user). Leave empty toapply to all end users.
Show child attributes
{ "is_portfolio": true }Numeric value to compare to a metric; use this when the threshold is numeric
42.42
String value to compare to a metric; use this when the threshold is a string
"mrc_12345678ijwdd321d921"
Was this page helpful?