### Sample Transaction Data Model Source: https://docs.herondata.io/api-reference/enduserintegrations/upload-ocrolus Example representation of transaction data model with consistent fields like amount, description, primary key, timestamp and transaction date across different transaction categories. ```yaml sample_transaction: amount: description: pk: 123 timestamp: '2023-11-07T05:31:56Z' txn_date: 07/08/2025 ``` -------------------------------- ### Define Policy Evaluations API Endpoint - OpenAPI Source: https://docs.herondata.io/api-reference/policy/get-the-policy-evaluations-for-an-end-user Defines the GET endpoint for retrieving policy evaluations from the Heron Data API. Requires API key authentication via x-api-key header. Returns an array of policy evaluations with detailed check results including failed checks, missing data checks, and evaluation outcomes. ```yaml yaml https://app.herondata.io/swagger get /api/end_users/{end_user_id_or_heron_id}/policy_evaluations paths: path: /api/end_users/{end_user_id_or_heron_id}/policy_evaluations method: get servers: - url: https://app.herondata.io description: Production request: security: - title: ApiKeyAuth parameters: query: {} header: x-api-key: type: apiKey cookie: {} parameters: path: end_user_id_or_heron_id: schema: - type: string required: true query: {} header: {} cookie: {} body: {} response: '200': application/json: schemaArray: - type: array items: allOf: - $ref: '#/components/schemas/PolicyEvaluationSchema' examples: example: value: - failed_checks: - attribute_value: attribute_label: value: check: attribute_label: boolean_check: auto_decline: true decline_description: email_template_name: ignore_metric_availability: true is_mandatory: true pass_description: value: true composite_check: auto_decline: true checks: - {} decline_description: email_template_name: ignore_metric_availability: true is_mandatory: true pass_description: type: AND date_check: auto_decline: true decline_description: email_template_name: ignore_metric_availability: true is_mandatory: true pass_description: type: equal value: '2023-12-25' date_delta_to_now_check: auto_decline: true decline_description: email_template_name: ignore_metric_availability: true is_mandatory: true pass_description: type: greater_than value: {} enhanced_sql_check: auto_decline: true check_type: equal column_name: comparison_value: data_type: numeric decline_description: email_template_name: ignore_metric_availability: true is_mandatory: true pass_description: query_name: group: name: numeric_check: auto_decline: true decline_description: email_template_name: ignore_metric_availability: true is_mandatory: true pass_description: type: equal value: sql_check: auto_decline: true column_name: decline_description: email_template_name: ignore_metric_availability: true is_mandatory: true pass_description: query_name: string_check: auto_decline: true decline_description: email_template_name: ignore_metric_availability: true is_mandatory: true pass_description: type: equal value: evaluations: - {} result: pass missing_data_checks: - attribute_value: attribute_label: value: check: ``` -------------------------------- ### GET /api/metrics Source: https://docs.herondata.io/api-reference/endusercalculations/get-enduser-scorecard Retrieves calculated financial data metrics across various categories including data quality, balance, profit/loss, and risk indicators for analysis and monitoring purposes. ```APIDOC ## GET /api/metrics ### Description Retrieves financial data metrics for analysis and monitoring. Metrics cover various categories including data quality, balance, profit and loss, debt, risk flags, forecasts, and machine learning features. ### Method GET ### Endpoint /api/metrics ### Query Parameters - **date_range** (string) - Required - Time period for metric calculation. Valid values include: 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 ### Response #### Success Response (200) - **date_range** (string) - Time period for the metric - **description** (string, nullable) - Description of the metric - **group** (string) - Type of metric (data_quality, processing_quality, balance, profit_and_loss, debt, risk_flag, forecast, heron, ml_feature) - **label** (string) - Slugified metric label - **status** (string, nullable) - Availability status (available, partially_available, not_available, null) - **unit** (string) - Unit of measurement (n, day, ratio, amount, weekday, array, probability) - **value** (any, nullable) - The metric value #### Response Example { ``` -------------------------------- ### GET /api/end_users/{end_user_id_or_heron_id}/policy_evaluations Source: https://docs.herondata.io/api-reference/policy/get-the-policy-evaluations-for-an-end-user Retrieves policy evaluations for a specific end user, identified by their ID or Heron ID. ```APIDOC ## GET /api/end_users/{end_user_id_or_heron_id}/policy_evaluations ### Description This endpoint retrieves a list of policy evaluations associated with a specific end user. The end user can be identified either by their unique `end_user_id` or their `heron_id`. ### Method GET ### Endpoint /api/end_users/{end_user_id_or_heron_id}/policy_evaluations ### Parameters #### Path Parameters - **end_user_id_or_heron_id** (string) - Required - The ID or Heron ID of the end user. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **failed_checks** (array) - A list of failed policy checks. - **missing_data_checks** (array) - A list of checks that failed due to missing data. #### Response Example ```json [ { "failed_checks": [ { "attribute_value": { "attribute_label": "", "value": "" }, "check": { "attribute_label": "", "boolean_check": { "auto_decline": true, "decline_description": "", "email_template_name": "", "ignore_metric_availability": true, "is_mandatory": true, "pass_description": "", "value": true }, "group": "", "name": "" }, "result": "pass" } ], "missing_data_checks": [ { "attribute_value": { "attribute_label": "", "value": "" }, "check": {} } ] } ] ``` ``` -------------------------------- ### GET /api/end_users/{end_user_id_or_heron_id}/evaluate_rules Source: https://docs.herondata.io/api-reference/enduserrules/evaluate-all-rules-for-an-end-user Retrieves the evaluation of rules for a specific end user based on their ID or Heron ID. This endpoint is useful for data quality checks and risk assessments. ```APIDOC ## GET /api/end_users/{end_user_id_or_heron_id}/evaluate_rules ### Description Evaluates and returns the status of rules associated with a specific end user. This can be used to check data quality, compliance, or other rule-based metrics. ### Method GET ### Endpoint /api/end_users/{end_user_id_or_heron_id}/evaluate_rules ### Parameters #### Path Parameters - **end_user_id_or_heron_id** (string) - Required - The unique identifier for the end user, either their ID or Heron ID. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **metric** (object) - Information about the metric being evaluated. - **context** (string) - The context for interpreting the metric (e.g., 'higher_is_better'). - **currency** (string) - The ISO currency code, if applicable. - **date_range** (string) - The date range for the metric (e.g., 'last_180_days'). - **description** (string) - A description of the metric. - **group** (string) - The group the metric belongs to (e.g., 'data_quality'). - **label** (string) - The label or slugified name of the metric. - **status** (string) - The availability status of the metric (e.g., 'not_available'). - **unit** (string) - The unit of measurement for the metric. - **value** (any) - The calculated value of the metric. - **result** (string) - The outcome of the rule evaluation (e.g., 'PASS', 'FAIL'). - **rule** (object) - Information about the rule being evaluated. - **condition** (string) - The condition of the rule (e.g., 'equal'). - **created** (string) - The creation timestamp of the rule. - **date_range** (string) - The date range associated with the rule. - **group** (string) - The group the rule belongs to. - **heron_id** (string) - The unique Heron ID of the rule. - **last_updated** (string) - The last updated timestamp of the rule. - **metric_label** (string) - The label of the metric the rule applies to. - **name** (string) - The name of the rule. - **selector** (object) - Selector criteria for the rule. - **value** (any) - The value used in the rule's condition. - **value_str** (string) - A string representation of the rule's value. #### Response Example ```json [ { "metric": { "context": "higher_is_better", "currency": "", "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": "" }, "result": "PASS", "rule": { "condition": "equal", "created": "2025-09-10T14:35:32.569349", "date_range": "last_180_days", "group": "data_quality_datasource", "heron_id": "rul_CDvekSS6KntJGkXGuLmNhn", "last_updated": "2025-10-22T14:35:32.569400", "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" } } ] ``` ``` -------------------------------- ### GET /api/end_users/{end_user_id_or_heron_id}/scorecard Source: https://docs.herondata.io/api-reference/endusercalculations/get-enduser-scorecard Retrieves a scorecard for a specific end user, including metrics and rule violations. The scorecard can be customized with date parameters. ```APIDOC ## GET /api/end_users/{end_user_id_or_heron_id}/scorecard ### Description Retrieves a scorecard for a specific end user, including metrics and rule violations. The scorecard can be customized with date parameters. ### Method GET ### Endpoint `/api/end_users/{end_user_id_or_heron_id}/scorecard` ### Parameters #### Path Parameters - **end_user_id_or_heron_id** (string) - Required - The unique identifier for the end user or Heron ID. #### Query Parameters - **named_date** (enum) - Optional - Qualitative description for date to calculate scorecard. Possible values: `end_user_created`, `end_user_last_updated`, `last_transaction`, `end_user_last_enriched`, `last_data_source_end_date_or_transaction_timestamp`, `custom_date`. - **date** (string) - Optional - Cut-off date to consider transactions for calculating scorecard (inclusive). Format: `YYYY-MM-DD`. ### Request Example ```json { "named_date": "end_user_created", "date": "2023-01-19" } ``` ### Response #### Success Response (200) - **metrics** (array) - List of metrics for the end user. - **rule_violations** (array) - List of rule violations for the end user. #### Response Example ```json { "metrics": [ { "context": "higher_is_better", "currency": "USD", "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": null } ], "rule_violations": [ { "metric": { "context": "higher_is_better", "currency": "USD", "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": null }, "rule": { "condition": "equal", "created": "2025-09-10T14:35:32.569349", "date_range": "last_180_days", "group": "data_quality_datasource", "heron_id": "rul_CDvekSS6KntJGkXGuLmNhn", "last_updated": "2025-10-22T14:35:32.569400", "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" } } ] } ``` ``` -------------------------------- ### GET /api/transactions/{reference_id_or_heron_id} Source: https://docs.herondata.io/api-reference/enrichedtransactions/get-apitransactions Retrieves an enriched transaction by its reference_id or Heron ID. This endpoint returns a structured enriched transaction object and requires the ApiKeyAuth header for access. ```APIDOC ## GET /api/transactions/{reference_id_or_heron_id}\n\n### Description\nRetrieve a transaction by its reference_id or Heron ID and return enriched transaction data.\n\n### Method\nGET\n\n### Endpoint\nhttps://app.herondata.io/api/transactions/{reference_id_or_heron_id}\n\n### Parameters\n#### Path Parameters\n- **reference_id_or_heron_id** (string) - Required - The reference id or Heron ID of the transaction\n\n#### Query Parameters\n- None\n\n#### Request Body\n- None\n\n### Request Example\n```\n{\n \"reference_id_or_heron_id\": \"txn_kGGs4e39Kr88gzZicnuY5X\"\n}\n```\n\n### Response\n#### Success Response (200)\n- **transaction_enriched** (object) - Description: Enriched transaction payload\n\n#### Response Example\n```\n{\n \"transaction_enriched\": {\n \"heron_id\": \"txn_kGGs4e39Kr88gzZicnuY5X\",\n \"amount\": -42.42\n }\n}\n```\n\n#### Error Response (401)\n- **error** (string) - Unauthorized\n\n#### Response Example\n```\n{\n \"error\": \"Unauthorized\"\n}\n``` ``` -------------------------------- ### Heron Data API: Get End User Scorecard Source: https://docs.herondata.io/api-reference/endusercalculations/get-enduser-scorecard Retrieves the scorecard for a specific end-user or Heron ID. Supports filtering by date parameters like 'end_user_created' or 'last_transaction' and a specific cut-off date. Requires an API key for authentication. Returns metrics and rule violations. ```yaml paths: path: /api/end_users/{end_user_id_or_heron_id}/scorecard method: get servers: - url: https://app.herondata.io description: Production request: security: - title: ApiKeyAuth parameters: query: {} header: x-api-key: type: apiKey cookie: {} parameters: path: end_user_id_or_heron_id: schema: - type: string required: true query: named_date: schema: - type: enum enum: - end_user_created - end_user_last_updated - last_transaction - end_user_last_enriched - last_data_source_end_date_or_transaction_timestamp - custom_date required: false description: Qualitative description for date to calculate scorecard default: null example: end_user_created - type: 'null' required: false description: Qualitative description for date to calculate scorecard default: null example: end_user_created date: schema: - type: string required: false description: >- Cut-off date to consider transactions to for calculating scorecard (inclusive) format: date default: null example: '2023-01-19' - type: 'null' required: false description: >- Cut-off date to consider transactions to for calculating scorecard (inclusive) default: null example: '2023-01-19' header: {} cookie: {} body: {} response: '200': application/json: schemaArray: - type: object properties: metrics: allOf: - items: $ref: '#/components/schemas/Metric' type: array rule_violations: allOf: - items: $ref: '#/components/schemas/RuleViolation' type: array examples: example: value: metrics: - context: higher_is_better currency: 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: rule_violations: - metric: context: higher_is_better currency: 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: rule: condition: equal created: '2025-09-10T14:35:32.569349' date_range: last_180_days group: data_quality_datasource heron_id: rul_CDvekSS6KntJGkXGuLmNhn last_updated: '2025-10-22T14:35:32.569400' 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 description: OK deprecated: false type: path components: schemas: Metric: properties: context: description: >- Context for how to interpret the metric, e.g., whether a higher value is 'better' than a lower value enum: - higher_is_better - lower_is_better - null example: higher_is_better nullable: true type: string currency: description: The ISO currency code for metric, where applicable nullable: true type: string date_range: description: Metric date range enum: - 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 ``` -------------------------------- ### Financial Metrics API Source: https://docs.herondata.io/api-reference/enduserrules/evaluate-all-rules-for-an-end-user Retrieve various financial metrics for analysis, including ratios, balances, cash flow, and scores. ```APIDOC ## GET /websites/herondata_io/metrics ### Description Retrieves a list of available financial metrics. ### Method GET ### Endpoint /websites/herondata_io/metrics ### Parameters #### Query Parameters - **metric_name** (string) - Optional - The name of the specific metric to retrieve. ### Request Example ``` GET /websites/herondata_io/metrics?metric_name=latest_balance ``` ### Response #### Success Response (200) - **metrics** (array) - A list of available metric names. #### Response Example ```json { "metrics": [ "unreconciled_intra_company_transfers_to_p2p_transfers_ratio", "latest_balance", "heron_score" ] } ``` ``` -------------------------------- ### Rule Evaluation API Source: https://docs.herondata.io/api-reference/enduserrules/evaluate-all-rules-for-an-end-user Allows for the creation and evaluation of custom rules based on financial metrics. ```APIDOC ## POST /websites/herondata_io/rules/evaluate ### Description Evaluates a given rule against financial data for a user or a set of conditions. ### Method POST ### Endpoint /websites/herondata_io/rules/evaluate ### Parameters #### Request Body - **rule** (object) - Required - Defines the rule to be evaluated. - **name** (string) - Optional - A descriptive name for the rule. - **selector** (object) - Optional - Key-value pairs to select specific users for rule evaluation. - **value** (number) - Optional - A numeric threshold for the metric. - **value_str** (string) - Optional - A string threshold for the metric. - **metric** (object) - Required - Defines the metric to be used in the rule. - **name** (string) - Required - The name of the metric (e.g., 'latest_balance'). - **result** (string) - Required - The expected outcome of the rule evaluation (PASS, FAIL, NOT_AVAILABLE). ### Request Example ```json { "rule": { "name": "notify_if_debt_investment_count_gt_0_last_180d", "selector": { "is_portfolio": true }, "value": 0 }, "metric": { "name": "debt_service_coverage_ratio" }, "result": "FAIL" } ``` ### Response #### Success Response (200) - **evaluation_result** (string) - The result of the rule evaluation (PASS, FAIL, NOT_AVAILABLE). #### Response Example ```json { "evaluation_result": "PASS" } ``` ``` -------------------------------- ### POST /websites/herondata_io Source: https://docs.herondata.io/api-reference/enduserintegrations/upload-ocrolus Analyzes bank account data including transactions, balances, and financial patterns. Returns categorized transaction data with summary information and request tracking. ```APIDOC ## POST /websites/herondata_io ### Description Analyzes bank account data including transactions, balances, and financial patterns. Returns categorized transaction data with summary information and request tracking. ### Method POST ### Endpoint /websites/herondata_io ### Parameters #### Request Body - **outside_source_deposits** (array) - Optional - External deposit transactions - **payroll** (array) - Optional - Payroll-related transactions - **period_balance_mismatches** (array) - Optional - Balance discrepancy transactions - **ppp_loan_txns** (array) - Optional - Paycheck Protection Program loan transactions - **probable_recurring_txns** (array of arrays) - Optional - Detected recurring transaction patterns - **returned_items** (array) - Optional - Returned transaction items - **round_number_txns** (array) - Optional - Round number transactions - **withdrawals** (array) - Optional - Withdrawal transactions - **withdrawals_max_by_month** (object) - Optional - Monthly maximum withdrawals data - **name** (string) - Optional - Account identifier ### Request Example { "outside_source_deposits": [ { "amount": "", "description": "", "pk": 123, "timestamp": "2023-11-07T05:31:56Z", "txn_date": "07/08/2025" } ], "payroll": [ { "amount": "", "description": "", "pk": 123, "timestamp": "2023-11-07T05:31:56Z", "txn_date": "07/08/2025" } ], "withdrawals": [ { "amount": "", "description": "", "pk": 123, "timestamp": "2023-11-07T05:31:56Z", "txn_date": "07/08/2025" } ], "name": "" } ### Response #### Success Response (201) - **_summary** (object) - Response summary object - **request_id** (string) - Unique UUID per request #### Response Example { "_summary": { "request_id": "" } } ``` -------------------------------- ### Website Evaluation Data Structure Source: https://docs.herondata.io/api-reference/policy/get-the-policy-evaluations-for-an-end-user This section describes the structure of an evaluation for a website, including various check types and their associated configurations and results. ```APIDOC ## Website Evaluation Data Structure ### Description Defines the schema for website evaluation data, encompassing various types of checks (boolean, composite, date, numeric, string, enhanced SQL, SQL) and their configuration parameters. It also includes information about the overall evaluation result. ### Data Structure - **attribute_label** (string) - Optional - A label for an attribute. - **boolean_check** (object) - Optional - Configuration for a boolean check. - **auto_decline** (boolean) - Whether to auto-decline. - **decline_description** (string) - Description for decline. - **email_template_name** (string) - Name of the email template. - **ignore_metric_availability** (boolean) - Whether to ignore metric availability. - **is_mandatory** (boolean) - Whether the check is mandatory. - **pass_description** (string) - Description for passing. - **value** (boolean) - The boolean value to check against. - **composite_check** (object) - Optional - Configuration for a composite check. - **auto_decline** (boolean) - Whether to auto-decline. - **checks** (array) - An array of checks to be composed. - **decline_description** (string) - Description for decline. - **email_template_name** (string) - Name of the email template. - **ignore_metric_availability** (boolean) - Whether to ignore metric availability. - **is_mandatory** (boolean) - Whether the check is mandatory. - **pass_description** (string) - Description for passing. - **type** (string) - The type of composite check (e.g., 'AND'). - **date_check** (object) - Optional - Configuration for a date check. - **auto_decline** (boolean) - Whether to auto-decline. - **decline_description** (string) - Description for decline. - **email_template_name** (string) - Name of the email template. - **ignore_metric_availability** (boolean) - Whether to ignore metric availability. - **is_mandatory** (boolean) - Whether the check is mandatory. - **pass_description** (string) - Description for passing. - **type** (string) - The type of date comparison (e.g., 'equal'). - **value** (string) - The date value to check against (e.g., '2023-12-25'). - **date_delta_to_now_check** (object) - Optional - Configuration for a date delta to now check. - **auto_decline** (boolean) - Whether to auto-decline. - **decline_description** (string) - Description for decline. - **email_template_name** (string) - Name of the email template. - **ignore_metric_availability** (boolean) - Whether to ignore metric availability. - **is_mandatory** (boolean) - Whether the check is mandatory. - **pass_description** (string) - Description for passing. - **type** (string) - The type of date delta comparison (e.g., 'greater_than'). - **value** (object) - The value for the date delta. - **enhanced_sql_check** (object) - Optional - Configuration for an enhanced SQL check. - **auto_decline** (boolean) - Whether to auto-decline. - **check_type** (string) - The type of SQL check (e.g., 'equal'). - **column_name** (string) - The name of the column to check. - **comparison_value** (any) - The value to compare against. - **data_type** (string) - The data type of the column (e.g., 'numeric'). - **decline_description** (string) - Description for decline. - **email_template_name** (string) - Name of the email template. - **ignore_metric_availability** (boolean) - Whether to ignore metric availability. - **is_mandatory** (boolean) - Whether the check is mandatory. - **pass_description** (string) - Description for passing. - **query_name** (string) - The name of the SQL query. - **group** (string) - Optional - A group identifier. - **name** (string) - Optional - The name of the check or evaluation. - **numeric_check** (object) - Optional - Configuration for a numeric check. - **auto_decline** (boolean) - Whether to auto-decline. - **decline_description** (string) - Description for decline. - **email_template_name** (string) - Name of the email template. - **ignore_metric_availability** (boolean) - Whether to ignore metric availability. - **is_mandatory** (boolean) - Whether the check is mandatory. - **pass_description** (string) - Description for passing. - **type** (string) - The type of numeric comparison (e.g., 'equal'). - **value** (string) - The numeric value to check against. - **sql_check** (object) - Optional - Configuration for an SQL check. - **auto_decline** (boolean) - Whether to auto-decline. - **column_name** (string) - The name of the column to check. - **decline_description** (string) - Description for decline. - **email_template_name** (string) - Name of the email template. - **ignore_metric_availability** (boolean) - Whether to ignore metric availability. - **is_mandatory** (boolean) - Whether the check is mandatory. - **pass_description** (string) - Description for passing. - **query_name** (string) - The name of the SQL query. - **string_check** (object) - Optional - Configuration for a string check. - **auto_decline** (boolean) - Whether to auto-decline. - **decline_description** (string) - Description for decline. - **email_template_name** (string) - Name of the email template. - **ignore_metric_availability** (boolean) - Whether to ignore metric availability. - **is_mandatory** (boolean) - Whether the check is mandatory. - **pass_description** (string) - Description for passing. - **type** (string) - The type of string comparison (e.g., 'equal'). - **value** (string) - The string value to check against. - **evaluations** (array) - An array of evaluations. - **result** (string) - The overall result of the evaluation (e.g., 'pass'). ### Passed Checks Structure - **attribute_value** (object) - The value of the attribute that passed. - **attribute_label** (string) - The label of the attribute. - **value** (string) - The value of the attribute. - **check** (object) - The specific check that passed. - **attribute_label** (string) - The label of the attribute associated with the check. - **boolean_check** (object) - Details of a boolean check (see above). - **composite_check** (object) - Details of a composite check (see above). - **date_check** (object) - Details of a date check (see above). - **decline_description** (string) - Description for decline. - **email_template_name** (string) - Name of the email template. - **ignore_metric_availability** (boolean) - Whether to ignore metric availability. ``` -------------------------------- ### Define OcrolusBankAccount Schema Structure Source: https://docs.herondata.io/api-reference/enduserintegrations/upload-ocrolus Schema definition for bank account data including categories, transaction lists, and balance information. Contains references to various transaction types and supports detailed financial data modeling. ```yaml OcrolusBankAccount: properties: account_category: type: string account_number: type: string alternative_lender_transactions: items: $ref: '#/components/schemas/OcrolusTransaction' type: array daily_balances: additionalProperties: type: string type: object debt_consolidator_txns: items: $ref: '#/components/schemas/OcrolusTransaction' type: array deposits_max_by_month: additionalProperties: items: $ref: '#/components/schemas/OcrolusTransaction' nullable: true type: array type: object estimated_expense_txns_list: items: $ref: '#/components/schemas/OcrolusTransaction' type: array estimated_revenue_txns_list: items: $ref: '#/components/schemas/OcrolusTransaction' type: array factor_txns: items: $ref: '#/components/schemas/OcrolusTransaction' type: array holder_country: type: string insurance_credits: items: $ref: '#/components/schemas/OcrolusTransaction' type: array insurance_debits: items: $ref: '#/components/schemas/OcrolusTransaction' type: array interbank_transactions: items: $ref: '#/components/schemas/OcrolusTransaction' type: array merchant_cash_advance_lender_txns: items: $ref: '#/components/schemas/OcrolusTransaction' type: array non_estimated_revenue_txns_list: items: $ref: '#/components/schemas/OcrolusTransaction' type: array nsf_transactions: items: $ref: '#/components/schemas/OcrolusTransaction' type: array nsf_transactions_paid_or_negative_balance: items: $ref: '#/components/schemas/OcrolusTransaction' type: array ``` -------------------------------- ### Upload Ocrolus Data via OpenAPI Source: https://docs.herondata.io/api-reference/enduserintegrations/upload-ocrolus This endpoint allows for the uploading of Ocrolus data associated with a specific end-user. It requires an API key for authentication and accepts a JSON payload containing the Ocrolus response schema. An optional query parameter can be used to skip transaction count checks. ```yaml paths: path: /api/end_users/{end_user_id_or_heron_id}/ocrolus method: post servers: - url: https://app.herondata.io description: Production request: security: - title: ApiKeyAuth parameters: query: {} header: x-api-key: type: apiKey cookie: {} parameters: path: end_user_id_or_heron_id: schema: - type: string required: true description: The `end_user_id` or `heron_id` of EndUser to upload query: skip_num_txns_check: schema: - type: boolean required: false description: Skip the check for the number of transactions in the payload header: {} cookie: {} body: application/json: schemaArray: - type: object properties: response: allOf: - $ref: '#/components/schemas/OcrolusResponse' required: true refIdentifier: '#/components/schemas/OcrolusSchema' requiredProperties: - response examples: example: value: response: bank_accounts: - account_category: account_number: alternative_lender_transactions: - amount: description: pk: 123 timestamp: '2023-11-07T05:31:56Z' txn_date: 07/08/2025 daily_balances: {} debt_consolidator_txns: - amount: description: pk: 123 timestamp: '2023-11-07T05:31:56Z' txn_date: 07/08/2025 deposits_max_by_month: {} estimated_expense_txns_list: - amount: description: pk: 123 timestamp: '2023-11-07T05:31:56Z' txn_date: 07/08/2025 estimated_revenue_txns_list: - amount: description: pk: 123 timestamp: '2023-11-07T05:31:56Z' txn_date: 07/08/2025 factor_txns: - amount: description: pk: 123 timestamp: '2023-11-07T05:31:56Z' txn_date: 07/08/2025 holder_country: insurance_credits: - amount: description: pk: 123 timestamp: '2023-11-07T05:31:56Z' txn_date: 07/08/2025 insurance_debits: - amount: description: pk: 123 timestamp: '2023-11-07T05:31:56Z' txn_date: 07/08/2025 interbank_transactions: - amount: description: pk: 123 timestamp: '2023-11-07T05:31:56Z' txn_date: 07/08/2025 merchant_cash_advance_lender_txns: - amount: description: pk: 123 timestamp: '2023-11-07T05:31:56Z' txn_date: 07/08/2025 non_estimated_revenue_txns_list: - amount: description: pk: 123 timestamp: '2023-11-07T05:31:56Z' txn_date: 07/08/2025 nsf_transactions: - amount: description: pk: 123 timestamp: '2023-11-07T05:31:56Z' txn_date: 07/08/2025 nsf_transactions_paid_or_negative_balance: - amount: description: pk: 123 timestamp: '2023-11-07T05:31:56Z' txn_date: 07/08/2025 nsf_transactions_returned_or_not_paid: - amount: description: pk: 123 ``` -------------------------------- ### API Response Summary Schema Definition Source: https://docs.herondata.io/api-reference/enduserintegrations/upload-ocrolus Defines the schema for successful API responses including a request identifier and structured summary data. Used to standardize response formats in financial transaction APIs. ```yaml _summary: allOf: - properties: request_id: description: Unique UUID per request type: string type: object ``` -------------------------------- ### Bank Access Token Schema Source: https://docs.herondata.io/api-reference/integrations/update-an-integration-link Schema definition for access tokens that grant secure access to banking data. Tokens are encrypted in transit and at rest using custom encryption keys and are write-only. ```APIDOC ## Schema: Bank Access Token ### Description Defines the structure for access tokens used to authenticate with bank institutions. These tokens are encrypted both in transit and at rest using a custom encryption key. The access_token property is write-only and is never returned in API responses. ### Schema Definition - **Type**: object - **Required Properties**: access_token - **Additional Schema Metadata**: The access_token property is marked as writeOnly per the OpenAPI specification, indicating it is only used in request bodies. ### Properties #### access_token (string) - **Description**: The generated token that grants access to the bank - **Type**: string - **Example**: `access-sandbox-de3ce8ef-33f8-452c-a685-8671031fc0f6` - **Required**: Yes - **Write-Only**: Yes - This property is only used in requests and will not be included in any response bodies. ### Usage Example This schema is typically used as a request body component for endpoints that establish or refresh bank connections. ```json { "access_token": "access-sandbox-de3ce8ef-33f8-452c-a685-8671031fc0f6" } ``` ```