{"components":{"schemas":{"AccountBalance":{"properties":{"closing_amount":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"The closing balance for the day","example":25000.45},"currency":{"description":"Currency of the balance","example":"USD","type":"string"},"date":{"description":"Date of the balance","example":"2022-01-01","format":"date","type":"string"}},"required":["closing_amount"],"type":"object"},"AccountBalance1":{"properties":{"account_id":{"example":"checking_account_202348","maxLength":400,"type":"string"},"batch_closing_balance":{"description":"The closing balance for this account after the transactions in this batch","example":25000.45,"type":"number"}},"required":["account_id","batch_closing_balance"],"type":"object"},"AccountDataSourceReconciliationRange":{"properties":{"end_date":{"format":"date","type":"string"},"reconciliation_report_by_date":{"additionalProperties":{"items":{"$ref":"#/components/schemas/DataSourceAccountDateReconciliationMetrics"},"type":"array"},"type":"object"},"reconciliation_status":{"enum":["no_data","single_source","reconciled","unreconciled"],"type":"string"},"start_date":{"format":"date","type":"string"}},"required":["end_date","reconciliation_report_by_date","reconciliation_status","start_date"],"type":"object"},"AccountDataSourcesReconciliation":{"properties":{"account_number":{"type":"string"},"ranges":{"items":{"$ref":"#/components/schemas/AccountDataSourceReconciliationRange"},"type":"array"}},"required":["account_number","ranges"],"type":"object"},"AccountTransactionDataCoverage":{"properties":{"account_number":{"type":"string"},"data_source_type":{"type":"string"},"ranges":{"items":{"$ref":"#/components/schemas/AccountTransactionDataCoverageRange"},"type":"array"}},"required":["account_number","data_source_type","ranges"],"type":"object"},"AccountTransactionDataCoverageRange":{"properties":{"data_source_account":{"allOf":[{"$ref":"#/components/schemas/DataSourceAccount"}],"nullable":true},"end_date":{"format":"date","type":"string"},"has_coverage":{"type":"boolean"},"is_enabled":{"nullable":true,"type":"boolean"},"start_date":{"format":"date","type":"string"}},"required":["end_date","has_coverage","start_date"],"type":"object"},"Address":{"properties":{"city":{"nullable":true,"type":"string"},"line_1":{"nullable":true,"type":"string"},"line_2":{"nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"type":"object"},"AddressLocation":{"properties":{"lat":{"type":"number"},"lng":{"type":"number"}},"type":"object"},"Analysis":{"properties":{"active":{"nullable":true,"type":"string"},"dpv_cmra":{"nullable":true,"type":"string"},"dpv_footnotes":{"nullable":true,"type":"string"},"dpv_match_code":{"nullable":true,"type":"string"},"dpv_no_stat":{"nullable":true,"type":"string"},"dpv_vacant":{"nullable":true,"type":"string"},"footnotes":{"nullable":true,"type":"string"}},"type":"object"},"Annotation":{"properties":{"annotator":{"allOf":[{"$ref":"#/components/schemas/AnnotatorPublic"}],"readOnly":true},"category":{"allOf":[{"$ref":"#/components/schemas/Category1"}],"readOnly":true},"confidence":{"readOnly":true,"type":"number"},"model_version":{"readOnly":true,"type":"string"}},"type":"object"},"AnnotationSettings":{"properties":{"annotators":{"items":{"$ref":"#/components/schemas/AnnotatorSettings"},"maxItems":10,"type":"array"},"heron_ai_chunk_size":{"type":"integer"},"heron_ai_counterparty_extraction_and_clustering_enabled":{"type":"boolean"},"heron_ai_counterparty_extraction_chunk_size":{"type":"integer"},"llm_counterparty_extraction_and_clustering_enabled":{"type":"boolean"},"llm_counterparty_extraction_chunk_size":{"type":"integer"},"reconcile":{"type":"boolean"},"reconcile_version":{"type":"string"},"slug":{"enum":["24","30","171","capchase","gb_sme_lend_2","gb_sme_lender","smartbiz_loans","us_consumer","us_sme_lend_2","us_sme_lender"],"type":"string"},"split_intra_co_transfers_to_inflows_outflows":{"type":"boolean"},"split_p2p_to_inflows_outflows":{"type":"boolean"}},"type":"object"},"AnnotatorPublic":{"properties":{"context":{"enum":["sync","async_","manual","undetermined"],"type":"string"},"priority_type":{"enum":["gold_standard","client_feedback","tagging_ui","reconcile","heuristic","classifier","undetermined","positions_detection"],"type":"string"}},"required":["context","priority_type"],"type":"object"},"AnnotatorSettings":{"properties":{"async_":{"type":"boolean"},"confidence_threshold":{"maximum":1.0,"minimum":0.0,"type":"number"},"label":{"pattern":"^(heuristics|rich_heuristics|distilbert|random_forest|heron_ai_.+)$","type":"string"},"sync":{"type":"boolean"}},"type":"object"},"AnomalyParams":{"properties":{"category_label_or_heron_id":{"description":"Label or Heron ID of category to find anomalies for","example":"Revenue","type":"string"}},"required":["category_label_or_heron_id"],"type":"object"},"AnomalySchema":{"properties":{"amount":{"description":"Converted amount of transaction in currency","example":42.42,"type":"number"},"anomaly_score":{"description":"Anomaly score 0-1, where 1 is very anomalous, and 0 is not anomalous","example":0.5,"type":"number"},"currency":{"description":"Currency code for amount that transaction was converted to","example":"USD","type":"string"},"heron_id":{"description":"Heron ID of the Transaction","example":"txn_YvYbnQ3guKpqTbd3SkYyaa","type":"string"},"reference_id":{"description":"Customer-provided reference ID for the Transaction","example":"1342db06-feb7-4c33-a157-4351d74a98e9","type":"string"}},"type":"object"},"AnyMarshmallowSchema":{"additionalProperties":true,"properties":{},"type":"object"},"ApiKeyCreatedSchema":{"properties":{"created":{"format":"date-time","readOnly":true,"type":"string"},"heron_id":{"readOnly":true,"type":"string"},"is_active":{"readOnly":true,"type":"boolean"},"name":{"readOnly":true,"type":"string"},"token":{"description":"Full token - shown only once","readOnly":true,"type":"string"},"token_prefix":{"readOnly":true,"type":"string"}},"type":"object"},"ApiKeyStatusSchema":{"properties":{"heron_id":{"readOnly":true,"type":"string"},"is_active":{"readOnly":true,"type":"boolean"}},"type":"object"},"ApiKeyWithLastUsedSchema":{"properties":{"created":{"format":"date-time","readOnly":true,"type":"string"},"heron_id":{"readOnly":true,"type":"string"},"is_active":{"readOnly":true,"type":"boolean"},"last_used":{"format":"date-time","nullable":true,"readOnly":true,"type":"string"},"name":{"readOnly":true,"type":"string"},"token_prefix":{"readOnly":true,"type":"string"}},"type":"object"},"AppStoreSchema":{"properties":{"applications":{"items":{"$ref":"#/components/schemas/Application"},"type":"array"}},"type":"object"},"Application":{"properties":{"cta":{"$ref":"#/components/schemas/CTA"},"description":{"description":"A brief description of the application.","example":"This is an example application.","type":"string"},"file_classes":{"example":[{"description":"description1","name":"file_class1"},{"description":"description2","name":"file_class2"}],"items":{"$ref":"#/components/schemas/FileClass"},"type":"array"},"heron_id":{"example":"asa_1a833hPPXwu8BrzFhoDVJL","type":"string"},"image":{"description":"URL to the application's logo","example":"https://example.com/image.png","format":"url","type":"string"},"integrations":{"example":["integration1","integration2"],"items":{"type":"string"},"type":"array"},"is_enabled":{"example":true,"type":"boolean"},"name":{"description":"The name of the application.","example":"Example App","type":"string"},"priority":{"example":1,"type":"integer"},"tags":{"example":["tag1","tag2"],"items":{"type":"string"},"type":"array"},"type":{"description":"The type of the application.","enum":["enricher","integration","ingestion","parser","check","analytics","workflow"],"example":"enricher","type":"string"},"use_cases":{"example":["use_case1","use_case2"],"items":{"type":"string"},"type":"array"}},"required":["description","heron_id","is_enabled","name","priority","type"],"type":"object"},"AsyncScorecardQueryParams":{"properties":{"date":{"description":"Cut-off date to consider transactions to for calculating scorecard (inclusive)","example":"2023-01-19","format":"date","type":"string"}},"required":["date"],"type":"object"},"AvailableEnvironments":{"properties":{"default_environment":{"description":"Default environment for the user (username)","example":"heron_data","type":"string"},"organizations":{"description":"List of organizations available to the user","example":[{"environments":[{"alias":"Development","environment":"dev","username":"dev"},{"alias":"Staging","environment":"staging","username":"staging"}],"name":"My Organization","slug":"my-organization"}],"items":{"allOf":[{"$ref":"#/components/schemas/AvailableEnvironmentsOrganization"}],"description":"List of organizations available to the user"},"type":"array"}},"type":"object"},"AvailableEnvironmentsEnvironment":{"properties":{"alias":{"description":"Alias for the environment","example":"Development","type":"string"},"environment":{"description":"Environment name","example":"dev","type":"string"},"username":{"description":"Name of the environment","example":"dev","type":"string"}},"type":"object"},"AvailableEnvironmentsOrganization":{"properties":{"environments":{"description":"List of environments available to the user","example":["dev","staging","prod"],"items":{"allOf":[{"$ref":"#/components/schemas/AvailableEnvironmentsEnvironment"}],"description":"List of environments available to the user"},"type":"array"},"name":{"description":"Name of the organization","example":"My Organization","type":"string"},"slug":{"description":"Slug of the organization","example":"my-organization","type":"string"}},"type":"object"},"BalanceSheetCategories":{"properties":{"current_assets":{"additionalProperties":{"description":"A list of example line item labels that map to this category","items":{"type":"string"},"type":"array"},"type":"object"},"current_liabilities":{"additionalProperties":{"description":"A list of example line item labels that map to this category","items":{"type":"string"},"type":"array"},"type":"object"},"equity":{"additionalProperties":{"description":"A list of example line item labels that map to this category","items":{"type":"string"},"type":"array"},"type":"object"},"fixed_assets":{"additionalProperties":{"description":"A list of example line item labels that map to this category","items":{"type":"string"},"type":"array"},"type":"object"},"non_current_liabilities":{"additionalProperties":{"description":"A list of example line item labels that map to this category","items":{"type":"string"},"type":"array"},"type":"object"},"other_assets":{"additionalProperties":{"description":"A list of example line item labels that map to this category","items":{"type":"string"},"type":"array"},"type":"object"}},"type":"object"},"BalanceSheetReport":{"properties":{"extracted_totals":{"allOf":[{"$ref":"#/components/schemas/BalanceSheetTotalsGroup"}],"default":null,"nullable":true},"line_items":{"default":null,"items":{"$ref":"#/components/schemas/BalanceSheetReportLineItem"},"nullable":true,"type":"array"},"summed_totals":{"allOf":[{"$ref":"#/components/schemas/BalanceSheetTotalsGroup"}],"default":null,"nullable":true},"time_period":{"allOf":[{"$ref":"#/components/schemas/BalanceSheetTimePeriod"}],"default":null,"nullable":true}},"type":"object"},"BalanceSheetReportLineItem":{"properties":{"amount":{"default":null,"nullable":true,"type":"number"},"category":{"default":null,"enum":["current_assets","fixed_assets","other_assets","current_liabilities","non_current_liabilities","equity",null],"nullable":true,"type":"string"},"id":{"default":null,"nullable":true,"type":"string"},"label":{"default":null,"nullable":true,"type":"string"},"row_id":{"default":null,"nullable":true,"type":"string"},"row_index":{"default":null,"nullable":true,"type":"integer"},"sub_category":{"default":null,"nullable":true,"type":"string"}},"type":"object"},"BalanceSheetSchema":{"properties":{"currency":{"default":null,"nullable":true,"type":"string"},"is_reconciled":{"default":null,"nullable":true,"type":"boolean"},"reports":{"default":null,"items":{"$ref":"#/components/schemas/BalanceSheetReport"},"nullable":true,"type":"array"}},"type":"object"},"BalanceSheetTimePeriod":{"properties":{"column_index":{"default":null,"nullable":true,"type":"integer"},"date":{"default":null,"format":"date","nullable":true,"type":"string"},"label":{"default":null,"nullable":true,"type":"string"},"time_interval":{"default":null,"enum":["year","quarter","month","interim_one_off",null],"nullable":true,"type":"string"}},"type":"object"},"BalanceSheetTotalsGroup":{"properties":{"current_ratio":{"default":null,"nullable":true,"type":"number"},"debt_to_equity_ratio":{"default":null,"nullable":true,"type":"number"},"is_reconciled":{"default":null,"nullable":true,"type":"boolean"},"total_assets":{"default":null,"nullable":true,"type":"number"},"total_current_assets":{"default":null,"nullable":true,"type":"number"},"total_current_liabilities":{"default":null,"nullable":true,"type":"number"},"total_equity":{"default":null,"nullable":true,"type":"number"},"total_fixed_assets":{"default":null,"nullable":true,"type":"number"},"total_liabilities":{"default":null,"nullable":true,"type":"number"},"total_liabilities_and_equity":{"default":null,"nullable":true,"type":"number"},"total_non_current_liabilities":{"default":null,"nullable":true,"type":"number"},"total_other_assets":{"default":null,"nullable":true,"type":"number"},"unreconciled_amount":{"default":null,"nullable":true,"type":"number"}},"type":"object"},"BankStatementSummaryRow":{"properties":{"actual_holdback_percentage":{"description":"Actual MCA payments to revenue as % (raw repayment amounts)","nullable":true,"type":"number"},"average_balance":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"Average balance"},"average_balance_to_revenue_ratio":{"description":"Average balance divided by total revenue","type":"number"},"dd_reversals":{"description":"Number of DD Reversals","type":"integer"},"ending_balance":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"Ending balance"},"expected_mca_debits":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"Expected MCA debits amount"},"holdback_percentage":{"description":"Expected MCA payments to revenue as % (with frequency multiplier)","nullable":true,"type":"number"},"is_mtd":{"description":"Whether this row represents a month-to-date (MTD) partial statement","type":"boolean"},"is_unreconcilable":{"description":"True when the statement period has no usable balance data for reconciliation (e.g. an unreconciled partial-month statement)","nullable":true,"type":"boolean"},"low_balance_days":{"description":"Number of days where end of day balance falls below low balance threshold","type":"integer"},"mca_credits":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"MCA credits amount"},"mca_debits":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"MCA debits amount"},"negative_balance_days":{"description":"Number of days with negative balance","type":"integer"},"no_deposits":{"description":"Number of deposit transactions","type":"integer"},"no_mca_credits":{"description":"Number of MCA credit transactions","type":"integer"},"no_mca_debits":{"description":"Number of MCA debit transactions","type":"integer"},"no_od_nsf":{"description":"Number of overdraft or NSF transactions","type":"integer"},"no_overdraft_transactions":{"description":"Number of transactions where the resulting balance falls below 0","type":"integer"},"no_revenue":{"description":"Number of revenue transactions","type":"integer"},"no_withdrawals":{"description":"Number of withdrawals transactions","type":"integer"},"non_revenue":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"Non-revenue amount"},"period_end_date":{"description":"The last day covered by the statement period (e.g. a partial April statement covering Apr 1\u201315 has period_end_date=Apr 15, while a full April statement with data only through Apr 15 would still show Apr 30)","format":"date","nullable":true,"type":"string"},"period_start_date":{"description":"The first day covered by the statement period (e.g. a partial April statement covering Apr 5\u201315 has period_start_date=Apr 5)","format":"date","nullable":true,"type":"string"},"starting_balance":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"Starting balance for the period"},"total_deposits":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"Total deposit amount"},"total_revenue":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"Total revenue amount"},"total_withdrawals":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"Total withdrawal amount"}},"type":"object"},"BooleanCheck":{"properties":{"auto_decline":{"default":false,"type":"boolean"},"decline_description":{"default":null,"nullable":true,"type":"string"},"email_template_name":{"default":null,"nullable":true,"type":"string"},"ignore_metric_availability":{"default":false,"type":"boolean"},"is_mandatory":{"default":false,"type":"boolean"},"pass_description":{"default":null,"nullable":true,"type":"string"},"value":{"type":"boolean"}},"type":"object"},"BrokerFunderLinkCreateSchema":{"additionalProperties":false,"properties":{"broker_heron_id":{"description":"Heron ID of the broker to link","nullable":true,"type":"string"},"broker_user_id":{"type":"integer"},"external_reference_id":{"nullable":true,"type":"integer"},"funder_heron_id":{"type":"string"},"offer_calculation_constants_override":{"additionalProperties":{},"nullable":true,"type":"object"},"offer_email_instructions_override":{"nullable":true,"type":"string"},"offer_portal_instructions_override":{"nullable":true,"type":"string"},"offer_source_override":{"enum":["email","api","web_portal","all_offers","crm_lendsaas",null],"nullable":true,"type":"string"},"staging_submission_integration_id":{"nullable":true,"type":"integer"},"submission_cc_email_addresses":{"items":{"type":"string"},"nullable":true,"type":"array"},"submission_channel_override":{"enum":["email","api","web_portal","all_offers","crm_lendsaas",null],"nullable":true,"type":"string"},"submission_email_address":{"nullable":true,"type":"string"},"submission_integration_id":{"nullable":true,"type":"integer"}},"required":["broker_user_id","funder_heron_id"],"type":"object"},"BrokerFunderLinkUpdateSchema":{"additionalProperties":false,"properties":{"broker_heron_id":{"description":"Heron ID of the broker to link","nullable":true,"type":"string"},"broker_user_id":{"type":"integer"},"external_reference_id":{"nullable":true,"type":"integer"},"funder_heron_id":{"type":"string"},"offer_calculation_constants_override":{"additionalProperties":{},"nullable":true,"type":"object"},"offer_email_instructions_override":{"nullable":true,"type":"string"},"offer_portal_instructions_override":{"nullable":true,"type":"string"},"offer_source_override":{"enum":["email","api","web_portal","all_offers","crm_lendsaas",null],"nullable":true,"type":"string"},"staging_submission_integration_id":{"nullable":true,"type":"integer"},"submission_cc_email_addresses":{"items":{"type":"string"},"nullable":true,"type":"array"},"submission_channel_override":{"enum":["email","api","web_portal","all_offers","crm_lendsaas",null],"nullable":true,"type":"string"},"submission_email_address":{"nullable":true,"type":"string"},"submission_integration_id":{"nullable":true,"type":"integer"}},"required":["broker_user_id","funder_heron_id"],"type":"object"},"BrokerFunderPolicy":{"additionalProperties":false,"properties":{"created":{"format":"date-time","readOnly":true,"type":"string"},"funder":{"allOf":[{"$ref":"#/components/schemas/BrokerFunderPolicyFunder"}],"readOnly":true},"last_updated":{"format":"date-time","readOnly":true,"type":"string"},"matching_priority":{"nullable":true,"readOnly":true,"type":"integer"},"policy":{"additionalProperties":{},"nullable":true,"readOnly":true,"type":"object"}},"type":"object"},"BrokerFunderPolicyFunder":{"additionalProperties":false,"properties":{"heron_id":{"readOnly":true,"type":"string"},"logo_url":{"nullable":true,"readOnly":true,"type":"string"},"name":{"readOnly":true,"type":"string"}},"type":"object"},"BrokerFunderPolicyUpdateItem":{"additionalProperties":false,"properties":{"funder_heron_id":{"type":"string"},"matching_priority":{"nullable":true,"type":"integer"},"policy":{"additionalProperties":{},"nullable":true,"type":"object"}},"required":["funder_heron_id"],"type":"object"},"BrokerFunderPolicyUploadJobSchema":{"additionalProperties":false,"properties":{"created":{"format":"date-time","readOnly":true,"type":"string"},"error_count":{"readOnly":true,"type":"integer"},"error_details":{"additionalProperties":{},"nullable":true,"readOnly":true,"type":"object"},"error_message":{"nullable":true,"readOnly":true,"type":"string"},"filename":{"nullable":true,"readOnly":true,"type":"string"},"finished_at":{"format":"date-time","nullable":true,"readOnly":true,"type":"string"},"heron_id":{"readOnly":true,"type":"string"},"last_updated":{"format":"date-time","readOnly":true,"type":"string"},"processed_count":{"readOnly":true,"type":"integer"},"results_summary":{"additionalProperties":{},"nullable":true,"readOnly":true,"type":"object"},"started_at":{"format":"date-time","nullable":true,"readOnly":true,"type":"string"},"status":{"enum":["queued","processing","completed","failed"],"readOnly":true},"success_count":{"readOnly":true,"type":"integer"},"total_count":{"nullable":true,"readOnly":true,"type":"integer"}},"type":"object"},"BrokerFunderPolicyUploadSchema":{"additionalProperties":false,"properties":{"file_base64":{"description":"Base64 encoded file bytes","type":"string"},"filename":{"description":"Name of file","type":"string"}},"required":["file_base64","filename"],"type":"object"},"BrokerSubmissionFilesUploadSchema":{"properties":{"files":{"items":{},"maxItems":10,"minItems":1,"type":"array"}},"required":["files"],"type":"object"},"BulkExecuteQueriesRequestSchema":{"properties":{"end_user_heron_id":{"nullable":false,"type":"string"},"query_names":{"items":{"nullable":false,"type":"string"},"minItems":1,"nullable":false,"type":"array"}},"required":["end_user_heron_id","query_names"],"type":"object"},"BulkSaveEntityAttributeValueItem":{"properties":{"attribute_name":{"description":"Name of the attribute to set the value for","type":"string"},"entity_name":{"description":"Name of the entity to target","type":"string"},"value":{"description":"The value to set for the attribute","nullable":true}},"required":["attribute_name","entity_name","value"],"type":"object"},"BulkSaveEntityAttributeValueResultSchema":{"properties":{"attribute_name":{"description":"Name of the attribute","type":"string"},"entity_name":{"description":"Name of the entity","type":"string"},"error":{"default":null,"description":"Error message if the save failed","nullable":true,"type":"string"},"success":{"description":"Whether the value was saved successfully","type":"boolean"}},"required":["attribute_name","entity_name","success"],"type":"object"},"BulkSaveEntityAttributeValuesSchema":{"properties":{"values":{"description":"List of entity attribute values to save","items":{"$ref":"#/components/schemas/BulkSaveEntityAttributeValueItem"},"type":"array"}},"required":["values"],"type":"object"},"BulkUpdateBrokerFunderPoliciesSchema":{"additionalProperties":false,"properties":{"policies":{"items":{"$ref":"#/components/schemas/BrokerFunderPolicyUpdateItem"},"type":"array"}},"required":["policies"],"type":"object"},"CTA":{"properties":{"text":{"example":"CTA Text","type":"string"},"url":{"example":"https://example.com/cta","type":"string"}},"required":["text","url"],"type":"object"},"CachePolicyDefinition":{"properties":{"enabled":{"type":"boolean"},"scope":{"type":"string"},"ttl_seconds":{"type":"integer"}},"required":["enabled","scope","ttl_seconds"],"type":"object"},"Category":{"properties":{"analytics_group":{"description":"The analytics group of the category","enum":["revenue","cost_of_goods_sold","operational_expenses","tax_expenses","intra_company","debt","equity","other_income","special_items","other",null],"example":"revenue","nullable":true,"readOnly":true,"type":"string"},"created":{"description":"Timestamp for when the category was created","example":"2026-04-18T03:33:26.854893","format":"date-time","readOnly":true,"type":"string"},"description":{"description":"Description of the category","example":"Rent for offices, workspaces or storage facilities","type":"string"},"heron_id":{"description":"Unique ID of the category generated by Heron Data","example":"ctg_K7nQMgtQDDumnWjpcaeHH7","readOnly":true,"type":"string"},"label":{"description":"The label of the category","example":"Rent","type":"string"}},"required":["label"],"type":"object"},"Category1":{"properties":{"heron_id":{"description":"Unique ID of the category generated by Heron Data","example":"ctg_K7nQMgtQDDumnWjpcaeHH7","readOnly":true,"type":"string"},"label":{"description":"The label of the category","example":"Rent","type":"string"}},"required":["label"],"type":"object"},"CategoryFeedback":{"properties":{"heron_id":{"description":"heron_id of the correct category","example":"ctg_Cd3DRG6ydK9epauo88dydF","type":"string"},"label":{"description":"label of the correct category","example":"Insurance","type":"string"}},"type":"object"},"Check":{"properties":{"attribute_label":{"nullable":true,"type":"string"},"boolean_check":{"allOf":[{"$ref":"#/components/schemas/BooleanCheck"}],"default":null,"nullable":true},"composite_check":{"allOf":[{"$ref":"#/components/schemas/CompositeCheck"}],"default":null,"nullable":true},"date_check":{"allOf":[{"$ref":"#/components/schemas/DateCheck"}],"default":null,"nullable":true},"date_delta_to_now_check":{"allOf":[{"$ref":"#/components/schemas/DateDeltaToNowCheck"}],"default":null,"nullable":true},"enhanced_sql_check":{"allOf":[{"$ref":"#/components/schemas/EnhancedSQLCheck"}],"default":null,"nullable":true},"group":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"numeric_check":{"allOf":[{"$ref":"#/components/schemas/NumericCheck"}],"default":null,"nullable":true},"sql_check":{"allOf":[{"$ref":"#/components/schemas/SQLCheck"}],"default":null,"nullable":true},"string_check":{"allOf":[{"$ref":"#/components/schemas/StringCheck"}],"default":null,"nullable":true}},"type":"object"},"CheckAnalyticsResponse":{"properties":{"check_name":{"type":"string"},"total_failed":{"type":"integer"},"total_missing_data":{"type":"integer"},"total_passed":{"type":"integer"}},"type":"object"},"CheckEvaluation":{"properties":{"attribute_value":{"allOf":[{"$ref":"#/components/schemas/CompanyAttributeValue"}],"default":null,"nullable":true},"check":{"allOf":[{"$ref":"#/components/schemas/Check"}],"default":null,"nullable":true},"evaluations":{"default":null,"items":{"$ref":"#/components/schemas/CheckEvaluation"},"nullable":true,"type":"array"},"result":{"enum":["pass","failed","missing_data"]}},"type":"object"},"CloneEndUserEntityAttributeSchema":{"properties":{"attribute_name":{"type":"string"}},"required":["attribute_name"],"type":"object"},"CompanyAttribute":{"properties":{"label":{"type":"string"},"type":{"enum":["float","int","decimal","string","date","datetime","bool"]}},"type":"object"},"CompanyAttributeValue":{"properties":{"attribute_label":{"type":"string"},"value":{"type":"string"}},"type":"object"},"CompanyAttributeValueSchema":{"properties":{"attribute":{"$ref":"#/components/schemas/CompanyAttribute"},"availability":{"enum":["available","partially_available","not_available"]},"value":{}},"type":"object"},"CompanyOverviewLayoutSchema":{"properties":{"group_name":{"type":"string"},"id":{"description":"A unique id used to reference the group","type":"string"},"widgets":{"items":{"$ref":"#/components/schemas/Widget"},"type":"array"}},"required":["group_name","id","widgets"],"type":"object"},"Components":{"properties":{"city_name":{"nullable":true,"type":"string"},"default_city_name":{"nullable":true,"type":"string"},"delivery_point":{"nullable":true,"type":"string"},"delivery_point_check_digit":{"nullable":true,"type":"string"},"plus4_code":{"nullable":true,"type":"string"},"primary_number":{"nullable":true,"type":"string"},"state_abbreviation":{"nullable":true,"type":"string"},"street_name":{"nullable":true,"type":"string"},"street_suffix":{"nullable":true,"type":"string"},"zipcode":{"nullable":true,"type":"string"}},"type":"object"},"CompositeCheck":{"properties":{"auto_decline":{"default":false,"type":"boolean"},"checks":{"items":{"$ref":"#/components/schemas/Check"},"type":"array"},"decline_description":{"default":null,"nullable":true,"type":"string"},"email_template_name":{"default":null,"nullable":true,"type":"string"},"ignore_metric_availability":{"default":false,"type":"boolean"},"is_mandatory":{"default":false,"type":"boolean"},"pass_description":{"default":null,"nullable":true,"type":"string"},"type":{"enum":["AND","OR"]}},"type":"object"},"CreateBrokerFunderApiKeySchema":{"properties":{"email":{"description":"Broker email address","format":"email","type":"string"}},"required":["email"],"type":"object"},"CreateBrokerSubmissionSchema":{"properties":{"name":{"description":"The name of the submission being made, this is purely for user reference.","minLength":10,"type":"string"}},"required":["name"],"type":"object"},"CreateEndUserEntityAttributeSchema":{"properties":{"attribute_description":{"type":"string"},"attribute_name":{"type":"string"},"attribute_type":{"enum":["float","int","decimal","string","date","datetime","bool"]},"display_order":{"type":"integer"},"is_dedupe_key":{"default":false,"type":"boolean"},"reconciliation_config":{"additionalProperties":{},"type":"object"},"reconciliation_strategy":{"enum":["sort_order","llm","comparison","concatenate_lists"]}},"required":["attribute_name"],"type":"object"},"CreateEndUserEntityAttributeSourceSchema":{"properties":{"sort_order":{"type":"integer"},"source_config":{"additionalProperties":{},"type":"object"},"source_type":{"enum":["parsed_end_user_file","api","rel_6","end_user_enricher","company_attribute","static_value","end_user_query","broker_submission_api"]}},"type":"object"},"CreateEndUserEntitySchema":{"properties":{"display_order":{"type":"integer"},"entity_description":{"type":"string"},"entity_name":{"type":"string"},"entity_post_processor_configs":{"default":[],"items":{"additionalProperties":{},"type":"object"},"type":"array"},"is_list":{"type":"boolean"},"saved_query_heron_id":{"nullable":true,"type":"string"}},"required":["entity_name"],"type":"object"},"CreateFileRenameRuleSchema":{"properties":{"end_user_file_class":{"type":"string"},"file_name_template":{"type":"string"},"is_enabled":{"type":"boolean"},"variables":{"items":{"$ref":"#/components/schemas/VariableDefinition"},"type":"array"}},"required":["end_user_file_class","file_name_template","is_enabled"],"type":"object"},"CreateFunderSchema":{"additionalProperties":false,"properties":{"aliases":{"items":{"type":"string"},"type":"array"},"email_domains":{"items":{"type":"string"},"type":"array"},"merchant_heron_id":{"type":"string"},"name":{"type":"string"},"offer_email_instructions":{"nullable":true,"type":"string"},"offer_portal_instructions":{"nullable":true,"type":"string"},"offer_source":{"enum":["email","api","web_portal","all_offers","crm_lendsaas",null],"nullable":true,"type":"string"},"submission_channel":{"enum":["email","api","web_portal","all_offers","crm_lendsaas",null],"nullable":true,"type":"string"},"submission_email_address":{"nullable":true,"type":"string"}},"required":["merchant_heron_id","name"],"type":"object"},"CreateInteractionLogSchema":{"properties":{"attributes":{"additionalProperties":{},"default":null,"description":"Arbitrary JSON attributes","nullable":true,"type":"object"},"end_user_heron_id":{"default":null,"description":"Heron ID of the end user","nullable":true,"type":"string"},"name":{"description":"Interaction name/type","maxLength":256,"minLength":1,"type":"string"},"session_uuid":{"description":"PostHog session UUID","maxLength":36,"minLength":1,"type":"string"}},"required":["name","session_uuid"],"type":"object"},"CreateKeySchema":{"properties":{"name":{"description":"A descriptive name for the key","maxLength":128,"minLength":1,"type":"string"}},"required":["name"],"type":"object"},"CrmConfig":{"properties":{"child_file_filtering_enabled":{"default":true,"description":"Whether to filter out child files (files that have a parent file)","type":"boolean"},"data_source_accounts_config":{"allOf":[{"$ref":"#/components/schemas/CrmObjectConfig"}],"default":null,"description":"The data source accounts configuration for the CRM integration","nullable":true},"default_id":{"allOf":[{"$ref":"#/components/schemas/CrmObjectId"}],"default":null,"description":"The default object id for the CRM integration","nullable":true},"object_configs":{"default":[],"description":"The object configurations for the CRM integration","items":{"$ref":"#/components/schemas/CrmObjectConfig"},"type":"array"},"policy_evaluation_config":{"allOf":[{"$ref":"#/components/schemas/CrmPolicyEvaluationConfig"}],"default":null,"description":"The policy evaluation configuration for the CRM integration","nullable":true},"small_file_filtering_enabled":{"default":false,"description":"Whether to filter out files smaller than 400 bytes","type":"boolean"},"sync_file_classes":{"additionalProperties":{"type":"boolean"},"default":{},"description":"Whether to sync files of a given class, including emails","type":"object"},"value_mappings":{"default":[],"description":"A list of value mappings for the CRM integration","items":{"$ref":"#/components/schemas/CrmValueMapping"},"type":"array"}},"type":"object"},"CrmExternalLookupConfig":{"properties":{"external_lookup_fields_and":{"description":"External lookup fields are what is used to try match potential new objects to existing objects in the CRM (i.e., for deduplication). Used in the and condition.","items":{"type":"string"},"type":"array"},"external_lookup_fields_or":{"description":"External lookup fields are what is used to try match potential new objects to existing objects in the CRM (i.e., for deduplication). Used in the or condition.","items":{"type":"string"},"type":"array"},"sort_field_name":{"default":"CreatedDate","description":"The field name to sort by when doing the external lookup","example":"CreatedDate","type":"string"},"sort_order":{"description":"The sort order when doing the external lookup","enum":["ASC","DESC"],"type":"string"}},"type":"object"},"CrmFieldMapping":{"properties":{"external_lookup_field_name":{"default":null,"description":"Override field name to use for external lookup instead of the field_name","nullable":true,"type":"string"},"external_object_name_for_id":{"description":"The external object whose id we want to use populate the field value","example":"Account","nullable":true,"type":"string"},"field_name":{"description":"The name of the field in the CRM","example":"Name","type":"string"},"heron_company_attribute_label":{"description":"The label of the company attribute in Heron","example":"owner_1_first_name","nullable":true,"type":"string"},"max_length":{"default":null,"description":"The max length of the crm field this should be mapped to. Used for string fields. If set, the string will be truncated.","example":255,"nullable":true,"type":"integer"},"overwrite_on_update":{"default":true,"description":"Whether the field should be overwritten on update. True by default. When False, the field will only be set on creation","example":true,"type":"boolean"},"regex_remove":{"description":"Any pattern that should be removed from the company attribute value","example":"pattern","nullable":true,"type":"string"},"required":{"default":false,"description":"Whether the field is required","example":true,"type":"boolean"},"static_value":{"description":"A static value for the field","example":"static value","nullable":true,"type":"string"},"static_value_key":{"description":"The value key of the static data","enum":["date_today",null],"nullable":true,"type":"string"},"value_mapping_name":{"description":"Name of the value mapping to use for the field","example":"state","nullable":true,"type":"string"},"value_type":{"default":null,"description":"The crm type of the field","example":"Text","nullable":true,"type":"string"}},"required":["field_name"],"type":"object"},"CrmIntegrationPatchSchema":{"additionalProperties":true,"properties":{"auth":{"additionalProperties":{},"description":"Authentication details for the CRM integration","type":"object","writeOnly":true},"config":{"allOf":[{"$ref":"#/components/schemas/CrmConfig"}],"description":"The configuration for the CRM integration"},"failure_notification_channel":{"default":null,"description":"The channel to send failure notifications to","nullable":true,"type":"string"},"heron_id":{"readOnly":true,"type":"string"},"instance_url":{"description":"Base URL of the CRM integration","example":"https://sandbox.salesforce.com","format":"url","type":"string"},"is_enabled":{"default":true,"description":"Whether the integration is enabled","example":true,"type":"boolean"},"is_live":{"default":true,"description":"Whether the integration is live","example":true,"type":"boolean"},"provider":{"description":"The CRM provider","type":"string"},"secret":{"description":"A secret key for the CRM integration","type":"string","writeOnly":true}},"type":"object"},"CrmIntegrationSchema":{"additionalProperties":true,"properties":{"auth":{"additionalProperties":{},"description":"Authentication details for the CRM integration","type":"object","writeOnly":true},"config":{"allOf":[{"$ref":"#/components/schemas/CrmConfig"}],"description":"The configuration for the CRM integration"},"failure_notification_channel":{"default":null,"description":"The channel to send failure notifications to","nullable":true,"type":"string"},"heron_id":{"readOnly":true,"type":"string"},"instance_url":{"description":"Base URL of the CRM integration","example":"https://sandbox.salesforce.com","format":"url","type":"string"},"is_enabled":{"default":true,"description":"Whether the integration is enabled","example":true,"type":"boolean"},"is_live":{"default":true,"description":"Whether the integration is live","example":true,"type":"boolean"},"provider":{"description":"The CRM provider","type":"string"},"secret":{"description":"A secret key for the CRM integration","type":"string","writeOnly":true}},"required":["auth","config","instance_url","provider","secret"],"type":"object"},"CrmObjectConfig":{"properties":{"description":{"description":"Human-readable description of the object","example":"A company or person","nullable":true,"type":"string"},"external_lookup_config":{"allOf":[{"$ref":"#/components/schemas/CrmExternalLookupConfig"}],"default":null,"description":"Configuration for external lookup","nullable":true},"external_name":{"description":"The exact name of the object in the CRM","example":"Account","type":"string"},"field_mappings":{"description":"Mapping for Heron fields to object fields in CRM","items":{"$ref":"#/components/schemas/CrmFieldMapping"},"type":"array"},"is_optional":{"default":false,"description":"Whether the object is optional. Optional means that if object fails it will not stop execution of CRM sync","type":"boolean"},"key":{"description":"key should be unique among objects within an integration","example":"Account","type":"string"},"required_ids":{"description":"List of object ids that new object needs","items":{"$ref":"#/components/schemas/CrmObjectId"},"type":"array"},"static_data":{"description":"Stores static data used by the integration, for example status fields","items":{"$ref":"#/components/schemas/CrmStaticData"},"type":"array"}},"required":["external_name","key"],"type":"object"},"CrmObjectId":{"properties":{"alias":{"default":null,"description":"An alias for the object in the CRM","example":"Company","nullable":true,"type":"string"},"external_name":{"description":"The exact name of the object in the CRM","example":"Account","type":"string"}},"required":["external_name"],"type":"object"},"CrmPolicyEvaluationConfig":{"properties":{"external_object_name":{"description":"The object to write policy evaluation results to","example":"Opportunity","type":"string"},"failure_reason_external_name":{"description":"The field to write policy evaluation failure reason to","example":"Failure_Reason__c","type":"string"},"result_external_name":{"description":"The field to write policy evaluation results","example":"Submission_Result_from_Heron__c","type":"string"}},"required":["external_object_name"],"type":"object"},"CrmStaticData":{"properties":{"key":{"description":"The key of the static data","example":"status","type":"string"},"value":{"description":"The value of the static data","example":"active"}},"required":["key","value"],"type":"object"},"CrmSyncEvent":{"properties":{"crm_record_url":{"nullable":true,"type":"string"},"error_message":{"nullable":true,"type":"string"},"heron_id":{"type":"string"},"name":{"type":"string"},"occurred_at":{"format":"date-time","type":"string"},"provider":{"nullable":true,"type":"string"},"result":{"enum":["success","failure","no_sync_attempted"]},"success_message":{"nullable":true,"type":"string"}},"type":"object"},"CrmSyncEventSchema":{"properties":{"crm_record_url":{"nullable":true,"type":"string"},"error_message":{"nullable":true,"type":"string"},"heron_id":{"type":"string"},"name":{"type":"string"},"occurred_at":{"format":"date-time","type":"string"},"provider":{"nullable":true,"type":"string"},"result":{"enum":["success","failure","no_sync_attempted"]},"success_message":{"nullable":true,"type":"string"}},"type":"object"},"CrmValueMapping":{"properties":{"default_value":{"default":null,"description":"The default value to use when no match is found","example":"Default","nullable":true,"type":"string"},"description":{"description":"A human-readable description of the value mapping","example":"The status of the company","nullable":true,"type":"string"},"mapping":{"additionalProperties":{},"description":"The mapping of values","example":{"CA":"California","NY":"New York"},"type":"object"},"name":{"description":"The name of the value mapping","example":"Status","type":"string"},"use_partial_match":{"default":false,"description":"Whether to use partial match when mapping values","type":"boolean"}},"required":["mapping","name"],"type":"object"},"DataSource":{"properties":{"status":{"description":"Status of the data source entity, where applicable (e.g. pdfs, integration links)","enum":["new","parsing","parsed","processed","human_reviewing","approved","rejected","failed","transactions_loaded","transactions_unloaded","pending","active","syncing","erroring","sync_disabled","deleted_in_plaid","unknown"],"example":"new","type":"string"},"type":{"description":"Data source type","enum":["api","csv","pdf","integration_link","legacy","legacy_pdf","legacy_integration_link"],"example":"pdf","type":"string"}},"required":["type"],"type":"object"},"DataSourceAccount":{"properties":{"account_id":{"description":"Unique account id associated with the data source account","example":"202348","type":"string"},"anomaly_score":{"description":"For pdf bank statement account sources, where the value is between 0 and 1000, with 1000 being the most anomalous","example":200,"type":"integer"},"balances":{"description":"List of balances associated with the account","example":[{"closing_amount":25000.45,"currency":"USD","date":"2022-01-01"}],"items":{"$ref":"#/components/schemas/AccountBalance"},"type":"array"},"currency":{"description":"Currency of the account","example":"USD","type":"string"},"end_date":{"description":"End date of the account","example":"2022-01-31","format":"date","type":"string"},"heron_id":{"description":"Unique ID for data source generated by Heron","example":"dso_mo5tGR2WUczHtFf6KxoQr4","type":"string"},"institution_name":{"description":"Name of the institution","example":"Chase","type":"string"},"is_enabled":{"description":"Whether or not the account is enabled. If disabled, hides related transactions from analytics","example":true,"type":"boolean"},"max_date":{"description":"Latest date of transactions associated with the data source account","example":"2022-01-31","format":"date","type":"string"},"min_date":{"description":"Earliest date of transactions associated with the data source account","example":"2022-01-01","format":"date","type":"string"},"name":{"description":"Name of the account","example":"Checking Account","type":"string"},"num_transactions":{"description":"Number of transactions associated with the data source account","example":120,"type":"integer"},"number":{"description":"Number of the account","example":"123456789","type":"string"},"owner_name":{"description":"Name of the account owner","example":"John Doe","type":"string"},"reference_id":{"description":"This is the account ID provided as part of the transaction","example":"account-202348","type":"string"},"start_date":{"description":"Start date of the account","example":"2022-01-01","format":"date","type":"string"},"transactions_match_balances":{"description":"For pdf bank statements, represents whether all transactions extracted match the balances extracted","example":true,"type":"boolean"},"type":{"description":"Type of the account","example":"Checking","type":"string"}},"required":["is_enabled"],"type":"object"},"DataSourceAccountDateReconciliationMetrics":{"properties":{"data_source_account_heron_id":{"type":"string"},"date":{"format":"date","type":"string"},"metrics":{"items":{"$ref":"#/components/schemas/DataSourceAccountReconciliationMetric"},"type":"array"}},"required":["data_source_account_heron_id","date","metrics"],"type":"object"},"DataSourceAccountNested":{"properties":{"heron_id":{"description":"Heron ID of the data source account","type":"string"},"is_enabled":{"description":"Whether this data source account is enabled","type":"boolean"}},"type":"object"},"DataSourceAccountReconciliationMetric":{"properties":{"category_label":{"type":"string"},"metric":{"type":"string"},"value":{"$ref":"#/components/schemas/Money"}},"required":["category_label","metric","value"],"type":"object"},"DataSourceAccountSummary":{"properties":{"account":{"$ref":"#/components/schemas/EndUserDataSourceAccount"},"summary":{"allOf":[{"$ref":"#/components/schemas/BankStatementSummaryRow"}],"nullable":true}},"type":"object"},"DataSourceAccountSummaryPublicSchema":{"properties":{"data_source_account_summaries":{"items":{"$ref":"#/components/schemas/DataSourceAccountSummary"},"type":"array"},"end_user":{"$ref":"#/components/schemas/EndUser1"}},"type":"object"},"DataSourceAccountUpdateNumberSchema":{"properties":{"source_dsa_heron_id":{"description":"The Heron ID of the data source account containing the number we want to update to","example":"dsa_8w6V5CuRESc7G5yx3mXF54","type":"string"}},"required":["source_dsa_heron_id"],"type":"object"},"DataSourceMetadata":{"properties":{"currency":{"description":"Currency associated with the data source entity, where applicable (e.g. pdfs)","example":"USD","type":"string"},"filename":{"description":"Name of the file uploaded, where applicable (e.g. pdfs)","example":"202348_JAN_2022.pdf","type":"string"},"integration_heron_id":{"description":"Unique Heron ID associated with an integration","example":"itg_iEK8eK84vhDKvzwGUpix75","type":"string"},"integration_item_id":{"description":"Unique item id associated with integration link data sources","example":"Ed6bjNrDLJfGvZWwnkQlfxwoNz54B5C97ejBr","type":"string"},"last_successful_sync":{"description":"Last successful sync date associated with integration link data sources","example":"2026-04-18T03:33:30.015728","format":"date-time","type":"string"},"notes":{"description":"Notes associated with the data source entity, where applicable (e.g. pdfs)","example":"error with processing, 52 invalid transaction(s) extracted from statement","type":"string"},"parsing_version":{"description":"Parsing version associated with the data source entity, where applicable (e.g. pdfs)","example":"1.0.0","type":"string"},"sub_type":{"description":"Sub type of the data source entity, where applicable (e.g. integration links)","example":"transaction","type":"string"}},"type":"object"},"DataSourceNested":{"properties":{"heron_id":{"description":"Heron ID of the data source","type":"string"},"is_enabled":{"description":"Whether this data source is enabled","type":"boolean"}},"type":"object"},"DateCheck":{"properties":{"auto_decline":{"default":false,"type":"boolean"},"decline_description":{"default":null,"nullable":true,"type":"string"},"email_template_name":{"default":null,"nullable":true,"type":"string"},"ignore_metric_availability":{"default":false,"type":"boolean"},"is_mandatory":{"default":false,"type":"boolean"},"pass_description":{"default":null,"nullable":true,"type":"string"},"type":{"enum":["equal","not_equal","before","before_or_on","after","after_or_on"]},"value":{"format":"date","type":"string"}},"type":"object"},"DateDeltaToNowCheck":{"properties":{"auto_decline":{"default":false,"type":"boolean"},"decline_description":{"default":null,"nullable":true,"type":"string"},"email_template_name":{"default":null,"nullable":true,"type":"string"},"ignore_metric_availability":{"default":false,"type":"boolean"},"is_mandatory":{"default":false,"type":"boolean"},"pass_description":{"default":null,"nullable":true,"type":"string"},"type":{"enum":["greater_than","less_than"]},"value":{"additionalProperties":{},"default":null,"nullable":true,"type":"object"}},"type":"object"},"DateRangeSchema":{"properties":{"end_date":{"format":"date-time","type":"string"},"start_date":{"format":"date-time","type":"string"}},"required":["end_date","start_date"],"type":"object"},"DecisionLogicPostParams":{"properties":{"currency":{"description":"ISO 4217 currency code","example":"USD","type":"string"}},"type":"object"},"DeclineAnalyticsResponseSchema":{"properties":{"check_analytics":{"items":{"$ref":"#/components/schemas/CheckAnalyticsResponse"},"type":"array"},"total_declined":{"type":"integer"},"total_end_users":{"type":"integer"}},"type":"object"},"DeleteTransactionParams":{"properties":{"account_id":{"default":null,"description":"account_id of transactions to be deleted","nullable":true,"type":"string"},"end_user_id":{"default":null,"description":"end_user_id of transactions to be deleted","nullable":true,"type":"string"},"heron_id":{"default":null,"description":"(legacy) Heron ID of transaction to be deleted","example":"txn_Fbqp5XgBHa4ko5WHiPJ2XU","nullable":true,"type":"string"},"heron_ids":{"default":[],"description":"Heron IDs of transactions to be deleted","items":{"type":"string"},"type":"array"},"only_duplicates":{"default":null,"description":"if true, deletes only transactions that are marked as duplicates","nullable":true,"type":"boolean"},"reference_ids":{"default":[],"description":"Reference IDs of transactions to be deleted","items":{"type":"string"},"type":"array"},"request_id":{"default":null,"description":"Request ID of transactions to be deleted","nullable":true,"type":"string"}},"type":"object"},"DriversLicenceFrontResultSchema":{"properties":{"address_city":{"default":null,"nullable":true,"type":"string"},"address_line_1":{"default":null,"nullable":true,"type":"string"},"address_state":{"default":null,"nullable":true,"type":"string"},"address_zip":{"default":null,"nullable":true,"type":"string"},"date_of_birth":{"default":null,"format":"date","nullable":true,"type":"string"},"document_number":{"default":null,"nullable":true,"type":"string"},"expiration_date":{"default":null,"format":"date","nullable":true,"type":"string"},"first_name":{"default":null,"nullable":true,"type":"string"},"issuing_date":{"default":null,"format":"date","nullable":true,"type":"string"},"issuing_state":{"default":null,"nullable":true,"type":"string"},"last_name":{"default":null,"nullable":true,"type":"string"},"middle_name":{"default":null,"nullable":true,"type":"string"}},"type":"object"},"DuplicateEndUser":{"properties":{"created":{"description":"When the duplicate end user was created","example":"2026-04-11T03:33:30.046041","format":"date-time","type":"string"},"end_user_heron_id":{"description":"Heron ID of the duplicate end user","example":"eus_abc123","type":"string"}},"required":["created","end_user_heron_id"],"type":"object"},"DuplicateEndUsersResponse":{"properties":{"duplicates":{"description":"List of duplicate end users with their heron IDs and created dates","items":{"$ref":"#/components/schemas/DuplicateEndUser"},"type":"array"}},"required":["duplicates"],"type":"object"},"EmailTemplatePatchSchema":{"additionalProperties":true,"properties":{"cc_address":{"default":null,"description":"The email address to CC","nullable":true,"type":"string"},"heron_id":{"description":"Unique identifier for the email template","readOnly":true,"type":"string"},"html_body":{"description":"The body of the email to send.","type":"string"},"name":{"description":"Unique name of the email template. Used to match which email template to send. Only alphanumeric characters, underscores, and dashes are allowed.","maxLength":50,"minLength":3,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"reply_to_address":{"default":null,"description":"The email address to reply to","nullable":true,"type":"string"},"to_address":{"default":null,"description":"The email address to send the email to","nullable":true,"type":"string"}},"type":"object"},"EmailTemplateSchema":{"additionalProperties":true,"properties":{"cc_address":{"default":null,"description":"The email address to CC","nullable":true,"type":"string"},"heron_id":{"description":"Unique identifier for the email template","readOnly":true,"type":"string"},"html_body":{"description":"The body of the email to send.","type":"string"},"name":{"description":"Unique name of the email template. Used to match which email template to send. Only alphanumeric characters, underscores, and dashes are allowed.","maxLength":50,"minLength":3,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"reply_to_address":{"default":null,"description":"The email address to reply to","nullable":true,"type":"string"},"to_address":{"default":null,"description":"The email address to send the email to","nullable":true,"type":"string"}},"required":["html_body","name"],"type":"object"},"EndUser":{"properties":{"confidence":{"description":"Aggregated confidence for the end user across all transactions; between 0 and 1","example":0.42,"readOnly":true,"type":"number"},"created":{"description":"When the end user was created in Heron system","example":"2026-03-07T03:33:30.031554","format":"date-time","readOnly":true,"type":"string"},"criteria":{"description":"List of scorecard metrics","items":{"$ref":"#/components/schemas/Metric"},"readOnly":true,"type":"array"},"data_sources":{"description":"List of data source summaries for the end user","items":{"$ref":"#/components/schemas/DataSource"},"readOnly":true,"type":"array"},"end_user_id":{"description":"id defined by user; links to the end_user_id for transactions","example":"40fb19d8-fa3c-46b2-b1b9-e9ae26c8bc0f","maxLength":140,"minLength":1,"type":"string"},"heron_id":{"description":"Unique id for end user generated by Heron","example":"eus_gUKiVmf9pdf2L2caKQHRAA","readOnly":true,"type":"string"},"is_portfolio":{"description":"Whether the end user is part of a lending portfolio","example":true,"type":"boolean"},"last_processed_at":{"description":"When the end user was last successfully processed in Heron system","example":"2026-04-18T03:33:30.031790","format":"date-time","readOnly":true,"type":"string"},"last_updated":{"description":"When the end user was last updated in Heron system","example":"2026-04-18T03:33:30.031585","format":"date-time","readOnly":true,"type":"string"},"name":{"description":"Name of end user; may help to improve categorisation accuracy","example":"Company Name Inc.","maxLength":128,"nullable":true,"type":"string"},"profit_and_loss_layout":{"nullable":true},"status":{"description":"Status of end user; 'ready' triggers async processing, 'review_requested' triggers manual review request","enum":["new","ready","processed","reviewed","review_requested","failed"],"example":"ready","type":"string"}},"required":["end_user_id"],"type":"object"},"EndUser1":{"properties":{"end_user_id":{"description":"id defined by user; links to the end_user_id for transactions","example":"40fb19d8-fa3c-46b2-b1b9-e9ae26c8bc0f","maxLength":140,"minLength":1,"type":"string"},"heron_id":{"description":"Unique id for end user generated by Heron","example":"eus_gUKiVmf9pdf2L2caKQHRAA","readOnly":true,"type":"string"},"name":{"description":"Name of end user; may help to improve categorisation accuracy","example":"Company Name Inc.","maxLength":128,"nullable":true,"type":"string"}},"required":["end_user_id"],"type":"object"},"EndUser2":{"properties":{"heron_id":{"description":"Unique id for end user generated by Heron","example":"eus_gUKiVmf9pdf2L2caKQHRAA","readOnly":true,"type":"string"}},"type":"object"},"EndUserAccountBalance":{"properties":{"account_id":{"description":"Account associated with balance","type":"string"},"account_info":{"$ref":"#/components/schemas/EndUserAccountInfo"},"balance":{"description":"Balance amount","type":"number"},"balance_converted":{"description":"Converted balance amount in target currency","type":"number"},"currency":{"description":"ISO 4217 currency code for balance","example":"USD","maxLength":3,"minLength":3,"nullable":true,"type":"string"},"currency_converted":{"description":"Conversion currency code. ISO 4217 currency code for balance","example":"USD","maxLength":3,"minLength":3,"nullable":true,"type":"string"},"is_computed":{"description":"Whether the balance has been imputed using forward fill","type":"boolean"},"is_latest":{"description":"Whether the date is the latest non-imputed balance for the account","type":"boolean"},"timestamp":{"description":"Timestamp of the latest transaction","format":"date-time","type":"string"}},"type":"object"},"EndUserAccountBalanceForecast":{"properties":{"account_id":{"type":"string"},"balances":{"items":{"$ref":"#/components/schemas/EndUserBalanceForecast"},"type":"array"},"currency":{"type":"string"}},"type":"object"},"EndUserAccountInfo":{"properties":{"currency":{"description":"ISO 4217 currency code","example":"USD","maxLength":3,"minLength":3,"nullable":true,"type":"string"},"institution_name":{"description":"Name of the institution","example":"Chase","type":"string"},"name":{"description":"Name of the account","example":"Checking Account","type":"string"},"number":{"description":"Number of the account","example":"123456789","type":"string"},"owner_name":{"description":"Name of the account owner","example":"John Doe","type":"string"},"type":{"description":"Type of the account","example":"Checking","type":"string"}},"type":"object"},"EndUserAddressLocationSchema":{"properties":{"company_physical_address":{"allOf":[{"$ref":"#/components/schemas/AddressLocation"}],"nullable":true}},"type":"object"},"EndUserBalanceForecast":{"properties":{"date":{"description":"Forecast date at specified date granularity","example":"2026-04-18","type":"string"},"predicted":{"description":"Predicted converted balance","example":42.42,"type":"number"},"predicted_lower":{"description":"Predict amount lower bound","example":4.24,"type":"number"},"predicted_upper":{"description":"Predicted amount upper bound","example":420.42,"type":"number"}},"type":"object"},"EndUserBalanceInputParams":{"properties":{"account_ids":{"default":[],"description":"Filter by specific account reference IDs","example":["1234","5678"],"items":{"type":"string"},"type":"array"},"date_max":{"default":null,"description":"Filter for transactions with date earlier than the input value (inclusive). It has precedence over timestamp_max","example":"2026-04-17","format":"date","nullable":true,"type":"string"},"date_min":{"default":null,"description":"Filter for transactions with timestamp after the input value (inclusive). It has precedence over timestamp_min","example":"2026-04-18","format":"date","nullable":true,"type":"string"},"end_user_heron_id":{"default":null,"description":"Heron-generated id for end user; either end_user_id or end_user_heron_id is required","example":"eus_AkUyV6qsqGTDCoSMANeQGg","nullable":true,"type":"string"},"end_user_id":{"default":null,"description":"end_user_id for statistics; either end_user_id or end_user_heron_id is required","example":"your_end_user_id","nullable":true,"type":"string"},"include_forecast":{"default":false,"description":"If true, forecasts the balances of each account","type":"boolean"},"timestamp_max":{"default":null,"description":"Deprecated (use date_max instead). Filter for transactions with timestamp earlier than the input value","example":"2026-04-17T03:33:31.334301","format":"date-time","nullable":true,"type":"string"},"timestamp_min":{"default":null,"description":"Deprecated (use date_min instead). Filter for transactions with timestamp after the input value","example":"2026-04-18T03:33:31.334232","format":"date-time","nullable":true,"type":"string"},"to_currency":{"description":"ISO 4217 currency code to convert to","enum":["GBP","USD","EUR",null],"example":"USD","nullable":true,"type":"string"}},"type":"object"},"EndUserBalanceOutputSchema":{"properties":{"daily_balances":{"items":{"$ref":"#/components/schemas/EndUserDailyBalance"},"type":"array"},"forecasted":{"items":{"$ref":"#/components/schemas/EndUserAccountBalanceForecast"},"type":"array"},"summary":{"$ref":"#/components/schemas/EndUserDailyBalance"}},"type":"object"},"EndUserBankStatementSummary":{"properties":{"average":{"$ref":"#/components/schemas/BankStatementSummaryRow"},"by_data_source_account_heron_id":{"additionalProperties":{"allOf":[{"$ref":"#/components/schemas/BankStatementSummaryRow"}],"nullable":true},"description":"Summary of bank statement by data source account. Keys are heron ids of the data source account","type":"object"},"by_month":{"additionalProperties":{"allOf":[{"$ref":"#/components/schemas/BankStatementSummaryRow"}],"nullable":true},"description":"Summary of bank statement by month (only populated when grouping is calendar_month))","type":"object"},"by_month_by_data_source_account_heron_id":{"additionalProperties":{"additionalProperties":{"allOf":[{"$ref":"#/components/schemas/BankStatementSummaryRow"}],"nullable":true},"type":"object"},"description":"Summary of bank statement by month and data source account. Keys are the start date of the month and heron ids of the data source account","type":"object"},"grouping":{"description":"Describes how the report was grouped. It supports either by calendar month or rolling 30-day period","readOnly":true,"type":"string"},"rolling_30_days_from_last_txn":{"additionalProperties":{"allOf":[{"$ref":"#/components/schemas/BankStatementSummaryRow"}],"nullable":true},"description":"Summary of bank statement by rolling 30 days (only populated when grouping is rolling_30_days). Keys are the start date of the 30-day period using latest transaction date date as the end date","type":"object"},"rolling_30_days_from_today":{"additionalProperties":{"allOf":[{"$ref":"#/components/schemas/BankStatementSummaryRow"}],"nullable":true},"description":"Summary of bank statement by rolling 30 days (only populated when grouping is rolling_30_days_from_today). Keys are the start date of the 30-day period using today as the end date","type":"object"},"total":{"$ref":"#/components/schemas/BankStatementSummaryRow"}},"required":["grouping"],"type":"object"},"EndUserBankStatementSummaryParams":{"properties":{"account_ids":{"default":null,"description":"Account ids to include in the summary, if not provided, all accounts are included","items":{"example":"1234","type":"string"},"nullable":true,"type":"array"},"grouping":{"default":"by_month","description":"Determines how to group transactions. It supports calendar month (by_month) or rolling 30-day period (from last txns with rolling_30_days_from_last_txn or from today with rolling_30_days_from_today)","enum":["by_month","by_data_source_account_heron_id","rolling_30_days_from_last_txn","rolling_30_days_from_today","by_month_by_data_source_account_heron_id"],"type":"string"},"num_full_calendar_months":{"default":null,"description":"Number of full calendar months to show in the summary","minimum":1,"nullable":true,"type":"integer"}},"type":"object"},"EndUserBulkCategoryFeedback":{"properties":{"category":{"$ref":"#/components/schemas/CategoryFeedback"},"source":{"default":null,"description":"your identifier for where the feedback comes from e.g. bob_the_underwriter","maxLength":120,"nullable":true,"type":"string"},"transaction_heron_ids":{"default":[],"description":"List of transaction heron IDs","items":{"example":"txn_7PVYrHhySukmSVg3DLAEm6","type":"string"},"type":"array"},"transaction_reference_ids":{"default":[],"description":"List of transaction reference IDs","items":{"example":"your_reference_id","type":"string"},"type":"array"}},"required":["category"],"type":"object"},"EndUserBulkCategoryFeedbackParams":{"properties":{"high_priority":{"default":false,"description":"Whether to process the feedback with high priority","type":"boolean"}},"type":"object"},"EndUserDailyBalance":{"properties":{"accounts":{"items":{"$ref":"#/components/schemas/EndUserAccountBalance"},"type":"array"},"accounts_not_converted":{"items":{"$ref":"#/components/schemas/EndUserAccountBalance"},"type":"array"},"balance":{"description":"Balance amount","type":"number"},"currency":{"description":"ISO 4217 currency code for balance","example":"USD","maxLength":3,"minLength":3,"nullable":true,"type":"string"},"date":{"description":"Date of balance","format":"date","type":"string"}},"type":"object"},"EndUserDataSource":{"properties":{"created":{"description":"When the data source was created in Heron system","example":"2026-03-07T03:33:30.016466","format":"date-time","type":"string"},"data_source_accounts":{"description":"List of data source accounts associated with the data source","example":[{"account_id":"202348","anomaly_score":200,"enabled":true,"max_date":"2022-01-31","min_date":"2022-01-01","num_transactions":120,"transactions_match_balances":true}],"items":{"$ref":"#/components/schemas/DataSourceAccount"},"type":"array"},"heron_id":{"description":"Unique ID for data source generated by Heron","example":"dso_SywBBE7P2guZtrjKDZCbMk","readOnly":true,"type":"string"},"is_enabled":{"default":true,"description":"Whether or not the data source is enabled. If disabled, hides related transactions from analytics","example":true,"type":"boolean"},"last_updated":{"description":"When the data source was last updated in Heron system","example":"2026-04-18T03:33:30.016488","format":"date-time","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/DataSourceMetadata"}],"description":"Metadata associated with the data source","example":{"filename":"202348_JAN_2022.pdf","status":"processed"}},"reference_id":{"description":"Unique ID to identify the data source","example":"pdf_CB32cBeFkmpggebrE9wHft","type":"string"},"status":{"description":"Status of the data source entity, where applicable (e.g. pdfs, integration links)","enum":["new","parsing","parsed","processed","human_reviewing","approved","rejected","failed","transactions_loaded","transactions_unloaded","pending","active","syncing","erroring","sync_disabled","deleted_in_plaid","unknown"],"example":"new","type":"string"},"type":{"description":"Data source type","enum":["api","csv","pdf","integration_link","legacy","legacy_pdf","legacy_integration_link"],"example":"pdf","type":"string"}},"required":["created","data_source_accounts","heron_id","last_updated","reference_id","type"],"type":"object"},"EndUserDataSourceAccount":{"properties":{"account_id":{"description":"Unique account id associated with the data source account","example":"202348","type":"string"},"anomaly_score":{"description":"For pdf bank statement account sources, where the value is between 0 and 1000, with 1000 being the most anomalous","example":200,"type":"integer"},"balances":{"description":"List of balances associated with the account","example":[{"closing_amount":25000.45,"currency":"USD","date":"2022-01-01"}],"items":{"$ref":"#/components/schemas/AccountBalance"},"type":"array"},"currency":{"description":"Currency of the account","example":"USD","type":"string"},"end_date":{"description":"End date of the account","example":"2022-01-31","format":"date","type":"string"},"heron_id":{"description":"Unique ID for data source generated by Heron","example":"dso_mo5tGR2WUczHtFf6KxoQr4","type":"string"},"institution_name":{"description":"Name of the institution","example":"Chase","type":"string"},"is_enabled":{"description":"Whether or not the account is enabled. If disabled, hides related transactions from analytics","example":true,"type":"boolean"},"max_date":{"description":"Latest date of transactions associated with the data source account","example":"2022-01-31","format":"date","type":"string"},"min_date":{"description":"Earliest date of transactions associated with the data source account","example":"2022-01-01","format":"date","type":"string"},"name":{"description":"Name of the account","example":"Checking Account","type":"string"},"num_transactions":{"description":"Number of transactions associated with the data source account","example":120,"type":"integer"},"number":{"description":"Number of the account","example":"123456789","type":"string"},"owner_name":{"description":"Name of the account owner","example":"John Doe","type":"string"},"reference_id":{"description":"This is the account ID provided as part of the transaction","example":"account-202348","type":"string"},"start_date":{"description":"Start date of the account","example":"2022-01-01","format":"date","type":"string"},"transactions_match_balances":{"description":"For pdf bank statements, represents whether all transactions extracted match the balances extracted","example":true,"type":"boolean"},"type":{"description":"Type of the account","example":"Checking","type":"string"}},"required":["is_enabled"],"type":"object"},"EndUserDataSourceAccountDisableDuplicatesSchema":{"properties":{"end_date":{"format":"date","nullable":true,"type":"string"},"start_date":{"format":"date","nullable":true,"type":"string"}},"type":"object"},"EndUserDataSourceAccountUpdateSchema":{"properties":{"is_enabled":{"description":"Whether or not the account is enabled. If disabled, hides related transactions from analytics","example":true,"type":"boolean"}},"type":"object"},"EndUserDataSourceMetadata":{"properties":{"currency":{"description":"Currency associated with the data source entity, where applicable (e.g. pdfs)","example":"USD","type":"string"},"filename":{"description":"Name of the file uploaded, where applicable (e.g. pdfs)","example":"202348_JAN_2022.pdf","type":"string"},"integration_heron_id":{"description":"Unique Heron ID associated with an integration","example":"itg_iEK8eK84vhDKvzwGUpix75","type":"string"},"integration_item_id":{"description":"Unique item id associated with integration link data sources","example":"Ed6bjNrDLJfGvZWwnkQlfxwoNz54B5C97ejBr","type":"string"},"last_successful_sync":{"description":"Last successful sync date associated with integration link data sources","example":"2026-04-18T03:33:30.015728","format":"date-time","type":"string"},"notes":{"description":"Notes associated with the data source entity, where applicable (e.g. pdfs)","example":"error with processing, 52 invalid transaction(s) extracted from statement","type":"string"},"parsing_version":{"description":"Parsing version associated with the data source entity, where applicable (e.g. pdfs)","example":"1.0.0","type":"string"},"sub_type":{"description":"Sub type of the data source entity, where applicable (e.g. integration links)","example":"transaction","type":"string"}},"type":"object"},"EndUserDataSourceSummaries":{"properties":{"status":{"description":"Status of the data source entity, where applicable (e.g. pdfs, integration links)","enum":["new","parsing","parsed","processed","human_reviewing","approved","rejected","failed","transactions_loaded","transactions_unloaded","pending","active","syncing","erroring","sync_disabled","deleted_in_plaid","unknown"],"example":"new","type":"string"},"type":{"description":"Data source type","enum":["api","csv","pdf","integration_link","legacy","legacy_pdf","legacy_integration_link"],"example":"pdf","type":"string"}},"required":["type"],"type":"object"},"EndUserDataSourceUpdateSchema":{"properties":{"is_enabled":{"default":true,"description":"Whether or not the data source is enabled. If disabled, hides related transactions from analytics","example":true,"type":"boolean"}},"type":"object"},"EndUserDataSources":{"properties":{"created":{"description":"When the data source was created in Heron system","example":"2026-03-07T03:33:30.016466","format":"date-time","type":"string"},"data_source_accounts":{"description":"List of data source accounts associated with the data source","example":[{"account_id":"202348","anomaly_score":200,"enabled":true,"max_date":"2022-01-31","min_date":"2022-01-01","num_transactions":120,"transactions_match_balances":true}],"items":{"$ref":"#/components/schemas/EndUserDataSourceAccount"},"type":"array"},"heron_id":{"description":"Unique ID for data source generated by Heron","example":"dso_SywBBE7P2guZtrjKDZCbMk","readOnly":true,"type":"string"},"is_enabled":{"default":true,"description":"Whether or not the data source is enabled. If disabled, hides related transactions from analytics","example":true,"type":"boolean"},"last_updated":{"description":"When the data source was last updated in Heron system","example":"2026-04-18T03:33:30.016488","format":"date-time","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/EndUserDataSourceMetadata"}],"description":"Metadata associated with the data source","example":{"filename":"202348_JAN_2022.pdf","status":"processed"}},"reference_id":{"description":"Unique ID to identify the data source","example":"pdf_CB32cBeFkmpggebrE9wHft","type":"string"},"status":{"description":"Status of the data source entity, where applicable (e.g. pdfs, integration links)","enum":["new","parsing","parsed","processed","human_reviewing","approved","rejected","failed","transactions_loaded","transactions_unloaded","pending","active","syncing","erroring","sync_disabled","deleted_in_plaid","unknown"],"example":"new","type":"string"},"type":{"description":"Data source type","enum":["api","csv","pdf","integration_link","legacy","legacy_pdf","legacy_integration_link"],"example":"pdf","type":"string"}},"required":["created","data_source_accounts","heron_id","last_updated","reference_id","type"],"type":"object"},"EndUserEmail":{"properties":{"date_sent":{"format":"date-time","type":"string"},"date_sent_string":{"type":"string"},"from_address":{"type":"string"},"from_address_domain":{"type":"string"},"from_name":{"type":"string"},"html_body":{"type":"string"},"html_or_text_body":{"type":"string"},"subject":{"type":"string"},"text_body":{"type":"string"}},"type":"object"},"EndUserEmailSchema":{"properties":{"created":{"format":"date-time","type":"string"},"date_sent":{"format":"date-time","type":"string"},"date_sent_string":{"type":"string"},"from_address":{"type":"string"},"from_address_domain":{"type":"string"},"from_name":{"type":"string"},"heron_id":{"type":"string"},"html_body":{"type":"string"},"html_or_text_body":{"type":"string"},"is_reply":{"type":"boolean"},"processing_status":{"enum":["new","processing","processed","failed"],"type":"string"},"subject":{"type":"string"},"subject_cleaned":{"type":"string"},"text_body":{"type":"string"},"viewer_url":{"description":"a temporary, secure URL for viewing the email contents","type":"string"}},"type":"object"},"EndUserEndUserFile":{"properties":{"file_class":{"nullable":true,"type":"string"},"filename":{"type":"string"},"heron_id":{"type":"string"},"renamed_filename":{"type":"string"}},"type":"object"},"EndUserEnrichParams":{"properties":{"priority":{"default":"normal","description":"Priority for async enrichment","enum":["normal","high"],"type":"string"}},"type":"object"},"EndUserEntitiesSettings":{"properties":{"date_display_format":{"description":"The format to use for date attributes when they are display in the dashboard","type":"string"}},"type":"object"},"EndUserEntityAttributeSchema":{"properties":{"attribute_description":{"type":"string"},"attribute_name":{"type":"string"},"attribute_type":{"enum":["float","int","decimal","string","date","datetime","bool"]},"display_order":{"type":"integer"},"heron_id":{"type":"string"},"is_dedupe_key":{"default":false,"type":"boolean"},"reconciliation_config":{"additionalProperties":{},"type":"object"},"reconciliation_strategy":{"enum":["sort_order","llm","comparison","concatenate_lists"]}},"type":"object"},"EndUserEntityAttributeSource":{"properties":{"heron_id":{"nullable":true,"type":"string"},"sort_order":{"type":"integer"},"source_config":{"additionalProperties":{},"type":"object"},"source_type":{"enum":["parsed_end_user_file","api","rel_6","end_user_enricher","company_attribute","static_value","end_user_query","broker_submission_api"]}},"type":"object"},"EndUserEntityAttributeSourceSchema":{"properties":{"heron_id":{"nullable":true,"type":"string"},"sort_order":{"type":"integer"},"source_config":{"additionalProperties":{},"type":"object"},"source_type":{"enum":["parsed_end_user_file","api","rel_6","end_user_enricher","company_attribute","static_value","end_user_query","broker_submission_api"]}},"type":"object"},"EndUserEntityAttributeValueSchema":{"properties":{"heron_id":{"type":"string"},"value":{}},"type":"object"},"EndUserEntitySchema":{"properties":{"display_order":{"type":"integer"},"entity_description":{"type":"string"},"entity_name":{"type":"string"},"entity_post_processor_configs":{"default":[],"items":{"additionalProperties":{},"type":"object"},"type":"array"},"heron_id":{"type":"string"},"is_list":{"type":"boolean"},"saved_query_heron_id":{"nullable":true,"type":"string"}},"type":"object"},"EndUserFileBase64Schema":{"properties":{"file_b64":{"type":"string"},"mime_type":{"type":"string"}},"type":"object"},"EndUserFilePageClasses":{"properties":{"confidence":{"default":1.0,"type":"number"},"file_class":{"type":"string"}},"type":"object"},"EndUserFileSchema":{"properties":{"bank_statement":{"allOf":[{"$ref":"#/components/schemas/PdfGet"}],"example":null,"nullable":true,"readOnly":true},"created":{"format":"date-time","type":"string"},"email":{"allOf":[{"$ref":"#/components/schemas/EndUserEmailSchema"}],"example":null,"nullable":true,"readOnly":true},"file_class":{"type":"string"},"file_source_metadata":{"additionalProperties":{},"nullable":true,"readOnly":true,"type":"object"},"filename":{"type":"string"},"heron_id":{"type":"string"},"iso_application":{"allOf":[{"$ref":"#/components/schemas/GetIsoApplication"}],"nullable":true,"readOnly":true},"num_pages":{"type":"integer"},"page_classes":{"additionalProperties":{"$ref":"#/components/schemas/EndUserFilePageClasses"},"nullable":true,"type":"object"},"parent_heron_id":{"nullable":true,"type":"string"},"parsed_results":{"default":[],"items":{"$ref":"#/components/schemas/ParsedEndUserFile"},"readOnly":true,"type":"array"},"reference_id":{"type":"string"},"renamed_filename":{"type":"string"}},"type":"object"},"EndUserFileUpdateSchema":{"properties":{"file_class":{"type":"string"},"page_classes":{"additionalProperties":{"$ref":"#/components/schemas/EndUserFilePageClasses"},"nullable":true,"type":"object"},"parent_heron_id":{"nullable":true,"type":"string"},"reference_id":{"type":"string"}},"type":"object"},"EndUserFileUploadSchema":{"properties":{"file_base64":{"description":"Base64 encoded file bytes","type":"string"},"file_class":{"description":"The type of file, e.g., bank_statement","nullable":true,"type":"string"},"filename":{"description":"Name of file","type":"string"},"parent_file_heron_id":{"default":null,"description":"The Heron ID of the parent file, if this file is a part of another file","nullable":true,"type":"string"},"reference_id":{"description":"Your reference id for file","nullable":true,"type":"string"},"trigger_downstream_processing":{"default":true,"description":"Whether to trigger downstream processing (file classification, parsing, etc.) upon upload","type":"boolean"}},"required":["file_base64","filename"],"type":"object"},"EndUserForecastInputParams":{"properties":{"category_heron_id":{"description":"Heron ID of category to be forecasted; either category_heron_id or category_label must be present","example":"ctg_MmconkaKcRKobxvUbUvYUC","type":"string"},"category_label":{"description":"Label of category to be forecasted; either category_heron_id or category_label must be present","example":"Revenue","type":"string"},"date_granularity":{"default":"month","description":"Aggregate results over time, i.e., aggregate by week or by month","enum":["week","month"],"example":"month","type":"string"},"end_user_heron_id":{"default":null,"description":"Heron-generated id for end user; either end_user_id or end_user_heron_id is required","example":"eus_AkUyV6qsqGTDCoSMANeQGg","nullable":true,"type":"string"},"end_user_id":{"default":null,"description":"end_user_id for statistics; either end_user_id or end_user_heron_id is required","example":"your_end_user_id","nullable":true,"type":"string"},"from_date":{"default":null,"description":"The earliest transaction timestamp date to use in forecasting","example":"2022-01-01","format":"date","nullable":true,"type":"string"},"to_currency":{"description":"ISO 4217 currency code to convert to","enum":["GBP","USD","EUR",null],"example":"USD","nullable":true,"type":"string"},"to_date":{"default":null,"description":"The latest transaction timestamp date to use in forecasting","example":"2022-01-31","format":"date","nullable":true,"type":"string"}},"type":"object"},"EndUserForecastOutputSchema":{"properties":{"currency":{"description":"ISO 4217 currency code","example":"USD","maxLength":3,"minLength":3,"nullable":true,"type":"string"},"date":{"description":"Forecast date at specified date granularity","example":"2026-04-18","type":"string"},"predicted":{"description":"Predicted amount","example":42.42,"type":"number"},"predicted_lower":{"description":"Predict amount lower bound","example":4.24,"type":"number"},"predicted_upper":{"description":"Predicted amount upper bound","example":420.42,"type":"number"}},"type":"object"},"EndUserGroupedTransactionsReport":{"properties":{"counterparty":{"type":"string"},"merchant":{"$ref":"#/components/schemas/GroupedTransactionMerchant"},"transaction_groups":{"items":{"$ref":"#/components/schemas/EndUserTransactionGroup"},"type":"array"}},"type":"object"},"EndUserInformationPatchSchema":{"properties":{"amount_requested":{"nullable":true,"type":"number"},"annual_revenue":{"nullable":true,"type":"number"},"business_start_date":{"format":"date","nullable":true,"type":"string"},"company_billing_address":{"$ref":"#/components/schemas/Address"},"company_email":{"nullable":true,"type":"string"},"company_legal_business_name":{"nullable":true,"type":"string"},"company_phone_number":{"nullable":true,"type":"string"},"company_physical_address":{"$ref":"#/components/schemas/Address"},"company_website":{"nullable":true,"type":"string"},"dba":{"description":"Doing business as","nullable":true,"type":"string"},"federal_tax_id":{"nullable":true,"type":"string"},"industry_type":{"nullable":true,"type":"string"},"loan_purpose":{"nullable":true,"type":"string"},"monthly_revenue":{"nullable":true,"type":"number"},"naics":{"nullable":true,"type":"string"},"owner_1":{"$ref":"#/components/schemas/Owner"},"owner_2":{"$ref":"#/components/schemas/Owner"},"predicted_industry_probability":{"nullable":true,"type":"number"},"source_email_address":{"nullable":true,"type":"string"},"source_name":{"nullable":true,"type":"string"},"source_notes":{"nullable":true,"type":"string"},"state_of_incorporation":{"nullable":true,"type":"string"},"type_of_business_entity":{"nullable":true,"type":"string"}},"type":"object"},"EndUserInformationSchema":{"properties":{"amount_requested":{"nullable":true,"type":"number"},"annual_revenue":{"nullable":true,"type":"number"},"business_start_date":{"format":"date","nullable":true,"type":"string"},"company_billing_address":{"$ref":"#/components/schemas/Address"},"company_email":{"nullable":true,"type":"string"},"company_legal_business_name":{"nullable":true,"type":"string"},"company_phone_number":{"nullable":true,"type":"string"},"company_physical_address":{"$ref":"#/components/schemas/Address"},"company_website":{"nullable":true,"type":"string"},"dba":{"description":"Doing business as","nullable":true,"type":"string"},"federal_tax_id":{"nullable":true,"type":"string"},"industry_type":{"nullable":true,"type":"string"},"loan_purpose":{"nullable":true,"type":"string"},"monthly_revenue":{"nullable":true,"type":"number"},"naics":{"nullable":true,"type":"string"},"owner_1":{"$ref":"#/components/schemas/Owner"},"owner_2":{"$ref":"#/components/schemas/Owner"},"predicted_industry_probability":{"nullable":true,"type":"number"},"source_email_address":{"nullable":true,"type":"string"},"source_name":{"nullable":true,"type":"string"},"source_notes":{"nullable":true,"type":"string"},"source_type":{"description":"Source of the end user information","enum":["api","iso_application_form","heron_industry_classifier","rel6_industry_classifier","email","end_user_entities"],"example":"iso_application_form","type":"string"},"state_of_incorporation":{"nullable":true,"type":"string"},"type_of_business_entity":{"nullable":true,"type":"string"}},"type":"object"},"EndUserMerchantSummary":{"properties":{"by_merchant_summary":{"items":{"$ref":"#/components/schemas/MerchantSummaryRow"},"type":"array"}},"type":"object"},"EndUserMerchantSummaryParams":{"properties":{"account_ids":{"default":null,"description":"Account ids to include in the summary, if not provided, all accounts are included","items":{"example":"1234","type":"string"},"nullable":true,"type":"array"},"analytics_group":{"items":{"description":"The category analytics group","enum":["revenue","cost_of_goods_sold","operational_expenses","tax_expenses","intra_company","debt","equity","other_income","special_items","other",null],"example":"debt","nullable":true,"type":"string"},"minItems":1,"nullable":true,"type":"array"},"category_label_or_heron_id":{"items":{"type":"string"},"minItems":1,"nullable":true,"type":"array"},"group_by_counterparty_txn_clusters":{"default":false,"description":"Whether to group by counterparty transaction clusters","type":"boolean"}},"type":"object"},"EndUserPositions":{"properties":{"llm_summary":{"nullable":true,"type":"string"},"positions":{"items":{"$ref":"#/components/schemas/PositionSummary"},"type":"array"}},"type":"object"},"EndUserPositionsParams":{"properties":{"account_ids":{"description":"Account IDs to filter positions by","items":{"type":"string"},"nullable":true,"type":"array"}},"type":"object"},"EndUserPostParams":{"properties":{"confidence":{"description":"Aggregated confidence for the end user across all transactions; between 0 and 1","example":0.42,"readOnly":true,"type":"number"},"created":{"description":"When the end user was created in Heron system","example":"2026-03-07T03:33:30.031554","format":"date-time","readOnly":true,"type":"string"},"criteria":{"description":"List of scorecard metrics","items":{"$ref":"#/components/schemas/Metric"},"readOnly":true,"type":"array"},"data_sources":{"description":"List of data source summaries for the end user","items":{"$ref":"#/components/schemas/DataSource"},"readOnly":true,"type":"array"},"end_user_id":{"description":"id defined by user; links to the end_user_id for transactions","example":"40fb19d8-fa3c-46b2-b1b9-e9ae26c8bc0f","maxLength":140,"minLength":1,"type":"string"},"heron_id":{"description":"Unique id for end user generated by Heron","example":"eus_gUKiVmf9pdf2L2caKQHRAA","readOnly":true,"type":"string"},"is_portfolio":{"description":"Whether the end user is part of a lending portfolio","example":true,"type":"boolean"},"last_processed_at":{"description":"When the end user was last successfully processed in Heron system","example":"2026-04-18T03:33:30.031790","format":"date-time","readOnly":true,"type":"string"},"last_updated":{"description":"When the end user was last updated in Heron system","example":"2026-04-18T03:33:30.031585","format":"date-time","readOnly":true,"type":"string"},"name":{"description":"Name of end user; may help to improve categorisation accuracy","example":"Company Name Inc.","maxLength":128,"nullable":true,"type":"string"},"profit_and_loss_layout":{"nullable":true}},"required":["end_user_id"],"type":"object"},"EndUserProcessingStatusSchema":{"properties":{"status":{"description":"Current processing status of the end user","enum":["processing","processed"],"example":"processed"}},"required":["status"],"type":"object"},"EndUserReadEnrichedParams":{"properties":{"account_ids":{"default":null,"description":"Account ids to include. If not provided, all accounts are included","items":{"example":"1234","type":"string"},"nullable":true,"type":"array"},"category_heron_id":{"default":[],"description":"Filter by the heron_id of the category that the transaction is annotated with","example":"ctg_2FFvG7KXEXQEG2tBoPtshF","items":{"type":"string"},"nullable":true,"type":"array"},"last_updated_min":{"default":null,"description":"Filter for transactions whose values were last updated in Heron systems after the specified input value, isoformat","example":"2026-04-18T03:33:30.036428","format":"date-time","nullable":true,"type":"string"},"order_by":{"default":"id_asc","description":"What to order transactions by","enum":["amount_asc","amount_desc","abs_amount_asc","abs_amount_desc","description_asc","description_desc","timestamp_asc","timestamp_desc","id_asc","id_desc","confidence_asc","confidence_desc","created_asc","created_desc"],"type":"string"},"page":{"default":1,"description":"Results page","minimum":1,"type":"integer"},"per_page":{"default":100,"description":"Desired results per page","maximum":50000,"minimum":1,"type":"integer"}},"type":"object"},"EndUserReadParams":{"properties":{"criteria":{"additionalProperties":{},"default":null,"description":"Information about the end user that can be used as rules for underwriting","example":{"history_days":{"value":40}},"nullable":true,"readOnly":true,"type":"object"},"end_user_id":{"default":null,"description":"Filter by ID associated with end_user_id field in transactions","example":"your_end_user_id","nullable":true,"type":"string"},"heron_id":{"default":null,"description":"Unique ID generated by Heron","example":"eus_gFma2Pg525BjYZFYVG2sSR","nullable":true,"type":"string"},"include_data_sources":{"default":false,"description":"Whether the to include data sources for each end user","example":true,"type":"boolean"},"include_scorecard_metrics":{"default":false,"description":"Whether to include scorecard metrics for each end user (under field criteria)","example":true,"type":"boolean"},"is_portfolio":{"default":null,"description":"Whether the end user is part of a lending portfolio","example":true,"nullable":true,"type":"boolean"},"limit":{"default":1000,"description":"Pagination limit per page","maximum":10000,"minimum":1,"type":"integer"},"name":{"default":null,"description":"Filter by name associated with end user","example":"your_end_user_name","nullable":true,"type":"string"},"order_by":{"default":"last_updated_desc","description":"Order to return end users by","enum":["last_updated_desc","last_updated_asc","created_desc","created_asc"],"type":"string"},"page":{"default":1,"description":"Pagination page number","minimum":1,"type":"integer"},"status":{"default":null,"description":"Filter by status of end user","enum":["new","ready","processed","reviewed","review_requested","failed",null],"example":"reviewed","nullable":true,"type":"string"}},"type":"object"},"EndUserReadSummaryParams":{"properties":{"criteria":{"additionalProperties":{},"default":null,"description":"Information about the end user that can be used as rules for underwriting","example":{"history_days":{"value":40}},"nullable":true,"readOnly":true,"type":"object"},"end_user_id":{"default":null,"description":"Filter by ID associated with end_user_id field in transactions","example":"your_end_user_id","nullable":true,"type":"string"},"heron_id":{"default":null,"description":"Unique ID generated by Heron","example":"eus_gFma2Pg525BjYZFYVG2sSR","nullable":true,"type":"string"},"interval_end":{"default":null,"format":"date-time","nullable":true,"type":"string"},"interval_start":{"default":null,"format":"date-time","nullable":true,"type":"string"},"is_portfolio":{"default":null,"description":"Whether the end user is part of a lending portfolio","example":true,"nullable":true,"type":"boolean"},"limit":{"default":null,"description":"Pagination limit per page (optional). If provided, 'page' must also be provided.","maximum":10000,"minimum":1,"nullable":true,"type":"integer"},"name":{"default":null,"description":"Filter by name associated with end user","example":"your_end_user_name","nullable":true,"type":"string"},"order_by":{"default":"last_updated_desc","description":"Order to return end users by","enum":["last_updated_desc","last_updated_asc","created_desc","created_asc"],"type":"string"},"page":{"default":null,"description":"Pagination page number (optional). If provided, 'limit' must also be provided.","minimum":1,"nullable":true,"type":"integer"},"status":{"default":null,"description":"Filter by status of end user","enum":["new","ready","processed","reviewed","review_requested","failed",null],"example":"reviewed","nullable":true,"type":"string"},"with_crm_sync_result":{"default":null,"enum":["success","failure","no_sync_attempted",null],"nullable":true},"with_policy_result":{"default":null,"enum":["passed","failed","missing_data",null],"nullable":true}},"type":"object"},"EndUserRecurringTransaction":{"properties":{"amount":{"$ref":"#/components/schemas/Money"},"category_confidence":{"type":"number"},"category_heron_id":{"type":"string"},"category_label":{"type":"string"},"counterparty":{"type":"string"},"description":{"type":"string"},"heron_id":{"type":"string"},"merchant_group_id":{"type":"string"},"merchant_heron_id":{"type":"string"},"merchant_name":{"type":"string"},"timestamp":{"format":"date-time","type":"string"}},"required":["amount","heron_id","timestamp"],"type":"object"},"EndUserRecurringTransactionsReport":{"properties":{"avg_amount":{"$ref":"#/components/schemas/Money"},"avg_confidence":{"type":"number"},"counterparty":{"type":"string"},"frequency":{"enum":["not_enough_data","same_day","irregular","daily","weekly","biweekly","monthly","quarterly","annually","weekday","twice_weekly"],"type":"string"},"merchant_group_id":{"type":"string"},"merchant_heron_id":{"type":"string"},"merchant_name":{"type":"string"},"transactions":{"items":{"$ref":"#/components/schemas/EndUserRecurringTransaction"},"type":"array"}},"type":"object"},"EndUserRecurringTransactionsReportParams":{"properties":{"account_ids":{"default":null,"description":"Account ids to include in the report, if not provided, all accounts are included","items":{"example":"1234","type":"string"},"nullable":true,"type":"array"}},"type":"object"},"EndUserStatsInputParams":{"properties":{"account_ids":{"default":[],"description":"Filter by specific account reference IDs","example":["1234","5678"],"items":{"type":"string"},"type":"array"},"category_heron_ids":{"default":[],"description":"Filter by specific categories","example":["ctg_ZPJQatstPBHzXf77oJaXBp","ctg_caV9JzjWyXBdURKJReebMd"],"items":{"type":"string"},"type":"array"},"date_granularity":{"default":"month","description":"Aggregate results over time, e.g., by week or by quarter","enum":["day","week","month","quarter","year"],"example":"month","type":"string"},"end_user_heron_id":{"default":null,"description":"Heron-generated id for end user; either end_user_id or end_user_heron_id is required","example":"eus_AkUyV6qsqGTDCoSMANeQGg","nullable":true,"type":"string"},"end_user_id":{"default":null,"description":"end_user_id for statistics; either end_user_id or end_user_heron_id is required","example":"your_end_user_id","nullable":true,"type":"string"},"from_date":{"default":null,"description":"Filter for transactions with timestamp after the input value (as date)","example":"2026-04-18","format":"date","nullable":true,"type":"string"},"group_by":{"default":"category","description":"Pivot results by merchant or by category","enum":["category","merchant"],"example":"category","type":"string"},"merchant_heron_ids":{"default":[],"description":"Filter by specific merchants","example":["mrc_HMJjgqPZDYbjCr6RccsZzj","mrc_H23kzHBbFh5EM4BnH29QXW"],"items":{"type":"string"},"type":"array"},"to_currency":{"description":"ISO 4217 currency code to convert to","enum":["GBP","USD","EUR",null],"example":"USD","nullable":true,"type":"string"},"to_date":{"default":null,"description":"Filter for transactions with timestamp before the input value (as date)","example":"2026-04-17","format":"date","nullable":true,"type":"string"}},"type":"object"},"EndUserStatsOutputMetrics":{"properties":{"inflow":{"allOf":[{"$ref":"#/components/schemas/EndUserStatsOutputMetricsInstance"}],"description":"Metrics only counting inflows"},"net":{"allOf":[{"$ref":"#/components/schemas/EndUserStatsOutputMetricsInstance"}],"description":"Net metrics"},"outflow":{"allOf":[{"$ref":"#/components/schemas/EndUserStatsOutputMetricsInstance"}],"description":"Metrics only counting outflows"}},"type":"object"},"EndUserStatsOutputMetricsInstance":{"properties":{"amount":{"description":"Aggregate amount of transactions","example":42.42,"type":"number"},"avg_amount":{"description":"Average value of transactions","example":1.01,"type":"number"},"n":{"description":"Number of transactions","example":42,"type":"integer"}},"type":"object"},"EndUserStatsOutputSchema":{"properties":{"currency":{"description":"ISO 4217 currency code","example":"USD","nullable":true,"type":"string"},"dt":{"description":"Date, impacted by input date granularity","example":"2026-04-18","type":"string"},"heron_id":{"description":"Heron ID of either merchant or category, depending on what was specified in group_by","example":"mrc_XcCyQnjWUTNTirJpkaDQgd","type":"string"},"label":{"description":"Label of either merchant or category, depending on what was specified in group_by","example":"Revenue","type":"string"},"metrics":{"$ref":"#/components/schemas/EndUserStatsOutputMetrics"}},"type":"object"},"EndUserSummary":{"properties":{"confidence":{"description":"Aggregated confidence for the end user across all transactions; between 0 and 1","example":0.42,"readOnly":true,"type":"number"},"created":{"description":"When the end user was created in Heron system","example":"2026-03-07T03:33:30.031554","format":"date-time","readOnly":true,"type":"string"},"criteria":{"description":"List of scorecard metrics","items":{"$ref":"#/components/schemas/Metric"},"readOnly":true,"type":"array"},"crm_sync_result":{"allOf":[{"$ref":"#/components/schemas/CrmSyncEvent"}],"nullable":true},"data_sources":{"description":"List of data source summaries for the end user","items":{"$ref":"#/components/schemas/DataSource"},"readOnly":true,"type":"array"},"end_user_id":{"description":"id defined by user; links to the end_user_id for transactions","example":"40fb19d8-fa3c-46b2-b1b9-e9ae26c8bc0f","maxLength":140,"minLength":1,"type":"string"},"files":{"items":{"$ref":"#/components/schemas/EndUserEndUserFile"},"type":"array"},"heron_id":{"description":"Unique id for end user generated by Heron","example":"eus_gUKiVmf9pdf2L2caKQHRAA","readOnly":true,"type":"string"},"is_portfolio":{"description":"Whether the end user is part of a lending portfolio","example":true,"type":"boolean"},"last_processed_at":{"description":"When the end user was last successfully processed in Heron system","example":"2026-04-18T03:33:30.031790","format":"date-time","readOnly":true,"type":"string"},"last_updated":{"description":"When the end user was last updated in Heron system","example":"2026-04-18T03:33:30.031585","format":"date-time","readOnly":true,"type":"string"},"name":{"description":"Name of end user; may help to improve categorisation accuracy","example":"Company Name Inc.","maxLength":128,"nullable":true,"type":"string"},"policy_evaluations":{"items":{"enum":["passed","failed","missing_data"]},"type":"array"},"profit_and_loss_layout":{"nullable":true},"status":{"description":"Status of end user; 'ready' triggers async processing, 'review_requested' triggers manual review request","enum":["new","ready","processed","reviewed","review_requested","failed"],"example":"ready","type":"string"}},"required":["end_user_id"],"type":"object"},"EndUserTransactionDataCoverageFilters":{"properties":{"end_date":{"format":"date","type":"string"},"include_disabled_data_sources":{"default":true,"type":"boolean"},"start_date":{"format":"date","type":"string"}},"required":["end_date","start_date"],"type":"object"},"EndUserTransactionDataCoverageSchema":{"properties":{"by_account":{"additionalProperties":{"items":{"$ref":"#/components/schemas/AccountTransactionDataCoverage"},"type":"array"},"type":"object"},"duplicate_data_source_accounts_by_account":{"additionalProperties":{"example":["dsa_6p29fVNrHCqcqujgzZjoDM"],"items":{"type":"string"},"type":"array"},"nullable":true,"type":"object"},"end_user_heron_id":{"type":"string"},"reconciliation_by_account":{"additionalProperties":{"$ref":"#/components/schemas/AccountDataSourcesReconciliation"},"type":"object"}},"required":["by_account","end_user_heron_id","reconciliation_by_account"],"type":"object"},"EndUserTransactionGroup":{"properties":{"frequency":{"enum":["not_enough_data","same_day","irregular","daily","weekly","biweekly","monthly","quarterly","annually","weekday","twice_weekly"],"type":"string"},"transactions":{"items":{"$ref":"#/components/schemas/GroupedTransaction"},"type":"array"}},"type":"object"},"EndUserTransactionPostAsync":{"properties":{"account_id":{"description":"Your unique ID for account associated with transaction","example":"checking_account_202348","maxLength":400,"type":"string"},"amount":{"description":"Amount. Inflows to an account should be positive, and outflows from an account should be negative. If using Plaid, please flip the amount sign for all transactions.","example":-42.42,"type":"number"},"balance":{"description":"The running balance of the account after transaction ocurred","example":423.0,"nullable":true,"type":"number"},"categories_default":{"description":"Category of transaction that you may have received from other sources","example":"shopping","nullable":true,"type":"string","writeOnly":true},"currency":{"description":"ISO 4217 currency code","example":"USD","maxLength":3,"minLength":3,"type":"string"},"date":{"description":"The date of the transaction; 'timestamp' field takes priority over 'date'","example":"2020-04-27","format":"date","nullable":true,"type":"string","writeOnly":true},"description":{"description":"The text description for the transaction","example":"GOOGLE *ADS12340929 cc@google.com US","type":"string"},"heron_id":{"description":"Unique ID of transaction; generated by Heron Data","example":"txn_ENfXsP3r8gSQcZTh3LbshP","readOnly":true,"type":"string"},"mcc_code":{"description":"Merchant category code associated with transaction that you may have received from other sources","nullable":true,"pattern":"^\\d{4}$","type":"string","writeOnly":true},"order":{"description":"If sending a batch of transactions, the order in which the transaction occurs, where a higher value is equivalent to a more recent transaction","nullable":true,"type":"integer","writeOnly":true},"reference_id":{"description":"Your unique ID for transaction","example":"my_favourite_transaction_231098","maxLength":140,"type":"string"},"request_id":{"description":"ID associated with request, e.g., all transactions in same POST request will have same request_id","example":"req_3urpSzeapwJFvkodG7taru","nullable":true,"readOnly":true,"type":"string"},"timestamp":{"description":"The ISO 8601 timezone aware timestamp of the transaction; takes precedence over 'date'","example":"2021-11-12T10:38:05Z","format":"date-time","nullable":true,"type":"string"},"transaction_code":{"description":"Code associated with transaction to indicate the type of transaction","example":"card","maxLength":140,"nullable":true,"type":"string"}},"required":["account_id","amount","currency","description","reference_id"],"type":"object"},"EndUserTransactionsPostAsyncSchema":{"properties":{"balances":{"description":"Bank account balance information for a particular account_id. The balance here must be the *latest balance* after all the transactions in this batch have been applied.","items":{"$ref":"#/components/schemas/AccountBalance1"},"nullable":true,"type":"array"},"transactions":{"items":{"$ref":"#/components/schemas/EndUserTransactionPostAsync"},"minItems":1,"type":"array"}},"required":["transactions"],"type":"object"},"EnhancedSQLCheck":{"properties":{"auto_decline":{"default":false,"type":"boolean"},"check_type":{"enum":["equal","not_equal","greater_than","greater_than_or_equal","less_than","less_than_or_equal","before","before_or_on","after","after_or_on"]},"column_name":{"type":"string"},"comparison_value":{},"data_type":{"enum":["numeric","date"]},"decline_description":{"default":null,"nullable":true,"type":"string"},"email_template_name":{"default":null,"nullable":true,"type":"string"},"ignore_metric_availability":{"default":false,"type":"boolean"},"is_mandatory":{"default":false,"type":"boolean"},"pass_description":{"default":null,"nullable":true,"type":"string"},"query_name":{"type":"string"}},"required":["check_type","column_name","comparison_value","data_type","query_name"],"type":"object"},"EnrichAddressesSchema":{"properties":{"city":{"type":"string"},"state":{"type":"string"},"street":{"type":"string"},"zip":{"type":"string"}},"type":"object"},"EnrichedAddressSchema":{"properties":{"analysis":{"$ref":"#/components/schemas/Analysis"},"candidate_index":{"type":"integer"},"components":{"$ref":"#/components/schemas/Components"},"delivery_line_1":{"type":"string"},"delivery_point_barcode":{"type":"string"},"input_index":{"type":"integer"},"last_line":{"type":"string"},"metadata":{"$ref":"#/components/schemas/Metadata"}},"required":["analysis","candidate_index","components","delivery_line_1","delivery_point_barcode","input_index","last_line","metadata"],"type":"object"},"EnricherFieldsSchema":{"properties":{"enricher_type":{"type":"string"},"fields":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"}},"type":"object"},"EnricherResultSchema":{"properties":{"enriched_at":{"format":"date-time","type":"string"},"enricher_name":{"type":"string"},"result":{"additionalProperties":{},"type":"object"},"status":{"enum":["succeeded","failed","processing","missing_input_data"],"type":"string"}},"required":["enriched_at","enricher_name","status"],"type":"object"},"FeatureSettings":{"properties":{"acknowledge_submission_emails":{"type":"boolean"},"auto_dsa_deduplication_enabled":{"type":"boolean"},"auto_iso_app_parsing_enabled":{"type":"boolean"},"auto_sync_to_crm":{"type":"boolean"},"bank_statement_human_review_enabled":{"type":"boolean"},"count_duplicate_end_users":{"type":"boolean"},"crm_sync_end_users_without_end_user_information":{"type":"boolean"},"crm_sync_n8n_workflow_url":{"nullable":true,"type":"string"},"crm_sync_n8n_workflow_urls":{"items":{"type":"string"},"nullable":true,"type":"array"},"custom_merchant_groups_auto_approve":{"type":"boolean"},"custom_merchant_groups_enabled":{"type":"boolean"},"custom_merchant_groups_to_override":{"items":{"type":"string"},"type":"array"},"daily_crm_sync_report_emails":{"items":{"format":"email","type":"string"},"type":"array"},"description_masked":{"type":"boolean"},"end_user_created_alert_slack_channel":{"nullable":true,"type":"string"},"failed_iso_email_forwarding_addresses":{"items":{"format":"email","type":"string"},"type":"array"},"file_classifier_fallback_model_registry_slug":{"nullable":true,"type":"string"},"file_classifier_model_registry_slug":{"nullable":true,"type":"string"},"financials_alerting_enabled":{"type":"boolean"},"financials_enabled":{"type":"boolean"},"flowmingo_workflow_owners":{"$ref":"#/components/schemas/FlowmingoWorkflowOwners"},"forward_failed_emails":{"type":"boolean"},"forward_rejected_emails":{"type":"boolean"},"grouped_recurring_transactions_enabled":{"type":"boolean"},"has_end_user_in_description":{"type":"boolean"},"has_matching_transaction":{"type":"boolean"},"heron_score":{"type":"boolean"},"heron_score_min_category_confidence":{"maximum":1.0,"minimum":0.0,"type":"number"},"identify_positions":{"type":"boolean"},"is_insurance_demo":{"type":"boolean"},"is_potential_duplicate":{"type":"boolean"},"is_recurring":{"type":"boolean"},"iso_app_parser_version":{"type":"string"},"iso_app_parsing":{"type":"boolean"},"lookup_crm_id_in_email_body":{"type":"boolean"},"merchant":{"type":"boolean"},"openai_file_classifier_model_slug":{"nullable":true,"type":"string"},"path_to_spreadsheet_export_template":{"nullable":true,"type":"string"},"policy_auto_decline":{"type":"boolean"},"policy_auto_pdf_parsing":{"type":"boolean"},"policy_auto_pdf_parsing_sequential":{"type":"boolean"},"policy_stop_if_iso_app_not_fully_matched":{"type":"boolean"},"positions_beta":{"type":"boolean"},"predict_naics":{"type":"boolean"},"rejected_iso_email_forwarding_addresses":{"items":{"format":"email","type":"string"},"type":"array"},"reply_to_rejected_emails":{"type":"boolean"},"report_bank_statement_summary_num_calendar_months_to_show":{"nullable":true,"type":"integer"},"report_bank_statement_summary_use_location_specific_months":{"type":"boolean"},"require_attachments_in_submissions":{"type":"boolean"},"send_email_after_failed_policy_workflow_reason":{"additionalProperties":{},"type":"object"},"show_debt_candidates_table":{"type":"boolean"},"skip_send_email_after_failed_crm_sync_cron":{"type":"boolean"},"skip_trial_end_user_alerts":{"type":"boolean"},"small_file_filtering_enabled":{"type":"boolean"},"spreadsheet_export_eusql_queries":{"description":"List of end user SQL query names to include in spreadsheet export. If null, all queries are exported. If empty list, no queries are exported.","items":{"type":"string"},"nullable":true,"type":"array"},"spreadsheet_export_exclude_hardcoded_sheets":{"description":"List of hardcoded sheet names to exclude from spreadsheet export. If null, no sheets are excluded. Only applies to hardcoded sheets, not query sheets.","items":{"type":"string"},"nullable":true,"type":"array"},"sync_to_crm_after_failed_policy_workflow_reason":{"additionalProperties":{},"type":"object"},"temporal_workflow_as_policy_workflow":{"type":"boolean"},"temporal_workflow_enabled":{"type":"boolean"},"webhook_retry_backoffs":{"items":{"maximum":86400,"minimum":60,"type":"integer"},"type":"array"}},"type":"object"},"FieldValidation":{"properties":{"failure_reason":{"nullable":true,"type":"string"},"field_name":{"type":"string"},"result":{"enum":["pass","fail","not_applicable"],"example":"pass","type":"string"},"validation_type":{"type":"string"}},"required":["failure_reason","field_name","result","validation_type"],"type":"object"},"FileClass":{"properties":{"description":{"example":"File Class Description","type":"string"},"name":{"example":"File Class Name","type":"string"}},"required":["name"],"type":"object"},"FileClassSchema":{"properties":{"description":{"nullable":true,"type":"string"},"display_name":{"nullable":true,"type":"string"},"grouping":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["name"],"type":"object"},"FileSettings":{"properties":{"combined_file_classification_enable_automatic_splitting":{"type":"boolean"},"combined_file_classification_enabled":{"type":"boolean"},"combined_file_classification_keywords":{"items":{"type":"string"},"type":"array"},"combined_file_classification_num_pages_threshold":{"type":"integer"},"combined_file_classification_treat_excel_files_as_combined":{"type":"boolean"},"disable_automatic_parsing":{"description":"a list of file classes to disable automatic parsing for.","items":{"type":"string"},"type":"array"},"file_class_parsers_map":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"human_in_the_loop":{"additionalProperties":{"$ref":"#/components/schemas/HumanInTheLoopParserConfig"},"description":"Configuration for human review per parser. Keys are parser_ids.","type":"object"},"reject_duplicates":{"type":"boolean"},"reject_duplicates_based_on_text":{"type":"boolean"},"required_file_classes":{"items":{"type":"string"},"type":"array"},"total_allowed_files_to_process":{"nullable":true,"type":"integer"}},"type":"object"},"FinancialsSummarySchema":{"properties":{"by_category":{"items":{"$ref":"#/components/schemas/FinancialsValue"},"type":"array"},"by_sub_category":{"items":{"$ref":"#/components/schemas/FinancialsValue"},"type":"array"},"currency":{"type":"string"},"grouping":{"enum":["by_month","by_quarter","by_year"],"type":"string"},"metrics":{"items":{"$ref":"#/components/schemas/FinancialsValue"},"type":"array"}},"type":"object"},"FinancialsValue":{"properties":{"label":{"type":"string"},"time_period_label":{"type":"string"},"value":{"type":"number"}},"type":"object"},"FinicityRequestCashflowReportSchema":{"properties":{"applicant_is_personal_guarantor":{"type":"boolean"},"for_cra_purpose":{"type":"boolean"},"user_type":{"enum":["personal","business"],"type":"string"}},"required":["applicant_is_personal_guarantor","for_cra_purpose","user_type"],"type":"object"},"FinicityRequestStatementReportsSchema":{"properties":{"max_statement_index":{"default":24,"type":"integer"},"min_statement_index":{"default":1,"type":"integer"}},"type":"object"},"FinicityRequestVoeTransactionsReportSchema":{"properties":{"from_date":{"format":"date-time","type":"string"}},"type":"object"},"FlowmingoWorkflowOwners":{"properties":{"group_slack_name":{"items":{"type":"string"},"type":"array"},"user_email":{"items":{"format":"email","type":"string"},"type":"array"}},"type":"object"},"Funder":{"additionalProperties":false,"properties":{"aliases":{"items":{"type":"string"},"readOnly":true,"type":"array"},"created":{"format":"date-time","readOnly":true,"type":"string"},"email_domains":{"items":{"type":"string"},"readOnly":true,"type":"array"},"heron_id":{"readOnly":true,"type":"string"},"last_updated":{"format":"date-time","readOnly":true,"type":"string"},"logo_url":{"nullable":true,"readOnly":true,"type":"string"},"merchant_heron_id":{"readOnly":true,"type":"string"},"name":{"readOnly":true,"type":"string"},"offer_email_instructions":{"nullable":true,"readOnly":true,"type":"string"},"offer_portal_instructions":{"nullable":true,"readOnly":true,"type":"string"},"offer_source":{"enum":["email","api","web_portal","all_offers","crm_lendsaas",null],"nullable":true,"readOnly":true},"slug":{"nullable":true,"readOnly":true,"type":"string"},"submission_channel":{"enum":["email","api","web_portal","all_offers","crm_lendsaas",null],"nullable":true,"readOnly":true},"submission_email_address":{"nullable":true,"readOnly":true,"type":"string"}},"type":"object"},"Funder1":{"additionalProperties":false,"properties":{"heron_id":{"readOnly":true,"type":"string"},"name":{"readOnly":true,"type":"string"}},"type":"object"},"FunderCandidate":{"additionalProperties":false,"properties":{"funder_heron_id":{"readOnly":true,"type":"string"},"funder_name":{"readOnly":true,"type":"string"},"similarity":{"readOnly":true,"type":"number"}},"type":"object"},"FunderPolicyEvaluation":{"additionalProperties":false,"properties":{"created":{"format":"date-time","readOnly":true,"type":"string"},"end_user_heron_id":{"readOnly":true,"type":"string"},"funder":{"allOf":[{"$ref":"#/components/schemas/FunderPolicyEvaluationFunder"}],"readOnly":true},"input_data":{"additionalProperties":{},"nullable":true,"readOnly":true,"type":"object"},"last_updated":{"format":"date-time","readOnly":true,"type":"string"},"linked_funder_submission":{"allOf":[{"$ref":"#/components/schemas/LinkedFunderSubmission"}],"nullable":true,"readOnly":true},"matching_priority":{"nullable":true,"readOnly":true,"type":"integer"},"result":{"additionalProperties":{},"nullable":true,"readOnly":true,"type":"object"},"status":{"enum":["not_evaluated","evaluating","matched","mismatched","missing_data","error"],"readOnly":true},"submission_configured":{"readOnly":true,"type":"boolean"}},"type":"object"},"FunderPolicyEvaluationFunder":{"additionalProperties":false,"properties":{"heron_id":{"readOnly":true,"type":"string"},"logo_url":{"nullable":true,"readOnly":true,"type":"string"},"name":{"readOnly":true,"type":"string"}},"type":"object"},"FunderSubmissionSchema":{"additionalProperties":false,"properties":{"created":{"format":"date-time","readOnly":true,"type":"string"},"end_user_heron_id":{"readOnly":true,"type":"string"},"funder":{"allOf":[{"$ref":"#/components/schemas/Funder1"}],"readOnly":true},"heron_id":{"readOnly":true,"type":"string"},"status":{"enum":["pending","in_progress","submitted_to_funder","invalid_data_for_funder","submission_failed","approved","declined",null],"nullable":true,"readOnly":true},"submission_result":{"additionalProperties":{},"nullable":true,"readOnly":true,"type":"object"},"submitted_at":{"format":"date-time","nullable":true,"readOnly":true,"type":"string"}},"type":"object"},"GetEndUserEmailsOptionsSchema":{"properties":{"limit":{"minimum":1,"type":"integer"},"page":{"minimum":0,"type":"integer"}},"required":["limit","page"],"type":"object"},"GetFileRenameRulesSchema":{"properties":{"end_user_file_class":{"type":"string"},"file_name_template":{"type":"string"},"heron_id":{"type":"string"},"is_enabled":{"type":"boolean"},"variables":{"items":{"$ref":"#/components/schemas/VariableDefinition"},"type":"array"}},"required":["end_user_file_class","file_name_template","is_enabled"],"type":"object"},"GetFinancialsSummarySchema":{"properties":{"grouping":{"enum":["by_month","by_quarter","by_year",null],"nullable":true,"type":"string"}},"type":"object"},"GetIsoApplication":{"properties":{"heron_id":{"description":"The ISO application's heron_id","example":"iso_6hBjQT9k6KP2rLCXwjUJff","type":"string"},"processing_status":{"description":"The processing status of the file.","enum":["new","processing","processed","failed"],"example":"processed","type":"string"}},"required":["heron_id","processing_status"],"type":"object"},"GetIsoApplicationSchema":{"properties":{"created":{"format":"date-time","readOnly":true,"type":"string"},"end_user_heron_id":{"description":"The heron_id of the end_user associated with the iso application, if available","readOnly":true,"type":"string"},"end_user_id":{"description":"The end_user_id of the end_user associated with the iso application, if available","readOnly":true,"type":"string"},"field_validations":{"items":{"$ref":"#/components/schemas/IsoApplicationFieldValidation"},"type":"array"},"filename":{"description":"The original filename of the ISO application form","example":"iso_app.pdf","type":"string"},"heron_id":{"description":"The ISO application's heron_id","example":"iso_6hBjQT9k6KP2rLCXwjUJff","type":"string"},"processing_status":{"description":"The processing status of the file.","enum":["new","processing","processed","failed"],"example":"processed","type":"string"},"quality_status":{"description":"The overall field validation results. 'fully_matched' indicated all field validations have passed. 'review_required' indicates one or more field validations failed.","enum":["fully_matched","review_required",null],"example":"fully_matched","nullable":true,"type":"string"},"result":{"additionalProperties":{"$ref":"#/components/schemas/IsoApplicationFieldResult"},"description":"The extracted keys/values from the form, normalised to Heron's field schema. Keys will only be present in results if they are found in the original file. For a full list of fields, see the documentation.","type":"object"},"source_email":{"allOf":[{"$ref":"#/components/schemas/EndUserEmail"}],"description":"Original email that contained ISO application, if applicable","nullable":true,"readOnly":true}},"required":["filename","heron_id","processing_status","quality_status"],"type":"object"},"GetTransactionParams":{"properties":{"account_ids":{"default":null,"description":"Account ids to include. If not provided, all accounts are included","items":{"example":"1234","type":"string"},"nullable":true,"type":"array"},"category_heron_id":{"default":[],"description":"Filter by the heron_id of the category that the transaction is annotated with","example":"ctg_GP7sGZpRn3exDregyvC4aW","items":{"type":"string"},"nullable":true,"type":"array"},"confidence_max":{"description":"Filter by maximum confidence of annotation associated with transaction","maximum":1.0,"minimum":0.0,"type":"number"},"confidence_min":{"description":"Filter by minimum confidence of annotation associated with transaction","maximum":1.0,"minimum":0.0,"type":"number"},"counterparty_keyword":{"description":"Filter by keyword match on transaction counterparty; case insensitive","type":"string"},"created_date_max":{"description":"Filter by latest transaction upload date - when Heron received the transaction","example":"2020-04-27","format":"date","type":"string"},"created_date_min":{"description":"Filter by earliest transaction upload date - when Heron received the transaction","example":"2020-04-27","format":"date","type":"string"},"description_keyword":{"description":"Filter by keyword match on transaction description; case insensitive","type":"string"},"description_regex":{"description":"Filter by regex matching transaction description","type":"string"},"end_user_id":{"description":"End user id of transaction","type":"string"},"from_date":{"description":"Deprecated; see created_date_ or timestamp_date_","format":"date","type":"string"},"has_matching_transaction":{"description":"Filter by whether the transaction has a matching transaction","type":"boolean"},"has_merchant":{"default":null,"description":"Filter by whether the transaction has a merchant entity associated with it","nullable":true,"type":"boolean"},"heron_id":{"description":"Heron generated Id of transaction","example":"txn_hEAbWvjRL8WDozkiLDcWSR","type":"string"},"include_duplicates":{"description":"Whether or not to include duplicate transactions in the response. Defaults to false unless request_id is provided, in which case it defaults to true.","type":"boolean"},"is_recurring":{"description":"Filter by whether the transaction is recurring","type":"boolean"},"last_updated_max":{"description":"Filter for transactions whose values were last updated in Heron systems before the specified input value","example":"2026-04-18T03:33:26.881367","format":"date-time","type":"string"},"last_updated_min":{"description":"Filter for transactions whose values were last updated in Heron systems after the specified input value","example":"2026-04-18T03:33:26.881353","format":"date-time","type":"string"},"limit":{"default":1000,"description":"Number of transactions to return per page","maximum":10000,"minimum":1,"type":"integer"},"max_amount":{"description":"Filter by maximum amount of transaction","type":"number"},"max_balance":{"description":"Filter by maximum running balance","type":"number"},"merchant_group_id":{"description":"Filter by merchant group id","type":"string"},"merchant_heron_id":{"description":"Filter by merchant heron id","type":"string"},"min_amount":{"description":"Filter by minimum amount of transaction","type":"number"},"min_balance":{"description":"Filter by minimum running balance","type":"number"},"order_by":{"default":"id_asc","description":"What to order transactions by","enum":["amount_asc","amount_desc","abs_amount_asc","abs_amount_desc","description_asc","description_desc","timestamp_asc","timestamp_desc","id_asc","id_desc","confidence_asc","confidence_desc","created_asc","created_desc","balance_asc","balance_desc"],"type":"string"},"page":{"default":1,"description":"Page of transaction to return","minimum":1,"type":"integer"},"reference_id":{"description":"Reference Id of transaction","type":"string"},"request_id":{"description":"Request-Id header returned in the response of POST transactions. Sending this parameter will return all transactions sent in a particular POST request, including any duplicates.","type":"string"},"timestamp_date_max":{"description":"Filter by latest transaction timestamp","example":"2020-04-27","format":"date","type":"string"},"timestamp_date_min":{"description":"Filter by earliest transaction timestamp","example":"2020-04-27","format":"date","type":"string"},"to_date":{"description":"Deprecated; see created_date_ or timestamp_date_","format":"date","type":"string"},"transaction_code":{"description":"Filter by transaction code","type":"string"}},"type":"object"},"GroupedTransaction":{"properties":{"amount":{"$ref":"#/components/schemas/Money"},"category":{"$ref":"#/components/schemas/GroupedTransactionsCategory"},"description":{"type":"string"},"heron_id":{"type":"string"},"timestamp":{"format":"date-time","type":"string"}},"type":"object"},"GroupedTransactionMerchant":{"properties":{"categories":{"items":{"$ref":"#/components/schemas/MerchantCategory"},"readOnly":true,"type":"array"},"group_id":{"enum":["Uber","Google","Intuit","debt.mca_or_rbf","debt.non_bank_business","debt.equipment_and_auto_leasing","debt.mortgage","debt.personal_non_mortgage","debt.collections","debt.bank","invoice_factoring","fuel_provider",null],"nullable":true,"type":"string"},"heron_id":{"example":"mrc_2gvRJMLxfTnawKfQcG8qw7","readOnly":true,"type":"string"},"icon_url":{"format":"url","readOnly":true,"type":"string"},"logo_url":{"format":"url","readOnly":true,"type":"string"},"name":{"type":"string"}},"type":"object"},"GroupedTransactionsCategory":{"properties":{"heron_id":{"type":"string"},"label":{"type":"string"}},"type":"object"},"Handle":{"properties":{"identifier":{"type":"string"},"name":{"type":"string"}},"required":["identifier","name"],"type":"object"},"HeronScoreFeatureGroupContribution":{"properties":{"relative_contribution":{"type":"number"},"relative_population_avg":{"type":"number"}},"type":"object"},"HeronScoreSchema":{"properties":{"data_quality_issues":{"description":"A list of data quality issues that may have impacted the score","items":{"enum":["transactions_without_timestamps","date_range_too_low","confidence_too_low","ctg_coverage_too_low","data_volume_too_low","data_not_fresh"],"type":"string"},"type":"array"},"feature_groups_contributions":{"additionalProperties":{"$ref":"#/components/schemas/HeronScoreFeatureGroupContribution"},"type":"object"},"predicted_at":{"description":"When the Heron Score was predicted","format":"date-time","type":"string"},"reference_timestamp":{"description":"When the Heron Score was calculated for; by default the last transaction timestamp for the company","format":"date-time","type":"string"},"status":{"enum":["not_available","partially_available","available"],"type":"string"},"value":{"description":"The Heron Score value","type":"integer"}},"type":"object"},"HumanInTheLoopParserConfig":{"properties":{"alert_channel":{"nullable":true,"type":"string"},"enabled":{"type":"boolean"},"run_jitl":{"type":"boolean"}},"type":"object"},"InboundEmailSettings":{"properties":{"allowed_from_domains":{"items":{"type":"string"},"type":"array"},"allowed_to_addresses":{"items":{"format":"email","type":"string"},"type":"array"},"blocked_from_domains":{"items":{"type":"string"},"type":"array"},"match_emails_with_same_subject_line":{"description":"Whether to group re-submissions with the same subject line into the same end user","type":"boolean"}},"type":"object"},"IndustryParams":{"properties":{"naics_code_max_digits":{"description":"Maximum number of digits in NAICS code","example":6,"maximum":6,"minimum":2,"type":"integer"},"naics_code_min_digits":{"description":"Minimum number of digits in NAICS code","example":2,"maximum":6,"minimum":2,"type":"integer"}},"type":"object"},"IndustrySchema":{"properties":{"label":{"description":"The text name of the taxonomy value","example":"Fruit and Vegetable Preserving and Specialty Food Manufacturing","type":"string"},"probability":{"description":"The probability that the end user is associated with the industry; we will always return the highest probability industry","example":0.42,"type":"number"},"taxonomy":{"description":"Industry classification system used","example":"naics","type":"string"},"taxonomy_value":{"description":"The predicted industry for the end user according to taxonomy","example":"3114","type":"string"}},"type":"object"},"InscribeAccount":{"properties":{"account_type":{"nullable":true,"type":"string"},"beginning_balance":{"allOf":[{"$ref":"#/components/schemas/InscribeNumberPrediction"}],"nullable":true},"ending_balance":{"allOf":[{"$ref":"#/components/schemas/InscribeNumberPrediction"}],"nullable":true},"institution_name":{"nullable":true,"type":"string"},"number":{"$ref":"#/components/schemas/InscribeStringPrediction"},"transactions":{"items":{"$ref":"#/components/schemas/InscribeTransaction"},"type":"array"},"transactions_match_balances":{"nullable":true,"type":"boolean"}},"type":"object"},"InscribeNumberPrediction":{"properties":{"confidence":{"type":"number"},"normalized":{"type":"integer"},"raw":{"type":"string"}},"type":"object"},"InscribeParsedDetails":{"properties":{"bank_accounts":{"items":{"$ref":"#/components/schemas/InscribeAccount"},"type":"array"},"name":{"$ref":"#/components/schemas/InscribeParsedDetailsName"}},"type":"object"},"InscribeParsedDetailsName":{"properties":{"raw":{"type":"string"}},"type":"object"},"InscribeSchema":{"properties":{"customer_name":{"default":null,"nullable":true,"type":"string"},"parsed_details":{"$ref":"#/components/schemas/InscribeParsedDetails"}},"type":"object"},"InscribeStringPrediction":{"properties":{"confidence":{"type":"number"},"normalized":{"type":"string"},"raw":{"type":"string"}},"type":"object"},"InscribeTransaction":{"properties":{"amount":{"type":"integer"},"date":{"format":"date","type":"string"},"description":{"type":"string"},"id":{"type":"string"}},"type":"object"},"InspectionReportSchema":{"properties":{"inspection_data":{"additionalProperties":{},"default":null,"nullable":true,"type":"object"},"type_of_inspection":{"default":null,"enum":["CommercialProperty","CommercialLiability","CommercialPackage","ContractorTelephone","Nonproductive","InsuredFailureToAppear","Mueller","Other",null],"nullable":true,"type":"string"}},"type":"object"},"IntegrationLinkNewSchema":{"properties":{"access_token":{"description":"The generated token that grants access to the bank (this is encrypted in transit and at-rest with a custom key)","example":"access-sandbox-de3ce8ef-33f8-452c-a685-8671031fc0f6","nullable":false,"type":"string","writeOnly":true},"asset_report_token":{"default":null,"description":"Optional. If you already have a Plaid asset report, pass the token to skip creating a new one.","nullable":true,"type":"string","writeOnly":true},"created":{"description":"When the integration link was created in Heron system","example":"2020-01-01T00:00:00Z","format":"date-time","readOnly":true,"type":"string"},"data_source_heron_id":{"type":"string"},"end_user_id":{"description":"A unique identifier for your end user (customer) generated by you","example":"c614d67b-9aec-4b5f-8a4f-6f2ab2b6cfe2","type":"string","writeOnly":true},"end_user_name":{"description":"An human readable name for this end user, like the company legal name","example":"Acme Corp","type":"string","writeOnly":true},"item_id":{"description":"Unique identifier for each bank connection made by your end users. In Plaid this is the 'item_id'.","example":"M5eVJqLnv3tbzdngLDp9FL5OlDNxlNhlE55op","nullable":false,"type":"string"},"last_successful_sync":{"description":"When the integration link was last successfully synced","example":"2020-01-01T00:00:00Z","format":"date-time","readOnly":true,"type":"string"},"last_updated":{"description":"When the integration link was last updated in Heron system","example":"2020-01-01T00:00:00Z","format":"date-time","readOnly":true,"type":"string"},"status":{"description":"The integration link status","enum":["pending","active","syncing","erroring","sync_disabled","deleted_in_plaid"],"example":"active","readOnly":true,"type":"string"},"status_message":{"description":"A message describing the 'erroring' status of the integration link","example":"[ITEM_LOGIN_REQUIRED] the login details of this item have changed (credentials, MFA, or required user action) and a user login is required to update this information. use Link's update mode to restore the item to a good state","readOnly":true,"type":"string"},"type":{"description":"The integration link type, inherited from the integration: plaid_assets_report or plaid_integration","example":"plaid_assets_report","readOnly":true,"type":"string"}},"required":["access_token","end_user_id","item_id"],"type":"object"},"IntegrationLinkSchema":{"properties":{"access_token":{"description":"The generated token that grants access to the bank (this is encrypted in transit and at-rest with a custom key)","example":"access-sandbox-de3ce8ef-33f8-452c-a685-8671031fc0f6","nullable":false,"type":"string","writeOnly":true},"asset_report_token":{"default":null,"description":"Optional. If you already have a Plaid asset report, pass the token to skip creating a new one.","nullable":true,"type":"string","writeOnly":true},"created":{"description":"When the integration link was created in Heron system","example":"2020-01-01T00:00:00Z","format":"date-time","readOnly":true,"type":"string"},"end_user_id":{"description":"A unique identifier for your end user (customer) generated by you","example":"c614d67b-9aec-4b5f-8a4f-6f2ab2b6cfe2","type":"string","writeOnly":true},"end_user_name":{"description":"An human readable name for this end user, like the company legal name","example":"Acme Corp","type":"string","writeOnly":true},"item_id":{"description":"Unique identifier for each bank connection made by your end users. In Plaid this is the 'item_id'.","example":"M5eVJqLnv3tbzdngLDp9FL5OlDNxlNhlE55op","nullable":false,"type":"string"},"last_successful_sync":{"description":"When the integration link was last successfully synced","example":"2020-01-01T00:00:00Z","format":"date-time","readOnly":true,"type":"string"},"last_updated":{"description":"When the integration link was last updated in Heron system","example":"2020-01-01T00:00:00Z","format":"date-time","readOnly":true,"type":"string"},"status":{"description":"The integration link status","enum":["pending","active","syncing","erroring","sync_disabled","deleted_in_plaid"],"example":"active","readOnly":true,"type":"string"},"status_message":{"description":"A message describing the 'erroring' status of the integration link","example":"[ITEM_LOGIN_REQUIRED] the login details of this item have changed (credentials, MFA, or required user action) and a user login is required to update this information. use Link's update mode to restore the item to a good state","readOnly":true,"type":"string"},"type":{"description":"The integration link type, inherited from the integration: plaid_assets_report or plaid_integration","example":"plaid_assets_report","readOnly":true,"type":"string"}},"required":["access_token","end_user_id","item_id"],"type":"object"},"IntegrationLinkUpdateSchema":{"properties":{"access_token":{"description":"The generated token that grants access to the bank (this is encrypted in transit and at-rest with a custom key)","example":"access-sandbox-de3ce8ef-33f8-452c-a685-8671031fc0f6","type":"string","writeOnly":true}},"required":["access_token"],"type":"object"},"IntegrationSchema":{"properties":{"base_url":{"description":"Base URL of the API integration. For Google Drive, use root_dir_path in client_auth instead.","example":"https://sandbox.plaid.com","format":"url","nullable":true,"type":"string"},"client_auth":{"additionalProperties":{},"description":"Client-specific authentication settings depending on the integration type","type":"object","writeOnly":true},"client_id":{"description":"Client ID for API access (this is encrypted in transit and at-rest with a custom key). Required for Plaid integration","nullable":true,"type":"string"},"client_secret":{"description":"Client Secret for API access (this is encrypted in transit and at-rest with a custom key). Required for Plaid integration","nullable":true,"type":"string"},"heron_id":{"readOnly":true,"type":"string"},"name":{"description":"A name for your integration","example":"Plaid Prod","type":"string"},"resource":{"description":"For integrations with multiple available resources, the specific resource","enum":["transaction","assets_report","end_user_application","invoice_factoring_processing","end_user_files","funder_decision"],"type":"string"},"type":{"description":"The integration type, a specific provider","type":"string"},"webhook_url":{"description":"URL provided by you to which we'll forward all webhooks (optional)","example":"https://your-server.yourdomain.com/hooks","format":"url","nullable":true,"type":"string"}},"required":["name","resource","type"],"type":"object"},"InteractionLogResponseSchema":{"properties":{"created":{"format":"date-time","readOnly":true,"type":"string"},"heron_id":{"readOnly":true,"type":"string"}},"type":"object"},"IsoAppAddress":{"properties":{"address_line_1":{"nullable":true,"type":"string"},"address_line_2":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"required":["address_line_1","address_line_2","city","state","zip"],"type":"object"},"IsoAppBusiness":{"properties":{"address":{"allOf":[{"$ref":"#/components/schemas/IsoAppAddress"}],"nullable":true},"annual_revenue":{"nullable":true,"type":"number"},"doing_business_as":{"nullable":true,"type":"string"},"ein":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"incorporated_state":{"nullable":true,"type":"string"},"industry":{"nullable":true,"type":"string"},"monthly_revenue":{"nullable":true,"type":"number"},"name":{"nullable":true,"type":"string"},"phone_number":{"nullable":true,"type":"string"},"start_date":{"nullable":true,"type":"string"},"type_of_business_entity":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"}},"required":["address","annual_revenue","doing_business_as","ein","email","incorporated_state","industry","monthly_revenue","name","phone_number","start_date","type_of_business_entity","website"],"type":"object"},"IsoAppFunding":{"properties":{"amount_requested":{"nullable":true,"type":"number"},"loan_purpose":{"nullable":true,"type":"string"}},"required":["amount_requested","loan_purpose"],"type":"object"},"IsoAppOwnerWithSignature":{"properties":{"address":{"allOf":[{"$ref":"#/components/schemas/IsoAppAddress"}],"nullable":true},"cell_phone":{"nullable":true,"type":"string"},"credit_score":{"default":null,"nullable":true,"type":"integer"},"date_of_signature":{"nullable":true,"type":"string"},"dob":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"first_name":{"nullable":true,"type":"string"},"home_phone":{"nullable":true,"type":"string"},"is_signed":{"nullable":true,"type":"boolean"},"last_name":{"nullable":true,"type":"string"},"ownership_percent":{"nullable":true,"type":"string"},"ssn":{"nullable":true,"type":"string"}},"required":["address","cell_phone","date_of_signature","dob","email","first_name","home_phone","is_signed","last_name","ownership_percent","ssn"],"type":"object"},"IsoAppWithOwnerSignaturesResponseSchema":{"properties":{"business":{"allOf":[{"$ref":"#/components/schemas/IsoAppBusiness"}],"nullable":true},"funding":{"allOf":[{"$ref":"#/components/schemas/IsoAppFunding"}],"nullable":true},"owner1":{"allOf":[{"$ref":"#/components/schemas/IsoAppOwnerWithSignature"}],"nullable":true},"owner2":{"allOf":[{"$ref":"#/components/schemas/IsoAppOwnerWithSignature"}],"nullable":true}},"required":["business","funding","owner1","owner2"],"type":"object"},"IsoApplicationFieldResult":{"properties":{"document_field_name":{"description":"The field's original name in the source document","example":"Company Legal Name","type":"string"},"is_empty":{"description":"Whether the value is empty","example":false,"type":"boolean"},"value":{"description":"The value extracted from the document for the current field","example":"Heron Data Ltd","type":"string"},"value_confidence":{"description":"OCR confidence of the extracted value","example":0.99,"nullable":true,"type":"number"}},"required":["document_field_name","is_empty","value","value_confidence"],"type":"object"},"IsoApplicationFieldValidation":{"properties":{"failure_reason":{"nullable":true,"type":"string"},"field_name":{"type":"string"},"result":{"enum":["passed","failed","not_applicable"],"example":"passed","type":"string"},"validation_type":{"type":"string"}},"required":["failure_reason","field_name","result","validation_type"],"type":"object"},"JSONWorkflowDefinition":{"properties":{"debounce_seconds":{"default":0,"minimum":0,"type":"integer"},"default_on_failure":{"default":null,"nullable":true,"type":"string"},"edges":{"items":{"$ref":"#/components/schemas/JSONWorkflowEdge"},"type":"array"},"error_handling":{"$ref":"#/components/schemas/JSONWorkflowErrorHandling"},"nodes":{"items":{"$ref":"#/components/schemas/JSONWorkflowNode"},"type":"array"},"workflow_parameters":{"additionalProperties":{},"type":"object"}},"type":"object"},"JSONWorkflowEdge":{"properties":{"from_handle_id":{"default":"default","type":"string"},"from_node_id":{"type":"string"},"to_handle_id":{"default":"default","type":"string"},"to_node_id":{"type":"string"}},"required":["from_node_id","to_node_id"],"type":"object"},"JSONWorkflowErrorHandling":{"properties":{"failure_strategy":{"default":"fail_fast","enum":["fail_fast","best_effort","critical"],"type":"string"},"join_rule":{"default":"all_success","enum":["all_success","any_success"],"type":"string"},"max_attempts_per_node":{"default":1,"minimum":1,"type":"integer"}},"type":"object"},"JSONWorkflowNode":{"properties":{"id":{"type":"string"},"is_critical":{"default":false,"type":"boolean"},"name":{"type":"string"},"parameters":{"additionalProperties":{},"type":"object"},"settings":{"$ref":"#/components/schemas/JSONWorkflowNodeSettings"},"type":{"type":"string"},"version":{"default":1,"type":"integer"}},"required":["id","name","type"],"type":"object"},"JSONWorkflowNodeSettings":{"properties":{"cache":{"$ref":"#/components/schemas/NodeCacheSettings"},"is_disabled":{"default":false,"type":"boolean"},"max_executions_per_end_user":{"default":0,"minimum":0,"type":"integer"},"on_disabled_output_handle_id":{"default":"default","type":"string"}},"type":"object"},"LinkedFunderSubmission":{"additionalProperties":false,"properties":{"heron_id":{"readOnly":true,"type":"string"},"status":{"enum":["pending","in_progress","submitted_to_funder","invalid_data_for_funder","submission_failed","approved","declined",null],"nullable":true,"readOnly":true},"submitted_at":{"format":"date-time","nullable":true,"readOnly":true,"type":"string"}},"type":"object"},"LocalVariable":{"properties":{"description":{"type":"string"},"json_schema":{"additionalProperties":{},"type":"object"},"name":{"type":"string"}},"required":["description","json_schema","name"],"type":"object"},"LossRunPolicy":{"properties":{"broker_name":{"default":null,"description":"The name of the broker that arranged the insurance policy","nullable":true,"type":"string"},"claims":{"default":null,"description":"A list of the claims associated with the the policy","items":{"$ref":"#/components/schemas/PolicyClaim"},"nullable":true,"type":"array"},"insurance_company_name":{"default":null,"description":"The insurance company and/or insurance carrier that issued the policy, often listed in the title of the document, e.g. AGMI, National Casualty Company, Atlas Financial Holdings, etc. If multiple possible companies are provided for the policy, include each one separated by forward-slashes.","nullable":true,"type":"string"},"insurance_type":{"default":null,"description":"The type of insurance for the policy. For example, Liability Loss, Physical Damage, Motor Truck Cargo. Leave blank if not applicable","nullable":true,"type":"string"},"insured_name":{"default":null,"description":"The name of the person/company on the insurance policy","nullable":true,"type":"string"},"number_of_units":{"default":null,"description":"The number of individual items or exposures covered under the policy. For example, the number of vehicles covered by the policy. Leave blank if not applicable","nullable":true,"type":"integer"},"policy_cancellation_date":{"default":null,"description":"The date the policy was cancelled prior to its expiration, if applicable","format":"date","nullable":true,"type":"string"},"policy_effective_date":{"default":null,"description":"The start date of the policy coverage period in YYYY-MM-DD format","format":"date","nullable":true,"type":"string"},"policy_expiration_date":{"default":null,"description":"The end date of the policy coverage period in YYYY-MM-DD format","format":"date","nullable":true,"type":"string"},"policy_number":{"default":null,"description":"The unique identifier assigned to the insurance policy","nullable":true,"type":"string"},"report_generation_date":{"default":null,"description":"The date the report was generate in YYYY-MM-DD format. This may also be called 'Valuation Date' or 'Individual Risk Experience as of' if not immediately found elsewhere in the document","format":"date","nullable":true,"type":"string"},"total_expense":{"default":null,"description":"The sum of all expense amounts from all losses in the policy. This value should only be extracted if it is present in the document. Also called 'ALAE Incurred' or 'Total ALAE'","nullable":true,"type":"number"},"total_incurred":{"default":null,"description":"The sum of total incurred amounts from all losses in the policy. If there were no claims made for the policy, this value should be 0. This value should only be extracted if it is present in the document or if it can be calculated directly from the totals row for the policy using your existing knowledge of loss runs.\nFor example, if there is are Loss Incurred and Total ALAE values for the policy, it is possible to calculate the total incurred","nullable":true,"type":"number"},"total_paid":{"default":null,"description":"The sum of total paid amounts from all losses in the policy. This value should only be extracted if it is present in the document. If not clearly provided in one of the totals row, 'Total Paid' may be found in the totals row of the 'Paid Loss' column.","nullable":true,"type":"number"},"total_recovered":{"default":null,"description":"The sum of total recovered amounts from all losses in the policy. This value should only be extracted if it is present in the document.","nullable":true,"type":"number"},"total_reserve":{"default":null,"description":"The sum of total reserve amounts from all losses in the policy. This value should only be extracted if it is present in the document.","nullable":true,"type":"number"}},"type":"object"},"LossRunResultSchema":{"properties":{"policies":{"default":null,"description":"A list of the policies on the loss run","items":{"$ref":"#/components/schemas/LossRunPolicy"},"nullable":true,"type":"array"}},"type":"object"},"MaterialisedEndUserEntityAttribute":{"properties":{"attribute_heron_id":{"type":"string"},"attribute_name":{"type":"string"},"attribute_type":{"enum":["float","int","decimal","string","date","datetime","bool"]},"display_order":{"type":"integer"},"materialised_sources":{"items":{"$ref":"#/components/schemas/MaterialisedEndUserEntityAttributeSource"},"type":"array"},"selected_source":{"allOf":[{"$ref":"#/components/schemas/MaterialisedEndUserEntityAttributeSource"}],"nullable":true}},"type":"object"},"MaterialisedEndUserEntityAttributeSource":{"properties":{"source":{"$ref":"#/components/schemas/EndUserEntityAttributeSourceSchema"},"source_data":{"additionalProperties":{},"type":"object"},"timestamp":{"format":"date-time","type":"string"},"value":{}},"type":"object"},"MaterialisedEndUserEntitySchema":{"properties":{"display_order":{"type":"integer"},"entity_heron_id":{"type":"string"},"entity_name":{"type":"string"},"is_list":{"type":"boolean"},"materialised_attributes":{"items":{"$ref":"#/components/schemas/MaterialisedEndUserEntityAttribute"},"type":"array"}},"type":"object"},"Merchant":{"properties":{"categories":{"items":{"$ref":"#/components/schemas/MerchantCategory"},"readOnly":true,"type":"array"},"group_id":{"enum":["Uber","Google","Intuit","debt.mca_or_rbf","debt.non_bank_business","debt.equipment_and_auto_leasing","debt.mortgage","debt.personal_non_mortgage","debt.collections","debt.bank","invoice_factoring","fuel_provider",null],"nullable":true,"type":"string"},"heron_id":{"example":"mrc_2gvRJMLxfTnawKfQcG8qw7","readOnly":true,"type":"string"},"icon_url":{"format":"url","nullable":true,"type":"string"},"is_priority":{"readOnly":true,"type":"boolean"},"logo_url":{"format":"url","nullable":true,"type":"string"},"name":{"type":"string"},"url":{"format":"url","type":"string"}},"required":["name","url"],"type":"object"},"MerchantCategory":{"properties":{"code":{"example":"7311","readOnly":true,"type":"string"},"description":{"default":null,"example":"Advertising services","nullable":true,"readOnly":true,"type":"string"},"slug":{"default":null,"example":"advertising_services","nullable":true,"readOnly":true,"type":"string"}},"required":["code"],"type":"object"},"MerchantExtract":{"properties":{"categories":{"items":{"$ref":"#/components/schemas/MerchantCategory"},"readOnly":true,"type":"array"},"confidence":{"default":null,"maximum":1.0,"minimum":0.0,"nullable":true,"type":"number"},"group_id":{"type":"string"},"heron_id":{"example":"mrc_2gvRJMLxfTnawKfQcG8qw7","readOnly":true,"type":"string"},"icon_url":{"format":"url","readOnly":true,"type":"string"},"logo_url":{"format":"url","readOnly":true,"type":"string"},"name":{"default":null,"example":"Amazon","nullable":true,"readOnly":true,"type":"string"},"url":{"default":null,"example":"https://www.amazon.com/","format":"url","nullable":true,"readOnly":true,"type":"string"}},"type":"object"},"MerchantFeedback":{"properties":{"heron_id":{"description":"heron_id of the correct merchant","example":"mrc_igC3nphBYr4Zunii4gQfY7","type":"string"},"is_correct":{"default":false,"example":false,"type":"boolean"},"name":{"description":"name of the correct merchant","example":"Spotify","type":"string"}},"type":"object"},"MerchantGroup":{"properties":{"description":{"description":"Description of merchant group","type":"string"},"id":{"description":"Unique ID of merchant group","type":"string"},"name":{"description":"Display name of merchant group","type":"string"}},"type":"object"},"MerchantSummaryRow":{"properties":{"group":{"nullable":true,"type":"string"},"heron_id":{"type":"string"},"inflow_metrics":{"$ref":"#/components/schemas/MerchantSummaryRowMetrics"},"name":{"type":"string"},"net_metrics":{"$ref":"#/components/schemas/MerchantSummaryRowMetrics"},"outflow_metrics":{"$ref":"#/components/schemas/MerchantSummaryRowMetrics"},"transactions":{"items":{"$ref":"#/components/schemas/GroupedTransaction"},"type":"array"}},"type":"object"},"MerchantSummaryRowMetrics":{"properties":{"amount":{"$ref":"#/components/schemas/Money"},"changed_in_last_90_days":{"type":"boolean"},"count":{"type":"integer"},"duration_days":{"type":"integer"},"estimated_monthly_amount":{"allOf":[{"$ref":"#/components/schemas/Money"}],"nullable":true},"frequency":{"enum":["not_enough_data","same_day","irregular","daily","weekly","biweekly","monthly","quarterly","annually","weekday","twice_weekly",null],"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"max_amount":{"$ref":"#/components/schemas/Money"},"max_timestamp":{"format":"date-time","type":"string"},"mean_amount":{"$ref":"#/components/schemas/Money"},"mean_interval_days":{"nullable":true,"type":"number"},"median_amount":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"Deprecated. This field is no longer being populated","nullable":true},"min_amount":{"$ref":"#/components/schemas/Money"},"min_timestamp":{"format":"date-time","type":"string"},"mode_amount":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"Deprecated. This field is no longer being populated","nullable":true},"mode_interval_days":{"nullable":true,"type":"integer"},"std_dev_amount":{"allOf":[{"$ref":"#/components/schemas/Money"}],"nullable":true}},"type":"object"},"Metadata":{"properties":{"carrier_route":{"nullable":true,"type":"string"},"congressional_district":{"nullable":true,"type":"string"},"county_fips":{"nullable":true,"type":"string"},"county_name":{"nullable":true,"type":"string"},"dst":{"nullable":true,"type":"boolean"},"elot_sequence":{"nullable":true,"type":"string"},"elot_sort":{"nullable":true,"type":"string"},"latitude":{"nullable":true,"type":"number"},"longitude":{"nullable":true,"type":"number"},"precision":{"nullable":true,"type":"string"},"rdi":{"nullable":true,"type":"string"},"record_type":{"nullable":true,"type":"string"},"time_zone":{"nullable":true,"type":"string"},"utc_offset":{"nullable":true,"type":"integer"},"zip_type":{"nullable":true,"type":"string"}},"type":"object"},"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","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"],"example":"last_180_days","type":"string"},"description":{"description":"Description of metric","example":"The number of unique transactions with a timestamp","nullable":true,"type":"string"},"group":{"description":"The type of metric","enum":["data_quality","processing_quality","balance","profit_and_loss","debt","risk_flag","forecast","heron","ml_feature"],"example":"data_quality","type":"string"},"label":{"description":"Metric label, slugified","example":"unique_transactions","type":"string"},"status":{"description":"either 'calculated' or 'not_available' depending on the requested date range vs. date range of the data","enum":["available","partially_available","not_available",null],"example":"not_available","nullable":true,"type":"string"},"unit":{"description":"The unit of measurement for metric","enum":["n","day","ratio","amount","weekday","array","probability"],"example":"n","type":"string"},"value":{"description":"The metric value","example":42.42,"nullable":true}},"type":"object"},"MetricBenchmarksSchema":{"properties":{"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","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"],"example":"last_180_days","type":"string"},"label":{"description":"Metric label, slugified","example":"unique_transactions","type":"string"},"percentile":{"description":"The implied percentile based on ranking and sample size","example":0.75,"nullable":true,"type":"number"},"rank":{"description":"Ranking of metric relative to datapoints. 1 is best","example":22,"nullable":true,"type":"integer"},"sample_size":{"description":"The number of datapoints to compare to","example":42,"type":"integer"},"scope":{"default":"user","description":"What end users are included in metric comparisons","enum":["user","heron"],"example":"user","type":"string"}},"type":"object"},"MetricDefinitionSchema":{"properties":{"date_range":{"description":"The date range this metric covers","example":"last_180_days","type":"string"},"description":{"description":"Human-readable description of the metric","example":"Total number of unique transactions","type":"string"},"group":{"description":"The group/category this metric belongs to","example":"transaction_metrics","type":"string"},"label":{"description":"The label/name of the metric","example":"unique_transactions","type":"string"},"unit":{"description":"The unit of measurement for this metric","example":"count","type":"string"}},"type":"object"},"MetricFormula":{"properties":{"add":{"$ref":"#/components/schemas/MetricFormulaAdd"},"aggregation":{"$ref":"#/components/schemas/MetricFormulaAggregation"},"div":{"$ref":"#/components/schemas/MetricFormulaDiv"},"metric":{"$ref":"#/components/schemas/MetricFormulaMetric"},"mult":{"$ref":"#/components/schemas/MetricFormulaMult"},"scalar":{"$ref":"#/components/schemas/MetricFormulaScalar"},"simple_metric":{"$ref":"#/components/schemas/MetricFormulaSimpleMetric"},"sub":{"$ref":"#/components/schemas/MetricFormulaSub"},"type":{"description":"The type of formula to be used","type":"string"}},"required":["type"],"type":"object"},"MetricFormulaAdd":{"properties":{"addend_1":{"$ref":"#/components/schemas/MetricFormula"},"addend_2":{"$ref":"#/components/schemas/MetricFormula"}},"required":["addend_1","addend_2"],"type":"object"},"MetricFormulaAggregation":{"properties":{"by":{"default":[],"description":"The dimension to be used in the aggregation","items":{"type":"string"},"type":"array"},"formula":{"$ref":"#/components/schemas/MetricFormula"},"op":{"description":"The aggregation operation to be used","type":"string"}},"required":["formula","op"],"type":"object"},"MetricFormulaDiv":{"properties":{"dividend":{"$ref":"#/components/schemas/MetricFormula"},"divisor":{"$ref":"#/components/schemas/MetricFormula"}},"required":["dividend","divisor"],"type":"object"},"MetricFormulaMetric":{"properties":{"date_range":{"default":null,"description":"The date range to be used in the query. It will override the date range specified in the metric spec","nullable":true,"type":"string"},"filters":{"default":null,"description":"A list of filters to be applied before computing the metric","items":{"$ref":"#/components/schemas/MetricFormulaSimpleMetricFilter"},"nullable":true,"type":"array"},"metric_name":{"description":"The metric to be used","type":"string"}},"required":["metric_name"],"type":"object"},"MetricFormulaMult":{"properties":{"multiplicand":{"$ref":"#/components/schemas/MetricFormula"},"multiplier":{"$ref":"#/components/schemas/MetricFormula"}},"required":["multiplicand","multiplier"],"type":"object"},"MetricFormulaScalar":{"properties":{"value":{"description":"The value to be used in the formula","type":"integer"}},"required":["value"],"type":"object"},"MetricFormulaSimpleMetric":{"properties":{"date_range":{"default":null,"description":"The date range to be used in the query. It will override the date range specified in the metric spec","nullable":true,"type":"string"},"filter":{"allOf":[{"$ref":"#/components/schemas/MetricFormulaSimpleMetricFilter"}],"default":null,"description":"A filter to be applied before computing the metric","nullable":true},"filters":{"default":null,"description":"A list of filters to be applied before computing the metric","items":{"$ref":"#/components/schemas/MetricFormulaSimpleMetricFilter"},"nullable":true,"type":"array"},"metric_name":{"description":"The metric to be used","type":"string"},"value_if_unavailable":{"default":null,"description":"The value to be used if the metric is not available","nullable":true}},"required":["metric_name"],"type":"object"},"MetricFormulaSimpleMetricFilter":{"properties":{"dimension":{"description":"The dimension to be used","type":"string"},"operator":{"description":"The operator to be used in the filter","type":"string"},"value":{"description":"The dimension value to be used","type":"string"}},"required":["dimension","value"],"type":"object"},"MetricFormulaSub":{"properties":{"minuend":{"$ref":"#/components/schemas/MetricFormula"},"subtrahend":{"$ref":"#/components/schemas/MetricFormula"}},"required":["minuend","subtrahend"],"type":"object"},"MetricSpec":{"properties":{"context":{"description":"The context to be used in the query","type":"string"},"date_ranges":{"description":"A list of date ranges to be used in the query","items":{"type":"string"},"type":"array"},"description":{"type":"string"},"expression":{"description":"The expression to be used in the query","type":"string"},"formula":{"$ref":"#/components/schemas/MetricFormula"},"group":{"description":"The group to be used in the query","type":"string"},"unit":{"description":"The unit to be used in the query","type":"string"}},"required":["context","date_ranges","description","group","unit"],"type":"object"},"MissingAccountSchema":{"properties":{"account_name":{"description":"An account name extracted from the transaction description","example":"Checking","type":"string"},"account_number":{"description":"An account number extracted from the transaction description","example":"****4321","type":"string"},"transactions":{"items":{"$ref":"#/components/schemas/Transaction3"},"type":"array"}},"type":"object"},"ModifiableSettings":{"properties":{"balance_sheet_categories":{"$ref":"#/components/schemas/BalanceSheetCategories"},"disable_data_export":{"type":"boolean"},"financials_metrics":{"additionalProperties":{"$ref":"#/components/schemas/MetricSpec"},"type":"object"},"industry_naics_enabled":{"type":"boolean"},"low_balance_days_threshold":{"type":"number"},"pnl_categories":{"$ref":"#/components/schemas/PnLCategories"},"query_reports":{"items":{"$ref":"#/components/schemas/QueryReportTabGroup"},"type":"array"},"required_revenue_per_month":{"type":"integer"},"restricted_industries":{"items":{"$ref":"#/components/schemas/RestrictedIndustry"},"type":"array"},"use_new_company_layout":{"type":"boolean"},"use_new_end_user_summary_table":{"type":"boolean"},"use_new_end_user_table":{"type":"boolean"}},"type":"object"},"Money":{"properties":{"amount":{"description":"The amount of money","example":"1234.56","type":"number"},"currency":{"description":"The currency of the money","example":"USD","type":"string"}},"type":"object"},"MoneyMarketStatementResultSchema":{"properties":{"account_holder_address_city":{"default":null,"nullable":true,"type":"string"},"account_holder_address_line_1":{"default":null,"nullable":true,"type":"string"},"account_holder_address_state":{"default":null,"enum":["AK","AL","AR","AZ","CA","CO","CT","DC","DE","FL","GA","HI","IA","ID","IL","IN","KS","KY","LA","MA","MD","ME","MI","MN","MO","MS","MT","NC","ND","NE","NH","NJ","NM","NV","NY","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VA","VT","WA","WI","WV","WY","PR",null],"nullable":true,"type":"string"},"account_holder_address_zip":{"default":null,"nullable":true,"type":"string"},"account_holder_name":{"default":null,"nullable":true,"type":"string"},"account_number":{"default":null,"nullable":true,"type":"string"},"bank_name":{"default":null,"nullable":true,"type":"string"},"end_balance":{"default":null,"nullable":true,"type":"number"},"end_date":{"default":null,"nullable":true,"type":"string"},"start_balance":{"default":null,"nullable":true,"type":"number"},"start_date":{"default":null,"nullable":true,"type":"string"}},"type":"object"},"MoneyThumbOutputSchema":{"properties":{"error":{"type":"string"},"results":{"items":{"$ref":"#/components/schemas/MoneyThumbStatement"},"type":"array"}},"type":"object"},"MoneyThumbStatement":{"properties":{"accountNumber":{"nullable":true,"type":"string"},"accounttitle":{"nullable":true,"type":"string"},"bankName":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"string"},"currencycode":{"nullable":true,"type":"string"},"endBalance":{"nullable":true,"type":"number"},"endBalanceCalc":{"nullable":true,"type":"number"},"endDate":{"nullable":true,"type":"string"},"fraudscore":{"nullable":true,"type":"integer"},"isBusiness":{"nullable":true,"type":"boolean"},"likelyMissingTransactions":{"default":false,"type":"boolean"},"maxResolution":{"nullable":true,"type":"integer"},"minResolution":{"nullable":true,"type":"integer"},"numCredits":{"type":"integer"},"numDebits":{"type":"integer"},"numTransactions":{"type":"integer"},"ocr":{"nullable":true,"type":"boolean"},"reconciled":{"type":"boolean"},"startBalance":{"nullable":true,"type":"number"},"startDate":{"nullable":true,"type":"string"},"totCredits":{"nullable":true,"type":"number"},"totDebits":{"nullable":true,"type":"number"},"tpreasons":{"items":{},"nullable":true,"type":"array"},"transactions":{"items":{},"nullable":true,"type":"array"},"webReport":{"nullable":true,"type":"boolean"}},"type":"object"},"MoneyThumbStatementSummary":{"properties":{"account_number":{"type":"string"},"account_title":{"type":"string"},"bank_name":{"type":"string"},"company":{"type":"string"},"currency":{"type":"string"},"end_balance":{"type":"number"},"fraud_reasons":{"items":{"type":"string"},"type":"array"},"fraud_score":{"type":"integer"},"is_business_account":{"type":"boolean"},"is_ocr":{"type":"boolean"},"max_resolution":{"type":"integer"},"min_resolution":{"type":"integer"},"num_credits":{"type":"integer"},"num_debits":{"type":"integer"},"num_transactions":{"type":"integer"},"reconciled":{"type":"boolean"},"start_balance":{"type":"number"},"statement_end_date":{"format":"date-time","type":"string"},"statement_start_date":{"format":"date-time","type":"string"},"total_credits":{"type":"number"},"total_debits":{"type":"number"},"unreconciled_end_balance":{"type":"number"},"web_report":{"type":"boolean"}},"required":["end_balance","num_credits","num_debits","num_transactions","reconciled","start_balance","total_credits","total_debits"],"type":"object"},"MoneyThumbTransactionBounds":{"properties":{"page":{"nullable":true,"type":"integer"},"x_max":{"nullable":true,"type":"integer"},"x_min":{"nullable":true,"type":"integer"},"y_max":{"nullable":true,"type":"integer"},"y_min":{"nullable":true,"type":"integer"}},"required":["page","x_max","x_min","y_max","y_min"],"type":"object"},"NamedDateSchema":{"properties":{"date":{"description":"The date of the NamedDate","example":"2026-04-18","format":"date","nullable":true,"type":"string"},"name":{"description":"The name of the NamedDate","enum":["end_user_created","end_user_last_updated","last_transaction","end_user_last_enriched","last_data_source_end_date_or_transaction_timestamp","custom_date"],"example":"last_transaction","type":"string"}},"type":"object"},"NestedEndUserEntityAttribute":{"properties":{"attribute_description":{"type":"string"},"attribute_name":{"type":"string"},"attribute_sources":{"items":{"$ref":"#/components/schemas/EndUserEntityAttributeSource"},"type":"array"},"attribute_type":{"enum":["float","int","decimal","string","date","datetime","bool"]},"display_order":{"type":"integer"},"heron_id":{"type":"string"},"is_dedupe_key":{"default":false,"type":"boolean"},"reconciliation_config":{"additionalProperties":{},"type":"object"},"reconciliation_strategy":{"enum":["sort_order","llm","comparison","concatenate_lists"]}},"type":"object"},"NestedEndUserEntityAttributeSchema":{"properties":{"attribute_description":{"type":"string"},"attribute_name":{"type":"string"},"attribute_sources":{"items":{"$ref":"#/components/schemas/EndUserEntityAttributeSource"},"type":"array"},"attribute_type":{"enum":["float","int","decimal","string","date","datetime","bool"]},"display_order":{"type":"integer"},"heron_id":{"type":"string"},"is_dedupe_key":{"default":false,"type":"boolean"},"reconciliation_config":{"additionalProperties":{},"type":"object"},"reconciliation_strategy":{"enum":["sort_order","llm","comparison","concatenate_lists"]}},"type":"object"},"NestedEndUserEntitySchema":{"properties":{"display_order":{"type":"integer"},"entity_attributes":{"items":{"$ref":"#/components/schemas/NestedEndUserEntityAttribute"},"type":"array"},"entity_description":{"type":"string"},"entity_name":{"type":"string"},"entity_post_processor_configs":{"default":[],"items":{"additionalProperties":{},"type":"object"},"type":"array"},"heron_id":{"type":"string"},"is_list":{"type":"boolean"},"saved_query_heron_id":{"nullable":true,"type":"string"}},"type":"object"},"NodeCacheSettings":{"properties":{"enabled":{"default":null,"nullable":true,"type":"boolean"},"scope":{"default":null,"nullable":true,"type":"string"},"ttl_seconds":{"default":null,"nullable":true,"type":"integer"}},"type":"object"},"NodeMetadataSchema":{"properties":{"cache_policy":{"$ref":"#/components/schemas/CachePolicyDefinition"},"deprecation_warning":{"default":null,"nullable":true,"type":"string"},"description":{"type":"string"},"input_field_order":{"items":{"type":"string"},"type":"array"},"input_handles":{"items":{"$ref":"#/components/schemas/Handle"},"type":"array"},"input_schema":{"additionalProperties":{},"type":"object"},"latest_version":{"type":"integer"},"local_variables":{"items":{"$ref":"#/components/schemas/LocalVariable"},"type":"array"},"output_handles":{"items":{"$ref":"#/components/schemas/Handle"},"type":"array"},"output_schema":{"additionalProperties":{},"type":"object"},"type":{"type":"string"},"version":{"type":"integer"}},"required":["cache_policy","description","input_field_order","input_handles","input_schema","latest_version","local_variables","output_handles","output_schema","type","version"],"type":"object"},"NsfFee":{"properties":{"amount":{"type":"number"},"date":{"format":"date","type":"string"},"merchant":{"nullable":true,"type":"string"}},"type":"object"},"NumericCheck":{"properties":{"auto_decline":{"default":false,"type":"boolean"},"decline_description":{"default":null,"nullable":true,"type":"string"},"email_template_name":{"default":null,"nullable":true,"type":"string"},"ignore_metric_availability":{"default":false,"type":"boolean"},"is_mandatory":{"default":false,"type":"boolean"},"pass_description":{"default":null,"nullable":true,"type":"string"},"type":{"enum":["equal","not_equal","greater_than","greater_than_or_equal","less_than","less_than_or_equal"]},"value":{"type":"string"}},"type":"object"},"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"},"nsf_transactions_returned_or_not_paid":{"items":{"$ref":"#/components/schemas/OcrolusTransaction"},"type":"array"},"outside_source_deposits":{"items":{"$ref":"#/components/schemas/OcrolusTransaction"},"type":"array"},"payroll":{"items":{"$ref":"#/components/schemas/OcrolusTransaction"},"type":"array"},"period_balance_mismatches":{"items":{"$ref":"#/components/schemas/OcrolusTransaction"},"type":"array"},"ppp_loan_txns":{"items":{"$ref":"#/components/schemas/OcrolusTransaction"},"type":"array"},"probable_recurring_txns":{"items":{"items":{"$ref":"#/components/schemas/OcrolusTransaction"},"type":"array"},"type":"array"},"returned_items":{"items":{"$ref":"#/components/schemas/OcrolusTransaction"},"type":"array"},"round_number_txns":{"items":{"$ref":"#/components/schemas/OcrolusTransaction"},"type":"array"},"txn_count":{"type":"integer"},"withdrawals":{"items":{"$ref":"#/components/schemas/OcrolusTransaction"},"type":"array"},"withdrawals_max_by_month":{"additionalProperties":{"items":{"$ref":"#/components/schemas/OcrolusTransaction"},"nullable":true,"type":"array"},"type":"object"}},"type":"object"},"OcrolusResponse":{"properties":{"bank_accounts":{"items":{"$ref":"#/components/schemas/OcrolusBankAccount"},"type":"array"},"name":{"type":"string"}},"required":["bank_accounts","name"],"type":"object"},"OcrolusSchema":{"properties":{"response":{"$ref":"#/components/schemas/OcrolusResponse"}},"required":["response"],"type":"object"},"OcrolusTransaction":{"properties":{"amount":{"type":"string"},"description":{"type":"string"},"pk":{"type":"integer"},"timestamp":{"format":"date-time","type":"string"},"txn_date":{"example":"07/08/2025","format":"date","pattern":"^\\d{2}/\\d{2}/\\d{4}$","type":"string"}},"type":"object"},"OutboundEmailSettings":{"properties":{"allowed_to_domains":{"items":{"type":"string"},"type":"array"},"restrict_outbound_emails_to_allowed_domains":{"type":"boolean"}},"type":"object"},"Owner":{"properties":{"credit_score":{"nullable":true,"type":"integer"},"date_of_birth":{"example":"1990-01-01","format":"date","nullable":true,"type":"string"},"email_address":{"nullable":true,"type":"string"},"first_name":{"nullable":true,"type":"string"},"has_signed":{"nullable":true,"type":"boolean"},"home_address":{"$ref":"#/components/schemas/Address"},"home_phone":{"nullable":true,"type":"string"},"last_name":{"nullable":true,"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"ownership_percentage":{"description":"Percentage of ownership","example":100,"nullable":true,"type":"number"},"signed_date":{"format":"date","nullable":true,"type":"string"},"social_security_number":{"nullable":true,"type":"string"}},"type":"object"},"Pagination":{"properties":{"next_url":{"description":"the URL of the next page","format":"url","nullable":true,"type":"string"},"num_results":{"description":"the number of results returned","type":"integer"},"page":{"description":"current page","type":"integer"},"per_page":{"description":"the max number of results per page","type":"integer"},"prev_url":{"description":"the URL of the last page","format":"url","nullable":true,"type":"string"}},"type":"object"},"ParseFileSchema":{"properties":{"parser_id":{"default":null,"nullable":true,"type":"string"}},"type":"object"},"ParsedEndUserFile":{"properties":{"attribute_values":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"bounding_boxes":{"items":{"$ref":"#/components/schemas/ParsedEndUserFileBoundingBox"},"nullable":true,"type":"array"},"created":{"format":"date-time","type":"string"},"field_validations":{"items":{"$ref":"#/components/schemas/FieldValidation"},"type":"array"},"heron_id":{"description":"Unique identifier of the end user file","type":"string"},"id":{"description":"[DEPRECATED] Unique identifier for the parsed file","type":"integer"},"layout_bounding_boxes":{"items":{"$ref":"#/components/schemas/ParsedEndUserFileBoundingBox"},"nullable":true,"type":"array"},"parser_display_name":{"type":"string"},"parser_id":{"type":"string"},"parsing_status":{"enum":["succeeded","failed","processing"],"type":"string"},"patches":{"items":{"$ref":"#/components/schemas/ParsedEndUserFilePatch"},"type":"array"},"result":{"additionalProperties":{},"description":"Final output result after applying patches","nullable":true,"type":"object"},"result_schema":{"additionalProperties":{},"description":"The output JSON schema the results conform to","type":"object"},"validation_summary":{"description":"Summary of validation results","type":"string"}},"required":["created","heron_id","parser_id","parsing_status"],"type":"object"},"ParsedEndUserFileBoundingBox":{"properties":{"bounding_box":{"description":"Bounding box coordinates in the format 'y1,x1,y2,x2'","items":{"type":"number"},"type":"array"},"json_pointer":{"description":"JSON pointer to the field in the parsed result","type":"string"},"page_num":{"description":"Page number where the bounding box is located","type":"integer"},"value":{"description":"The actual value of the field within the bounding box","type":"string"}},"required":["bounding_box","json_pointer","page_num","value"],"type":"object"},"ParsedEndUserFilePatch":{"properties":{"correction_reason":{"nullable":true,"type":"string"},"enabled":{"nullable":true,"type":"boolean"},"op":{"type":"string"},"original_value":{"nullable":true},"path":{"type":"string"},"source":{"nullable":true,"type":"string"},"value":{"nullable":true}},"required":["op","path"],"type":"object"},"ParsedEndUserFileSchema":{"properties":{"attribute_values":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"bounding_boxes":{"items":{"$ref":"#/components/schemas/ParsedEndUserFileBoundingBox"},"nullable":true,"type":"array"},"created":{"format":"date-time","type":"string"},"field_validations":{"items":{"$ref":"#/components/schemas/FieldValidation"},"type":"array"},"heron_id":{"description":"Unique identifier of the end user file","type":"string"},"id":{"description":"[DEPRECATED] Unique identifier for the parsed file","type":"integer"},"layout_bounding_boxes":{"items":{"$ref":"#/components/schemas/ParsedEndUserFileBoundingBox"},"nullable":true,"type":"array"},"parser_display_name":{"type":"string"},"parser_id":{"type":"string"},"parsing_status":{"enum":["succeeded","failed","processing"],"type":"string"},"patches":{"items":{"$ref":"#/components/schemas/ParsedEndUserFilePatch"},"type":"array"},"result":{"additionalProperties":{},"description":"Final output result after applying patches","nullable":true,"type":"object"},"result_schema":{"additionalProperties":{},"description":"The output JSON schema the results conform to","type":"object"},"validation_summary":{"description":"Summary of validation results","type":"string"}},"required":["created","heron_id","parser_id","parsing_status"],"type":"object"},"ParsedEndUserFilesFilterSchema":{"properties":{"parser_id":{"nullable":true,"type":"string"},"version_number":{"nullable":true,"type":"integer"}},"type":"object"},"ParsedEndUserSubmissionSchema":{"properties":{"end_user_heron_id":{"type":"string"},"result":{"additionalProperties":{},"type":"object"},"status":{"enum":["success","failed"],"type":"string"},"submission_parser":{"$ref":"#/components/schemas/SubmissionParserExternal"}},"type":"object"},"PaymentProcessor":{"properties":{"heron_id":{"example":"mrc_nRYdGU7nYuevb7qem65cEb","readOnly":true,"type":"string"},"icon_url":{"default":null,"example":"https://storage.googleapis.com/heron-merchant-assets/icons/mrc_nRYdGU7nYuevb7qem65cEb.svg","format":"url","nullable":true,"readOnly":true,"type":"string"},"logo_url":{"default":null,"example":"https://storage.googleapis.com/heron-merchant-assets/logos/mrc_nRYdGU7nYuevb7qem65cEb.svg","format":"url","nullable":true,"readOnly":true,"type":"string"},"name":{"default":null,"example":"Paypal","nullable":true,"readOnly":true,"type":"string"},"url":{"default":null,"example":"https://www.paypal.com","format":"url","nullable":true,"readOnly":true,"type":"string"}},"type":"object"},"PdfDefaultCurrencyUpdateSchema":{"properties":{"currency":{"description":"ISO 4217 currency code to update for PDF and all statements","enum":["USD","GBP","EUR","SEK","AED","AUD","SGD","CAD","NOK","IDR","CHF","DKK","MXN","PLN","MYR","VND","RON","TRY","CZK","BGN","HKD","PHP","HUF","NZD","BRL","ILS","COP","RUB","INR","ZAR","THB","JPY","CLP","MAD","RSD","SLE"],"example":"EUR","type":"string"}},"required":["currency"],"type":"object"},"PdfGet":{"properties":{"heron_id":{"description":"ID generated by Heron Data","example":"pdf_mUYqZiRNLYmcTk2vYNnND4","type":"string"},"status":{"description":"Status of PDF","enum":["new","parsing","parsed","processed","human_reviewing","approved","rejected","failed","transactions_loaded","transactions_unloaded"],"example":"processed","type":"string"}},"type":"object"},"PdfGetSchema":{"properties":{"account_id":{"description":"Unique ID for account associated with PDF","example":"checking_account_202348","type":"string"},"created":{"description":"Timestamp when PDF was created in Heron system","example":"2026-04-18T03:33:30.059570","format":"date-time","type":"string"},"currency":{"description":"ISO 4217 currency code for transactions in account. We currently only support GBP and USD PDFs","enum":["USD","GBP"],"example":"USD","type":"string"},"data_source":{"allOf":[{"$ref":"#/components/schemas/DataSourceNested"}],"description":"The data source for this PDF. Only available after parsing and enrichment has completed, otherwise null.","nullable":true},"end_user":{"$ref":"#/components/schemas/EndUser2"},"filename":{"description":"The filename of the PDF","example":"my-favourite.pdf","type":"string"},"heron_id":{"description":"ID generated by Heron Data","example":"pdf_mUYqZiRNLYmcTk2vYNnND4","type":"string"},"is_image_based":{"description":"True if the PDF was processed using image-based OCR. None if not yet processed","nullable":true,"type":"boolean"},"last_updated":{"description":"Timestamp when PDF was last updated in Heron system","example":"2026-04-18T03:33:30.059599","format":"date-time","type":"string"},"notes":{"description":"Notes for the PDF, e.g., failed reason","example":"failed to send to external OCR provider","type":"string"},"parsing_version":{"description":"Indicates which provider was used to parse this pdf","type":"string"},"reference_id":{"description":"An optional field for your unique identifier for the PDF","example":"my-favourite-pdf","type":"string"},"statements":{"items":{"$ref":"#/components/schemas/PdfStatement"},"type":"array"},"status":{"description":"Status of PDF","enum":["new","parsing","parsed","processed","human_reviewing","approved","rejected","failed","transactions_loaded","transactions_unloaded"],"example":"processed","type":"string"}},"type":"object"},"PdfPatchStatementSummary":{"properties":{"account_number":{"type":"string"},"bank_name":{"type":"string"},"company":{"type":"string"},"currency":{"type":"string"},"end_balance":{"type":"number"},"fraud_reasons":{"items":{"type":"string"},"type":"array"},"fraud_score":{"type":"integer"},"start_balance":{"type":"number"},"statement_end_date":{"format":"date-time","type":"string"},"statement_start_date":{"format":"date-time","type":"string"}},"type":"object"},"PdfPatchTransaction":{"properties":{"amount":{"nullable":true,"type":"number"},"balance":{"nullable":true,"type":"number"},"bounds":{"allOf":[{"$ref":"#/components/schemas/MoneyThumbTransactionBounds"}],"nullable":true},"currency":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"ocr_suspect":{"nullable":true,"type":"boolean"},"reference_id":{"nullable":true,"type":"string"},"timestamp":{"format":"date-time","nullable":true,"type":"string"},"transaction_code":{"nullable":true,"type":"string"}},"type":"object"},"PdfPostSchema":{"properties":{"account_id":{"default":null,"description":"Unique ID for account associated with PDF","example":"checking_account_202348","nullable":true,"type":"string"},"currency":{"default":null,"description":"ISO 4217 currency code for transactions in account. We currently only support GBP and USD PDFs","enum":["USD","GBP",null],"example":"USD","nullable":true,"type":"string"},"filename":{"default":null,"description":"The filename of the PDF","example":"my-favourite.pdf","nullable":true,"type":"string"},"is_split":{"default":null,"description":"Whether the file has been manually split","example":false,"nullable":true,"type":"boolean"},"parent_file_heron_id":{"default":null,"description":"The Heron ID of the parent file, if this PDF is a split from another file","nullable":true,"type":"string"},"pdf_base64":{"description":"The base64 encoded string of the PDF file. If using Javascript, this is directly the output of the FileReader.readAsDataURL() output.","pattern":"^data\\:\\w+\\/\\w+\\;base64\\,","type":"string"},"read_us_dates":{"default":null,"description":"True if date formats in the statement are US: month/date/year","nullable":true,"type":"boolean"},"reference_id":{"default":null,"description":"An optional field for your unique identifier for the PDF","example":"my-favourite-pdf","maxLength":140,"nullable":true,"type":"string"}},"required":["pdf_base64"],"type":"object"},"PdfPutSchema":{"properties":{"filename":{"description":"The filename of the PDF","example":"my-favourite.pdf","type":"string"},"fraud_reason":{"description":"If fraud reason ","nullable":true,"type":"string"},"is_fraud":{"description":"True if fraud was detected in the PDF","type":"boolean"},"notes":{"description":"Notes associated with PDF, e.g., rejected reason, failed reason","type":"string"},"reference_id":{"description":"An optional field for your unique identifier for the PDF","example":"my-favourite-pdf","maxLength":140,"type":"string"},"status":{"description":"Status of PDF","enum":["new","parsing","parsed","processed","human_reviewing","approved","rejected","failed","transactions_loaded","transactions_unloaded"],"example":"processed","type":"string"}},"type":"object"},"PdfSettings":{"properties":{"auto_approve":{"type":"boolean"},"auto_fail":{"type":"boolean"},"enabled":{"type":"boolean"},"fraud_detection":{"type":"boolean"},"fraud_threshold":{"type":"integer"},"human_review_auto_reject":{"type":"boolean"},"include_failed_statuses_in_finished_pdfs":{"type":"boolean"},"max_pdfs_to_parse":{"nullable":true,"type":"integer"},"override_pdf_parsing_with_temporal_flow":{"type":"boolean"},"parsing_version":{"enum":["0.0.0","1.0.0","2.0.0","3.0.0","4.0.0","5.0.0"],"type":"string"},"reject_duplicated_based_on_text":{"type":"boolean"},"reject_duplicates":{"type":"boolean"},"use_cache":{"type":"boolean"},"use_summary_parser_override":{"type":"boolean"}},"type":"object"},"PdfStatement":{"properties":{"data_source_account":{"allOf":[{"$ref":"#/components/schemas/DataSourceAccountNested"}],"description":"The data source account for this statement. Only available after parsing and enrichment has completed, otherwise null.","nullable":true},"exclude":{"description":"True if the statement should be excluded from processing","type":"boolean"},"invalid_transaction_partials":{"items":{"$ref":"#/components/schemas/PdfPatchTransaction"},"type":"array"},"summary":{"$ref":"#/components/schemas/MoneyThumbStatementSummary"},"transaction_partials":{"items":{"$ref":"#/components/schemas/PdfTransaction"},"type":"array"}},"type":"object"},"PdfStatementPatchSchema":{"properties":{"exclude":{"description":"True if the statement should be excluded from processing","type":"boolean"},"index":{"description":"The index of the statement in the pdf to patch","type":"integer"},"summary":{"$ref":"#/components/schemas/PdfPatchStatementSummary"},"transactions":{"description":"The full list of transactions that will be used to override the extracted transactions for the specified statement","items":{"$ref":"#/components/schemas/PdfPatchTransaction"},"type":"array"}},"required":["index","transactions"],"type":"object"},"PdfTransaction":{"properties":{"amount":{"type":"number"},"balance":{"type":"number"},"bounds":{"allOf":[{"$ref":"#/components/schemas/MoneyThumbTransactionBounds"}],"nullable":true},"currency":{"nullable":true,"type":"string"},"description":{"type":"string"},"ocr_suspect":{"type":"boolean"},"reference_id":{"type":"string"},"timestamp":{"format":"date-time","type":"string"},"transaction_code":{"type":"string"}},"required":["amount","description","timestamp"],"type":"object"},"PendingMatchSchema":{"additionalProperties":false,"properties":{"candidates":{"items":{"$ref":"#/components/schemas/FunderCandidate"},"readOnly":true,"type":"array"},"index":{"readOnly":true,"type":"integer"},"matching_priority":{"nullable":true,"readOnly":true,"type":"integer"},"policy":{"additionalProperties":{},"nullable":true,"readOnly":true,"type":"object"},"resolved_funder_heron_id":{"nullable":true,"readOnly":true,"type":"string"},"spreadsheet_name":{"readOnly":true,"type":"string"},"status":{"readOnly":true,"type":"string"}},"type":"object"},"PlaidAccount":{"properties":{"account_id":{"type":"string"},"balances":{"$ref":"#/components/schemas/PlaidAccountSnapshotBalance"},"historical_balances":{"items":{"$ref":"#/components/schemas/PlaidAccountBalance"},"type":"array"},"mask":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"official_name":{"nullable":true,"type":"string"},"owners":{"items":{"$ref":"#/components/schemas/PlaidAccountOwners"},"nullable":true,"type":"array"},"subtype":{"nullable":true,"type":"string"},"transactions":{"items":{"$ref":"#/components/schemas/PlaidTransaction"},"type":"array"},"type":{"nullable":true,"type":"string"}},"required":["account_id","balances","historical_balances","transactions"],"type":"object"},"PlaidAccountBalance":{"properties":{"current":{"type":"number"},"date":{"format":"date","type":"string"},"iso_currency_code":{"description":"ISO 4217 currency code","example":"USD","maxLength":3,"minLength":3,"nullable":true,"type":"string"}},"type":"object"},"PlaidAccountOwners":{"properties":{"names":{"items":{"type":"string"},"type":"array"}},"required":["names"],"type":"object"},"PlaidAccountSnapshot":{"properties":{"account_id":{"type":"string"},"balances":{"allOf":[{"$ref":"#/components/schemas/PlaidAccountSnapshotBalance"}],"description":"Balance information for the account as an object. This is optional, but if not provided, balance calculations will not be performed for individual transactions.","nullable":true},"mask":{"nullable":true,"type":"string"},"name":{"type":"string"},"official_name":{"nullable":true,"type":"string"},"subtype":{"type":"string"},"type":{"type":"string"}},"type":"object"},"PlaidAccountSnapshotBalance":{"properties":{"available":{"nullable":true,"type":"number"},"current":{"nullable":true,"type":"number"},"iso_currency_code":{"type":"string"},"limit":{"nullable":true,"type":"number"}},"type":"object"},"PlaidAssetReport":{"properties":{"date_generated":{"format":"date-time","type":"string"},"days_requested":{"type":"integer"},"items":{"items":{"$ref":"#/components/schemas/PlaidAssetReportItem"},"type":"array"}},"required":["date_generated","days_requested","items"],"type":"object"},"PlaidAssetReportItem":{"properties":{"accounts":{"items":{"$ref":"#/components/schemas/PlaidAccount"},"type":"array"},"institution_name":{"type":"string"}},"required":["accounts","institution_name"],"type":"object"},"PlaidAssetsSchema":{"properties":{"report":{"$ref":"#/components/schemas/PlaidAssetReport"}},"required":["report"],"type":"object"},"PlaidSettings":{"properties":{"assets_report_days_to_sync":{"type":"integer"},"auto_enrich_after_sync":{"type":"boolean"},"days_to_sync":{"type":"integer"}},"type":"object"},"PlaidTransaction":{"properties":{"account_id":{"type":"string"},"amount":{"type":"number"},"balance":{"type":"number"},"category":{"nullable":true,"type":"string"},"date":{"format":"date","type":"string"},"iso_currency_code":{"description":"ISO 4217 currency code","example":"USD","maxLength":3,"minLength":3,"nullable":true,"type":"string"},"merchant_name":{"nullable":true,"type":"string"},"name":{"type":"string"},"pending":{"type":"boolean"},"pending_transaction_id":{"default":null,"nullable":true,"type":"string"},"timestamp":{"format":"date-time","type":"string"},"transaction_code":{"nullable":true,"type":"string"},"transaction_id":{"type":"string"}},"type":"object"},"PlaidTransactionsSchema":{"properties":{"accounts":{"items":{"$ref":"#/components/schemas/PlaidAccountSnapshot"},"type":"array"},"transactions":{"items":{"$ref":"#/components/schemas/PlaidTransaction"},"type":"array"}},"required":["transactions"],"type":"object"},"PnLCategories":{"properties":{"cogs":{"additionalProperties":{"description":"A list of example line item labels that map to this category","items":{"type":"string"},"type":"array"},"type":"object"},"income":{"additionalProperties":{"description":"A list of example line item labels that map to this category","items":{"type":"string"},"type":"array"},"type":"object"},"operating_expenses":{"additionalProperties":{"description":"A list of example line item labels that map to this category","items":{"type":"string"},"type":"array"},"type":"object"},"other_expenses":{"additionalProperties":{"description":"A list of example line item labels that map to this category","items":{"type":"string"},"type":"array"},"type":"object"},"other_income":{"additionalProperties":{"description":"A list of example line item labels that map to this category","items":{"type":"string"},"type":"array"},"type":"object"}},"type":"object"},"PnLLineItem":{"properties":{"amount":{"default":null,"nullable":true,"type":"number"},"category":{"default":null,"enum":["income","cogs","operating_expenses","other_expenses","other_income",null],"nullable":true,"type":"string"},"id":{"default":null,"nullable":true,"type":"string"},"label":{"default":null,"nullable":true,"type":"string"},"row_id":{"default":null,"nullable":true,"type":"string"},"row_index":{"default":null,"nullable":true,"type":"integer"},"sub_category":{"default":null,"nullable":true,"type":"string"}},"type":"object"},"PnLStatementSchema":{"properties":{"basis":{"default":null,"enum":["accrual","cash","unknown",null],"nullable":true,"type":"string"},"currency":{"default":null,"nullable":true,"type":"string"},"is_reconciled":{"default":null,"nullable":true,"type":"boolean"},"reports":{"default":null,"items":{"$ref":"#/components/schemas/PnlReport"},"nullable":true,"type":"array"}},"type":"object"},"PnLTimePeriod":{"properties":{"column_index":{"default":null,"nullable":true,"type":"integer"},"end_date":{"default":null,"format":"date","nullable":true,"type":"string"},"label":{"default":null,"nullable":true,"type":"string"},"start_date":{"default":null,"format":"date","nullable":true,"type":"string"},"time_interval":{"default":null,"enum":["year_end","quarter","month","interim_one_off",null],"nullable":true,"type":"string"}},"type":"object"},"PnLTotalGroup":{"properties":{"gross_profit":{"default":null,"nullable":true,"type":"number"},"net_operating_profit":{"default":null,"nullable":true,"type":"number"},"net_other_profit":{"default":null,"nullable":true,"type":"number"},"net_profit":{"default":null,"nullable":true,"type":"number"},"total_cogs":{"default":null,"nullable":true,"type":"number"},"total_operating_expenses":{"default":null,"nullable":true,"type":"number"},"total_other_expenses":{"default":null,"nullable":true,"type":"number"},"total_other_income":{"default":null,"nullable":true,"type":"number"},"total_revenue":{"default":null,"nullable":true,"type":"number"}},"type":"object"},"PnlMetric":{"properties":{"confidence":{"description":"Amount weighted confidence for the metric, based on the confidene associated with category labels of related transactions","nullable":true,"type":"number"},"indent":{"description":"Indentation level for formatting purposes","type":"integer"},"is_ratio":{"description":"Whether the metric is a ratio or not","type":"boolean"},"name":{"description":"Name of metric","type":"string"},"values":{"description":"The list of values ordered according to date","items":{"nullable":true,"type":"number"},"type":"array"}},"type":"object"},"PnlMetricFractionTerm":{"properties":{"labels":{"description":"List of category labels associated with the fraction term","items":{"type":"string"},"type":"array"},"sections":{"description":"List of section slugs associated with the fraction term","items":{"type":"string"},"type":"array"}},"type":"object"},"PnlMetricLayout":{"properties":{"denominator":{"allOf":[{"$ref":"#/components/schemas/PnlMetricFractionTerm"}],"description":"If the metric is a ratio, the denominator of the metric; otherwise this is just 1","nullable":true},"indent":{"description":"Indentation level for formatting purposes","type":"integer"},"is_growth":{"description":"If true, calculates the % growth in the metric over time","type":"boolean"},"name":{"description":"Name of metric","type":"string"},"numerator":{"allOf":[{"$ref":"#/components/schemas/PnlMetricFractionTerm"}],"description":"The numerator of the metric"}},"type":"object"},"PnlReport":{"properties":{"extracted_totals":{"allOf":[{"$ref":"#/components/schemas/PnLTotalGroup"}],"default":null,"nullable":true},"is_reconciled":{"default":null,"nullable":true,"type":"boolean"},"line_items":{"default":null,"items":{"$ref":"#/components/schemas/PnLLineItem"},"nullable":true,"type":"array"},"summed_totals":{"allOf":[{"$ref":"#/components/schemas/PnLTotalGroup"}],"default":null,"nullable":true},"time_period":{"allOf":[{"$ref":"#/components/schemas/PnLTimePeriod"}],"default":null,"nullable":true}},"type":"object"},"PnlSection":{"properties":{"metrics":{"description":"Ordered list of P&L metrics","items":{"$ref":"#/components/schemas/PnlMetric"},"type":"array"},"name":{"description":"Name of P&L section, e.g,. Operating Expenses","type":"string"},"slug":{"description":"Slugified version of the name","type":"string"}},"type":"object"},"PnlSectionLayout":{"properties":{"labels":{"description":"The category labels associated with the section","items":{"type":"string"},"type":"array"},"metrics":{"description":"An ordered list of metric layouts","items":{"$ref":"#/components/schemas/PnlMetricLayout"},"type":"array"},"name":{"description":"Name of P&L section, e.g,. Operating Expenses","type":"string"},"slug":{"description":"Slugified version of the name","type":"string"}},"type":"object"},"Policy":{"properties":{"checks":{"items":{"$ref":"#/components/schemas/Check"},"type":"array"},"display_order":{"default":null,"nullable":true,"type":"integer"},"heron_id":{"type":"string"},"name":{"type":"string"}},"required":["heron_id","name"],"type":"object"},"PolicyClaim":{"properties":{"claim_description":{"default":null,"description":"A detailed description of the nature of the claim and cause of loss, if applicable and different to the claim_summary.","nullable":true,"type":"string"},"claim_number":{"default":null,"description":"The unique identifier assigned to the claim","nullable":true,"type":"string"},"claim_summary":{"default":null,"description":"A brief description of the nature of the claim (e.g., property damage, bodily injury)","nullable":true,"type":"string"},"date_closed":{"default":null,"description":"The date when the claim was closed","format":"date","nullable":true,"type":"string"},"date_of_loss":{"default":null,"description":"The date when the loss on the claim happened in YYYY-MM-DD format","format":"date","nullable":true,"type":"string"},"date_reported":{"default":null,"description":"The date when the claim was reported to the insurer in YYYY-MM-DD format","format":"date","nullable":true,"type":"string"},"losses":{"default":null,"description":"A list of losses associated with this claim","items":{"$ref":"#/components/schemas/PolicyLoss"},"nullable":true,"type":"array"}},"type":"object"},"PolicyEvaluationSchema":{"properties":{"failed_checks":{"items":{"$ref":"#/components/schemas/CheckEvaluation"},"type":"array"},"missing_data_checks":{"items":{"$ref":"#/components/schemas/CheckEvaluation"},"type":"array"},"passed_checks":{"items":{"$ref":"#/components/schemas/CheckEvaluation"},"type":"array"},"policy":{"$ref":"#/components/schemas/Policy"},"result":{"enum":["passed","failed","missing_data"]}},"type":"object"},"PolicyLoss":{"properties":{"claimant_name":{"default":null,"description":"The name of the claimant for the loss","nullable":true,"type":"string"},"claims_examiner":{"default":null,"description":"The name of the claims examiner for this loss event. Also known as the 'Handler' or 'Adjuster' for the loss.","nullable":true,"type":"string"},"expense_paid":{"default":null,"description":"The absolute amount already paid out for expenses related to the loss (e.g. legal fees, investigation costs). Also called 'Paid Fees', 'Paid ALAE (Allocated loss adjustment expenses)', 'Payment Expense(s)'","nullable":true,"type":"number"},"expense_reserve":{"default":null,"description":"The absolute amount reserved specifically for expenses related to the loss (e.g. legal fees, investigation costs). Also called 'Reserve ALAE (Allocated loss adjustment expenses)', 'Outstanding Expense(s)'","nullable":true,"type":"number"},"loss_paid":{"default":null,"description":"The absolute amount paid for the loss itself (excluding expenses). Also called 'Paid Loss', 'Indemnity Paid', 'Payment Loss'","nullable":true,"type":"number"},"loss_reserve":{"default":null,"description":"The absolute amount reserved for the loss itself (excluding expenses). Also called 'Reserve Loss', 'Indemnity Reserve', 'Outstanding Loss'","nullable":true,"type":"number"},"loss_type":{"default":null,"description":"The loss type for this event. E.g. AL (Auto Liability), PD (Property Damage), BI (Bodily Injury), UM/UIM (Uninsured/Underinsured Motorist), SLL (Single Limit Liability) etc.","nullable":true,"type":"string"},"status":{"default":null,"description":"The current status of the loss event","enum":["Open","Closed","Denied","Pending"],"nullable":true,"type":"string"},"total_incurred":{"default":null,"description":"The absolute amount incurred by this loss after recoveries (only include this if it appears in the document, do not attempt to calculate it). Also called 'Total Net Payment' or 'Incurred Total'","nullable":true,"type":"number"},"total_recovered":{"default":null,"description":"The absolute amount recovered from third parties or other insurers for the loss. Sometimes also called 'Total Collected' when used in the context of an insurance loss run. Also called 'Recovery'","nullable":true,"type":"number"}},"type":"object"},"PositionInflowMetrics":{"properties":{"count":{"type":"integer"},"max_amount":{"allOf":[{"$ref":"#/components/schemas/Money"}],"nullable":true},"max_timestamp":{"format":"date-time","nullable":true,"type":"string"},"min_amount":{"allOf":[{"$ref":"#/components/schemas/Money"}],"nullable":true},"min_timestamp":{"format":"date-time","nullable":true,"type":"string"},"total_amount":{"allOf":[{"$ref":"#/components/schemas/Money"}],"nullable":true}},"type":"object"},"PositionOutflowMetrics":{"properties":{"changed_in_last_90_days":{"type":"boolean"},"count":{"type":"integer"},"duration_days":{"nullable":true,"type":"integer"},"estimated_monthly_amount":{"allOf":[{"$ref":"#/components/schemas/Money"}],"nullable":true},"estimated_remaining_balance":{"allOf":[{"$ref":"#/components/schemas/Money"}],"nullable":true},"estimated_right_to_receive_amount":{"allOf":[{"$ref":"#/components/schemas/Money"}],"nullable":true},"frequency":{"enum":["not_enough_data","same_day","irregular","daily","weekly","biweekly","monthly","quarterly","annually","weekday","twice_weekly",null],"nullable":true,"type":"string"},"has_repayment_modifications":{"type":"boolean"},"latest_repayment_amount":{"allOf":[{"$ref":"#/components/schemas/Money"}],"nullable":true},"latest_repayment_frequency":{"enum":["not_enough_data","same_day","irregular","daily","weekly","biweekly","monthly","quarterly","annually","weekday","twice_weekly",null],"nullable":true,"type":"string"},"max_amount":{"allOf":[{"$ref":"#/components/schemas/Money"}],"nullable":true},"max_timestamp":{"format":"date-time","nullable":true,"type":"string"},"mean_amount":{"allOf":[{"$ref":"#/components/schemas/Money"}],"nullable":true},"mean_interval_days":{"nullable":true,"type":"number"},"min_amount":{"allOf":[{"$ref":"#/components/schemas/Money"}],"nullable":true},"min_timestamp":{"format":"date-time","nullable":true,"type":"string"},"mode_interval_days":{"nullable":true,"type":"integer"},"remaining_repayment_duration_days":{"nullable":true,"type":"integer"},"std_dev_amount":{"allOf":[{"$ref":"#/components/schemas/Money"}],"nullable":true},"total_amount":{"allOf":[{"$ref":"#/components/schemas/Money"}],"nullable":true},"total_expected_duration_days":{"nullable":true,"type":"integer"},"total_expected_payments_to_date":{"nullable":true,"type":"integer"}},"type":"object"},"PositionSummary":{"properties":{"group":{"nullable":true,"type":"string"},"heron_id":{"type":"string"},"inflow_metrics":{"allOf":[{"$ref":"#/components/schemas/PositionInflowMetrics"}],"nullable":true},"is_active":{"type":"boolean"},"is_renewal":{"nullable":true,"type":"boolean"},"llm_summary":{"nullable":true,"type":"string"},"merchant":{"nullable":true,"type":"string"},"missed_payments":{"items":{"format":"date","type":"string"},"nullable":true,"type":"array"},"nsf_fees":{"items":{"$ref":"#/components/schemas/NsfFee"},"nullable":true,"type":"array"},"outflow_metrics":{"allOf":[{"$ref":"#/components/schemas/PositionOutflowMetrics"}],"nullable":true},"parent_position_heron_id":{"nullable":true,"type":"string"},"reversals":{"items":{"$ref":"#/components/schemas/Reversal"},"nullable":true,"type":"array"},"status":{"enum":["none","active","inactive","defaulted","potential_default","renewal_active","renewal_inactive","new_position","likely_paid_off"],"type":"string"}},"type":"object"},"PositionTransaction":{"properties":{"amount":{"$ref":"#/components/schemas/Money"},"description":{"type":"string"},"heron_id":{"type":"string"},"timestamp":{"format":"date-time","type":"string"}},"type":"object"},"PositionTransactions":{"properties":{"investment_transactions":{"items":{"$ref":"#/components/schemas/PositionTransaction"},"type":"array"},"position_heron_id":{"type":"string"},"repayment_transactions":{"items":{"$ref":"#/components/schemas/PositionTransaction"},"type":"array"},"reversal_transactions":{"items":{"$ref":"#/components/schemas/PositionTransaction"},"type":"array"}},"type":"object"},"PostIsoApplicationBase64Schema":{"properties":{"file_base64":{"description":"The base64 encoded string of the file","example":"base64_encoded_string","pattern":"^data\\:\\w+\\/\\w+\\;base64\\,","type":"string"},"filename":{"description":"The original filename of the ISO application form","example":"iso_app.pdf","type":"string"},"reference_id":{"default":null,"description":"A reference id for the file","example":"your-file-id","nullable":true,"type":"string"}},"required":["file_base64","filename"],"type":"object"},"PostProcessorConfigSchema":{"properties":{"description":{"nullable":true,"type":"string"},"inputs":{"additionalProperties":{},"nullable":true,"type":"object"},"name":{"type":"string"}},"required":["name"],"type":"object"},"PostProcessorsResponseSchema":{"properties":{"post_processors":{"items":{"$ref":"#/components/schemas/PostProcessorConfigSchema"},"type":"array"}},"required":["post_processors"],"type":"object"},"ProfitAndLossLayoutSchema":{"properties":{"sections":{"description":"Ordered list of P&L sections","items":{"$ref":"#/components/schemas/PnlSectionLayout"},"type":"array"}},"type":"object"},"ProfitAndLossLayoutUpdateSchema":{"properties":{"category_labels":{"description":"List of category labels to assign to a different section","example":["Postage"],"items":{"type":"string"},"minItems":1,"type":"array"},"section_slug":{"description":"Slug of section to assign labels to","example":"operational_expenses","type":"string"}},"required":["category_labels","section_slug"],"type":"object"},"ProfitAndLossParams":{"properties":{"currency":{"description":"ISO 4217 currency code for balance","enum":["GBP","USD","EUR",null],"example":"USD","nullable":true,"type":"string"},"dates_ascending":{"default":false,"description":"If true, dates are sorted left to right by ascending order. False by default, i.e., by default sorted in descending date order so more recent dates are first","type":"boolean"},"from_date":{"default":null,"description":"The earliest transaction timestamp date to use","example":"2022-01-01","format":"date","nullable":true,"type":"string"},"to_date":{"default":null,"description":"The latest transaction timestamp date to use","example":"2022-01-31","format":"date","nullable":true,"type":"string"}},"type":"object"},"ProfitAndLossSchema":{"properties":{"dates":{"description":"Ordered list of dates representing the columns of the P&L table","items":{"format":"date","type":"string"},"type":"array"},"sections":{"description":"Ordered list of P&L sections","items":{"$ref":"#/components/schemas/PnlSection"},"type":"array"}},"type":"object"},"ProgressPolicySchema":{"properties":{"end_user_heron_id":{"type":"string"}},"required":["end_user_heron_id"],"type":"object"},"QueryReportTab":{"properties":{"tab_name":{"type":"string"},"widgets":{"items":{"$ref":"#/components/schemas/QueryReportWidget"},"type":"array"}},"required":["tab_name","widgets"],"type":"object"},"QueryReportTabGroup":{"properties":{"tab_group":{"type":"string"},"tabs":{"items":{"$ref":"#/components/schemas/QueryReportTab"},"type":"array"}},"required":["tab_group","tabs"],"type":"object"},"QueryReportWidget":{"properties":{"description":{"nullable":true,"type":"string"},"query_name":{"type":"string"},"title":{"type":"string"}},"required":["query_name","title"],"type":"object"},"RefreshAssetsReportsResponseSchema":{"properties":{"failed_links":{"description":"Array of item_ids that failed to refresh","example":["item_123","item_456"],"items":{"type":"string"},"type":"array"},"processed_links":{"description":"Number of links processed for refresh","example":2,"type":"integer"}},"required":["failed_links","processed_links"],"type":"object"},"ReorderEndUserEntitiesSchema":{"properties":{"ordered_entity_heron_ids":{"items":{"type":"string"},"type":"array"}},"required":["ordered_entity_heron_ids"],"type":"object"},"ReorderEndUserEntityAttributesSchema":{"properties":{"ordered_attribute_heron_ids":{"items":{"type":"string"},"type":"array"}},"required":["ordered_attribute_heron_ids"],"type":"object"},"ResolvePendingMatchRequestSchema":{"additionalProperties":false,"properties":{"funder_heron_id":{"description":"Heron ID of the funder to match with","type":"string"}},"required":["funder_heron_id"],"type":"object"},"RestrictedIndustry":{"properties":{"description":{"type":"string"},"name":{"type":"string"}},"type":"object"},"Reversal":{"properties":{"amount":{"type":"number"},"date":{"format":"date","type":"string"},"merchant":{"nullable":true,"type":"string"}},"type":"object"},"Rule":{"properties":{"condition":{"description":"Key for how to compare metric value to rule value","enum":["equal","not_equal","greater_than","greater_than_or_equal","less_than","less_than_or_equal","contains"],"example":"equal","type":"string"},"created":{"description":"When the rule was created in Heron system","example":"2026-03-07T03:33:32.657765","format":"date-time","readOnly":true,"type":"string"},"date_range":{"description":"Date range corresponding to metric","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","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"],"example":"last_180_days","type":"string"},"group":{"description":"Used to display rules by the stage in the underwriting workflow to which they apply.","enum":["data_quality_datasource","data_quality_account","data_quality_transaction",null],"example":"data_quality_datasource","nullable":true,"type":"string"},"heron_id":{"description":"Unique id for rule generated by Heron","example":"rul_H3zJNuRAUjxPJJum8uNPDg","readOnly":true,"type":"string"},"last_updated":{"description":"When the rule was last updated in Heron system","example":"2026-04-18T03:33:32.657797","format":"date-time","readOnly":true,"type":"string"},"metric_label":{"description":"Label corresponding to metric","enum":["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"],"example":"unique_transactions","type":"string"},"name":{"description":"Description of rule. Sent with webhook response, so can be used as a reference to the rule","example":"notify_if_debt_investment_count_gt_0_last_180d","maxLength":140,"nullable":true,"type":"string"},"selector":{"additionalProperties":{},"description":"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.","example":{"is_portfolio":true},"type":"object"},"value":{"description":"Numeric value to compare to a metric; use this when the threshold is numeric","example":42.42,"nullable":true,"type":"number"},"value_str":{"description":"String value to compare to a metric; use this when the threshold is a string","example":"mrc_12345678ijwdd321d921","nullable":true,"type":"string"}},"type":"object"},"RuleEvaluationSchema":{"properties":{"metric":{"$ref":"#/components/schemas/Metric"},"result":{"enum":["PASS","FAIL","NOT_AVAILABLE"],"type":"string"},"rule":{"$ref":"#/components/schemas/Rule"}},"type":"object"},"RuleUpdateSchema":{"properties":{"condition":{"description":"Key for how to compare metric value to rule value","enum":["equal","not_equal","greater_than","greater_than_or_equal","less_than","less_than_or_equal","contains"],"example":"equal","type":"string"},"created":{"description":"When the rule was created in Heron system","example":"2026-03-07T03:33:32.657765","format":"date-time","readOnly":true,"type":"string"},"date_range":{"description":"Date range corresponding to metric","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","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"],"example":"last_180_days","type":"string"},"group":{"description":"Used to display rules by the stage in the underwriting workflow to which they apply.","enum":["data_quality_datasource","data_quality_account","data_quality_transaction",null],"example":"data_quality_datasource","nullable":true,"type":"string"},"heron_id":{"description":"Unique id for rule generated by Heron","example":"rul_H3zJNuRAUjxPJJum8uNPDg","readOnly":true,"type":"string"},"last_updated":{"description":"When the rule was last updated in Heron system","example":"2026-04-18T03:33:32.657797","format":"date-time","readOnly":true,"type":"string"},"metric_label":{"description":"Label corresponding to metric","enum":["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"],"example":"unique_transactions","type":"string"},"name":{"description":"Description of rule. Sent with webhook response, so can be used as a reference to the rule","example":"notify_if_debt_investment_count_gt_0_last_180d","maxLength":140,"nullable":true,"type":"string"},"selector":{"additionalProperties":{},"description":"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.","example":{"is_portfolio":true},"type":"object"},"value":{"description":"Numeric value to compare to a metric; use this when the threshold is numeric","example":42.42,"nullable":true,"type":"number"},"value_str":{"description":"String value to compare to a metric; use this when the threshold is a string","example":"mrc_12345678ijwdd321d921","nullable":true,"type":"string"}},"type":"object"},"RuleViolation":{"properties":{"metric":{"$ref":"#/components/schemas/Metric"},"rule":{"$ref":"#/components/schemas/Rule"}},"type":"object"},"SQLCheck":{"properties":{"auto_decline":{"default":false,"type":"boolean"},"column_name":{"type":"string"},"decline_description":{"default":null,"nullable":true,"type":"string"},"email_template_name":{"default":null,"nullable":true,"type":"string"},"ignore_metric_availability":{"default":false,"type":"boolean"},"is_mandatory":{"default":false,"type":"boolean"},"pass_description":{"default":null,"nullable":true,"type":"string"},"query_name":{"type":"string"}},"required":["column_name","query_name"],"type":"object"},"SalesforceObjectJsonSchema":{"properties":{"applicant_addresses":{"default":null,"items":{"additionalProperties":{},"type":"object"},"nullable":true,"type":"array"},"policy_number":{"default":null,"nullable":true,"type":"string"},"property":{"additionalProperties":{},"default":null,"nullable":true,"type":"object"},"property_addresses":{"default":null,"items":{"additionalProperties":{},"type":"object"},"nullable":true,"type":"array"}},"type":"object"},"SaltEdgeCsvSchema":{"properties":{"account_id":{"type":"integer"},"amount":{"type":"number"},"category":{"type":"string"},"closing_balance":{"nullable":true,"type":"number"},"currency_code":{"type":"string"},"description":{"type":"string"},"made_on":{"format":"date","type":"string"},"payee":{"nullable":true,"type":"string"},"payer":{"nullable":true,"type":"string"},"transaction_id":{"type":"integer"}},"type":"object"},"ScorecardQueryParams":{"properties":{"date":{"default":null,"description":"Cut-off date to consider transactions to for calculating scorecard (inclusive)","example":"2023-01-19","format":"date","nullable":true,"type":"string"},"named_date":{"default":null,"description":"Qualitative description for date to calculate scorecard","enum":["end_user_created","end_user_last_updated","last_transaction","end_user_last_enriched","last_data_source_end_date_or_transaction_timestamp","custom_date",null],"example":"end_user_created","nullable":true,"type":"string"}},"type":"object"},"ScorecardSettings":{"properties":{"balance_prediction":{"type":"boolean"},"company_overview_layout":{"items":{"$ref":"#/components/schemas/WidgetGroup"},"type":"array"}},"type":"object"},"SingleNodeExecuteRequestSchema":{"properties":{"end_user_heron_id":{"type":"string"},"explicit_node_results":{"additionalProperties":{},"default":null,"nullable":true,"type":"object"},"node_id":{"type":"string"},"reference_execution_heron_id":{"default":null,"nullable":true,"type":"string"},"workflow_heron_id":{"type":"string"},"workflow_parameters":{"additionalProperties":{},"default":{},"type":"object"},"workflow_version_number":{"default":null,"nullable":true,"type":"integer"}},"required":["end_user_heron_id","node_id","workflow_heron_id"],"type":"object"},"SingleNodeExecuteResponseSchema":{"properties":{"node_id":{"readOnly":true,"type":"string"},"status":{"readOnly":true,"type":"string"},"workflow_execution_heron_id":{"readOnly":true,"type":"string"}},"type":"object"},"SingleNodeExecutionListItemSchema":{"properties":{"created":{"format":"date-time","readOnly":true,"type":"string"},"end_user_heron_id":{"readOnly":true,"type":"string"},"error":{"nullable":true,"readOnly":true},"result":{"nullable":true,"readOnly":true},"status":{"readOnly":true,"type":"string"},"workflow_execution_heron_id":{"readOnly":true,"type":"string"}},"type":"object"},"SingleNodeExecutionStatusSchema":{"properties":{"error":{"nullable":true,"readOnly":true},"result":{"nullable":true,"readOnly":true},"status":{"readOnly":true,"type":"string"}},"type":"object"},"StandaloneProcessFileSchema":{"properties":{"expected_file_class":{"description":"Expected file classification (e.g., 'bank_statement')","nullable":true,"type":"string"},"file_content_base64":{"description":"Base64 encoded file content","type":"string"},"filename":{"description":"Original filename (helps with MIME type detection)","type":"string"},"reference_id":{"description":"Reference ID for tracking","type":"string"}},"required":["file_content_base64","filename","reference_id"],"type":"object"},"StartEnrichEndUserResponseSchema":{"properties":{"end_user_id":{"type":"integer"},"enricher_name":{"type":"string"}},"required":["end_user_id","enricher_name"],"type":"object"},"StringCheck":{"properties":{"auto_decline":{"default":false,"type":"boolean"},"decline_description":{"default":null,"nullable":true,"type":"string"},"email_template_name":{"default":null,"nullable":true,"type":"string"},"ignore_metric_availability":{"default":false,"type":"boolean"},"is_mandatory":{"default":false,"type":"boolean"},"pass_description":{"default":null,"nullable":true,"type":"string"},"type":{"enum":["equal","not_equal","starts_with","starts_with_any_of","does_not_start_with_any_of","contains","does_not_start_with","does_not_contain","is_in","is_not_in"]},"value":{"type":"string"}},"type":"object"},"SubmissionParserExternal":{"properties":{"description":{"type":"string"},"heron_id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"type":"object"},"SubmitFunderSubmissionRequestSchema":{"additionalProperties":false,"properties":{"use_sandbox":{"type":"boolean"}},"required":["use_sandbox"],"type":"object"},"SubmitFunderSubmissionResponseSchema":{"additionalProperties":false,"properties":{"submission_heron_id":{"readOnly":true,"type":"string"}},"type":"object"},"TaxReturn":{"properties":{"balance_sheet_report":{"allOf":[{"$ref":"#/components/schemas/BalanceSheetReport"}],"default":null,"nullable":true},"form_name":{"default":null,"nullable":true,"type":"string"},"page_indexes":{"default":null,"items":{"type":"integer"},"nullable":true,"type":"array"},"pnl_report":{"allOf":[{"$ref":"#/components/schemas/PnlReport"}],"default":null,"nullable":true}},"type":"object"},"TaxReturnsSchema":{"properties":{"tax_returns":{"default":null,"items":{"$ref":"#/components/schemas/TaxReturn"},"nullable":true,"type":"array"}},"type":"object"},"Transaction":{"properties":{"account_id":{"description":"Your unique ID for account associated with transaction","example":"checking_account_202348","maxLength":400,"nullable":true,"type":"string"},"amount":{"description":"Amount. Inflows to an account should be positive, and outflows from an account should be negative. If using Plaid, please flip the amount sign for all transactions.","example":-42.42,"type":"number"},"balance":{"description":"The running balance of the account after transaction ocurred","example":423.0,"nullable":true,"type":"number"},"categories_default":{"description":"Category of transaction that you may have received from other sources","example":"shopping","nullable":true,"type":"string","writeOnly":true},"currency":{"description":"ISO 4217 currency code","example":"USD","maxLength":3,"minLength":3,"nullable":true,"type":"string"},"date":{"description":"The date of the transaction; 'timestamp' field takes priority over 'date'","example":"2020-04-27","format":"date","nullable":true,"type":"string","writeOnly":true},"description":{"description":"The text description for the transaction","example":"GOOGLE *ADS12340929 cc@google.com US","type":"string"},"end_user_id":{"description":"Your unique ID for end user associated with transaction","example":"my_best_customer_203948","maxLength":140,"nullable":true,"type":"string"},"heron_id":{"description":"Unique ID of transaction; generated by Heron Data","example":"txn_ENfXsP3r8gSQcZTh3LbshP","readOnly":true,"type":"string"},"mcc_code":{"description":"Merchant category code associated with transaction that you may have received from other sources","nullable":true,"pattern":"^\\d{4}$","type":"string","writeOnly":true},"order":{"description":"If sending a batch of transactions, the order in which the transaction occurs, where a higher value is equivalent to a more recent transaction","nullable":true,"type":"integer","writeOnly":true},"reference_id":{"description":"Your unique ID for transaction","example":"my_favourite_transaction_231098","maxLength":140,"nullable":true,"type":"string"},"request_id":{"description":"ID associated with request, e.g., all transactions in same POST request will have same request_id","example":"req_3urpSzeapwJFvkodG7taru","nullable":true,"readOnly":true,"type":"string"},"timestamp":{"description":"The ISO 8601 timezone aware timestamp of the transaction; takes precedence over 'date'","example":"2021-11-12T10:38:05Z","format":"date-time","nullable":true,"type":"string"},"transaction_code":{"description":"Code associated with transaction to indicate the type of transaction","example":"card","maxLength":140,"nullable":true,"type":"string"}},"required":["amount","description"],"type":"object"},"Transaction1":{"properties":{"account_id":{"description":"Your unique ID for account associated with transaction","example":"checking_account_202348","maxLength":400,"nullable":true,"type":"string"},"amount":{"description":"Amount. Inflows to an account should be positive, and outflows from an account should be negative. If using Plaid, please flip the amount sign for all transactions.","example":-42.42,"type":"number"},"balance":{"description":"The running balance of the account after transaction ocurred","example":423.0,"nullable":true,"type":"number"},"categories_default":{"description":"Category of transaction that you may have received from other sources","example":"shopping","nullable":true,"type":"string","writeOnly":true},"currency":{"description":"ISO 4217 currency code","example":"USD","maxLength":3,"minLength":3,"nullable":true,"type":"string"},"date":{"description":"The date of the transaction; 'timestamp' field takes priority over 'date'","example":"2020-04-27","format":"date","nullable":true,"type":"string","writeOnly":true},"description":{"description":"The text description for the transaction","example":"GOOGLE *ADS12340929 cc@google.com US","type":"string"},"end_user_id":{"description":"Your unique ID for end user associated with transaction","example":"my_best_customer_203948","maxLength":140,"nullable":true,"type":"string"},"heron_id":{"description":"Unique ID of transaction; generated by Heron Data","example":"txn_ENfXsP3r8gSQcZTh3LbshP","readOnly":true,"type":"string"},"mcc_code":{"description":"Merchant category code associated with transaction that you may have received from other sources","nullable":true,"pattern":"^\\d{4}$","type":"string","writeOnly":true},"order":{"description":"If sending a batch of transactions, the order in which the transaction occurs, where a higher value is equivalent to a more recent transaction","nullable":true,"type":"integer","writeOnly":true},"reference_id":{"description":"Your unique ID for transaction","example":"my_favourite_transaction_231098","maxLength":140,"nullable":true,"type":"string"},"request_id":{"description":"ID associated with request, e.g., all transactions in same POST request will have same request_id","example":"req_3urpSzeapwJFvkodG7taru","nullable":true,"readOnly":true,"type":"string"},"timestamp":{"description":"The ISO 8601 timezone aware timestamp of the transaction; takes precedence over 'date'","example":"2021-11-12T10:38:05Z","format":"date-time","nullable":true,"type":"string"},"transaction_code":{"description":"Code associated with transaction to indicate the type of transaction","example":"card","maxLength":140,"nullable":true,"type":"string"}},"required":["amount","description"],"type":"object"},"Transaction2":{"properties":{"heron_id":{"description":"Unique ID of transaction; generated by Heron Data","example":"txn_ENfXsP3r8gSQcZTh3LbshP","readOnly":true,"type":"string"},"reference_id":{"description":"Your unique ID for transaction","example":"my_favourite_transaction_231098","maxLength":140,"nullable":true,"type":"string"}},"type":"object"},"Transaction3":{"properties":{"account_id":{"description":"Your unique ID for account associated with transaction","example":"checking_account_202348","maxLength":400,"nullable":true,"type":"string"},"amount":{"description":"Amount. Inflows to an account should be positive, and outflows from an account should be negative. If using Plaid, please flip the amount sign for all transactions.","example":-42.42,"type":"number"},"currency":{"description":"ISO 4217 currency code","example":"USD","maxLength":3,"minLength":3,"nullable":true,"type":"string"},"description":{"description":"The text description for the transaction","example":"GOOGLE *ADS12340929 cc@google.com US","type":"string"},"heron_id":{"description":"Unique ID of transaction; generated by Heron Data","example":"txn_ENfXsP3r8gSQcZTh3LbshP","readOnly":true,"type":"string"},"timestamp":{"description":"The ISO 8601 timezone aware timestamp of the transaction; takes precedence over 'date'","example":"2021-11-12T10:38:05Z","format":"date-time","nullable":true,"type":"string"}},"required":["amount","description"],"type":"object"},"TransactionAnnotation":{"properties":{"annotator":{"description":"Annotator type","example":"predicted","type":"string"},"confidence":{"description":"The confidence associated with the category annotation","example":0.5,"type":"number"},"heron_id":{"description":"Unique ID of category; generated by Heron Data","example":"ctg_PWoQhNmYcv7D7xd5G85FkM","type":"string"},"label":{"description":"Label of category","example":"Rent","type":"string"},"model_version":{"description":"The model version that produced the categorisation","example":"c13c6055-63bd-46d8-b0eb-14e7590e05a1","type":"string"}},"type":"object"},"TransactionDeleteReference":{"properties":{"transactions":{"description":"list of transactions (only ids) that have been deleted","items":{"$ref":"#/components/schemas/Transaction2"},"type":"array"}},"type":"object"},"TransactionDeleteWebhook":{"properties":{"created":{"description":"time webhook was sent","example":"2026-04-18T03:33:26.885246","format":"date-time","type":"string"},"data":{"allOf":[{"$ref":"#/components/schemas/TransactionDeleteReference"}],"description":"payload of the webhook"},"meta":{"additionalProperties":{},"description":"meta information about the webhook","type":"object"},"topic":{"description":"topic of webhook","example":"transactions.deleted","type":"string"}},"type":"object"},"TransactionEnriched":{"properties":{"account_id":{"description":"Your unique ID for account associated with transaction","example":"checking_account_202348","maxLength":400,"nullable":true,"type":"string"},"account_number":{"description":"The account number of the data source account associated with the transaction","example":"1234567890","nullable":true,"type":"string"},"amount":{"description":"Amount. Inflows to an account should be positive, and outflows from an account should be negative. If using Plaid, please flip the amount sign for all transactions.","example":-42.42,"type":"number"},"annotation":{"allOf":[{"$ref":"#/components/schemas/Annotation"}],"description":"The category annotation associated with the transaction"},"balance":{"description":"The running balance of the account after transaction ocurred","example":423.0,"nullable":true,"type":"number"},"categories_default":{"description":"Category of transaction that you may have received from other sources","example":"shopping","nullable":true,"type":"string","writeOnly":true},"counterparty":{"description":"The counterparty associated with the transaction, if available","example":"GOOGLE","nullable":true,"type":"string"},"currency":{"description":"ISO 4217 currency code","example":"USD","maxLength":3,"minLength":3,"nullable":true,"type":"string"},"data_source_account_heron_id":{"description":"The heron ID of the data source account associated with the transaction","example":"dsa_4oMTbLoU6MoTzTShjfVuAY","nullable":true,"type":"string"},"data_source_heron_id":{"description":"The heron ID of the data source associated with the transaction","example":"dso_4xSQ57ufJCPscVUL9NK7i4","nullable":true,"type":"string"},"date":{"description":"The date of the transaction; 'timestamp' field takes priority over 'date'","example":"2020-04-27","format":"date","nullable":true,"type":"string","writeOnly":true},"description":{"description":"The text description for the transaction","example":"GOOGLE *ADS12340929 cc@google.com US","type":"string"},"end_user_id":{"description":"Your unique ID for end user associated with transaction","example":"my_best_customer_203948","maxLength":140,"nullable":true,"type":"string"},"features":{"allOf":[{"$ref":"#/components/schemas/TransactionFeatures"}],"description":"Features calculated from transaction"},"heron_id":{"description":"Unique ID of transaction; generated by Heron Data","example":"txn_ENfXsP3r8gSQcZTh3LbshP","readOnly":true,"type":"string"},"last_updated":{"description":"When the transaction was last updated, either by updating its enrichments or the values of the transaction itself","example":"2026-04-18T03:33:26.878384","format":"date-time","type":"string"},"mcc_code":{"description":"Merchant category code associated with transaction that you may have received from other sources","nullable":true,"pattern":"^\\d{4}$","type":"string","writeOnly":true},"merchant":{"allOf":[{"$ref":"#/components/schemas/Merchant"}],"description":"The merchant associated with the transaction"},"order":{"description":"If sending a batch of transactions, the order in which the transaction occurs, where a higher value is equivalent to a more recent transaction","nullable":true,"type":"integer","writeOnly":true},"reference_id":{"description":"Your unique ID for transaction","example":"my_favourite_transaction_231098","maxLength":140,"nullable":true,"type":"string"},"request_id":{"description":"ID associated with request, e.g., all transactions in same POST request will have same request_id","example":"req_3urpSzeapwJFvkodG7taru","nullable":true,"readOnly":true,"type":"string"},"timestamp":{"description":"The ISO 8601 timezone aware timestamp of the transaction; takes precedence over 'date'","example":"2021-11-12T10:38:05Z","format":"date-time","nullable":true,"type":"string"},"transaction_code":{"description":"Code associated with transaction to indicate the type of transaction","example":"card","maxLength":140,"nullable":true,"type":"string"}},"required":["amount","description"],"type":"object"},"TransactionFeatures":{"properties":{"description_clean":{"description":"The cleaned description of the transaction","example":"GOOGLE ADS","type":"string"},"duplicate_of_id":{"description":"Indicates that the transaction is a duplicate and gives the heron_id of the original","example":"txn_8bQBoKs8zUU44Cn58SqwDz"},"has_matching_transaction":{"description":"Whether the transaction is a transfer; requires end_user_id and timestamp to be present","type":"boolean"},"is_potential_duplicate":{"description":"Indicates whether the transaction has another transaction similar to it","readOnly":true,"type":"boolean"},"is_recurring":{"description":"Whether the transaction is recurring or not; requires end_user_id and timestamp to be present","type":"boolean"}},"type":"object"},"TransactionFeedbackParams":{"properties":{"trigger_webhook":{"default":true,"description":"If true, enables the triggering of transaction_updated webhook. Set to false to suppress trigger. Default true","type":"boolean"}},"type":"object"},"TransactionFeedbackSchema":{"properties":{"category":{"allOf":[{"$ref":"#/components/schemas/CategoryFeedback"}],"default":{},"example":{"heron_id":"ctg_SJ6JNuZz2SG7d4YfMfUPHh","label":"Insurance"}},"merchant":{"allOf":[{"$ref":"#/components/schemas/MerchantFeedback"}],"default":{},"example":{"heron_id":"mrc_bkaFUKcdaJ4P2bpk9E3kjB","is_correct":false,"name":"Spotify"}},"source":{"default":null,"description":"your identifier for where the feedback comes from e.g. bob_the_underwriter","maxLength":120,"nullable":true,"type":"string"}},"type":"object"},"TransactionGetOutput":{"properties":{"account_id":{"description":"Your unique ID for account associated with transaction","example":"checking_account_202348","maxLength":400,"nullable":true,"type":"string"},"account_number":{"description":"The account number associated with the transaction","example":"1234567890","type":"string"},"amount":{"description":"Amount. Inflows to an account should be positive, and outflows from an account should be negative. If using Plaid, please flip the amount sign for all transactions.","example":-42.42,"type":"number"},"balance":{"description":"The running balance of the account after transaction ocurred","example":423.0,"nullable":true,"type":"number"},"categories":{"description":"The category associated with the transaction","items":{"$ref":"#/components/schemas/TransactionAnnotation"},"type":"array"},"counterparty":{"description":"The counterparty associated with the transaction, if available","example":"GOOGLE","nullable":true,"type":"string"},"created":{"description":"When transaction was created in Heron system","example":"2026-04-18T03:33:26.880858","format":"date-time","type":"string"},"currency":{"description":"ISO 4217 currency code","example":"USD","maxLength":3,"minLength":3,"nullable":true,"type":"string"},"data_source_account_heron_id":{"description":"Unique ID of the transaction's data source account","example":"dsa_7PGqaEhAeThWdrJhepjuTy","readOnly":true,"type":"string"},"data_source_heron_id":{"description":"Unique ID of the transaction's data source","example":"dso_gfru5sd7mRMmnEL3mdV8uP","readOnly":true,"type":"string"},"description":{"description":"The text description for the transaction","example":"GOOGLE *ADS12340929 cc@google.com US","type":"string"},"description_clean":{"description":"The cleaned description of the transaction","example":"GOOGLE ADS","type":"string"},"duplicate_of_id":{"description":"Indicates that the transaction is a duplicate and gives the heron_id of the original","example":"txn_8bQBoKs8zUU44Cn58SqwDz"},"end_user_id":{"description":"Your unique ID for end user associated with transaction","example":"my_best_customer_203948","maxLength":140,"nullable":true,"type":"string"},"has_matching_transaction":{"description":"Whether the transaction is a transfer; requires end_user_id and timestamp to be present","type":"boolean"},"heron_id":{"description":"Unique ID of transaction; generated by Heron Data","example":"txn_ENfXsP3r8gSQcZTh3LbshP","readOnly":true,"type":"string"},"is_potential_duplicate":{"description":"Indicates whether the transaction has another transaction similar to it","readOnly":true,"type":"boolean"},"is_recurring":{"description":"Whether the transaction is recurring or not; requires end_user_id and timestamp to be present","type":"boolean"},"last_updated":{"description":"When transaction was last updated in Heron system; could be from recategorisation or attribute updates","example":"2026-04-18T03:33:26.880879","format":"date-time","type":"string"},"mcc_code":{"description":"Merchant category code associated with transaction that you may have received from other sources","nullable":true,"pattern":"^\\d{4}$","type":"string","writeOnly":true},"merchant":{"allOf":[{"$ref":"#/components/schemas/Merchant"}],"description":"The merchant associated with the transaction"},"order":{"description":"If sending a batch of transactions, the order in which the transaction occurs, where a higher value is equivalent to a more recent transaction","nullable":true,"type":"integer","writeOnly":true},"payment_processor":{"allOf":[{"$ref":"#/components/schemas/PaymentProcessor"}],"description":"The payment processor associated with the transaction"},"reference_id":{"description":"Your unique ID for transaction","example":"my_favourite_transaction_231098","maxLength":140,"nullable":true,"type":"string"},"request_id":{"description":"ID associated with request, e.g., all transactions in same POST request will have same request_id","example":"req_3urpSzeapwJFvkodG7taru","nullable":true,"readOnly":true,"type":"string"},"timestamp":{"description":"The ISO 8601 timezone aware timestamp of the transaction; takes precedence over 'date'","example":"2021-11-12T10:38:05Z","format":"date-time","nullable":true,"type":"string"},"transaction_code":{"description":"Code associated with transaction to indicate the type of transaction","example":"card","maxLength":140,"nullable":true,"type":"string"}},"required":["amount","description"],"type":"object"},"TransactionPostAsync":{"properties":{"account_id":{"description":"Your unique ID for account associated with transaction","example":"checking_account_202348","maxLength":400,"type":"string"},"amount":{"description":"Amount. Inflows to an account should be positive, and outflows from an account should be negative. If using Plaid, please flip the amount sign for all transactions.","example":-42.42,"type":"number"},"balance":{"description":"The running balance of the account after transaction ocurred","example":423.0,"nullable":true,"type":"number"},"categories_default":{"description":"Category of transaction that you may have received from other sources","example":"shopping","nullable":true,"type":"string","writeOnly":true},"currency":{"description":"ISO 4217 currency code","example":"USD","maxLength":3,"minLength":3,"type":"string"},"date":{"description":"The date of the transaction; 'timestamp' field takes priority over 'date'","example":"2020-04-27","format":"date","nullable":true,"type":"string","writeOnly":true},"description":{"description":"The text description for the transaction","example":"GOOGLE *ADS12340929 cc@google.com US","type":"string"},"end_user_id":{"description":"Your unique ID for end user associated with transaction","example":"my_best_customer_203948","maxLength":140,"type":"string"},"heron_id":{"description":"Unique ID of transaction; generated by Heron Data","example":"txn_ENfXsP3r8gSQcZTh3LbshP","readOnly":true,"type":"string"},"mcc_code":{"description":"Merchant category code associated with transaction that you may have received from other sources","nullable":true,"pattern":"^\\d{4}$","type":"string","writeOnly":true},"order":{"description":"If sending a batch of transactions, the order in which the transaction occurs, where a higher value is equivalent to a more recent transaction","nullable":true,"type":"integer","writeOnly":true},"reference_id":{"description":"Your unique ID for transaction","example":"my_favourite_transaction_231098","maxLength":140,"type":"string"},"request_id":{"description":"ID associated with request, e.g., all transactions in same POST request will have same request_id","example":"req_3urpSzeapwJFvkodG7taru","nullable":true,"readOnly":true,"type":"string"},"timestamp":{"description":"The ISO 8601 timezone aware timestamp of the transaction; takes precedence over 'date'","example":"2021-11-12T10:38:05Z","format":"date-time","nullable":true,"type":"string"},"transaction_code":{"description":"Code associated with transaction to indicate the type of transaction","example":"card","maxLength":140,"nullable":true,"type":"string"}},"required":["account_id","amount","currency","description","end_user_id","reference_id"],"type":"object"},"TransactionPostOutput":{"properties":{"account_id":{"description":"Your unique ID for account associated with transaction","example":"checking_account_202348","maxLength":400,"nullable":true,"type":"string"},"amount":{"description":"Amount. Inflows to an account should be positive, and outflows from an account should be negative. If using Plaid, please flip the amount sign for all transactions.","example":-42.42,"type":"number"},"balance":{"description":"The running balance of the account after transaction ocurred","example":423.0,"nullable":true,"type":"number"},"categories":{"description":"The category associated with the transaction","items":{"$ref":"#/components/schemas/TransactionAnnotation"},"type":"array"},"currency":{"description":"ISO 4217 currency code","example":"USD","maxLength":3,"minLength":3,"nullable":true,"type":"string"},"description":{"description":"The text description for the transaction","example":"GOOGLE *ADS12340929 cc@google.com US","type":"string"},"description_clean":{"description":"The cleaned description of the transaction","example":"GOOGLE ADS","type":"string"},"duplicate_of_id":{"description":"Indicates that the transaction is a duplicate and gives the heron_id of the original","example":"txn_8bQBoKs8zUU44Cn58SqwDz"},"end_user_id":{"description":"Your unique ID for end user associated with transaction","example":"my_best_customer_203948","maxLength":140,"nullable":true,"type":"string"},"has_matching_transaction":{"description":"Whether the transaction is a transfer; requires end_user_id and timestamp to be present","type":"boolean"},"is_potential_duplicate":{"description":"Indicates whether the transaction has another transaction similar to it","readOnly":true,"type":"boolean"},"is_recurring":{"description":"Whether the transaction is recurring or not; requires end_user_id and timestamp to be present","type":"boolean"},"mcc_code":{"description":"Merchant category code associated with transaction that you may have received from other sources","nullable":true,"pattern":"^\\d{4}$","type":"string","writeOnly":true},"merchant":{"allOf":[{"$ref":"#/components/schemas/Merchant"}],"description":"The merchant associated with the transaction"},"order":{"description":"If sending a batch of transactions, the order in which the transaction occurs, where a higher value is equivalent to a more recent transaction","nullable":true,"type":"integer","writeOnly":true},"payment_processor":{"allOf":[{"$ref":"#/components/schemas/PaymentProcessor"}],"description":"The payment processor associated with the transaction"},"reference_id":{"description":"Your unique ID for transaction","example":"my_favourite_transaction_231098","maxLength":140,"nullable":true,"type":"string"},"request_id":{"description":"ID associated with request, e.g., all transactions in same POST request will have same request_id","example":"req_3urpSzeapwJFvkodG7taru","nullable":true,"readOnly":true,"type":"string"},"timestamp":{"description":"The ISO 8601 timezone aware timestamp of the transaction; takes precedence over 'date'","example":"2021-11-12T10:38:05Z","format":"date-time","nullable":true,"type":"string"},"transaction_code":{"description":"Code associated with transaction to indicate the type of transaction","example":"card","maxLength":140,"nullable":true,"type":"string"}},"required":["amount","description"],"type":"object"},"TransactionsPostAsyncSchema":{"properties":{"balances":{"description":"Bank account balance information for a particular account_id. The balance here must be the *latest balance* after all the transactions in this batch have been applied.","items":{"$ref":"#/components/schemas/AccountBalance1"},"nullable":true,"type":"array"},"transactions":{"items":{"$ref":"#/components/schemas/TransactionPostAsync"},"minItems":1,"type":"array"}},"required":["transactions"],"type":"object"},"TransactionsPostSyncSchema":{"properties":{"transactions":{"items":{"$ref":"#/components/schemas/Transaction1"},"minItems":1,"type":"array"}},"required":["transactions"],"type":"object"},"UpdateEndUserEntityAttributeSchema":{"properties":{"attribute_description":{"type":"string"},"attribute_name":{"type":"string"},"attribute_type":{"enum":["float","int","decimal","string","date","datetime","bool"]},"is_dedupe_key":{"type":"boolean"},"reconciliation_config":{"additionalProperties":{},"type":"object"},"reconciliation_strategy":{"enum":["sort_order","llm","comparison","concatenate_lists"]}},"type":"object"},"UpdateEndUserEntityAttributeSourceSchema":{"properties":{"sort_order":{"type":"integer"},"source_config":{"additionalProperties":{},"type":"object"},"source_type":{"enum":["parsed_end_user_file","api","rel_6","end_user_enricher","company_attribute","static_value","end_user_query","broker_submission_api"]}},"type":"object"},"UpdateEndUserEntitySchema":{"properties":{"display_order":{"type":"integer"},"entity_description":{"type":"string"},"entity_name":{"type":"string"},"entity_post_processor_configs":{"items":{"additionalProperties":{},"type":"object"},"type":"array"},"is_list":{"type":"boolean"},"saved_query_heron_id":{"nullable":true,"type":"string"}},"type":"object"},"UpdateFileRenameRuleSchema":{"properties":{"file_name_template":{"type":"string"},"is_enabled":{"type":"boolean"},"variables":{"default":[],"items":{"$ref":"#/components/schemas/VariableDefinition"},"type":"array"}},"required":["file_name_template","is_enabled"],"type":"object"},"UpdateFunderSchema":{"additionalProperties":false,"properties":{"aliases":{"items":{"type":"string"},"nullable":true,"type":"array"},"email_domains":{"items":{"type":"string"},"nullable":true,"type":"array"},"name":{"minLength":1,"type":"string"},"offer_email_instructions":{"nullable":true,"type":"string"},"offer_portal_instructions":{"nullable":true,"type":"string"},"offer_source":{"enum":["email","api","web_portal","all_offers","crm_lendsaas",null],"nullable":true,"type":"string"},"submission_channel":{"enum":["email","api","web_portal","all_offers","crm_lendsaas",null],"nullable":true,"type":"string"},"submission_email_address":{"nullable":true,"type":"string"}},"type":"object"},"UpsertEndUserEntityAttributeValueSchema":{"properties":{"attribute_heron_id":{"type":"string"},"source_heron_id":{"type":"string"},"value":{"nullable":true}},"required":["attribute_heron_id","source_heron_id","value"],"type":"object"},"UpsertFunderSubmissionRequestSchema":{"additionalProperties":false,"properties":{"end_user_heron_id":{"type":"string"},"funder_heron_id":{"type":"string"}},"required":["end_user_heron_id","funder_heron_id"],"type":"object"},"User":{"properties":{"alias":{"type":"string"},"created":{"format":"date-time","readOnly":true,"type":"string"},"email":{"type":"string"},"environment":{"enum":["dev","prod","internal"],"type":"string"},"id":{"readOnly":true,"type":"integer"},"is_active":{"default":true,"type":"boolean"},"is_self_sign_up":{"nullable":true,"type":"boolean"},"last_updated":{"format":"date-time","readOnly":true,"type":"string"},"onboarding_data":{"additionalProperties":{},"nullable":true,"type":"object"},"onboarding_step":{"enum":["require_email_verification","require_company_info","require_file_classes","require_rename_rules","require_file_upload","complete",null],"nullable":true},"onboarding_step_initial_data":{"additionalProperties":{},"nullable":true,"type":"object"},"organization_id":{"type":"integer"},"password":{"type":"string"},"profit_and_loss_layout":{"nullable":true},"settings":{"$ref":"#/components/schemas/UserSettings"},"username":{"type":"string"}},"required":["email","organization_id","username"],"type":"object"},"UserLogoBase64Schema":{"properties":{"file_b64":{"description":"Base64 encoded logo file","type":"string"},"mime_type":{"description":"MIME type of the logo file","type":"string"}},"type":"object"},"UserLogoFileSchema":{"properties":{"filename":{"type":"string"},"user_id":{"type":"string"}},"type":"object"},"UserLogoUploadSchema":{"properties":{"file_base64":{"description":"Base64 encoded file bytes","type":"string"},"filename":{"description":"Name of file","type":"string"}},"required":["file_base64","filename"],"type":"object"},"UserMerchantGroupSchema":{"properties":{"group_id":{"type":"string"},"merchant_heron_id":{"type":"string"},"merchant_name":{"type":"string"}},"required":["merchant_heron_id","merchant_name"],"type":"object"},"UserMerchantGroupsSchema":{"properties":{"custom_merchants":{"default":[],"items":{"$ref":"#/components/schemas/UserMerchantGroupSchema"},"type":"array"},"pending_merchants":{"default":[],"items":{"$ref":"#/components/schemas/UserMerchantGroupSchema"},"type":"array"},"rejected_merchants":{"default":[],"items":{"$ref":"#/components/schemas/UserMerchantGroupSchema"},"type":"array"}},"type":"object"},"UserModifiableSettings":{"properties":{"balance_sheet_categories":{"$ref":"#/components/schemas/BalanceSheetCategories"},"disable_data_export":{"type":"boolean"},"financials_metrics":{"additionalProperties":{"$ref":"#/components/schemas/MetricSpec"},"type":"object"},"industry_naics_enabled":{"type":"boolean"},"low_balance_days_threshold":{"type":"number"},"pnl_categories":{"$ref":"#/components/schemas/PnLCategories"},"query_reports":{"items":{"$ref":"#/components/schemas/QueryReportTabGroup"},"type":"array"},"required_revenue_per_month":{"type":"integer"},"restricted_industries":{"items":{"$ref":"#/components/schemas/RestrictedIndustry"},"type":"array"},"use_new_company_layout":{"type":"boolean"},"use_new_end_user_summary_table":{"type":"boolean"},"use_new_end_user_table":{"type":"boolean"}},"type":"object"},"UserSettings":{"properties":{"annotations":{"$ref":"#/components/schemas/AnnotationSettings"},"api_version":{"type":"string"},"cache_global_enrich":{"type":"boolean"},"currency_iso_code":{"enum":["GBP","USD","EUR"],"type":"string"},"data_retention_days":{"minimum":1,"nullable":true,"type":"integer"},"data_retention_turned_on":{"type":"boolean"},"email_domains":{"items":{"type":"string"},"type":"array"},"enabled_enrichers":{"items":{"type":"string"},"type":"array"},"end_user_entities":{"$ref":"#/components/schemas/EndUserEntitiesSettings"},"end_user_query_static_csvs":{"additionalProperties":{"type":"string"},"description":"Static CSV configurations for end user queries. Dict mapping table_name to gcs_path.","type":"object"},"enrich_global_ttl_days":{"minimum":1,"type":"integer"},"enricher_inputs_mapping":{"additionalProperties":{},"description":"Mapping of enricher names to input field names. Used to map LLM enricher inputs to end user fields.","type":"object"},"features":{"$ref":"#/components/schemas/FeatureSettings"},"files":{"$ref":"#/components/schemas/FileSettings"},"high_priority_async_slots":{"type":"integer"},"inbound_emails":{"$ref":"#/components/schemas/InboundEmailSettings"},"include_in_analytics":{"type":"boolean"},"ip_whitelist":{"items":{"type":"string"},"nullable":true,"type":"array"},"is_priority_async":{"type":"boolean"},"legacy_data_sources":{"type":"boolean"},"modifiable":{"$ref":"#/components/schemas/ModifiableSettings"},"outbound_emails":{"$ref":"#/components/schemas/OutboundEmailSettings"},"pdf":{"$ref":"#/components/schemas/PdfSettings"},"plaid":{"$ref":"#/components/schemas/PlaidSettings"},"rate_limit":{"pattern":"^[0-9]{1,4}/minute$","type":"string"},"restrict_api_keys_in_dashboard":{"type":"boolean"},"retry_global_enrich":{"type":"boolean"},"scorecard":{"$ref":"#/components/schemas/ScorecardSettings"},"sync_async_enrich":{"type":"boolean"},"sync_enrich":{"type":"boolean"},"use_case_type":{"enum":["iso_underwriting","non_iso_underwriting","commercial_insurance","commercial_law","equipment_finance","broker","other"],"type":"string"}},"type":"object"},"UserWorkflowSchema":{"properties":{"dashboard_trigger_enabled":{"readOnly":true,"type":"boolean"},"dashboard_trigger_label":{"nullable":true,"readOnly":true,"type":"string"},"heron_id":{"readOnly":true,"type":"string"},"is_default":{"readOnly":true,"type":"boolean"},"name":{"readOnly":true,"type":"string"},"owners":{"allOf":[{"$ref":"#/components/schemas/FlowmingoWorkflowOwners"}],"readOnly":true}},"type":"object"},"VariableDefinition":{"properties":{"description":{"type":"string"},"examples":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"name":{"type":"string"}},"required":["description","examples","key","name"],"type":"object"},"VoidCheckResultSchema":{"properties":{"account_number":{"default":null,"nullable":true,"type":"string"},"address_city":{"default":null,"nullable":true,"type":"string"},"address_line_1":{"default":null,"nullable":true,"type":"string"},"address_state":{"default":null,"enum":["AK","AL","AR","AZ","CA","CO","CT","DC","DE","FL","GA","HI","IA","ID","IL","IN","KS","KY","LA","MA","MD","ME","MI","MN","MO","MS","MT","NC","ND","NE","NH","NJ","NM","NV","NY","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VA","VT","WA","WI","WV","WY","PR",null],"nullable":true,"type":"string"},"address_zip":{"default":null,"nullable":true,"type":"string"},"bank_name":{"default":null,"nullable":true,"type":"string"},"check_number":{"default":null,"nullable":true,"type":"string"},"company_name":{"default":null,"nullable":true,"type":"string"},"routing_number":{"default":null,"nullable":true,"type":"string"}},"type":"object"},"WebhookSchema":{"properties":{"headers":{"additionalProperties":{},"description":"Headers to send webhook with","example":{"Content-Type":"application/json"},"nullable":true,"type":"object"},"heron_id":{"description":"Unique ID for webhook generated by Heron","example":"wbh_DCbWpZryLF2Tb5yKfYdo6X","readOnly":true,"type":"string"},"is_enabled":{"description":"Whether the webhook is enabled","example":true,"type":"boolean"},"topic":{"description":"Webhook topic for different Heron events","enum":["data_source.enabled","data_source_account_summary.created","data_source.disabled","end_user.created","end_user.processed","end_user.failed","end_user.reviewed","end_user.transactions_updated","end_user.review_required","end_user.files_changed","end_user.files_classified","end_user_information.updated","end_user.policy_workflow_finished","end_user.policy_workflow_failed","enrich_workflow.finished","transactions.deleted","transactions.updated","pdf.processed","pdf.checks_passed","pdf.checks_failed","pdf.transactions_loaded","pdf.failed","pdf.parsed","pdf.human_reviewing","pdf.approved","integration_link.erroring","iso_application.processed","iso_application.processed_simple","iso_application.created","iso_application.failed","end_user_email.processed","end_user_email.failed","end_user_file.parsed","end_user_file.parse_failed","end_user_file.processed_standalone","end_user_file.deleted","end_user_files.processing_failed","enricher.succeeded","enricher.failed"],"example":"end_user.processed","type":"string"},"url":{"description":"URL where webhook should be sent","example":"https://www.your-webhook-endpoint.com/heron","format":"url","type":"string"}},"type":"object"},"WebhookUpdateSchema":{"properties":{"headers":{"additionalProperties":{},"description":"Headers to send webhook with","example":{"Content-Type":"application/json"},"nullable":true,"type":"object"},"heron_id":{"description":"Unique ID for webhook generated by Heron","example":"wbh_DCbWpZryLF2Tb5yKfYdo6X","readOnly":true,"type":"string"},"is_enabled":{"description":"Whether the webhook is enabled","example":true,"type":"boolean"},"topic":{"description":"Webhook topic for different Heron events","enum":["data_source.enabled","data_source_account_summary.created","data_source.disabled","end_user.created","end_user.processed","end_user.failed","end_user.reviewed","end_user.transactions_updated","end_user.review_required","end_user.files_changed","end_user.files_classified","end_user_information.updated","end_user.policy_workflow_finished","end_user.policy_workflow_failed","enrich_workflow.finished","transactions.deleted","transactions.updated","pdf.processed","pdf.checks_passed","pdf.checks_failed","pdf.transactions_loaded","pdf.failed","pdf.parsed","pdf.human_reviewing","pdf.approved","integration_link.erroring","iso_application.processed","iso_application.processed_simple","iso_application.created","iso_application.failed","end_user_email.processed","end_user_email.failed","end_user_file.parsed","end_user_file.parse_failed","end_user_file.processed_standalone","end_user_file.deleted","end_user_files.processing_failed","enricher.succeeded","enricher.failed"],"example":"end_user.processed","type":"string"},"url":{"description":"URL where webhook should be sent","example":"https://www.your-webhook-endpoint.com/heron","format":"url","type":"string"}},"type":"object"},"Widget":{"properties":{"id":{"description":"A unique id used to reference the widget","type":"string"},"scorecard_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","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"],"type":"string"},"scorecard_metric_label":{"type":"string"},"type":{"enum":["scorecard_metric","heron_score","loan_revenue_ratio","deposit_trends_ratio"],"type":"string"}},"required":["id","type"],"type":"object"},"WidgetGroup":{"properties":{"group_name":{"type":"string"},"id":{"description":"A unique id used to reference the group","type":"string"},"widgets":{"items":{"$ref":"#/components/schemas/Widget"},"type":"array"}},"required":["group_name","id","widgets"],"type":"object"},"WorkflowApproveSchema":{"properties":{"approved_by":{"type":"string"},"comment":{"default":null,"nullable":true,"type":"string"}},"required":["approved_by"],"type":"object"},"WorkflowCopyToDraftSchema":{"properties":{"author_email":{"default":null,"nullable":true,"type":"string"}},"type":"object"},"WorkflowCreateSchema":{"properties":{"display_config":{"additionalProperties":{},"nullable":true,"type":"object"},"name":{"type":"string"},"set_as_default":{"default":false,"type":"boolean"},"workflow_definition":{"$ref":"#/components/schemas/JSONWorkflowDefinition"}},"required":["name","workflow_definition"],"type":"object"},"WorkflowExecutionSchema":{"properties":{"created":{"format":"date-time","readOnly":true,"type":"string"},"end_user_heron_id":{"nullable":true,"readOnly":true,"type":"string"},"end_user_name":{"nullable":true,"readOnly":true,"type":"string"},"heron_id":{"readOnly":true,"type":"string"},"single_node_id":{"nullable":true,"readOnly":true,"type":"string"},"started_at":{"format":"date-time","readOnly":true,"type":"string"},"status":{"readOnly":true,"type":"string"},"workflow_version_id":{"readOnly":true,"type":"integer"},"workflow_version_number":{"readOnly":true,"type":"integer"}},"type":"object"},"WorkflowExecutionStatusSchema":{"properties":{"nodes":{"additionalProperties":{"$ref":"#/components/schemas/WorkflowNodeStatus"},"readOnly":true,"type":"object"},"status":{"readOnly":true,"type":"string"}},"type":"object"},"WorkflowNodeStatus":{"properties":{"error":{"additionalProperties":{},"readOnly":true,"type":"object"},"execution_heron_id":{"readOnly":true,"type":"string"},"execution_id":{"readOnly":true,"type":"string"},"finished_time":{"format":"date-time","readOnly":true,"type":"string"},"inputs":{"additionalProperties":{},"readOnly":true,"type":"object"},"node_metadata":{"additionalProperties":{},"readOnly":true,"type":"object"},"result":{"readOnly":true},"scheduled_time":{"format":"date-time","readOnly":true,"type":"string"},"sourced_from_cache_hit":{"readOnly":true,"type":"boolean"},"started_time":{"format":"date-time","readOnly":true,"type":"string"},"status":{"readOnly":true,"type":"string"}},"type":"object"},"WorkflowPublishSchema":{"properties":{"published_by":{"type":"string"}},"required":["published_by"],"type":"object"},"WorkflowSchema":{"properties":{"created":{"format":"date-time","readOnly":true,"type":"string"},"dashboard_trigger_enabled":{"readOnly":true,"type":"boolean"},"dashboard_trigger_label":{"nullable":true,"readOnly":true,"type":"string"},"heron_id":{"readOnly":true,"type":"string"},"is_default":{"readOnly":true,"type":"boolean"},"name":{"readOnly":true,"type":"string"},"owners":{"allOf":[{"$ref":"#/components/schemas/FlowmingoWorkflowOwners"}],"readOnly":true},"user_id":{"readOnly":true,"type":"string"},"user_username":{"nullable":true,"readOnly":true,"type":"string"},"versions":{"items":{"$ref":"#/components/schemas/WorkflowVersionSummary"},"readOnly":true,"type":"array"}},"type":"object"},"WorkflowStartByNameRequestSchema":{"properties":{"end_user_heron_id":{"type":"string"},"workflow_name":{"type":"string"},"workflow_parameters":{"additionalProperties":{},"default":{},"type":"object"}},"required":["end_user_heron_id","workflow_name"],"type":"object"},"WorkflowStartRequestSchema":{"properties":{"end_user_heron_id":{"type":"string"},"workflow_heron_id":{"default":null,"nullable":true,"type":"string"},"workflow_parameters":{"additionalProperties":{},"default":{},"type":"object"},"workflow_version_number":{"default":null,"nullable":true,"type":"integer"}},"required":["end_user_heron_id"],"type":"object"},"WorkflowStartResponseSchema":{"properties":{"action":{"readOnly":true,"type":"string"},"status":{"readOnly":true,"type":"string"},"workflow_execution_id":{"readOnly":true,"type":"string"},"workflow_id":{"readOnly":true,"type":"string"}},"type":"object"},"WorkflowSubmitForReviewSchema":{"properties":{"submitted_by":{"type":"string"}},"required":["submitted_by"],"type":"object"},"WorkflowSummarySchema":{"properties":{"created":{"format":"date-time","readOnly":true,"type":"string"},"dashboard_trigger_enabled":{"readOnly":true,"type":"boolean"},"dashboard_trigger_label":{"nullable":true,"readOnly":true,"type":"string"},"heron_id":{"readOnly":true,"type":"string"},"is_default":{"readOnly":true,"type":"boolean"},"latest_version_approved_at":{"format":"date-time","nullable":true,"readOnly":true,"type":"string"},"latest_version_approved_by":{"nullable":true,"readOnly":true,"type":"string"},"latest_version_approved_comment":{"nullable":true,"readOnly":true,"type":"string"},"latest_version_author_email":{"nullable":true,"readOnly":true,"type":"string"},"latest_version_change_description":{"nullable":true,"readOnly":true,"type":"string"},"latest_version_last_edited_at":{"format":"date-time","nullable":true,"readOnly":true,"type":"string"},"latest_version_last_updated":{"format":"date-time","nullable":true,"readOnly":true,"type":"string"},"latest_version_number":{"nullable":true,"readOnly":true,"type":"integer"},"latest_version_published_at":{"format":"date-time","nullable":true,"readOnly":true,"type":"string"},"latest_version_published_by":{"nullable":true,"readOnly":true,"type":"string"},"latest_version_status":{"nullable":true,"readOnly":true,"type":"string"},"latest_version_submitted_by":{"nullable":true,"readOnly":true,"type":"string"},"latest_version_submitted_for_review_at":{"format":"date-time","nullable":true,"readOnly":true,"type":"string"},"name":{"readOnly":true,"type":"string"},"user_id":{"readOnly":true,"type":"integer"},"user_username":{"nullable":true,"readOnly":true,"type":"string"}},"type":"object"},"WorkflowUpdateSchema":{"properties":{"dashboard_trigger_enabled":{"default":null,"nullable":true,"type":"boolean"},"dashboard_trigger_label":{"default":null,"nullable":true,"type":"string"},"name":{"default":null,"nullable":true,"type":"string"},"set_as_default":{"default":false,"type":"boolean"}},"type":"object"},"WorkflowUpdateVersionSchema":{"properties":{"author_email":{"default":null,"nullable":true,"type":"string"},"change_description":{"default":null,"nullable":true,"type":"string"},"display_config":{"additionalProperties":{},"default":null,"nullable":true,"type":"object"},"workflow_definition":{"allOf":[{"$ref":"#/components/schemas/JSONWorkflowDefinition"}],"default":null,"nullable":true}},"type":"object"},"WorkflowVersionSchema":{"properties":{"approved_at":{"format":"date-time","nullable":true,"readOnly":true,"type":"string"},"approved_by":{"nullable":true,"readOnly":true,"type":"string"},"approved_comment":{"nullable":true,"readOnly":true,"type":"string"},"author_email":{"nullable":true,"readOnly":true,"type":"string"},"change_description":{"nullable":true,"readOnly":true,"type":"string"},"created":{"format":"date-time","readOnly":true,"type":"string"},"display_config":{"additionalProperties":{},"nullable":true,"readOnly":true,"type":"object"},"last_edited_at":{"format":"date-time","nullable":true,"readOnly":true,"type":"string"},"published_at":{"format":"date-time","nullable":true,"readOnly":true,"type":"string"},"published_by":{"nullable":true,"readOnly":true,"type":"string"},"status":{"enum":["draft","in_review","approved","published"],"readOnly":true,"type":"string"},"submitted_by":{"nullable":true,"readOnly":true,"type":"string"},"submitted_for_review_at":{"format":"date-time","nullable":true,"readOnly":true,"type":"string"},"version":{"readOnly":true,"type":"integer"},"workflow_definition":{"allOf":[{"$ref":"#/components/schemas/JSONWorkflowDefinition"}],"readOnly":true}},"type":"object"},"WorkflowVersionSummary":{"properties":{"approved_at":{"format":"date-time","nullable":true,"readOnly":true,"type":"string"},"approved_by":{"nullable":true,"readOnly":true,"type":"string"},"approved_comment":{"nullable":true,"readOnly":true,"type":"string"},"author_email":{"nullable":true,"readOnly":true,"type":"string"},"change_description":{"nullable":true,"readOnly":true,"type":"string"},"created":{"format":"date-time","readOnly":true,"type":"string"},"last_edited_at":{"format":"date-time","nullable":true,"readOnly":true,"type":"string"},"published_at":{"format":"date-time","nullable":true,"readOnly":true,"type":"string"},"published_by":{"nullable":true,"readOnly":true,"type":"string"},"status":{"enum":["draft","in_review","approved","published"],"readOnly":true,"type":"string"},"submitted_by":{"nullable":true,"readOnly":true,"type":"string"},"submitted_for_review_at":{"format":"date-time","nullable":true,"readOnly":true,"type":"string"},"version":{"readOnly":true,"type":"integer"}},"type":"object"},"YodleeAccount":{"properties":{"balance":{"$ref":"#/components/schemas/YodleeAmount"},"classification":{"nullable":true,"type":"string"},"id":{"type":"integer"}},"type":"object"},"YodleeAmount":{"properties":{"amount":{"type":"number"},"currency":{"type":"string"}},"type":"object"},"YodleeSchema":{"properties":{"accounts":{"items":{"$ref":"#/components/schemas/YodleeAccount"},"type":"array"},"transactions":{"items":{"$ref":"#/components/schemas/YodleeTransaction"},"type":"array"}},"type":"object"},"YodleeTransaction":{"properties":{"accountId":{"type":"integer"},"amount":{"$ref":"#/components/schemas/YodleeAmount"},"baseType":{"enum":["CREDIT","DEBIT"],"type":"string"},"category":{"type":"string"},"date":{"example":"2025-07-08","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"description":{"$ref":"#/components/schemas/YodleeTransactionDescription"},"id":{"type":"integer"}},"type":"object"},"YodleeTransactionDescription":{"properties":{"original":{"type":"string"},"simple":{"type":"string"}},"type":"object"}},"securitySchemes":{"ApiKeyAuth":{"in":"header","name":"x-api-key","type":"apiKey"}}},"externalDocs":{"description":"Read Tutorial","url":"https://docs.herondata.io/"},"info":{"contact":{"email":"support@herondata.io","name":"Support"},"title":"Heron Data API","version":"2021-07-19"},"openapi":"3.0.0","paths":{"/api/analytics/decline":{"get":{"description":"Returns aggregated decline analytics for end users within a date range, including total end users, total declined, and per-check pass/fail/missing counts. Only the latest policy evaluation per end user is considered.\n","parameters":[{"description":"Start of the date range (filters by end_user created date)","in":"query","name":"start_date","required":true,"schema":{"format":"date-time","type":"string"}},{"description":"End of the date range (filters by end_user created date)","in":"query","name":"end_date","required":true,"schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"check_analytics":{"items":{"properties":{"check_name":{"type":"string"},"total_failed":{"type":"integer"},"total_missing_data":{"type":"integer"},"total_passed":{"type":"integer"}},"type":"object"},"type":"array"},"total_declined":{"description":"Number of end users with at least one failed check","type":"integer"},"total_end_users":{"description":"Total number of end users with policy evaluations","type":"integer"}},"type":"object"}}},"description":"Decline analytics retrieved successfully"},"400":{"description":"User does not have analytics configured"},"401":{"description":"Authentication required"},"422":{"description":"Missing required parameters"}},"summary":"Get decline analytics for a user","tags":["Analytics"]}},"/api/app_store/list":{"get":{"description":"List available apps","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppStoreSchema"}}},"description":"OK"}},"summary":"List available apps","tags":["AppStore"]}},"/api/auth/environments":{"get":{"description":"Get all available environments for the current user\n","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailableEnvironments"}}},"description":"Ok"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get available environments","tags":["Authentication"],"x-hidden":true}},"/api/broker_funder_policies/":{"get":{"description":"Get all broker funder policies for the current user, ordered by matching priority","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BrokerFunderPolicy"},"type":"array"}}},"description":"List of broker funder policies"}},"security":[{"ApiKeyAuth":[]}],"summary":"List broker funder policies for current user"},"patch":{"description":"Create or update broker funder policies for the current user","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateBrokerFunderPoliciesSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BrokerFunderPolicy"},"type":"array"}}},"description":"Broker funder policies updated successfully"},"404":{"description":"One or more funders not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Bulk update broker funder policies"}},"/api/broker_funder_policies/upload/":{"post":{"description":"Upload a spreadsheet (XLS, XLSX, CSV) or PDF containing funder policies.\nThe file will be parsed asynchronously and policies will be upserted for the current user.\nOnly one upload job can be active at a time per user.\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerFunderPolicyUploadSchema"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerFunderPolicyUploadJobSchema"}}},"description":"Upload job created successfully"},"400":{"description":"Invalid file or another job is already in progress"},"409":{"description":"Another upload job is already active"}},"security":[{"ApiKeyAuth":[]}],"summary":"Upload funder policy file for parsing"}},"/api/broker_funder_policies/upload/status/":{"get":{"description":"Get the status of the most recent policy upload job for the current user","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerFunderPolicyUploadJobSchema"}}},"description":"Upload job status"},"404":{"description":"No upload job found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get policy upload job status"}},"/api/broker_funder_policies/upload/{job_heron_id}/":{"get":{"description":"Get a specific policy upload job by its Heron ID","parameters":[{"description":"The Heron ID of the upload job","in":"path","name":"job_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerFunderPolicyUploadJobSchema"}}},"description":"Upload job details"},"404":{"description":"Upload job not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get specific policy upload job"}},"/api/broker_funder_policies/upload/{job_heron_id}/pending/":{"get":{"description":"Get all pending funder matches that need manual resolution for a specific upload job","parameters":[{"description":"The Heron ID of the upload job","in":"path","name":"job_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PendingMatchSchema"},"type":"array"}}},"description":"List of pending matches"},"404":{"description":"Job not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"List pending funder matches for a job"}},"/api/broker_funder_policies/upload/{job_heron_id}/pending/{index}/resolve/":{"post":{"description":"Resolve a pending match by selecting a funder. This will create the broker_funder\nrecord with the policy data and mark the pending match as resolved.\n","parameters":[{"description":"The Heron ID of the upload job","in":"path","name":"job_heron_id","required":true,"schema":{"type":"string"}},{"description":"The index of the pending match to resolve","in":"path","name":"index","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolvePendingMatchRequestSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingMatchSchema"}}},"description":"Pending match resolved successfully"},"400":{"description":"Invalid request or match already resolved"},"404":{"description":"Job or pending match not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Resolve a pending funder match"}},"/api/broker_funder_policies/upload/{job_heron_id}/pending/{index}/skip/":{"post":{"description":"Skip a pending match without resolving it. This will mark it as skipped.","parameters":[{"description":"The Heron ID of the upload job","in":"path","name":"job_heron_id","required":true,"schema":{"type":"string"}},{"description":"The index of the pending match to skip","in":"path","name":"index","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingMatchSchema"}}},"description":"Pending match skipped successfully"},"400":{"description":"Match already resolved or skipped"},"404":{"description":"Job or pending match not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Skip a pending funder match"}},"/api/broker_submissions/":{"post":{"description":"Create a new broker submission with end user details.\n**Authentication**: Requires a broker API key in the `x-api-key` header. Generate keys using the `/api/broker_submissions/api_keys/generate` endpoint.\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBrokerSubmissionSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"heron_id":{"description":"Heron ID of the created submission","type":"string"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create broker submission","tags":["BrokerSubmissions"]}},"/api/broker_submissions/api_keys":{"get":{"description":"Retrieve all Broker API keys associated with the authenticated user's funder account. Returns a list of broker-funder relationships with their corresponding API keys.\n","responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"broker":{"description":"The broker's name","type":"string"},"broker_funder_api_key_heron_id":{"description":"The API key's unique identifier","type":"string"},"broker_funder_api_key_token":{"description":"The API key token","type":"string"}},"type":"object"},"type":"array"}}},"description":"OK"},"404":{"description":"Funder account not found for the authenticated user"}},"summary":"List broker API keys for a given user.","tags":["BrokerSubmissions"]}},"/api/broker_submissions/api_keys/generate":{"post":{"description":"Create a new API key for a broker-funder relationship. The broker is identified by email domain. If the funder account or broker-funder relationship doesn't exist, they will be created automatically. Returns an error if an API key already exists for this relationship.\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBrokerFunderApiKeySchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"broker_funder_token":{"description":"The generated API key token","type":"string"}},"type":"object"}}},"description":"OK"},"404":{"description":"Broker with the specified email domain does not exist"},"409":{"description":"API key already exists for this broker-funder relationship"}},"summary":"Generate broker API key","tags":["BrokerSubmissions"]}},"/api/broker_submissions/api_keys/{broker_funder_api_key_heron_id}":{"delete":{"description":"Delete an existing API key for a broker-funder relationship. The authenticated user must own the funder account associated with the API key.\n","parameters":[{"description":"The unique identifier of the API key to delete","in":"path","name":"broker_funder_api_key_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"API key successfully deleted"},"403":{"description":"User does not have permission to delete this API key"},"404":{"description":"API key not found"}},"summary":"Delete broker API key","tags":["BrokerSubmissions"]}},"/api/broker_submissions/{submission_heron_id}/files":{"post":{"description":"Upload one or more PDF files for a specified broker submission.\n**Authentication**: Requires a broker API key in the `x-api-key` header. Generate keys using the `/api/broker_submissions/api_keys/generate` endpoint.\n**Response Status Codes:** - `201`: All files uploaded successfully - `207`: Partial success - some files uploaded, some failed (Multi-Status) - `400`: All files failed validation or upload\n","parameters":[{"description":"The unique identifier for the broker submission to upload files to","in":"path","name":"submission_heron_id","required":true,"schema":{"example":"sub_1a2b3c4d5e6f","type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"examples":{"multiple_files":{"summary":"Upload multiple files","value":{"files":["january.pdf","february.pdf","march.pdf"]}},"single_file":{"summary":"Upload single file","value":{"files":["file_q4.pdf"]}}},"schema":{"properties":{"files":{"description":"Array of PDF files to upload (minimum 1, maximum 5)","items":{"format":"binary","type":"string"},"maxItems":5,"minItems":1,"type":"array"}},"required":["files"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"items":{"properties":{"file":{"description":"Name of the uploaded file","example":"statement_q4.pdf","type":"string"},"status":{"description":"Status of the file upload","enum":["uploaded"],"example":"uploaded","type":"string"}},"type":"object"},"type":"array"}}},"description":"All files uploaded successfully"},"207":{"content":{"application/json":{"schema":{"items":{"properties":{"file":{"description":"Name of the file","example":"statement.pdf","type":"string"},"reason":{"description":"Error reason (only present when status is \"error\")","example":"Duplicate file","type":"string"},"status":{"description":"Status of the file upload","enum":["uploaded","error"],"example":"uploaded","type":"string"}},"type":"object"},"type":"array"}}},"description":"Partial success - some files uploaded, others failed"},"400":{"content":{"application/json":{"schema":{"items":{"properties":{"file":{"description":"Name of the file","example":"invalid.pdf","type":"string"},"reason":{"description":"Reason for failure","example":"File type application/msword not allowed. Allowed: application/pdf","type":"string"},"status":{"description":"Status of the file upload","enum":["error"],"example":"error","type":"string"}},"type":"object"},"type":"array"}}},"description":"All files failed validation or upload"}},"security":[{"ApiKeyAuth":[]}],"summary":"Upload PDF files for broker submission","tags":["BrokerSubmissions"]}},"/api/broker_submissions/{submission_heron_id}/update_information":{"post":{"description":"Add company and owner details to existing broker submission.\n**Authentication**: Requires a broker API key in the `x-api-key` header. Generate keys using the `/api/broker_submissions/api_keys/generate` endpoint.\n","parameters":[{"in":"path","name":"submission_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserInformationPatchSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserInformationSchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Add details to broker submission","tags":["BrokerSubmissions"]}},"/api/categories":{"get":{"description":"Get available categories","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"categories":{"items":{"$ref":"#/components/schemas/Category"},"type":"array"}},"type":"object"}}},"description":"OK"},"401":{"description":"Unauthorized"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get categories","tags":["Categories"]}},"/api/credentials/keys":{"get":{"description":"List all API keys for the authenticated user. Returns key metadata including name, token prefix, creation date, and active status. The `last_used` field is the most recent usage timestamp, or null if usage data is not available. Full tokens are never returned - only the first 8 characters where the first 4 are \"key_\".\n","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"keys":{"items":{"$ref":"#/components/schemas/ApiKeyWithLastUsedSchema"},"type":"array"}},"type":"object"}}},"description":"List of API keys"}},"summary":"List API keys","tags":["Credentials"]},"post":{"description":"Create a new named API key for the authenticated user. The full token is returned only in this response - it cannot be retrieved again.\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeySchema"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreatedSchema"}}},"description":"API key created. The full token is only returned in this response."},"400":{"description":"Invalid request"}},"summary":"Create a new API key","tags":["Credentials"]}},"/api/credentials/keys/{heron_id}":{"delete":{"description":"Permanently delete an API key. This cannot be undone. Consider deactivating instead if you might need to rollback.\n","parameters":[{"in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Key deleted"},"404":{"description":"Key not found"}},"summary":"Delete an API key","tags":["Credentials"]}},"/api/credentials/keys/{heron_id}/activate":{"put":{"description":"Re-activate a previously deactivated API key.\n","parameters":[{"in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyStatusSchema"}}},"description":"Key activated"},"404":{"description":"Key not found"}},"summary":"Activate an API key","tags":["Credentials"]}},"/api/credentials/keys/{heron_id}/deactivate":{"put":{"description":"Deactivate an API key. The key will stop working immediately but can be re-activated later. Use this instead of deleting to allow rollback.\n","parameters":[{"in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyStatusSchema"}}},"description":"Key deactivated"},"404":{"description":"Key not found"}},"summary":"Deactivate an API key","tags":["Credentials"]}},"/api/credentials/reset_api_token":{"put":{"description":"Deprecated. Use POST /credentials/keys to create a new key and PUT /credentials/keys/{heron_id}/deactivate to disable the old one.\n","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"tokens":{"description":"Array of new API tokens","items":{"type":"string"},"type":"array"}},"type":"object"}}},"description":"API token successfully reset"},"409":{"content":{"application/json":{"schema":{"properties":{"description":{"example":"No API keys found. Please contact support@herondata.io","type":"string"}},"type":"object"}}},"description":"No API keys found for user"}},"summary":"Reset API token (deprecated)","tags":["Credentials"],"x-hidden":true}},"/api/crm_integrations":{"get":{"description":"Get a list of CRM Integrations","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"crm_integrations":{"items":{"$ref":"#/components/schemas/CrmIntegrationSchema"},"type":"array"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"List CRM Integrations","tags":["CrmIntegrations"]},"post":{"description":"Create a CRM integration, e.g., with Salesforce","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmIntegrationSchema"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"crm_integration":{"$ref":"#/components/schemas/CrmIntegrationSchema"}},"type":"object"}}},"description":"Created"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create a CRM integration","tags":["CrmIntegrations"]}},"/api/crm_integrations/{heron_id}":{"patch":{"description":"patch a CRM integration","parameters":[{"in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmIntegrationPatchSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmIntegrationSchema"}}},"description":"Ok"}},"security":[{"ApiKeyAuth":[]}],"summary":"Patch a CRM integration","tags":["CrmIntegrations"]}},"/api/data_source_accounts/{dsa_heron_id_to_update}/update_number":{"post":{"description":"Update a data source account's account number\n","parameters":[{"in":"path","name":"dsa_heron_id_to_update","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSourceAccountUpdateNumberSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserDataSourceAccount"}}},"description":"Ok"}},"security":[{"ApiKeyAuth":[]}],"summary":"Update a data source account's account number","tags":["EndUserDataSourceAccounts"]}},"/api/data_source_accounts/{heron_id}":{"put":{"description":"Update a data source account\n","parameters":[{"in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserDataSourceAccountUpdateSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserDataSourceAccount"}}},"description":"Ok"}},"security":[{"ApiKeyAuth":[]}],"summary":"Update a data source account","tags":["EndUserDataSourceAccounts"]}},"/api/data_sources/{heron_id}":{"put":{"description":"Update a data source\n","parameters":[{"in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserDataSourceUpdateSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserDataSource"}}},"description":"Ok"}},"security":[{"ApiKeyAuth":[]}],"summary":"Update a data source","tags":["EndUserDataSources"]}},"/api/email_templates":{"get":{"description":"Read all available templates","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"rules":{"items":{"$ref":"#/components/schemas/EmailTemplateSchema"},"type":"array"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get email templates","tags":["EmailTemplates"]},"post":{"description":"Create an email template used to send emails conditional on events like policy evaluation\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateSchema"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"email_template":{"$ref":"#/components/schemas/EmailTemplateSchema"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create an email template","tags":["EmailTemplates"]}},"/api/email_templates/{heron_id}":{"patch":{"description":"Update an email template\n","parameters":[{"in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplatePatchSchema"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"email_template":{"$ref":"#/components/schemas/EmailTemplatePatchSchema"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Patch an email template","tags":["EmailTemplates"]}},"/api/end_user_emails":{"get":{"description":"Get all emails for all end users associate with this user","parameters":[{"in":"query","name":"page","required":true,"schema":{"minimum":0,"type":"integer"}},{"in":"query","name":"limit","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"_meta":{"properties":{"count":{"type":"number"},"has_more":{"type":"boolean"},"page":{"type":"number"},"total_pages":{"type":"number"}},"type":"object"},"emails":{"items":{"properties":{"email":{"$ref":"#/components/schemas/EndUserEmailSchema"},"end_user_heron_id":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser emails","tags":["EndUsers"]}},"/api/end_user_emails/{heron_id}/export":{"get":{"description":"Export an end user email as an EML file. Attachments are not included.","parameters":[{"description":"The heron_id of the email to export","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"message/rfc822":{"schema":{"format":"binary","type":"string"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Export an end user email as an EML file","tags":["EndUserEmails"]}},"/api/end_user_enrichers/definitions/{enricher_definition_name}/start_enrich":{"post":{"description":"Dispatches an enricher task for an end user and returns immediately.\n","parameters":[{"description":"The name of the enricher definition to execute","example":"industry_prediction","in":"path","name":"enricher_definition_name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"end_user_heron_id":{"description":"The Heron ID of the end user to enrich","example":"eun_abc123","type":"string"}},"required":["end_user_heron_id"],"type":"object"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartEnrichEndUserResponseSchema"}}},"description":"Enrichment task dispatched successfully"},"400":{"description":"Invalid input"},"404":{"description":"Enricher or end user not found"},"422":{"description":"Unprocessable entity"}},"security":[{"ApiKeyAuth":[]}],"summary":"Start enricher execution for a specific end user asynchronously","tags":["EndUserEnrichers"]}},"/api/end_user_enrichers/fields":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EnricherFieldsSchema"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get all fields for all enrichers for a given user","tags":["EndUserEnrichers"]}},"/api/end_user_enrichers/{end_user_heron_id}/enrich":{"post":{"description":"Executes a specified enricher for an end user and returns the enrichment result.\nThe enrichment result is automatically saved to the database.\n","parameters":[{"description":"The Heron ID of the end user to enrich","example":"eus_abc123","in":"path","name":"end_user_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"enricher_name":{"description":"The name of the enricher to execute","example":"industry_prediction","type":"string"}},"required":["enricher_name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnricherResultSchema"}}},"description":"Enricher executed successfully"}},"security":[{"ApiKeyAuth":[]}],"summary":"Trigger enricher execution for a specific end user","tags":["EndUserEnrichers"]}},"/api/end_user_enrichers/{end_user_heron_id}/enricher_results":{"get":{"description":"Get all latest enrichment results for a given end user by their Heron ID.\n","parameters":[{"in":"path","name":"end_user_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EnricherResultSchema"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get enrichment results for an end user","tags":["EndUserEnrichers"]}},"/api/end_user_enrichers/{end_user_heron_id}/enricher_results/{enricher_name}":{"get":{"description":"Retrieve the latest result for a specific enricher and end user","parameters":[{"description":"The heron ID of the end user","example":"eus_abc123","in":"path","name":"end_user_heron_id","required":true,"schema":{"type":"string"}},{"description":"The name of the enricher","example":"industry_prediction","in":"path","name":"enricher_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnricherResultSchema"}}},"description":"Successfully retrieved enricher result"},"404":{"description":"Enricher result not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get enricher result by enricher name and end user","tags":["EndUserEnrichers"]}},"/api/end_user_entities":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/NestedEndUserEntitySchema"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get the definitions for all end user entities","tags":["EndUserEntity"]},"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEndUserEntitySchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserEntitySchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create an end user entity","tags":["EndUserEntity"]}},"/api/end_user_entities/attribute_values/export":{"get":{"description":"Export a spreadsheet with saved entity attribute values (API sources only) for all end users under the current user.\n","responses":{"200":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary","type":"string"}}},"description":"OK"},"404":{"description":"No end users or API attribute values found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Export all saved attribute for all end users to an Excel file","tags":["EndUserEntity"]}},"/api/end_user_entities/reorder":{"patch":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderEndUserEntitiesSchema"}}},"required":true},"responses":{"200":{"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Set the display order of end user entities","tags":["EndUserEntity"]}},"/api/end_user_entities/{entity_heron_id}/attributes":{"post":{"parameters":[{"in":"path","name":"entity_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEndUserEntityAttributeSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserEntityAttributeSchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create an end user entity attribute","tags":["EndUserEntity"]}},"/api/end_user_entities/{entity_heron_id}/attributes/reorder":{"patch":{"parameters":[{"in":"path","name":"entity_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderEndUserEntityAttributesSchema"}}},"required":true},"responses":{"200":{"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Set the display order of end user entity attributes","tags":["EndUserEntity"]}},"/api/end_user_entities/{entity_heron_id}/attributes/{attribute_heron_id}":{"delete":{"parameters":[{"in":"path","name":"entity_heron_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"attribute_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"success":{"description":"Indicates if the delete operation was successful","type":"boolean"}},"required":["success"],"type":"object"}}},"description":"Successfully deleted the EndUserEntity attribute"},"404":{"description":"EndUserEntity attribute not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Delete an EndUserEntityAttribute","tags":["EndUserEntity"]},"patch":{"parameters":[{"in":"path","name":"entity_heron_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"attribute_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEndUserEntityAttributeSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserEntityAttributeSchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Update an end user entity","tags":["EndUserEntity"]}},"/api/end_user_entities/{entity_heron_id}/attributes/{attribute_heron_id}/clone":{"post":{"parameters":[{"in":"path","name":"entity_heron_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"attribute_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloneEndUserEntityAttributeSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserEntityAttributeSchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create an end user entity attribute","tags":["EndUserEntity"]}},"/api/end_user_entities/{entity_heron_id}/attributes/{attribute_heron_id}/sources":{"post":{"parameters":[{"in":"path","name":"entity_heron_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"attribute_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEndUserEntityAttributeSourceSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserEntityAttributeSourceSchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create an end user entity attribute source","tags":["EndUserEntity"]}},"/api/end_user_entities/{entity_heron_id}/attributes/{attribute_heron_id}/sources/{source_heron_id}":{"delete":{"parameters":[{"in":"path","name":"entity_heron_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"attribute_heron_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"source_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"success":{"type":"boolean"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Delete an EndUserEntityAttribute","tags":["EndUserEntity"]},"patch":{"parameters":[{"in":"path","name":"entity_heron_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"attribute_heron_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"source_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEndUserEntityAttributeSourceSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserEntityAttributeSourceSchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Upsert an end user entity","tags":["EndUserEntity"]}},"/api/end_user_entities/{heron_id}":{"delete":{"parameters":[{"description":"The Integration's heron_id","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"success":{"type":"boolean"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Delete an EndUserEntity","tags":["EndUserEntity"]},"patch":{"parameters":[{"in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEndUserEntitySchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserEntitySchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Update an end user entity","tags":["EndUserEntity"]}},"/api/end_user_files":{"get":{"description":"Get all files uploaded to Heron by your users, not including parsed results from files","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EndUserFileSchema"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"All EndUserFiles","tags":["EndUserFiles"]}},"/api/end_user_files/file_classes":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FileClassSchema"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get all file classes","tags":["FileClass"]}},"/api/end_user_files/process_standalone":{"post":{"description":"Process a file for classification and parsing without storing it as an EndUserFile. Results are delivered via webhook to subscribed endpoints.\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandaloneProcessFileSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"reference_id":{"description":"The reference ID provided in the request","type":"string"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Process file without creating EndUserFile record","tags":["EndUserFiles"]}},"/api/end_user_files/recent_by_file_class":{"get":{"description":"Retrieve the most recent files for the specified file class.","parameters":[{"description":"The file class to filter by.","in":"query","name":"file_class","required":true,"schema":{"type":"string"}},{"description":"The maximum number of files to return, defaults to 20","in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EndUserFileSchema"},"type":"array"}}},"description":"A list of recent files."}},"security":[{"ApiKeyAuth":[]}],"summary":"Get recent files by file class","tags":["EndUserFiles"]}},"/api/end_user_files/rename_rules":{"get":{"description":"Retrieve all file rename rules for the current user.","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GetFileRenameRulesSchema"},"type":"array"}}},"description":"A list of file rename rules"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get file rename rules","tags":["EndUserFiles"]},"post":{"description":"Add a new rename rule for files.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFileRenameRuleSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFileRenameRulesSchema"}}},"description":"The created file rename rule"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create a file rename rule","tags":["EndUserFiles"]}},"/api/end_user_files/rename_rules/slugs":{"get":{"description":"Retrieve all file rename rules slugs for the current user.","responses":{"200":{"content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array"}}},"description":"A list of file rename rule slugs"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get file rename rule variable slugs","tags":["EndUserFiles"]}},"/api/end_user_files/rename_rules/{heron_id}":{"patch":{"description":"Update an existing rename rule identified by its `heron_id`.","parameters":[{"description":"The unique identifier of the rename rule.","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFileRenameRuleSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFileRenameRulesSchema"}}},"description":"The updated file rename rule"}},"security":[{"ApiKeyAuth":[]}],"summary":"Update a file rename rule","tags":["EndUserFiles"]}},"/api/end_user_files/{heron_id}":{"delete":{"parameters":[{"description":"The Heron ID of the end user file to delete","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"success":{"type":"boolean"}},"type":"object"}}},"description":"OK"},"403":{"description":"Unauthorized to delete this end user file"},"404":{"description":"End user file not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Delete an EndUserFile","tags":["EndUserFiles"]},"get":{"description":"Retrieve a single end user file by its Heron ID. Returns file metadata including filename, file class, parsed results (if any), and related info. Use this endpoint when you have an end user file Heron ID and need its details without listing or filtering all files.\n","parameters":[{"description":"The Heron ID of the end user file (e.g. euf_...)","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserFileSchema"}}},"description":"The end user file"},"404":{"description":"End user file not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get a single end user file by Heron ID","tags":["EndUserFiles"]},"patch":{"description":"Use this endpoint to change the end user file's class. The file will be reprocessed as the new type.\n","parameters":[{"in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserFileUpdateSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserFileSchema"}}},"description":"Ok"}},"security":[{"ApiKeyAuth":[]}],"summary":"Update the end user file's class","tags":["EndUserFiles"]}},"/api/end_user_files/{heron_id}/file":{"get":{"description":"Get the base64 string representation of an end user file","parameters":[{"description":"The heron_id of the end user file","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserFileBase64Schema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUserFile as a base64 string","tags":["EndUserFiles"]}},"/api/end_user_files/{heron_id}/parse_file":{"post":{"parameters":[{"description":"The file's heron_id","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseFileSchema"}}},"required":true},"responses":{"200":{"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Trigger async parsing of an end user file","tags":["EndUserFiles"]}},"/api/end_user_files/{heron_id}/parsed_results":{"get":{"parameters":[{"description":"The file's heron_id - beginning with 'euf_'","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"parser_id","required":false,"schema":{"nullable":true,"type":"string"}},{"in":"query","name":"version_number","required":false,"schema":{"nullable":true,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ParsedEndUserFileSchema"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get parsed results from uploaded files","tags":["EndUserFiles"]}},"/api/end_user_files/{heron_id}/trigger_rename":{"post":{"parameters":[{"description":"The file's heron_id - starting with euf_","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserFileSchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Trigger file's rename rule","tags":["EndUserFiles"]}},"/api/end_user_files/{heron_id}/trigger_split":{"post":{"parameters":[{"description":"The file's heron_id","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EndUserFileSchema"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Trigger splitting a combined end user file into its child files based on its page_classes","tags":["EndUserFiles"]}},"/api/end_user_files/{parsed_end_user_file_id}/parsed_results":{"patch":{"parameters":[{"description":"The ID of the parsed end user file","in":"path","name":"parsed_end_user_file_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"parsed_result":{"additionalProperties":true,"type":"object"}}}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParsedEndUserFileSchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Update Parsed Results","tags":["EndUserFiles"]}},"/api/end_user_queries/execute":{"post":{"description":"Execute saved SQL queries by name for a specific end user and return results\n","requestBody":{"content":{"application/json":{"schema":{"properties":{"end_user_heron_id":{"description":"Heron ID of the end user","example":"eu_abc123","type":"string"},"query_names":{"description":"List of saved query names to execute","example":["monthly_revenue","top_transactions"],"items":{"type":"string"},"type":"array"}},"required":["query_names","end_user_heron_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":{"items":{"type":"object"},"type":"array"},"example":{"results":{"monthly_revenue":{"column_order":["month","revenue"],"records":[{"month":"2024-01","revenue":50000}]},"top_transactions":{"column_order":["id","amount"],"records":[{"amount":1000,"id":1}]}}},"type":"object"}}},"description":"Successfully executed queries"}},"security":[{"ApiKeyAuth":[]}],"summary":"Execute saved queries","tags":["EndUserQueries"],"x-hidden":true}},"/api/end_users":{"get":{"description":"Get a list of EndUsers","parameters":[{"description":"Unique ID generated by Heron","in":"query","name":"heron_id","required":false,"schema":{"default":null,"example":"eus_gFma2Pg525BjYZFYVG2sSR","nullable":true,"type":"string"}},{"description":"Filter by ID associated with end_user_id field in transactions","in":"query","name":"end_user_id","required":false,"schema":{"default":null,"example":"your_end_user_id","nullable":true,"type":"string"}},{"description":"Filter by name associated with end user","in":"query","name":"name","required":false,"schema":{"default":null,"example":"your_end_user_name","nullable":true,"type":"string"}},{"description":"Filter by status of end user","in":"query","name":"status","required":false,"schema":{"default":null,"enum":["new","ready","processed","reviewed","review_requested","failed",null],"example":"reviewed","nullable":true,"type":"string"}},{"description":"Pagination page number","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Pagination limit per page","in":"query","name":"limit","required":false,"schema":{"default":1000,"maximum":10000,"minimum":1,"type":"integer"}},{"description":"Order to return end users by","in":"query","name":"order_by","required":false,"schema":{"default":"last_updated_desc","enum":["last_updated_desc","last_updated_asc","created_desc","created_asc"],"type":"string"}},{"description":"Whether the end user is part of a lending portfolio","in":"query","name":"is_portfolio","required":false,"schema":{"default":null,"example":true,"nullable":true,"type":"boolean"}},{"description":"Whether the to include data sources for each end user","in":"query","name":"include_data_sources","required":false,"schema":{"default":false,"example":true,"type":"boolean"}},{"description":"Whether to include scorecard metrics for each end user (under field criteria)","in":"query","name":"include_scorecard_metrics","required":false,"schema":{"default":false,"example":true,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"_meta":{"properties":{"limit":{"example":1000,"type":"integer"},"next_url":{"type":"string"},"page":{"example":1,"type":"integer"},"pages":{"example":3,"type":"integer"},"prev_url":{"type":"string"},"total":{"example":3500,"type":"integer"}},"type":"object"},"end_users":{"items":{"$ref":"#/components/schemas/EndUser"},"type":"array"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"List EndUsers","tags":["EndUsers"]},"post":{"description":"Create a new end user. If transactions have previously been sent for this `end_user_id`, use `PUT end_users` to update instead.\n","requestBody":{"content":{"application/json":{"schema":{"properties":{"end_user":{"$ref":"#/components/schemas/EndUserPostParams"}},"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"end_user":{"$ref":"#/components/schemas/EndUser"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create EndUser","tags":["EndUsers"]},"put":{"callbacks":{"onData":{"$yourWebhookUrl":{"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"created":{"format":"date-time","type":"string"},"data":{"properties":{"end_user_id":{"example":"myenduser","type":"string"},"heron_id":{"example":"eus_Eqio3Y4dhyNiMphrXwG58p","type":"string"},"status":{"example":"processed","type":"string"}},"type":"object"},"meta":{"format":"nullable","type":"object"},"topic":{"type":"string"}},"type":"object"}}},"description":"Webhook payload with end_user"},"responses":{"200":{"description":"Your webhook implementation should return this HTTP status code\nif the data was received successfully."}}}}}},"description":"Confirm an end user is ready for async processing by sending a status of \"ready\". The `end_user_id` must have previously been sent with at least one Transaction if attempting to update the status.\n","externalDocs":{"description":"Webhook Tutorial","url":"https://docs.herondata.io/webhooks"},"requestBody":{"content":{"application/json":{"schema":{"properties":{"end_user":{"$ref":"#/components/schemas/EndUser"}},"type":"object"}}},"description":"Dictionary representing an EndUser","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"end_user":{"$ref":"#/components/schemas/EndUser"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Update EndUser","tags":["EndUsers"]}},"/api/end_users/balance":{"get":{"description":"Get balance for given EndUser on a daily and account granularity","parameters":[{"description":"end_user_id for statistics; either end_user_id or end_user_heron_id is required","in":"query","name":"end_user_id","required":false,"schema":{"default":null,"example":"your_end_user_id","nullable":true,"type":"string"}},{"description":"Heron-generated id for end user; either end_user_id or end_user_heron_id is required","in":"query","name":"end_user_heron_id","required":false,"schema":{"default":null,"example":"eus_AkUyV6qsqGTDCoSMANeQGg","nullable":true,"type":"string"}},{"description":"ISO 4217 currency code to convert to","in":"query","name":"to_currency","required":false,"schema":{"enum":["GBP","USD","EUR",null],"example":"USD","nullable":true,"type":"string"}},{"description":"Deprecated (use date_min instead). Filter for transactions with timestamp after the input value","in":"query","name":"timestamp_min","required":false,"schema":{"default":null,"example":"2026-04-18T03:33:31.334232","format":"date-time","nullable":true,"type":"string"}},{"description":"Filter for transactions with timestamp after the input value (inclusive). It has precedence over timestamp_min","in":"query","name":"date_min","required":false,"schema":{"default":null,"example":"2026-04-18","format":"date","nullable":true,"type":"string"}},{"description":"Deprecated (use date_max instead). Filter for transactions with timestamp earlier than the input value","in":"query","name":"timestamp_max","required":false,"schema":{"default":null,"example":"2026-04-17T03:33:31.334301","format":"date-time","nullable":true,"type":"string"}},{"description":"Filter for transactions with date earlier than the input value (inclusive). It has precedence over timestamp_max","in":"query","name":"date_max","required":false,"schema":{"default":null,"example":"2026-04-17","format":"date","nullable":true,"type":"string"}},{"description":"If true, forecasts the balances of each account","in":"query","name":"include_forecast","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Filter by specific account reference IDs","explode":true,"in":"query","name":"account_ids","required":false,"schema":{"default":[],"example":["1234","5678"],"items":{"type":"string"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserBalanceOutputSchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser balance","tags":["EndUserCalculations"]}},"/api/end_users/forecast":{"get":{"description":"Get forecast amounts for a given EndUser and category","parameters":[{"description":"end_user_id for statistics; either end_user_id or end_user_heron_id is required","in":"query","name":"end_user_id","required":false,"schema":{"default":null,"example":"your_end_user_id","nullable":true,"type":"string"}},{"description":"Heron-generated id for end user; either end_user_id or end_user_heron_id is required","in":"query","name":"end_user_heron_id","required":false,"schema":{"default":null,"example":"eus_AkUyV6qsqGTDCoSMANeQGg","nullable":true,"type":"string"}},{"description":"ISO 4217 currency code to convert to","in":"query","name":"to_currency","required":false,"schema":{"enum":["GBP","USD","EUR",null],"example":"USD","nullable":true,"type":"string"}},{"description":"Aggregate results over time, i.e., aggregate by week or by month","in":"query","name":"date_granularity","required":false,"schema":{"default":"month","enum":["week","month"],"example":"month","type":"string"}},{"description":"Heron ID of category to be forecasted; either category_heron_id or category_label must be present","in":"query","name":"category_heron_id","required":false,"schema":{"example":"ctg_MmconkaKcRKobxvUbUvYUC","type":"string"}},{"description":"Label of category to be forecasted; either category_heron_id or category_label must be present","in":"query","name":"category_label","required":false,"schema":{"example":"Revenue","type":"string"}},{"description":"The earliest transaction timestamp date to use in forecasting","in":"query","name":"from_date","required":false,"schema":{"default":null,"example":"2022-01-01","format":"date","nullable":true,"type":"string"}},{"description":"The latest transaction timestamp date to use in forecasting","in":"query","name":"to_date","required":false,"schema":{"default":null,"example":"2022-01-31","format":"date","nullable":true,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EndUserForecastOutputSchema"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser forecasts","tags":["EndUserCalculations"]}},"/api/end_users/statistics":{"get":{"description":"Get summarized statistics for a given EndUser","parameters":[{"description":"end_user_id for statistics; either end_user_id or end_user_heron_id is required","in":"query","name":"end_user_id","required":false,"schema":{"default":null,"example":"your_end_user_id","nullable":true,"type":"string"}},{"description":"Heron-generated id for end user; either end_user_id or end_user_heron_id is required","in":"query","name":"end_user_heron_id","required":false,"schema":{"default":null,"example":"eus_AkUyV6qsqGTDCoSMANeQGg","nullable":true,"type":"string"}},{"description":"ISO 4217 currency code to convert to","in":"query","name":"to_currency","required":false,"schema":{"enum":["GBP","USD","EUR",null],"example":"USD","nullable":true,"type":"string"}},{"description":"Filter for transactions with timestamp after the input value (as date)","in":"query","name":"from_date","required":false,"schema":{"default":null,"example":"2026-04-18","format":"date","nullable":true,"type":"string"}},{"description":"Filter for transactions with timestamp before the input value (as date)","in":"query","name":"to_date","required":false,"schema":{"default":null,"example":"2026-04-17","format":"date","nullable":true,"type":"string"}},{"description":"Aggregate results over time, e.g., by week or by quarter","in":"query","name":"date_granularity","required":false,"schema":{"default":"month","enum":["day","week","month","quarter","year"],"example":"month","type":"string"}},{"description":"Pivot results by merchant or by category","in":"query","name":"group_by","required":false,"schema":{"default":"category","enum":["category","merchant"],"example":"category","type":"string"}},{"description":"Filter by specific categories","explode":true,"in":"query","name":"category_heron_ids","required":false,"schema":{"default":[],"example":["ctg_ZPJQatstPBHzXf77oJaXBp","ctg_caV9JzjWyXBdURKJReebMd"],"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Filter by specific merchants","explode":true,"in":"query","name":"merchant_heron_ids","required":false,"schema":{"default":[],"example":["mrc_HMJjgqPZDYbjCr6RccsZzj","mrc_H23kzHBbFh5EM4BnH29QXW"],"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Filter by specific account reference IDs","explode":true,"in":"query","name":"account_ids","required":false,"schema":{"default":[],"example":["1234","5678"],"items":{"type":"string"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"statistics":{"items":{"$ref":"#/components/schemas/EndUserStatsOutputSchema"},"type":"array"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser statistics","tags":["EndUserCalculations"]}},"/api/end_users/summary":{"get":{"description":"Get a list of EndUsers","parameters":[{"description":"Unique ID generated by Heron","in":"query","name":"heron_id","required":false,"schema":{"default":null,"example":"eus_gFma2Pg525BjYZFYVG2sSR","nullable":true,"type":"string"}},{"description":"Filter by ID associated with end_user_id field in transactions","in":"query","name":"end_user_id","required":false,"schema":{"default":null,"example":"your_end_user_id","nullable":true,"type":"string"}},{"description":"Filter by name associated with end user","in":"query","name":"name","required":false,"schema":{"default":null,"example":"your_end_user_name","nullable":true,"type":"string"}},{"description":"Filter by status of end user","in":"query","name":"status","required":false,"schema":{"default":null,"enum":["new","ready","processed","reviewed","review_requested","failed",null],"example":"reviewed","nullable":true,"type":"string"}},{"description":"Pagination page number (optional). If provided, 'limit' must also be provided.","in":"query","name":"page","required":false,"schema":{"default":null,"minimum":1,"nullable":true,"type":"integer"}},{"description":"Pagination limit per page (optional). If provided, 'page' must also be provided.","in":"query","name":"limit","required":false,"schema":{"default":null,"maximum":10000,"minimum":1,"nullable":true,"type":"integer"}},{"description":"Order to return end users by","in":"query","name":"order_by","required":false,"schema":{"default":"last_updated_desc","enum":["last_updated_desc","last_updated_asc","created_desc","created_asc"],"type":"string"}},{"description":"Whether the end user is part of a lending portfolio","in":"query","name":"is_portfolio","required":false,"schema":{"default":null,"example":true,"nullable":true,"type":"boolean"}},{"description":"Whether the to include data sources for each end user","in":"query","name":"include_data_sources","required":false,"schema":{"default":false,"example":true,"type":"boolean"}},{"description":"Whether to include scorecard metrics for each end user (under field criteria)","in":"query","name":"include_scorecard_metrics","required":false,"schema":{"default":false,"example":true,"type":"boolean"}},{"in":"query","name":"with_policy_result","required":false,"schema":{"default":null,"enum":["passed","failed","missing_data",null],"nullable":true}},{"in":"query","name":"with_crm_sync_result","required":false,"schema":{"default":null,"enum":["success","failure","no_sync_attempted",null],"nullable":true}},{"in":"query","name":"interval_start","required":false,"schema":{"default":null,"format":"date-time","nullable":true,"type":"string"}},{"in":"query","name":"interval_end","required":false,"schema":{"default":null,"format":"date-time","nullable":true,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"_meta":{"description":"Pagination metadata. Present only if pagination parameters ('page' and 'limit') are provided in the request.","properties":{"limit":{"example":100,"type":"integer"},"next_url":{"format":"url","nullable":true,"type":"string"},"page":{"example":1,"type":"integer"},"pages":{"example":3,"type":"integer"},"prev_url":{"format":"url","nullable":true,"type":"string"},"total":{"example":350,"type":"integer"}},"type":"object"},"end_users":{"items":{"$ref":"#/components/schemas/EndUserSummary"},"type":"array"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"List EndUsers with Summary Information","tags":["EndUsers"]}},"/api/end_users/{end_user_heron_id}/company_attributes":{"get":{"description":"Get calculated attribute values for a given end user","parameters":[{"in":"path","name":"end_user_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CompanyAttributeValueSchema"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser attribute values","tags":["EndUserAttributes"]}},"/api/end_users/{end_user_heron_id}/duplicate_end_users":{"get":{"description":"Find duplicate end users for the given end user by matching on EIN (federal_tax_id) or normalized legal business name. Only returns duplicates within the same user (lender). Matching strategy: (1) Priority - Match by EIN when available (fast indexed query), (2) Fallback - Match by normalized company_legal_business_name when EIN is missing. Requires the count_duplicate_end_users feature flag to be enabled for the user.\n","parameters":[{"description":"The Heron ID of the end user to check for duplicates","in":"path","name":"end_user_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateEndUsersResponse"}}},"description":"List of duplicate end users found"},"403":{"description":"Feature not enabled for this user"},"404":{"description":"End user not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get duplicate end users for an end user","tags":["EndUsers"]}},"/api/end_users/{end_user_heron_id}/entities":{"get":{"parameters":[{"in":"path","name":"end_user_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MaterialisedEndUserEntitySchema"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get the materialised end user entities for an end user","tags":["EndUserEntity"]}},"/api/end_users/{end_user_heron_id}/entities/values/bulk":{"put":{"description":"Save multiple entity attribute values in a single request.\nEach item specifies the entity name, attribute name, and value to set.\nIf an API source doesn't exist for an attribute, one will be created.\n","parameters":[{"description":"The Heron ID of the end user","in":"path","name":"end_user_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSaveEntityAttributeValuesSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BulkSaveEntityAttributeValueResultSchema"},"type":"array"}}},"description":"Results for each item in the bulk request"},"404":{"description":"End user not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Bulk save entity attribute values by entity name and attribute name","tags":["EndUserEntity"]}},"/api/end_users/{end_user_heron_id}/entities/{entity_heron_id}":{"post":{"parameters":[{"in":"path","name":"end_user_heron_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"entity_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertEndUserEntityAttributeValueSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserEntityAttributeValueSchema"}}},"description":"OK"},"204":{"description":"No Content (value was deleted)"}},"security":[{"ApiKeyAuth":[]}],"summary":"Upsert the attribute value for an end user entity attribute source","tags":["EndUserEntity"]}},"/api/end_users/{end_user_heron_id}/funder_policy_evaluations/":{"get":{"description":"Get all funder policy evaluations for a specific end user","parameters":[{"description":"The Heron ID of the end user","in":"path","name":"end_user_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FunderPolicyEvaluation"},"type":"array"}}},"description":"List of funder policy evaluations"},"404":{"description":"End user not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"List funder policy evaluations for an end user"}},"/api/end_users/{end_user_heron_id}/funder_submissions/{submission_heron_id}/submit_to_funder/":{"post":{"description":"Triggers an async submission for a specific funder submission. Returns 202 immediately; poll the submission status to check progress.","parameters":[{"description":"The Heron ID of the end user","in":"path","name":"end_user_heron_id","required":true,"schema":{"type":"string"}},{"description":"The Heron ID of the funder submission","in":"path","name":"submission_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFunderSubmissionRequestSchema"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFunderSubmissionResponseSchema"}}},"description":"Submission accepted and queued for processing"},"400":{"description":"Submission cannot be submitted in its current status"},"404":{"description":"End user or funder submission not found"},"409":{"description":"Submission is already in progress"}},"security":[{"ApiKeyAuth":[]}],"summary":"Submit an end user to a single funder"}},"/api/end_users/{end_user_id_or_heron_id}":{"delete":{"description":"Delete an end user. You must delete associated transactions before doing this.\n","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"}},"security":[{"ApiKeyAuth":[]}],"summary":"Delete EndUser by heron_id or end_user_id","tags":["EndUsers"]},"get":{"description":"Get an end user using its end_user_id or heron_id\n","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"end_user":{"$ref":"#/components/schemas/EndUser"}},"type":"object"}}},"description":"Ok"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser by heron_id or end_user_id","tags":["EndUsers"]}},"/api/end_users/{end_user_id_or_heron_id}/anomalies":{"get":{"description":"Get anomalies for given EndUser given a category label or heron id","parameters":[{"description":"The `end_user_id` or `heron_id` of EndUser to upload","in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}},{"description":"Label or Heron ID of category to find anomalies for","in":"query","name":"category_label_or_heron_id","required":true,"schema":{"example":"Revenue","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AnomalySchema"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser anomalies","tags":["EndUserCalculations"]}},"/api/end_users/{end_user_id_or_heron_id}/bank_statement_summary":{"get":{"description":"Get the bank statement summary by month for an end user","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}},{"description":"Determines how to group transactions. It supports calendar month (by_month) or rolling 30-day period (from last txns with rolling_30_days_from_last_txn or from today with rolling_30_days_from_today)","in":"query","name":"grouping","required":false,"schema":{"default":"by_month","enum":["by_month","by_data_source_account_heron_id","rolling_30_days_from_last_txn","rolling_30_days_from_today","by_month_by_data_source_account_heron_id"],"type":"string"}},{"description":"Number of full calendar months to show in the summary","in":"query","name":"num_full_calendar_months","required":false,"schema":{"default":null,"minimum":1,"nullable":true,"type":"integer"}},{"description":"Account ids to include in the summary, if not provided, all accounts are included","explode":true,"in":"query","name":"account_ids","required":false,"schema":{"default":null,"items":{"example":"1234","type":"string"},"nullable":true,"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserBankStatementSummary"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser bank statement summary","tags":["EndUserCalculations"]}},"/api/end_users/{end_user_id_or_heron_id}/benchmarks":{"get":{"description":"Get the benchmarks for each metric for an end user","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"benchmarks":{"items":{"$ref":"#/components/schemas/MetricBenchmarksSchema"},"type":"array"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser metric benchmarks","tags":["EndUserCalculations"]}},"/api/end_users/{end_user_id_or_heron_id}/bulk_category_feedback":{"post":{"description":"Provide bulk feedback on Transaction Categories for a specified end user","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}},{"description":"Whether to process the feedback with high priority","in":"query","name":"high_priority","required":false,"schema":{"default":false,"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserBulkCategoryFeedback"}}},"description":"A list of objects containing a Transaction's heron id and the suggested Category. If you provide a `heron_id` for Category, you don't need to provide other fields. If `heron_id` is provided, we disregard `label`.\n","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"num_annotations":{"description":"The number of category annotations added","example":1,"type":"integer"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Bulk create category feedback for an end user","tags":["EnrichmentFeedback"]}},"/api/end_users/{end_user_id_or_heron_id}/combined_financials":{"get":{"description":"Get the combined P&L & Balance Sheet data from financial documents for an EndUser","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"grouping","required":false,"schema":{"enum":["by_month","by_quarter","by_year",null],"nullable":true,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinancialsSummarySchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser's combined financials","tags":["EndUserFinancials"]}},"/api/end_users/{end_user_id_or_heron_id}/data_source_account_summary":{"get":{"description":"Get a list of data sources accounts & their summarised information for a company\n","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DataSourceAccountSummaryPublicSchema"},"type":"array"}}},"description":"Ok"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get data source account summary","tags":["EndUserDataSources"]}},"/api/end_users/{end_user_id_or_heron_id}/data_source_accounts/disable_duplicates":{"post":{"parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"start_date","required":false,"schema":{"format":"date","nullable":true,"type":"string"}},{"in":"query","name":"end_date","required":false,"schema":{"format":"date","nullable":true,"type":"string"}}],"responses":{"200":{"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Disable duplicate data source accounts for an end user","tags":["EndUserDataSourceAccounts"]}},"/api/end_users/{end_user_id_or_heron_id}/data_sources":{"get":{"description":"Get a list of data sources for a company\n","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EndUserDataSources"},"type":"array"}}},"description":"Ok"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get data sources","tags":["EndUserDataSources"]}},"/api/end_users/{end_user_id_or_heron_id}/debt_candidates":{"get":{"description":"Identify potential debt candidates.\n","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserMerchantSummary"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser debt candidates","tags":["EndUserCalculations"]}},"/api/end_users/{end_user_id_or_heron_id}/decision_logic":{"post":{"description":"Upload DecisionLogic XML files for a specified end user to translate into Heron Data format and add transactions for the end user\n","parameters":[{"description":"The `end_user_id` or `heron_id` of EndUser to upload","in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}},{"description":"ISO 4217 currency code","in":"query","name":"currency","required":false,"schema":{"example":"USD","type":"string"}}],"requestBody":{"content":{"application/xml":{"schema":{"type":"string"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"_summary":{"properties":{"request_id":{"description":"Unique UUID per request","type":"string"}},"type":"object"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Upload DecisionLogic XML","tags":["EndUserIntegrations"]}},"/api/end_users/{end_user_id_or_heron_id}/emails":{"get":{"description":"Get the emails associated with an end user","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EndUserEmailSchema"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser emails","tags":["EndUsers"]}},"/api/end_users/{end_user_id_or_heron_id}/end_user_information":{"get":{"description":"Get the company details of an end user including loan information","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserInformationSchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser information","tags":["EndUsers"]},"patch":{"description":"Update the end user information","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserInformationPatchSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserInformationSchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Patch EndUser information","tags":["EndUsers"]}},"/api/end_users/{end_user_id_or_heron_id}/enrich":{"post":{"description":"Enriches transactions of an end user identified by its end_user_id or heron_id. There is an optional `priority` parameter that can be set to `high` to prioritize the enrichment over `normal` (default) priority. High priority enrichment is only enabled for enterprise-level accounts. Please contact support@herondata.io to upgrade your account.\n","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}},{"description":"Priority for async enrichment","in":"query","name":"priority","required":false,"schema":{"default":"normal","enum":["normal","high"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"end_user":{"$ref":"#/components/schemas/EndUser"}},"type":"object"}}},"description":"Ok"}},"security":[{"ApiKeyAuth":[]}],"summary":"Enrich transactions of EndUser","tags":["EndUsers"]}},"/api/end_users/{end_user_id_or_heron_id}/evaluate_rules":{"get":{"parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RuleEvaluationSchema"},"type":"array"}}},"description":"Ok"}},"security":[{"ApiKeyAuth":[]}],"summary":"Evaluate all rules for an end user","tags":["EndUserRules"]}},"/api/end_users/{end_user_id_or_heron_id}/export_spreadsheet":{"get":{"description":"Export a spreadsheet for an end user containing key metrics and reports\n","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary","type":"string"}}},"description":"OK"},"400":{"description":"No transaction data available for the end user"},"500":{"description":"Spreadsheet generation failed"}},"security":[{"ApiKeyAuth":[]}],"summary":"Export as a spreadsheet","tags":["EndUserCalculations"]}},"/api/end_users/{end_user_id_or_heron_id}/files":{"get":{"description":"Get all files for an end user","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EndUserFileSchema"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUserFiles","tags":["EndUserFiles"]},"post":{"deprecated":true,"description":"Deprecated \u2014 use [Post EndUserFile V2](/api-reference/enduserfiles/post-enduserfile-v2) instead.","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserFileUploadSchema"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserFileSchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Post EndUserFile","tags":["EndUserFiles"]}},"/api/end_users/{end_user_id_or_heron_id}/files/download":{"get":{"description":"Download all files for an end user as a zip","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/zip":{"schema":{"format":"binary","type":"string"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Download EndUserFiles","tags":["EndUserFiles"]}},"/api/end_users/{end_user_id_or_heron_id}/files/parsed_results/xlsx":{"get":{"parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary","type":"string"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Download xlsx of parsed results from uploaded files","tags":["EndUserFiles"]}},"/api/end_users/{end_user_id_or_heron_id}/files/v2":{"post":{"description":"Upload file to an end user & asynchronously classify its type. After uploading, call the `/start_workflow` endpoint to trigger downstream processing (parsing, bank statement extraction, etc.).\n","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"The file to upload","format":"binary","type":"string"},"file_class":{"description":"(Optional) - The type of file. Common values: bank_statement, iso_application_form, debt_summary, void_check, invoice, pnl_statement, balance_sheet, tax_return, money_market_statement. Contact Heron support for the full list of file classes available for your account.","type":"string"},"reference_id":{"description":"Your reference id for the file","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserFileSchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Post EndUserFile V2","tags":["EndUserFiles"]}},"/api/end_users/{end_user_id_or_heron_id}/finicity/connect":{"post":{"description":"Create a Finicity Link for an end user and send a Finicity Connect email to the end user to initiate the connection. The end user must have sufficient end user information to create the link.\n","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Send a Finicity Connect email to an end user","tags":["Integrations"]}},"/api/end_users/{end_user_id_or_heron_id}/finicity/request_cashflow_report":{"post":{"description":"Request a cashflow report generation for an end user. When the report is ready it will be available as EndUserFile.\n","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinicityRequestCashflowReportSchema"}}},"required":true},"responses":{"202":{"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Trigger a cashflow report generation for an end user","tags":["Integrations"]}},"/api/end_users/{end_user_id_or_heron_id}/finicity/request_statement_reports":{"post":{"description":"Request a Finicity statement reports generation for end user. Reports will be generated for each account available and each month going back in time between min_statement_index and max_statement_index. When the report is ready it will be available as EndUserFile.\n","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinicityRequestStatementReportsSchema"}}},"required":true},"responses":{"202":{"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Trigger a statement reports generation for an end user","tags":["Integrations"]}},"/api/end_users/{end_user_id_or_heron_id}/finicity/request_voe_transactions_report":{"post":{"description":"Request a Finicity VOE transactions report generation for an end user. When the report is ready it will be available as an EndUserFile.\n","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinicityRequestVoeTransactionsReportSchema"}}},"required":true},"responses":{"202":{"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Trigger a Finicity VOE transactions report generation for an end user","tags":["Integrations"]}},"/api/end_users/{end_user_id_or_heron_id}/grouped_transactions_report":{"get":{"description":"Get a report of transactions grouped by merchant or counterparty for an end user","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EndUserGroupedTransactionsReport"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser transactions grouped by counterparty or merchant","tags":["EndUserCalculations"]}},"/api/end_users/{end_user_id_or_heron_id}/heron_score":{"get":{"description":"Get Heron Score for end user with a breakdown of the feature group contributions which resulted in the score. The score is calculated for the day of last transaction. This is a beta feature and is subject to change.","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}},{"description":"Minimum company categorisation confidence to calculate Heron Score","in":"query","name":"min_category_confidence","required":false,"schema":{"default":null,"example":0.8,"nullable":true,"type":"number"}},{"description":"Cut-off date to consider transactions to for calculating heron score (inclusive)","in":"query","name":"date","required":false,"schema":{"default":null,"example":"2023-01-19","format":"date","nullable":true,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeronScoreSchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser Heron Score (beta)","tags":["EndUserCalculations"]}},"/api/end_users/{end_user_id_or_heron_id}/inscribe":{"post":{"description":"Upload Inscribe JSON for a specified end user to translate into Heron Data format and add transactions for the end user\n","parameters":[{"description":"The `end_user_id` or `heron_id` of EndUser to upload","in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InscribeSchema"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"_summary":{"properties":{"request_id":{"description":"Unique UUID per request","type":"string"}},"type":"object"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Upload Inscribe","tags":["EndUserIntegrations"]}},"/api/end_users/{end_user_id_or_heron_id}/integration_links":{"get":{"description":"Get a list of integration links for a specified end user\n","parameters":[{"description":"The `end_user_id` or `heron_id` of EndUser","in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"links":{"items":{"$ref":"#/components/schemas/IntegrationLinkSchema"},"type":"array"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get Integration Links","tags":["EndUserIntegrations"]}},"/api/end_users/{end_user_id_or_heron_id}/iso_application_form":{"post":{"description":"Use this endpoint to upload an ISO application PDF. Once uploaded, the file will be automatically scrubbed asynchronously. You can use the returned iso_application heron_id (prefixed \"iso_\") to fetch the scrubbing results. Please contact support@herondata.io to enable this endpoint.\n","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserFileSchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Upload an ISO application PDF for for an end user","tags":["ISOApplication"]}},"/api/end_users/{end_user_id_or_heron_id}/iso_applications":{"get":{"description":"Get all ISO applications for an end user","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GetIsoApplicationSchema"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser ISO Applications","tags":["ISOApplication"]}},"/api/end_users/{end_user_id_or_heron_id}/location":{"get":{"description":"Get the company physical address coordinates","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserAddressLocationSchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser physical location","tags":["EndUsers"]}},"/api/end_users/{end_user_id_or_heron_id}/merchant_summary":{"get":{"description":"Get the summary of transactions by merchant for an end user for given categories or analytics groups","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}},{"explode":true,"in":"query","name":"category_label_or_heron_id","required":false,"schema":{"items":{"type":"string"},"minItems":1,"nullable":true,"type":"array"},"style":"form"},{"explode":true,"in":"query","name":"analytics_group","required":false,"schema":{"items":{"description":"The category analytics group","enum":["revenue","cost_of_goods_sold","operational_expenses","tax_expenses","intra_company","debt","equity","other_income","special_items","other",null],"example":"debt","nullable":true,"type":"string"},"minItems":1,"nullable":true,"type":"array"},"style":"form"},{"description":"Whether to group by counterparty transaction clusters","in":"query","name":"group_by_counterparty_txn_clusters","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Account ids to include in the summary, if not provided, all accounts are included","explode":true,"in":"query","name":"account_ids","required":false,"schema":{"default":null,"items":{"example":"1234","type":"string"},"nullable":true,"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserMerchantSummary"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser merchant summary","tags":["EndUserCalculations"]}},"/api/end_users/{end_user_id_or_heron_id}/missing_accounts":{"get":{"description":"Get a list of possible missing accounts for a given End User. This endpoint is in beta and likely to change.","parameters":[{"description":"The `end_user_id` or `heron_id` of EndUser","in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"missing_accounts":{"items":{"$ref":"#/components/schemas/MissingAccountSchema"},"type":"array"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get Missing Accounts (beta)","tags":["EndUserAccounts"]}},"/api/end_users/{end_user_id_or_heron_id}/named_dates":{"get":{"description":"Get the named dates associated with an end user, e.g., date of last transaction","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"named_dates":{"items":{"$ref":"#/components/schemas/NamedDateSchema"},"type":"array"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser named dates","tags":["EndUserCalculations"]}},"/api/end_users/{end_user_id_or_heron_id}/ocrolus":{"post":{"description":"Upload Ocrolus JSON for a specified end user to translate into Heron Data format and add transactions for the end user\n","parameters":[{"description":"The `end_user_id` or `heron_id` of EndUser to upload","in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}},{"description":"Skip the check for the number of transactions in the payload","in":"query","name":"skip_num_txns_check","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OcrolusSchema"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"_summary":{"properties":{"request_id":{"description":"Unique UUID per request","type":"string"}},"type":"object"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Upload Ocrolus","tags":["EndUserIntegrations"]}},"/api/end_users/{end_user_id_or_heron_id}/pdfs":{"get":{"description":"Get list of PDFs for a specified end user\n","parameters":[{"description":"The `end_user_id` or `heron_id` of EndUser to upload","in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}},{"description":"Include processed results where applicable per pdf","in":"query","name":"with_processed_results","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pdfs":{"items":{"$ref":"#/components/schemas/PdfGetSchema"},"type":"array"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get PDFs","tags":["EndUserIntegrations"]}},"/api/end_users/{end_user_id_or_heron_id}/pdfs/parse":{"post":{"description":"Starts parsing all PDFs for a specified end users. This will not restart any PDFs that are already being parsed\n","parameters":[{"description":"The `end_user_id` or `heron_id` of EndUser to upload","in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pdf_heron_ids":{"items":{"type":"string"},"type":"array"},"request_id":{"description":"Unique UUID per request","type":"string"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Parse all PDF","tags":["EndUserIntegrations"]}},"/api/end_users/{end_user_id_or_heron_id}/pdfs/v1":{"post":{"description":"Upload encoded PDF of transactions for a specified end user to translate into Heron Data format\n","parameters":[{"description":"The `end_user_id` or `heron_id` of EndUser to upload","in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfPostSchema"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"pdf_heron_id":{"description":"Heron id of the uploaded pdf file","type":"string"},"request_id":{"description":"Unique UUID per request","type":"string"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Upload PDF","tags":["EndUserIntegrations"]}},"/api/end_users/{end_user_id_or_heron_id}/plaid/assets":{"post":{"description":"Upload Plaid asset JSON for a specified end user to translate into Heron Data format and add transactions for the end user\n","parameters":[{"description":"The `end_user_id` or `heron_id` of EndUser to upload","in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaidAssetsSchema"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"_summary":{"properties":{"request_id":{"description":"Unique UUID per request","type":"string"}},"type":"object"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Upload Plaid assets","tags":["EndUserIntegrations"]}},"/api/end_users/{end_user_id_or_heron_id}/plaid/transactions":{"post":{"description":"Upload Plaid transactions JSON for a specified end user to translate into Heron Data format and add transactions for the end user\n","parameters":[{"description":"The `end_user_id` or `heron_id` of EndUser to upload","in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaidTransactionsSchema"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"_summary":{"properties":{"request_id":{"description":"Unique UUID per request","type":"string"}},"type":"object"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Upload Plaid transactions","tags":["EndUserIntegrations"]}},"/api/end_users/{end_user_id_or_heron_id}/policy_evaluations":{"get":{"description":"Evaluates the user's policies against end user on-the-fly\n","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PolicyEvaluationSchema"},"type":"array"}}},"description":"Ok"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get the policy evaluations for an end user","tags":["Policy"]}},"/api/end_users/{end_user_id_or_heron_id}/positions":{"get":{"description":"Returns positions with calculated metrics for an end user, optionally filtered by account IDs","parameters":[{"description":"The end user ID or heron ID","in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}},{"description":"Account IDs to filter positions by","in":"query","name":"account_ids","schema":{"items":{"type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserPositions"}}},"description":"Positions summary retrieved successfully"},"404":{"description":"End user not found"}},"summary":"Get positions summary for end user","tags":["Positions"]}},"/api/end_users/{end_user_id_or_heron_id}/processing_status":{"get":{"description":"Get the current processing status of an end user by heron_id or end_user_id. Returns whether the end user is currently being processed or has completed processing.\n","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserProcessingStatusSchema"}}},"description":"Successfully retrieved processing status"},"404":{"description":"End user not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser processing status","tags":["EndUsers"]}},"/api/end_users/{end_user_id_or_heron_id}/profit_and_loss":{"get":{"description":"Calculates the cashflow profit & loss table for an end user, based on the layout defined (if any)\n","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}},{"description":"The earliest transaction timestamp date to use","in":"query","name":"from_date","required":false,"schema":{"default":null,"example":"2022-01-01","format":"date","nullable":true,"type":"string"}},{"description":"The latest transaction timestamp date to use","in":"query","name":"to_date","required":false,"schema":{"default":null,"example":"2022-01-31","format":"date","nullable":true,"type":"string"}},{"description":"If true, dates are sorted left to right by ascending order. False by default, i.e., by default sorted in descending date order so more recent dates are first","in":"query","name":"dates_ascending","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"ISO 4217 currency code for balance","in":"query","name":"currency","required":false,"schema":{"enum":["GBP","USD","EUR",null],"example":"USD","nullable":true,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfitAndLossSchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser cashflow P&L","tags":["EndUserCalculations"]}},"/api/end_users/{end_user_id_or_heron_id}/profit_and_loss_layout":{"put":{"description":"Update the profit and loss layout for the end user, which determines how the profit and loss table is calculated\n","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfitAndLossLayoutUpdateSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfitAndLossLayoutSchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Update EndUser P&L layout","tags":["EndUserCalculations"]}},"/api/end_users/{end_user_id_or_heron_id}/recurring_transactions_report":{"get":{"description":"Get a report of recurring transactions grouped by merchant or counterparty for an end user","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}},{"description":"Account ids to include in the report, if not provided, all accounts are included","explode":true,"in":"query","name":"account_ids","required":false,"schema":{"default":null,"items":{"example":"1234","type":"string"},"nullable":true,"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EndUserRecurringTransactionsReport"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser recurring transactions report","tags":["EndUserCalculations"]}},"/api/end_users/{end_user_id_or_heron_id}/scorecard":{"get":{"description":"Get scorecard metrics and rule violations for a user","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}},{"description":"Cut-off date to consider transactions to for calculating scorecard (inclusive)","in":"query","name":"date","required":false,"schema":{"default":null,"example":"2023-01-19","format":"date","nullable":true,"type":"string"}},{"description":"Qualitative description for date to calculate scorecard","in":"query","name":"named_date","required":false,"schema":{"default":null,"enum":["end_user_created","end_user_last_updated","last_transaction","end_user_last_enriched","last_data_source_end_date_or_transaction_timestamp","custom_date",null],"example":"end_user_created","nullable":true,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"metrics":{"items":{"$ref":"#/components/schemas/Metric"},"type":"array"},"rule_violations":{"items":{"$ref":"#/components/schemas/RuleViolation"},"type":"array"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser scorecard","tags":["EndUserCalculations"]}},"/api/end_users/{end_user_id_or_heron_id}/scorecard/async":{"post":{"description":"Request scorecard metrics for a date and end user","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}},{"description":"Cut-off date to consider transactions to for calculating scorecard (inclusive)","in":"query","name":"date","required":true,"schema":{"example":"2023-01-19","format":"date","type":"string"}}],"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Request EndUser scorecard","tags":["EndUserCalculations"]}},"/api/end_users/{end_user_id_or_heron_id}/start_workflow":{"post":{"description":"Starts your configured Heron workflow for an end user","parameters":[{"description":"The end user's ID or heron_id","in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"success":{"type":"boolean"}},"type":"object"}}},"description":"Heron workflow triggered successfully"},"404":{"description":"End user not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Start Workflow","tags":["EndUserFiles"]}},"/api/end_users/{end_user_id_or_heron_id}/transaction_data_coverage":{"get":{"description":"Information about dates covered by any transaction data source","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"start_date","required":true,"schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","required":true,"schema":{"format":"date","type":"string"}},{"in":"query","name":"include_disabled_data_sources","required":false,"schema":{"default":true,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserTransactionDataCoverageSchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get EndUser transaction data coverage","tags":["EndUserCalculations"]}},"/api/end_users/{end_user_id_or_heron_id}/transactions":{"get":{"description":"Get all unique transactions for a single end user. Set end user status to \"ready\" to initiate transaction enrichment, otherwise may contain both enriched and unenriched transactions\n","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}},{"description":"Filter for transactions whose values were last updated in Heron systems after the specified input value, isoformat","in":"query","name":"last_updated_min","required":false,"schema":{"default":null,"example":"2026-04-18T03:33:30.036428","format":"date-time","nullable":true,"type":"string"}},{"description":"Results page","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Desired results per page","in":"query","name":"per_page","required":false,"schema":{"default":100,"maximum":50000,"minimum":1,"type":"integer"}},{"description":"Account ids to include. If not provided, all accounts are included","explode":true,"in":"query","name":"account_ids","required":false,"schema":{"default":null,"items":{"example":"1234","type":"string"},"nullable":true,"type":"array"},"style":"form"},{"description":"Filter by the heron_id of the category that the transaction is annotated with","explode":true,"in":"query","name":"category_heron_id","required":false,"schema":{"default":[],"example":"ctg_2FFvG7KXEXQEG2tBoPtshF","items":{"type":"string"},"nullable":true,"type":"array"},"style":"form"},{"description":"What to order transactions by","in":"query","name":"order_by","required":false,"schema":{"default":"id_asc","enum":["amount_asc","amount_desc","abs_amount_asc","abs_amount_desc","description_asc","description_desc","timestamp_asc","timestamp_desc","id_asc","id_desc","confidence_asc","confidence_desc","created_asc","created_desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"_meta":{"$ref":"#/components/schemas/Pagination"},"transactions_enriched":{"items":{"$ref":"#/components/schemas/TransactionEnriched"},"type":"array"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get end user transactions","tags":["EnrichedTransactions"]},"post":{"description":"Upload transactions for a specific end user. Does not include enriching transactions -- set end user status = 'ready' to initiate processing. For synchronous enrichment, please instead use \"Enrich transactions (sync). Either timestamp (preferred) or date must be present in the transaction payload.\"\n","parameters":[{"in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserTransactionsPostAsyncSchema"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"request_id":{"description":"Unique UUID per request","type":"string"},"transactions_loaded":{"description":"The number of transactions loaded","type":"integer"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create end user transactions (async)","tags":["Transactions"]}},"/api/end_users/{end_user_id_or_heron_id}/yodlee":{"post":{"description":"Upload Yodlee JSON files for a specified end user to translate into Heron Data format and add transactions for the end user\n","parameters":[{"description":"The `end_user_id` or `heron_id` of EndUser to upload","in":"path","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/YodleeSchema"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"_summary":{"properties":{"request_id":{"description":"Unique UUID per request","type":"string"}},"type":"object"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Upload Yodlee","tags":["EndUserIntegrations"]}},"/api/end_users/{heron_id}/crm_sync":{"get":{"parameters":[{"in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CrmSyncEventSchema"},"type":"array"}}},"description":"The list of CRM events that occurred for this end user"}},"security":[{"ApiKeyAuth":[]}],"summary":"Retrieve CRM sync events for an end user","tags":["EndUsers"]},"post":{"parameters":[{"in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"crm_sync_triggered":{"type":"boolean"},"heron_id":{"description":"The Heron ID of the End User","type":"string"}},"type":"object"}}},"description":"Ok"}},"security":[{"ApiKeyAuth":[]}],"summary":"Trigger a CRM Sync for an End User","tags":["EndUsers"]}},"/api/entities/post_processors":{"get":{"description":"Returns a list of all available post processors that can be applied to entity attributes","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostProcessorsResponseSchema"}}},"description":"List of available post processor and configurations"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get all available post processors","tags":["EndUserEntity"],"x-hidden":true}},"/api/funder_submissions/":{"post":{"description":"Find or create a funder submission for the given end user and funder pair. Returns the existing submission if one already exists (unique per end_user + funder).\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertFunderSubmissionRequestSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunderSubmissionSchema"}}},"description":"Funder submission found or created"},"404":{"description":"End user or funder not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Upsert a funder submission"}},"/api/funder_submissions/{submission_heron_id}/":{"get":{"description":"Returns the status and details of a funder submission. Use this to poll after triggering a submission.","parameters":[{"description":"The Heron ID of the funder submission","in":"path","name":"submission_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunderSubmissionSchema"}}},"description":"Funder submission details"},"404":{"description":"Funder submission not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get funder submission status"}},"/api/funder_submissions/{submission_heron_id}/trigger/":{"post":{"description":"Triggers an async submission to a funder. Returns 202 immediately; poll via GET /funder_submissions/{submission_heron_id}/ to check progress.\n","parameters":[{"description":"The Heron ID of the funder submission","in":"path","name":"submission_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFunderSubmissionRequestSchema"}}},"required":true},"responses":{"202":{"description":"Submission accepted and queued for processing"},"400":{"description":"Submission has a non-submittable status"},"404":{"description":"Funder submission not found"},"409":{"description":"Submission is already in progress"}},"security":[{"ApiKeyAuth":[]}],"summary":"Trigger a funder submission"}},"/api/funders/":{"get":{"description":"Get a list of all available funders","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"funders":{"items":{"$ref":"#/components/schemas/Funder"},"type":"array"}},"type":"object"}}},"description":"List of funders"}},"security":[{"ApiKeyAuth":[]}],"summary":"List all funders","tags":["Funders"]}},"/api/funders/linked":{"get":{"description":"Get a list of funders linked to the current user","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"funders":{"items":{"$ref":"#/components/schemas/Funder"},"type":"array"}},"type":"object"}}},"description":"List of user's linked funders"}},"security":[{"ApiKeyAuth":[]}],"summary":"List your linked funders","tags":["Funders"]}},"/api/funders/{heron_id}":{"get":{"description":"Get details of a specific funder by heron_id","parameters":[{"description":"The funder's heron_id","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"funder":{"$ref":"#/components/schemas/Funder"}},"type":"object"}}},"description":"Funder details"},"404":{"description":"Funder not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get a single funder","tags":["Funders"]}},"/api/hello_world":{"get":{"description":"Test endpoint (no authentication)","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"hello":{"type":"string"}},"type":"object"}}},"description":"url works"}},"tags":["Testing"]}},"/api/hello_world/authenticated":{"get":{"description":"Test authentication","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"hello":{"type":"string"}},"type":"object"}}},"description":"Authentication works"},"401":{"description":"Unauthorized"}},"security":[{"ApiKeyAuth":[]}],"tags":["Testing"]}},"/api/ingestion/crm/{crm_integration_heron_id}":{"post":{"description":"Receives a webhook payload from a CRM integration, parses it into an EndUserSource, and syncs the end user via the ingestion pipeline.\n","parameters":[{"description":"Heron ID of the CRM integration","in":"path","name":"crm_integration_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"end_user_heron_id":{"description":"Heron ID of an existing end user (for updates)","type":"string"},"end_user_name":{"description":"Name for the end user (required for creates when end_user_heron_id is not provided)","type":"string"},"entity_data":{"description":"Optional entity data to attach to the end user","type":"object"},"external_id":{"description":"External record ID in the CRM","type":"string"},"external_name":{"description":"External object type name in the CRM","type":"string"}},"required":["external_id","external_name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"end_user_heron_id":{"type":"string"}},"type":"object"}}},"description":"End user successfully ingested"},"400":{"description":"Invalid payload or unsupported CRM provider"},"404":{"description":"CRM integration not found"}},"summary":"Ingest end user data from a CRM webhook","x-hidden":true}},"/api/integration_links/{item_id}":{"put":{"description":"Allows refreshing the access_token of an existing Integration Link","parameters":[{"in":"path","name":"item_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"end_user":{"$ref":"#/components/schemas/IntegrationLinkUpdateSchema"}},"type":"object"}}},"description":"IntegrationLink","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"integration_link":{"$ref":"#/components/schemas/IntegrationLinkSchema"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Update an Integration Link","tags":["Integrations"]}},"/api/integrations":{"get":{"description":"Get a list of Integrations","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"integrations":{"items":{"$ref":"#/components/schemas/IntegrationSchema"},"type":"array"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"List Integrations","tags":["Integrations"]},"post":{"description":"Create an integration e.g. with Plaid","requestBody":{"content":{"application/json":{"schema":{"properties":{"integration":{"$ref":"#/components/schemas/IntegrationSchema"}},"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"integration":{"$ref":"#/components/schemas/IntegrationSchema"}},"type":"object"}}},"description":"Created"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create an integration","tags":["Integrations"]}},"/api/integrations/pdfs/{heron_id}":{"get":{"description":"Retrieve a single PDF document by its heron_id. Returns the PDF metadata, status information, and optionally the processed statements/transactions. Users can only access their own PDFs.\n","parameters":[{"description":"The heron_id of the PDF to retrieve","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}},{"description":"Include processed statements/transactions in the response","in":"query","name":"with_processed_results","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pdf":{"$ref":"#/components/schemas/PdfGetSchema"}},"type":"object"}}},"description":"Successfully retrieved PDF"},"404":{"content":{"application/json":{"schema":{"properties":{"message":{"example":"no pdf with heron_id=example_id found","type":"string"}},"type":"object"}}},"description":"PDF not found or user does not have access"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get single PDF by heron_id","tags":["EndUserIntegrations"]},"put":{"description":"Update PDF attributes including status\n","parameters":[{"description":"heron_id of the pdf","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfPutSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pdf":{"$ref":"#/components/schemas/PdfGetSchema"},"request_id":{"description":"Unique UUID per request","type":"string"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Update PDF attributes including status","tags":["EndUserIntegrations"]}},"/api/integrations/pdfs/{heron_id}/processed":{"patch":{"description":"Send patch transactions processed pdf that will override the extracted transactions in the specified statement\n","parameters":[{"description":"heron_id of the pdf","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfStatementPatchSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean"}},"type":"object"}}},"description":"Ok"}},"security":[{"ApiKeyAuth":[]}],"summary":"Send patch transactions for a pdf statement","tags":["EndUserIntegrations"]}},"/api/integrations/pdfs/{heron_id}/reload_transactions":{"post":{"description":"This will load transactions for the pdf that is in a transactions unloaded status\n","parameters":[{"description":"heron_id of the pdf","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean"}},"type":"object"}}},"description":"Ok"}},"security":[{"ApiKeyAuth":[]}],"summary":"Reloads transactions for a pdf","tags":["EndUserIntegrations"]}},"/api/integrations/pdfs/{heron_id}/unload_transactions":{"post":{"description":"This will delete all transactions that were previously loaded for the pdf\n","parameters":[{"description":"heron_id of the pdf","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean"}},"type":"object"}}},"description":"Ok"}},"security":[{"ApiKeyAuth":[]}],"summary":"Unloads transactions for a pdf","tags":["EndUserIntegrations"]}},"/api/integrations/pdfs/{heron_id}/update_currency":{"post":{"description":"Update the currency for a PDF and all its statement summaries. The PDF must be in transactions_unloaded status.\n","parameters":[{"description":"heron_id of the PDF","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfDefaultCurrencyUpdateSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean"},"pdf":{"$ref":"#/components/schemas/PdfGetSchema"},"request_id":{"description":"Unique UUID per request","type":"string"}},"type":"object"}}},"description":"PDF currency updated successfully"},"400":{"description":"Bad request - PDF not in correct status"},"404":{"description":"PDF not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Update PDF currency","tags":["EndUserIntegrations"]}},"/api/integrations/{heron_id}":{"put":{"description":"Update an Integration","parameters":[{"in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"integration":{"$ref":"#/components/schemas/IntegrationSchema"}},"type":"object"}}},"description":"Integration","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"integration":{"$ref":"#/components/schemas/IntegrationSchema"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Update Integration","tags":["Integrations"]}},"/api/integrations/{heron_id}/links":{"delete":{"description":"Soft-deletes of an integration link (sync is disabled)","parameters":[{"description":"The Integration's heron_id","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}},{"description":"Delete that end user's IntegrationLinks","in":"query","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"(Soft-)Delete an integration link","tags":["Integrations"]},"get":{"description":"Get a list of IntegrationLinks for an Integration filtered by end user","parameters":[{"description":"The Integration's heron_id","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}},{"description":"Return only IntegrationLinks for that end user","in":"query","name":"end_user_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"links":{"items":{"$ref":"#/components/schemas/IntegrationLinkSchema"},"type":"array"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get IntegrationLinks by Integration","tags":["Integrations"]},"post":{"description":"Create a Link for an active Integration every time a customer connects their bank. In Plaid, this is a Plaid Link every time a customer connects their bank. For Plaid, call this after exchanging a public token for an Item access_token.\n","parameters":[{"in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationLinkSchema"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"link":{"$ref":"#/components/schemas/IntegrationLinkNewSchema"}},"type":"object"}}},"description":"Created"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create an integration Link","tags":["Integrations"]},"put":{"description":"Refresh assets reports for an integration and specific end user. This will trigger a refresh operation for all active Plaid assets report links associated with the integration and end user.\n","parameters":[{"description":"The Integration's heron_id","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}},{"description":"Filter to refresh only links for this specific end user","in":"query","name":"end_user_id_or_heron_id","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshAssetsReportsResponseSchema"}}},"description":"Assets reports refresh completed successfully"},"404":{"description":"Integration not found or no assets reports found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshAssetsReportsResponseSchema"}}},"description":"Some assets reports failed to refresh (partial success)"}},"security":[{"ApiKeyAuth":[]}],"summary":"Refresh assets reports for integration links","tags":["Integrations"]}},"/api/integrations/{heron_id}/links/{link_item_id}/refresh":{"post":{"description":"Trigger a refresh operation for an IntegrationLink","parameters":[{"description":"The Integration's heron_id","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}},{"description":"The IntegrationLink's item_id","in":"path","name":"link_item_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"link":{"$ref":"#/components/schemas/IntegrationLinkSchema"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Refresh an IntegrationLink","tags":["Integrations"]}},"/api/interaction_logs":{"post":{"description":"Log a user interaction from the frontend.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInteractionLogSchema"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InteractionLogResponseSchema"}}},"description":"Interaction log created"},"404":{"description":"End user not found"}},"summary":"Create an interaction log","tags":["Interaction Logs"],"x-hidden":true}},"/api/iso_applications/":{"post":{"description":"Use this endpoint to upload an ISO application PDF. Once uploaded, the file will be automatically scrubbed asynchronously. You can use the returned heron_id (prefixed \"iso_\") to fetch the scrubbing results from the GET endpoint below. Please contact support@herondata.io to enable this endpoint.\n","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"heron_id":{"description":"e.g. iso_","type":"string"},"status":{"enum":["processing"],"type":"string"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Upload an ISO application PDF for automated scrubbing in under 15 seconds","tags":["ISOApplication"]}},"/api/iso_applications/base64":{"post":{"description":"This endpoint is for uploading ISO application PDFs in base64 format.\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostIsoApplicationBase64Schema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"heron_id":{"description":"e.g. iso_","type":"string"},"status":{"enum":["processing"],"type":"string"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Upload an ISO application PDF for automated scrubbing in under 15 seconds (base64)","tags":["ISOApplication"]}},"/api/iso_applications/reprocess/{heron_id}":{"post":{"description":"Use this endpoint to trigger reprocessing of a specific ISO application. This will re-run the parsing and validation process for the specified application.\n","parameters":[{"description":"The heron_id of the ISO application to reprocess","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"failed":{"description":"List of heron_ids that failed to reprocess","items":{"type":"string"},"type":"array"},"succeeded":{"description":"List of heron_ids that were successfully queued for reprocessing","items":{"type":"string"},"type":"array"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Reprocess a single ISO application","tags":["ISOApplication"]}},"/api/iso_applications/{heron_id}":{"get":{"description":"Use this endpoint to retrieve the scrubbed results and data validations of an uploaded ISO application PDF once it has finished processing. If processing is still underway, the processing_status field will be \"processing\".\n","parameters":[{"in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIsoApplicationSchema"}}},"description":"Ok"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get the scrubbed results and data validations of an uploaded ISO application by its heron_id (prefixed \"iso_\")","tags":["ISOApplication"]}},"/api/merchants/extract":{"post":{"description":"Extract Merchant from a transaction description","requestBody":{"content":{"application/json":{"schema":{"properties":{"description":{"example":"PAYPAL* AMZN Mktp 198748320","type":"string"}},"required":["description"],"type":"object"}}},"description":"The bank transaction description as a string"},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"description_clean":{"example":"Amzn Mktp","nullable":true,"type":"string"},"merchant":{"$ref":"#/components/schemas/MerchantExtract","nullable":true},"payment_processor":{"$ref":"#/components/schemas/PaymentProcessor","nullable":true}},"type":"object"}}},"description":"The `merchant` key is not null when we find a positive match to our database. When we could not match a merchant, `merchant` is null and `description_clean` is set to a substring of the original description that our models identified as the relevant entity.\n"}},"security":[{"ApiKeyAuth":[]}],"tags":["Merchants"]}},"/api/merchants/groups":{"get":{"description":"Get Merchant groups","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MerchantGroup"},"type":"array"}}},"description":"Ok"}},"security":[{"ApiKeyAuth":[]}],"tags":["Merchants"]}},"/api/merchants/search":{"get":{"description":"Search Merchants by name","parameters":[{"description":"Full or partial name, minimum 3 characters","in":"query","name":"name","required":true,"schema":{"type":"string"}},{"description":"If true, only returns priority merchants","in":"query","name":"only_priority","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"merchants":{"items":{"$ref":"#/components/schemas/Merchant"},"type":"array"}},"type":"object"}}},"description":"A list of up to 5 merchants which match the search term, sorted by descending order of their URL rank and the frequency this merchant has been seen historically.\n"}},"security":[{"ApiKeyAuth":[]}],"tags":["Merchants"]}},"/api/merchants/{heron_id}":{"get":{"description":"Get Merchant by heron_id","parameters":[{"description":"The Merchant `heron_id`","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"merchant":{"$ref":"#/components/schemas/Merchant"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"tags":["Merchants"]}},"/api/merchants/{merchant_heron_id}/user_merchant_group":{"patch":{"description":"Update the group id for a merchant for the current user","parameters":[{"description":"The Merchant `heron_id`","in":"path","name":"merchant_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"group_id":{"example":"debt.mca_or_rbf","nullable":true,"type":"string"}},"required":["group_id"],"type":"object"}}},"description":"Group ID to assign to the merchant"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMerchantGroupSchema"}}},"description":"OK"},"404":{"description":"Merchant not found"}},"security":[{"ApiKeyAuth":[]}],"tags":["Merchants"]}},"/api/policies/progress":{"post":{"description":"Triggers the policy progression workflow for a specific end user\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgressPolicySchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"example":true,"type":"boolean"}},"type":"object"}}},"description":"Ok"},"404":{"description":"End user not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Progress policies for an end user","tags":["Policy"]}},"/api/positions/{position_heron_id}/transactions":{"get":{"description":"Returns investment and repayment transactions for a specific position","operationId":"getPositionTransactions","parameters":[{"description":"The position heron ID","in":"path","name":"position_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositionTransactions"}}},"description":"Position transactions retrieved successfully"},"404":{"description":"Position not found"}},"summary":"Get transactions for a specific position","tags":["Positions"]}},"/api/rules/":{"get":{"description":"Read all available rules","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"rules":{"items":{"$ref":"#/components/schemas/Rule"},"type":"array"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get rules","tags":["Rules"]},"post":{"description":"Create a new rule to send a 'end_user.review_required' webhook after processing if rule condition evaluates to true\n","requestBody":{"content":{"application/json":{"schema":{"properties":{"rule":{"$ref":"#/components/schemas/Rule"}},"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"rule":{"$ref":"#/components/schemas/Rule"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create a single rule","tags":["Rules"]}},"/api/rules/metrics":{"get":{"description":"Read all available metrics to define rules on","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MetricDefinitionSchema"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get metrics","tags":["Rules"]}},"/api/rules/{heron_id}":{"delete":{"description":"Delete a rule\n","parameters":[{"in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"content":{"application/json":{"schema":{"properties":{"heron_id":{"type":"string"}},"type":"object"}}},"description":"Deleted"}},"security":[{"ApiKeyAuth":[]}],"summary":"Delete rule by heron_id","tags":["Rules"]},"put":{"description":"Update a rule\n","parameters":[{"in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"rule":{"$ref":"#/components/schemas/RuleUpdateSchema"}},"type":"object"}}},"description":"Rule","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"rule":{"$ref":"#/components/schemas/Rule"}},"type":"object"}}},"description":"Updated"}},"security":[{"ApiKeyAuth":[]}],"summary":"Update rule by heron_id","tags":["Rules"]}},"/api/submission_parsers/{end_user_heron_id}":{"get":{"parameters":[{"description":"The heron_id of the end user","in":"path","name":"end_user_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ParsedEndUserSubmissionSchema"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get parsed submissions for an End User","tags":["ParsedEndUserSubmission"]}},"/api/transactions":{"delete":{"callbacks":{"onData":{"$yourWebhookUrl":{"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionDeleteWebhook","type":"object"}}},"description":"Webhook payload with transactions"},"responses":{"200":{"description":"Your webhook implementation should return this HTTP status code\nif the data was received successfully."}}}}}},"description":"Please provide at least one of the following parameters: heron_ids, heron_id, request_id or end_user_id.\n","parameters":[{"description":"(legacy) Heron ID of transaction to be deleted","in":"query","name":"heron_id","required":false,"schema":{"default":null,"example":"txn_Fbqp5XgBHa4ko5WHiPJ2XU","nullable":true,"type":"string"}},{"description":"Heron IDs of transactions to be deleted","explode":true,"in":"query","name":"heron_ids","required":false,"schema":{"default":[],"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Reference IDs of transactions to be deleted","explode":true,"in":"query","name":"reference_ids","required":false,"schema":{"default":[],"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Request ID of transactions to be deleted","in":"query","name":"request_id","required":false,"schema":{"default":null,"nullable":true,"type":"string"}},{"description":"end_user_id of transactions to be deleted","in":"query","name":"end_user_id","required":false,"schema":{"default":null,"nullable":true,"type":"string"}},{"description":"account_id of transactions to be deleted","in":"query","name":"account_id","required":false,"schema":{"default":null,"nullable":true,"type":"string"}},{"description":"if true, deletes only transactions that are marked as duplicates","in":"query","name":"only_duplicates","required":false,"schema":{"default":null,"nullable":true,"type":"boolean"}}],"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Delete transactions","tags":["Transactions"]},"get":{"description":"Get transactions. At least `end_user_id`, `heron_id` or `request_id` must be provided.","parameters":[{"description":"Deprecated; see created_date_ or timestamp_date_","in":"query","name":"from_date","required":false,"schema":{"format":"date","type":"string"}},{"description":"Deprecated; see created_date_ or timestamp_date_","in":"query","name":"to_date","required":false,"schema":{"format":"date","type":"string"}},{"description":"Filter by earliest transaction upload date - when Heron received the transaction","in":"query","name":"created_date_min","required":false,"schema":{"example":"2020-04-27","format":"date","type":"string"}},{"description":"Filter by latest transaction upload date - when Heron received the transaction","in":"query","name":"created_date_max","required":false,"schema":{"example":"2020-04-27","format":"date","type":"string"}},{"description":"Filter for transactions whose values were last updated in Heron systems after the specified input value","in":"query","name":"last_updated_min","required":false,"schema":{"example":"2026-04-18T03:33:26.881353","format":"date-time","type":"string"}},{"description":"Filter for transactions whose values were last updated in Heron systems before the specified input value","in":"query","name":"last_updated_max","required":false,"schema":{"example":"2026-04-18T03:33:26.881367","format":"date-time","type":"string"}},{"description":"Filter by earliest transaction timestamp","in":"query","name":"timestamp_date_min","required":false,"schema":{"example":"2020-04-27","format":"date","type":"string"}},{"description":"Filter by latest transaction timestamp","in":"query","name":"timestamp_date_max","required":false,"schema":{"example":"2020-04-27","format":"date","type":"string"}},{"description":"Filter by the heron_id of the category that the transaction is annotated with","explode":true,"in":"query","name":"category_heron_id","required":false,"schema":{"default":[],"example":"ctg_GP7sGZpRn3exDregyvC4aW","items":{"type":"string"},"nullable":true,"type":"array"},"style":"form"},{"description":"Request-Id header returned in the response of POST transactions. Sending this parameter will return all transactions sent in a particular POST request, including any duplicates.","in":"query","name":"request_id","required":false,"schema":{"type":"string"}},{"description":"Reference Id of transaction","in":"query","name":"reference_id","required":false,"schema":{"type":"string"}},{"description":"Heron generated Id of transaction","in":"query","name":"heron_id","required":false,"schema":{"example":"txn_hEAbWvjRL8WDozkiLDcWSR","type":"string"}},{"description":"End user id of transaction","in":"query","name":"end_user_id","required":false,"schema":{"type":"string"}},{"description":"Whether or not to include duplicate transactions in the response. Defaults to false unless request_id is provided, in which case it defaults to true.","in":"query","name":"include_duplicates","required":false,"schema":{"type":"boolean"}},{"description":"Filter by transaction code","in":"query","name":"transaction_code","required":false,"schema":{"type":"string"}},{"description":"Filter by whether the transaction is recurring","in":"query","name":"is_recurring","required":false,"schema":{"type":"boolean"}},{"description":"Filter by whether the transaction has a matching transaction","in":"query","name":"has_matching_transaction","required":false,"schema":{"type":"boolean"}},{"description":"Filter by keyword match on transaction description; case insensitive","in":"query","name":"description_keyword","required":false,"schema":{"type":"string"}},{"description":"Filter by keyword match on transaction counterparty; case insensitive","in":"query","name":"counterparty_keyword","required":false,"schema":{"type":"string"}},{"description":"Filter by regex matching transaction description","in":"query","name":"description_regex","required":false,"schema":{"type":"string"}},{"description":"Filter by minimum amount of transaction","in":"query","name":"min_amount","required":false,"schema":{"type":"number"}},{"description":"Filter by maximum amount of transaction","in":"query","name":"max_amount","required":false,"schema":{"type":"number"}},{"description":"Filter by minimum running balance","in":"query","name":"min_balance","required":false,"schema":{"type":"number"}},{"description":"Filter by maximum running balance","in":"query","name":"max_balance","required":false,"schema":{"type":"number"}},{"description":"Filter by minimum confidence of annotation associated with transaction","in":"query","name":"confidence_min","required":false,"schema":{"maximum":1.0,"minimum":0.0,"type":"number"}},{"description":"Filter by maximum confidence of annotation associated with transaction","in":"query","name":"confidence_max","required":false,"schema":{"maximum":1.0,"minimum":0.0,"type":"number"}},{"description":"Filter by merchant group id","in":"query","name":"merchant_group_id","required":false,"schema":{"type":"string"}},{"description":"Filter by merchant heron id","in":"query","name":"merchant_heron_id","required":false,"schema":{"type":"string"}},{"description":"Filter by whether the transaction has a merchant entity associated with it","in":"query","name":"has_merchant","required":false,"schema":{"default":null,"nullable":true,"type":"boolean"}},{"description":"What to order transactions by","in":"query","name":"order_by","required":false,"schema":{"default":"id_asc","enum":["amount_asc","amount_desc","abs_amount_asc","abs_amount_desc","description_asc","description_desc","timestamp_asc","timestamp_desc","id_asc","id_desc","confidence_asc","confidence_desc","created_asc","created_desc","balance_asc","balance_desc"],"type":"string"}},{"description":"Page of transaction to return","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Number of transactions to return per page","in":"query","name":"limit","required":false,"schema":{"default":1000,"maximum":10000,"minimum":1,"type":"integer"}},{"description":"Account ids to include. If not provided, all accounts are included","explode":true,"in":"query","name":"account_ids","required":false,"schema":{"default":null,"items":{"example":"1234","type":"string"},"nullable":true,"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"_meta":{"properties":{"next_url":{"type":"string"},"page":{"type":"integer"},"pages":{"type":"integer"},"per_page":{"type":"integer"},"prev_url":{"type":"string"}},"type":"object"},"_summary":{"properties":{"returned_transactions":{"type":"integer"},"transactions":{"type":"integer"}},"type":"object"},"transactions":{"items":{"$ref":"#/components/schemas/TransactionGetOutput"},"type":"array"}},"type":"object"}}},"description":"OK"},"401":{"description":"Unauthorized"}},"security":[{"ApiKeyAuth":[]}],"tags":["Transactions"]},"post":{"description":"Enrich and categorize transactions and consume them in a sync response. For business lending and underwriting, please use \"Create end user transactions\" instead. Please send a maximum of 249 transactions per request.\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionsPostSyncSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"_summary":{"properties":{"request_id":{"description":"Unique UUID per request","type":"string"}},"type":"object"},"transactions":{"description":"only returned for sync enrichment requests","items":{"$ref":"#/components/schemas/TransactionPostOutput"},"type":"array"}},"type":"object"}}},"description":"OK"},"413":{"content":{"application/json":{"schema":{"properties":{"code":{"example":413,"type":"integer"},"description":{"example":"Transaction batch size exceeds max of 2500","type":"string"},"name":{"example":"Payload Too Large","type":"string"}},"type":"object"}}},"description":"Payload Too Large"}},"security":[{"ApiKeyAuth":[]}],"summary":"Enrich transactions (sync)","tags":["Transactions"]}},"/api/transactions/{heron_id}/feedback":{"put":{"description":"Provide feedback on a Transaction's Categories and Merchants","parameters":[{"description":"Transaction `heron_id`","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"transaction":{"$ref":"#/components/schemas/TransactionFeedbackSchema"}},"type":"object"}}},"description":"A partial Transaction object with the suggested Category and/or Merchant. If you provide a `heron_id` for Category or Merchant, you don't need to provide other fields. If you don't know the Merchant `heron_id` nor name, you can just send the `is_correct` boolean. If `heron_id` is provided, we disregard `name` and `label`. If `is_correct` is set to true, we disregard all other Merchant fields.\n","required":true},"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create category, merchant feedback","tags":["EnrichmentFeedback"]}},"/api/transactions/{reference_id_or_heron_id}":{"get":{"description":"Get enriched transaction","parameters":[{"in":"path","name":"reference_id_or_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"transaction_enriched":{"$ref":"#/components/schemas/TransactionEnriched"}},"type":"object"}}},"description":"OK"},"401":{"description":"Unauthorized"}},"security":[{"ApiKeyAuth":[]}],"tags":["EnrichedTransactions"]}},"/api/user_merchant_groups":{"get":{"parameters":[{"description":"The group_id of the merchant","in":"query","name":"group_id","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMerchantGroupsSchema"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"This endpoint returns merchant groups categorized as pending, custom, or rejected.","tags":["UserMerchantGroups"]}},"/api/users/company_overview_layout":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CompanyOverviewLayoutSchema"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get user's company overview layout","tags":["Users"]},"put":{"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CompanyOverviewLayoutSchema"},"type":"array"}}},"description":"The new company overview layout","required":true},"responses":{"204":{"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Save user's company overview layout","tags":["Users"]}},"/api/users/current":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"user":{"$ref":"#/components/schemas/User"}},"type":"object"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get the current user","tags":["Users"],"x-hidden":true}},"/api/users/current/settings":{"put":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserModifiableSettings"}}},"description":"The new settings","required":true},"responses":{"204":{"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Save user's settings","tags":["Users"]}},"/api/users/file_classes":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FileClassSchema"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get current file classes used in classification","tags":["FileClass"]}},"/api/users/file_classes/{file_class_name}":{"delete":{"parameters":[{"in":"path","name":"file_class_name","required":true,"schema":{"type":"string"}},{"in":"path","name":"user_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FileClassSchema"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Remove a FileClass from Classification for a User","tags":["FileClass"]},"post":{"parameters":[{"in":"path","name":"file_class_name","required":true,"schema":{"type":"string"}},{"in":"path","name":"user_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FileClassSchema"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]}],"summary":"Add a FileClass to Classify for a User","tags":["FileClass"]}},"/api/users/{user_id}/workflow_owners":{"put":{"parameters":[{"description":"The ID of the user whose workflow owners to update","in":"path","name":"user_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"group_slack_name":{"items":{"type":"string"},"type":"array"},"user_email":{"items":{"format":"email","type":"string"},"type":"array"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"owners":{"properties":{"group_slack_name":{"items":{"type":"string"},"type":"array"},"user_email":{"items":{"format":"email","type":"string"},"type":"array"}},"type":"object"}},"type":"object"}}},"description":"Workflow owners updated successfully"},"404":{"description":"User not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Update workflow owners for a user (admin only)","tags":["Users"],"x-hidden":true}},"/api/watermarks/logo":{"get":{"description":"Retrieve the logo file for the current user as raw bytes.","responses":{"200":{"content":{"image/*":{"schema":{"format":"binary","type":"string"}}},"description":"Logo file retrieved successfully"},"401":{"description":"Unauthorized"},"404":{"description":"Logo not found for user"}},"summary":"Retrieve user logo","tags":["Watermarks"]},"post":{"description":"Upload a logo file for the current user. The file is validated for security and stored in GCS.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLogoUploadSchema"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLogoFileSchema"}}},"description":"Logo uploaded successfully"},"400":{"description":"Invalid file format or content"},"401":{"description":"Unauthorized"},"413":{"description":"File too large"}},"summary":"Upload user logo","tags":["Watermarks"]}},"/api/webhooks":{"get":{"description":"Get webhook\n","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"webhooks":{"items":{"$ref":"#/components/schemas/WebhookSchema"},"type":"array"}},"type":"object"}}},"description":"Ok"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get webhooks","tags":["Webhooks"]},"post":{"description":"Create a webhook\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSchema"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"webhook":{"$ref":"#/components/schemas/WebhookSchema"}},"type":"object"}}},"description":"Created"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create a webhook","tags":["Webhooks"]}},"/api/webhooks/topics":{"get":{"description":"Get webhook topics\n","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"topics":{"items":{"type":"string"},"type":"array"}},"type":"object"}}},"description":"Ok"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get webhook topics","tags":["Webhooks"]}},"/api/webhooks/{heron_id}":{"delete":{"description":"Delete a webhook by its heron_id. The webhook must belong to the authenticated user.\n","parameters":[{"description":"The heron_id of the webhook to delete","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"content":{"application/json":{"schema":{"properties":{"heron_id":{"description":"The heron_id of the deleted webhook","type":"string"}},"type":"object"}}},"description":"Webhook successfully deleted"},"404":{"content":{"application/json":{"schema":{"properties":{"description":{"example":"webhook with heron_id {heron_id} not found","type":"string"}},"type":"object"}}},"description":"Webhook not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Delete a webhook","tags":["Webhooks"]},"put":{"description":"Update a webhook\n","parameters":[{"in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdateSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"webhook":{"$ref":"#/components/schemas/WebhookSchema"}},"type":"object"}}},"description":"Ok"}},"security":[{"ApiKeyAuth":[]}],"summary":"Update a webhook","tags":["Webhooks"]}},"/api/workflow/executions/status/{workflow_execution_heron_id}":{"get":{"description":"Retrieve all WorkflowNodeExecution records for a given WorkflowExecution heron_id","parameters":[{"description":"The heron ID of the workflow execution","in":"path","name":"workflow_execution_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowExecutionStatusSchema"}}},"description":"Workflow execution status"},"404":{"description":"Workflow execution not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get the status of a workflow execution (admin only)","tags":["Workflows"],"x-hidden":true}},"/api/workflow/node/execute":{"post":{"description":"Execute an individual node from a workflow definition for debugging/testing purposes.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SingleNodeExecuteRequestSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SingleNodeExecuteResponseSchema"}}},"description":"Single node execution started"},"400":{"description":"Invalid request or missing node input references"},"404":{"description":"Workflow, end user, or node not found"}},"security":[{"HeronAdminAuth":[]}],"summary":"Execute a single workflow node in isolation","tags":["Workflows"],"x-hidden":true}},"/api/workflow/node/executions/{workflow_execution_heron_id}":{"get":{"description":"Returns the current status and result (if available) of a single node execution.","parameters":[{"description":"The heron ID of the workflow execution","in":"path","name":"workflow_execution_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Single node execution status"},"404":{"description":"Workflow execution not found or not a single-node execution"}},"security":[{"HeronAdminAuth":[]}],"summary":"Get single node execution status and result","tags":["Workflows"],"x-hidden":true}},"/api/workflow/nodes":{"get":{"description":"Get metadata for all nodes that can be used in JSONWorkflows. Requires workflow_heron_id to get user-specific schemas.","parameters":[{"description":"The heron ID of a workflow to customize node schemas for that workflow's user","in":"query","name":"workflow_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/NodeMetadataSchema"},"type":"array"}}},"description":"List of available nodes with their metadata"},"400":{"description":"Missing workflow_heron_id parameter"},"404":{"description":"Workflow not found"}},"summary":"List all available workflow nodes","tags":["Workflows"],"x-hidden":true}},"/api/workflow/start":{"post":{"description":"Start a workflow by heron_id for an end user, or start the default workflow if no workflow_heron_id provided","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowStartRequestSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowStartResponseSchema"}}},"description":"Workflow started successfully"},"404":{"description":"End user or workflow not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Start a workflow for an end user","tags":["Workflows"],"x-hidden":true}},"/api/workflow/start_by_name":{"post":{"description":"Start a workflow by name for an end user","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowStartByNameRequestSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowStartResponseSchema"}}},"description":"Workflow started successfully"},"404":{"description":"End user or workflow not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Start a workflow by name for an end user","tags":["Workflows"]}},"/api/workflow/user/workflows":{"get":{"description":"Returns all workflows belonging to the authenticated user.","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserWorkflowSchema"},"type":"array"}}},"description":"List of workflows"}},"security":[{"ApiKeyAuth":[]}],"summary":"List workflows for the current user","tags":["Workflows"]}},"/api/workflow/users/{user_id}/workflows":{"get":{"parameters":[{"description":"The ID of the user","in":"path","name":"user_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WorkflowSchema"},"type":"array"}}},"description":"List of user workflows"},"404":{"description":"User not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"List all workflows for a user (admin only)","tags":["Workflows"],"x-hidden":true},"post":{"parameters":[{"description":"The ID of the user","in":"path","name":"user_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCreateSchema"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowSchema"}}},"description":"Workflow created successfully"},"400":{"description":"Invalid workflow data"},"404":{"description":"User not found"},"409":{"description":"Workflow with this name already exists"}},"security":[{"ApiKeyAuth":[]}],"summary":"Create a new workflow for a user (admin only)","tags":["Workflows"],"x-hidden":true}},"/api/workflow/users/{user_id}/workflows/{workflow_heron_id}":{"get":{"parameters":[{"description":"The ID of the user","in":"path","name":"user_id","required":true,"schema":{"type":"integer"}},{"description":"The heron ID of the workflow","in":"path","name":"workflow_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowSchema"}}},"description":"Workflow found"},"404":{"description":"User or workflow not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get a specific workflow for a user (admin only)","tags":["Workflows"],"x-hidden":true}},"/api/workflow/workflows":{"get":{"description":"Get all workflows ordered by most recently edited (based on latest version's last_updated)","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WorkflowSummarySchema"},"type":"array"}}},"description":"List of all workflows"}},"security":[{"ApiKeyAuth":[]}],"summary":"List all workflows across all users (admin only)","tags":["Workflows"],"x-hidden":true}},"/api/workflow/{heron_id}":{"delete":{"parameters":[{"description":"The heron ID of the workflow","in":"path","name":"heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowSchema"}}},"description":"Workflow deleted successfully"},"404":{"description":"Workflow not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Delete a workflow by heron ID (admin only)","tags":["Workflows"],"x-hidden":true}},"/api/workflow/{workflow_heron_id}":{"get":{"parameters":[{"description":"The heron ID of the workflow","in":"path","name":"workflow_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowSchema"}}},"description":"Workflow found"},"404":{"description":"Workflow not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get a workflow by heron ID (admin only)","tags":["Workflows"],"x-hidden":true},"patch":{"parameters":[{"description":"The heron ID of the workflow","in":"path","name":"workflow_heron_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowUpdateSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowSchema"}}},"description":"Workflow updated successfully"},"400":{"description":"Invalid workflow data"},"404":{"description":"Workflow not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Update a workflow by heron ID (admin only)","tags":["Workflows"],"x-hidden":true}},"/api/workflow/{workflow_heron_id}/executions":{"get":{"description":"Retrieve all WorkflowExecution records for a given workflow heron_id, ordered by most recent","parameters":[{"description":"The heron ID of the workflow (e.g., wfl_ZpWkCHwGAKkE7By2gdo5re)","in":"path","name":"workflow_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WorkflowExecutionSchema"},"type":"array"}}},"description":"List of workflow executions"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get recent workflow executions for a workflow (admin only)","tags":["Workflows"],"x-hidden":true}},"/api/workflow/{workflow_heron_id}/executions/end_user/{end_user_heron_id}":{"get":{"description":"Retrieve all WorkflowNodeExecution records for a given WorkflowExecution heron_id","parameters":[{"description":"The heron ID of the end user","in":"path","name":"end_user_heron_id","required":true,"schema":{"type":"string"}},{"description":"The heron ID of the workflow","in":"path","name":"workflow_heron_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WorkflowExecutionSchema"},"type":"array"}}},"description":"Workflow execution status"},"404":{"description":"End user not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get the status of a workflow execution (admin only)","tags":["Workflows"],"x-hidden":true}},"/api/workflow/{workflow_heron_id}/node/{node_id}/executions":{"get":{"description":"Returns all single-node executions for a given node_id within a workflow.","parameters":[{"description":"The heron ID of the workflow","in":"path","name":"workflow_heron_id","required":true,"schema":{"type":"string"}},{"description":"The node ID within the workflow definition","in":"path","name":"node_id","required":true,"schema":{"type":"string"}},{"description":"Optional heron ID of the end user to filter by","in":"query","name":"end_user_heron_id","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SingleNodeExecutionListItemSchema"},"type":"array"}}},"description":"List of single-node executions"},"404":{"description":"Workflow not found"}},"security":[{"HeronAdminAuth":[]}],"summary":"List all single-node executions for a node","tags":["Workflows"],"x-hidden":true}},"/api/workflow/{workflow_heron_id}/versions/{version_number}":{"delete":{"description":"Deletes the specified version. The version must be a draft and the latest version.","parameters":[{"description":"The heron ID of the workflow","in":"path","name":"workflow_heron_id","required":true,"schema":{"type":"string"}},{"description":"The version number to delete","in":"path","name":"version_number","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Version deleted successfully"},"400":{"description":"Version is not a draft or not the latest version"},"404":{"description":"Workflow or version not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Delete a draft workflow version by heron ID (admin only)","tags":["Workflows"],"x-hidden":true},"get":{"description":"Get full details for a specific version of a workflow, including definition and display config","parameters":[{"description":"The heron ID of the workflow","in":"path","name":"workflow_heron_id","required":true,"schema":{"type":"string"}},{"description":"The version number to retrieve","in":"path","name":"version_number","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVersionSchema"}}},"description":"Workflow version details"},"404":{"description":"Workflow or version not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get workflow version details (admin only)","tags":["Workflows"],"x-hidden":true},"patch":{"description":"Update fields on an existing draft version. Only non-null fields are updated.","parameters":[{"description":"The heron ID of the workflow","in":"path","name":"workflow_heron_id","required":true,"schema":{"type":"string"}},{"description":"The version number to update","in":"path","name":"version_number","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowUpdateVersionSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVersionSchema"}}},"description":"Draft version updated successfully"},"400":{"description":"Invalid request"},"404":{"description":"Workflow or version not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Update a draft workflow version in-place (admin only)","tags":["Workflows"],"x-hidden":true}},"/api/workflow/{workflow_heron_id}/versions/{version_number}/approve":{"post":{"parameters":[{"description":"The heron ID of the workflow","in":"path","name":"workflow_heron_id","required":true,"schema":{"type":"string"}},{"description":"The version number to approve","in":"path","name":"version_number","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowApproveSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVersionSchema"}}},"description":"Workflow version approved"},"400":{"description":"Invalid request"},"404":{"description":"Workflow or in-review version not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Approve a workflow version in review (admin only)","tags":["Workflows"],"x-hidden":true}},"/api/workflow/{workflow_heron_id}/versions/{version_number}/copy_to_draft":{"post":{"description":"Create a new draft version by copying workflow_definition and display_config from the specified version.","parameters":[{"description":"The heron ID of the workflow","in":"path","name":"workflow_heron_id","required":true,"schema":{"type":"string"}},{"description":"The version number to copy from","in":"path","name":"version_number","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCopyToDraftSchema"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVersionSchema"}}},"description":"New draft version created successfully"},"400":{"description":"Invalid request"},"404":{"description":"Workflow or version not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Copy a version to a new draft (admin only)","tags":["Workflows"],"x-hidden":true}},"/api/workflow/{workflow_heron_id}/versions/{version_number}/publish":{"post":{"parameters":[{"description":"The heron ID of the workflow","in":"path","name":"workflow_heron_id","required":true,"schema":{"type":"string"}},{"description":"The version number to publish","in":"path","name":"version_number","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowPublishSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVersionSchema"}}},"description":"Workflow version published"},"400":{"description":"Invalid request"},"404":{"description":"Workflow or draft version not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Publish a workflow draft directly (admin only)","tags":["Workflows"],"x-hidden":true}},"/api/workflow/{workflow_heron_id}/versions/{version_number}/submit_for_review":{"post":{"parameters":[{"description":"The heron ID of the workflow","in":"path","name":"workflow_heron_id","required":true,"schema":{"type":"string"}},{"description":"The version number to submit for review","in":"path","name":"version_number","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowSubmitForReviewSchema"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVersionSchema"}}},"description":"Workflow version submitted for review"},"400":{"description":"Invalid request"},"404":{"description":"Workflow or draft version not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Submit a workflow draft for review (admin only)","tags":["Workflows"],"x-hidden":true}},"/api/workflow/{workflow_heron_id}/versions/{version_number}/withdraw":{"post":{"parameters":[{"description":"The heron ID of the workflow","in":"path","name":"workflow_heron_id","required":true,"schema":{"type":"string"}},{"description":"The version number to withdraw","in":"path","name":"version_number","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVersionSchema"}}},"description":"Workflow version withdrawn to draft"},"400":{"description":"Invalid request"},"404":{"description":"Workflow or in-review version not found"}},"security":[{"ApiKeyAuth":[]}],"summary":"Withdraw a workflow version from review (admin only)","tags":["Workflows"],"x-hidden":true}}},"security":[{"ApiKeyAuth":["key_XXX"]}],"servers":[{"description":"Production","url":"https://app.herondata.io"}]}
