v1

latestOpenAPI 3.0.02026-07-2482421001.1 KB
Cash Flow Analytics

Enriched transactions

This API provides categorizations for each transaction in the requested <glossary:Book>. It's the building block for all the Cash Flow Analytics products. It contains a comprehensive list of categories, accurate Transaction tagging, and improved revenue, expense, and transfer logic.


Async processing

This API supports asynchronous processing. To get the asynchronous result, add async=true in the query parameter to run the request as a background job and receive a job_id immediately instead of waiting for the full response inline. When async=true, the endpoint returns 202 Accepted with a job_id instead of the analytics payload.

Async mode is required for Books with more than 100,000 transactions. Books exceeding 1,000,000 transactions are rejected with 422 (error code 1100). Once submitted, poll Async job status API to retrieve the result when the job is complete.

get/v2/book/{book_uuid}/enriched_txns

Path parameters

book_uuidstring uuid required

The unique identifier of the <glossary:Book> that you'd like to analyze.

Query parameters

offsetinteger

The starting point (number of records to skip) from the latest transaction to fetch results.

limitinteger

The maximum number of records to be fetched starting from the specified offset value.

include_pending_plaid_transactionstrue | false

Provides an option to include pending transactions in the response. When set to true, the response payload includes an additional pending_plaid_transactions field listing currently pending transactions for the Book’s Plaid-linked accounts.

Pending Plaid transactions are transactions that the financial institution has reported to Plaid but which have not yet posted to the account. For example, card authorizations that have not cleared, or ACH debits still in flight. Including them gives you early visibility into recent activity that will eventually appear in the posted transaction set.

📘 Note

  • Pending transactions are surfaced for visibility only. They are not processed through Ocrolus’s enrichment pipeline and therefore do not include tags, categories, or counterparties.
  • These transactions are excluded from all analytics outputs. Cash flow features, Book summaries, risk scores, lender analytics, and analytics exports are computed only from posted transactions.
  • Once a pending transaction posts at the financial institution, it is processed through enrichment and appears in the standard posted transaction set on the next refresh. The pending entry is then removed.
asyncboolean

When true, runs the request as a background job and returns a job_id immediately instead of the analytics payload. Required for Books with more than 100,000 transactions. Books exceeding 1,000,000 transactions are rejected with 422 (error code 1100).

Response

Success

book_uuidstring uuid

Unique identifier of the <glossary:Book>.

filtered_totalinteger

The total number of transactions retrieved after applying offset and limit.

offsetinteger

The starting index for paginated transactions result.

limitinteger

The maximum number of transactions returned per page starting from the specified offset value.

totalinteger

The total number of enriched_transactions found in this <glossary:Book>

number_of_docs_in_bookinteger

the total count of <glossary:Document>s uploaded to this <glossary:Book>

number_of_docs_processedinteger

the total count of <glossary:Document>s in this <glossary:Book> that completed verification.

analytic_constants_versionstring

The version of the constants used in analytical calculations.

Example response

{
  "filtered_total": 50,
  "offset": 1,
  "limit": 50,
  "enriched_transactions": [
    {
      "txn_date": "2021-01-09",
      "description": "CHECKCARD 0109 LIBERTY PAPER SUPPLIES",
      "bank_account_pk": 123246,
      "uploaded_doc_pk": 123246,
      "uploaded_doc_name": "december_bank_statement",
      "atm": true,
      "checks": true,
      "credit_card": true,
      "crypto": true,
      "debit_card": true,
      "debt_consolidator": true,
      "deposits": true,
      "equipment_lease": true,
      "expense": true,
      "factoring": true,
      "federal_tax": true,
      "fintech_loan": true,
      "fintech_mca": true,
      "fintech": true,
      "gambling": true,
      "insurance": true,
      "internal_transfer": true,
      "investment": true,
      "large_deposits": true,
      "merchant_service_transfer": true,
      "merchant_service": true,
      "nsf": true,
      "nsf_paid_or_negative_balance": true,
      "nsf_returned_or_not_paid": true,
      "other_loan": true,
      "other_transfer": true,
      "outside_source_deposits": true,
      "overdraft": true,
      "paypal": true,
      "payroll_tax": true,
      "payroll": true,
      "probable_recurring_txns": true,
      "remote": true,
      "returned_item": true,
      "revenue_deduction_other": true,
      "revenue_deduction": true,
      "revenue": true,
      "reversed": true,
      "sba": true,
      "state_tax": true,
      "tolls": true,
      "truck_stop": true,
      "txn_five_zeros": true,
      "txn_four_zeros": true,
      "venmo_zelle_cashapp": true,
      "wire_transfer": true,
      "withdrawals": true
    }
  ],
  "mismatched_transactions": [
    {
      "txn_pk": 123,
      "txn_date": "2024-01-01",
      "description": "TRANSFER TO CHECKING",
      "uploaded_doc_pk": 123456,
      "uploaded_doc_format": "PLAID",
      "severity": "High",
      "reason_code": "critical_category_mismatch",
      "related_txn_pk": 456,
      "tags": "fintech, fintech_loan",
      "counterparty": "Credibly"
    }
  ],
  "bank_checks": [
    {
      "uuid": "520dc1b8-3475-4da3-8fa0-f2880b9ae2c3",
      "bank_account_pk": 290879,
      "pay_to": "Fake",
      "txn_date": "01/01/2000"
    }
  ],
  "pending_plaid_transactions": [
    {
      "amount": "1714.65",
      "description": "Payment Received",
      "iso_currency_code": "USD",
      "plaid_account_id": "p9kUU7HLU5ok2R78UjqNn8vPfS1SDWdpaxpE",
      "plaid_txn_id": "mXNVUdPHn6jyFyJaCYrQoR293PaYlOmhqzwR",
      "txn_date": "2025-01-01",
      "uploaded_doc_uuid": "733bddcd-0fb4-45e7-9f8d-ccdefd021a2d"
    }
  ],
  "analytic_constants_version": "1.0.6"
}