Book summary
This API retrieves the Cash Flow Analytics summary of a Book in JSON format. It provides daily balances, bank account PII, and time series for all transaction categories at the <glossary:Book> and bank account level.
It offers quicker analytics generation, more granular and accurate transaction categories (including improved revenue and expense calculations), and a more concise structure.
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.
Request
- Base URLhttps://api.ocrolus.com
- URLhttps://api.ocrolus.com/v2/book/{book_uuid}/summary
- AuthOAuth 2Client credentialsToken URL: https://auth.ocrolus.com/oauth/token
Path parameters
The unique identifier of the <glossary:Book> that contains the bank statements you'd like to have analyzed.
Query parameters
Bank account primary key(s) to exclude from analytics calculations in the book summary. The underlying data remains in the system and is not deleted.
📘 This parameter is in beta. If you encounter any bug, please reach out to support@ocrolus.com.
Months (in YYYY-MM format) of transaction to exclude from analytics calculations in the book summary. The underlying data remains in the system and is not deleted.
📘 This parameter is in beta. If you encounter any bug, please reach out to support@ocrolus.com.
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
A unique numerical identifier for a <glossary:Book>, commonly referred to as the Book primary key (Book pk).
The name of the Book used for the analytics calculation.
The number of transactions considered for analytics calculation.
A 4-digit North American Industry Classification System (NAICS) code that represents the industry of the Book.
The description of the 4-digit NAICS code, indicating the industry classification of the Book category.
📘 In Books with multiple businesses or fragmented merchant activity, the widget may show the following statuses as applicable:
- Pending - Industry Data: Classification is in progress.
- Unable to find a unique SMB merchant: The system is not able to find a unique merchant mapped to the documents in the Book.
- Not Available: The system has found a unique merchant, but this merchant does not have industry classification data.
A six-digit NAICS code that provides a more granular industry classification for the merchant. This code refines the broader NAICS category and is commonly used for detailed industry analysis, peer comparisons, and benchmarking.
A human-readable description of the six-digit NAICS code that specifies the merchant's exact industry segment within the broader NAICS classification.
Shows if the 4-digit NAICS code was overridden by the lender.
A four-digit code assigned by payment networks that classifies a merchant based on the primary type of goods or services they provide. Merchant Category Code (MCC) are commonly derived from card transaction data and are used for transaction categorization, risk assessment, and analytics.
❗️ This field is deprecated. Always returns 999999
A human-readable description of the MCC that explains the merchant's primary business activity as defined by the card network.
❗️ > This field is deprecated.
A four-digit Standard Industrial Classification (SIC) code that identifies the merchant's primary business activity using the legacy SIC system. SIC codes are derived from bank statement data and are used for industry classification, regulatory reporting, and analytics.
❗️ This field is deprecated. Always returns 999999
A human-readable description of the SIC code that explains the merchant's primary business activity as defined by the legacy SIC system.
❗️ This field is deprecated.
The severity of mismatches detected in the Book, such as discrepancies between uploaded documents and extracted data. > 📘 This attribute is in beta. If you encounter any bug, please reach out to support@ocrolus.com.
Daily ending balances keyed by date. Each key is a date in YYYY-MM-DD format and the value is the ending balance for that date.
Daily cash flows keyed by date. Each key is a date in YYYY-MM-DD format and the value is the net cash flow for that date, calculated as the difference between total credits and total debits.
The average value in daily_cash_flows.
The cash flows resulting from the difference between total credits and total debits, categorized by calendar month. Each key is a month in YYYY-MM format.
The minimum daily balance grouped by calendar month. Each key is a month in YYYY-MM format.
The maximum daily balance grouped by calendar month. Each key is a month in YYYY-MM format.
The average amount in daily_balances.
The average daily balance grouped by calendar month. Each key is a month in YYYY-MM format.
The average daily balance on weekdays.
The average daily balance on weekdays grouped by calendar month. Each key is a month in YYYY-MM format.
Total number of days for which analytics is calculated.
Dates with negative ending balances grouped by calendar month. Each key is a month in YYYY-MM format and the value is an array of date strings in YYYY-MM-DD format.
Count of negative ending balances grouped by calendar month. Each key is a month in YYYY-MM format.
Dates with negative ending balances on weekdays grouped by calendar month. Each key is a month in YYYY-MM format and the value is an array of date strings in YYYY-MM-DD format.
Count of weekdays with negative ending balances grouped by calendar month. Each key is a month in YYYY-MM format.
Daily cash balance trend of 30 days. The calculation formula is ((Mean cash balance over first 15 days ) - (Mean cash balance over last 15 days) ) / standard deviation of cash balance over the period.
Daily cash balance trend of 60 days. The calculation formula is ((Mean cash balance over first 30 days ) - (Mean cash balance over last 30 days) ) / standard deviation of cash balance over the period.
Daily cash balance trend of 90 days. The calculation formula is ((Mean cash balance over first 45 days ) - (Mean cash balance over last 45 days) ) / standard deviation of cash balance over the period.
Daily cash flow trend of 30 days. The calculation formula is ((Mean cash flow over first 15 days ) - (Mean cash flow over last 15 days) ) / standard deviation of cash flow over the period.
Daily cash flow trend of 60 days. The calculation formula is ((Mean cash flow over first 30 days ) - (Mean cash flow over last 30 days) ) / standard deviation of cash flow over the period.
Daily cash flow trend of 90 days. The calculation formula is ((Mean cash flow over first 45 days ) - (Mean cash flow over last 45 days) ) / standard deviation of cash flow over the period.
The average transaction size grouped by month. Each key is the first day of the month in YYYY-MM-DD format.
The average deposit size grouped by calendar month. Each key is a month in YYYY-MM format.
Expenses grouped by calendar month. Each key is a month in YYYY-MM format. Values are negative.
Withdrawals grouped by calendar month. Each key is a month in YYYY-MM format. Values are negative.
Revenue grouped by calendar month. Each key is a month in YYYY-MM format.
Revenue deductions grouped by calendar month. Each key is a month in YYYY-MM format.
Deposits grouped by calendar month. Each key is a month in YYYY-MM format.
Outside source deposits grouped by calendar month. Each key is a month in YYYY-MM format.
Total amount of large deposits grouped by calendar month. Each key is a month in YYYY-MM format.
Debt consolidator inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Debt consolidator outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Factoring inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Factoring outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Payroll inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Payroll outflows grouped by calendar month. Each key is a month in YYYY-MM format. Values are negative.
Insurance inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Insurance outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Venmo/Zelle/Cash App inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Venmo/Zelle/Cash App outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Automated teller machine (ATM) inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Automated teller machine (ATM) outflows grouped by calendar month. Each key is a month in YYYY-MM format. Values are negative.
Toll inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Toll outflows grouped by calendar month. Each key is a month in YYYY-MM format.
PayPal inflows grouped by calendar month. Each key is a month in YYYY-MM format.
PayPal outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Equipment lease inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Equipment lease outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Check inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Check outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Transactions with four zeros inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Transactions with four zeros outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Transactions with five zeros inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Transactions with five zeros outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Recurring transactions inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Recurring transactions outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Fintech loan inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Fintech loan outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Bank loan inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Bank loan outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Other loan inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Other loan outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Fintech MCA (Merchant Cash Advance) inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Fintech MCA (Merchant Cash Advance) outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Bank cash advance inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Bank cash advance outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Debit card inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Debit card outflows grouped by calendar month. Each key is a month in YYYY-MM format. Values are negative.
Credit card inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Credit card outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Merchant service inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Merchant service outflows grouped by calendar month. Each key is a month in YYYY-MM format.
SBA inflows grouped by calendar month. Each key is a month in YYYY-MM format.
SBA outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Remote inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Remote outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Benefit inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Benefit outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Card reward inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Card reward outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Crypto inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Crypto outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Gambling inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Gambling outflows grouped by calendar month. Each key is a month in YYYY-MM format. Values are negative.
Investment inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Investment outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Reversed inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Reversed outflows grouped by calendar month. Each key is a month in YYYY-MM format.
State tax inflows grouped by calendar month. Each key is a month in YYYY-MM format.
State tax outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Payroll tax inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Payroll tax outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Internal transfer inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Internal transfer outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Merchant service transfer inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Merchant service transfer outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Wire transfer inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Wire transfer outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Other transfer inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Other transfer outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Truck stop inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Truck stop outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Federal tax inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Federal tax outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Bank branch inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Bank branch outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Credit builder inflows grouped by calendar month. Each key is a month in YYYY-MM format.
Credit builder outflows grouped by calendar month. Each key is a month in YYYY-MM format.
Expense counts grouped by calendar month. Each key is a month in YYYY-MM format.
Withdrawal counts grouped by calendar month. Each key is a month in YYYY-MM format.
Revenue counts grouped by calendar month. Each key is a month in YYYY-MM format.
Deposit counts grouped by calendar month. Each key is a month in YYYY-MM format.
Non-sufficient funds (NSF) fees count grouped by calendar month. Each key is a month in YYYY-MM format.
Calculated amount for a single NSF fee. The common divisor is defined as the least common multiple (in 0.50 increments) of amount values corresponding to transactions with nsf = True. This multiple must fall between 25 and 60 (inclusive) otherwise nsf_divisor = null and no scaling occurs.
Non-sufficient funds (NSF) fee count (NOT including common divisor logic) grouped by calendar month. Each key is a month in YYYY-MM format.
Overdraft fees count grouped by calendar month. Each key is a month in YYYY-MM format.
Calculated amount for a single overdraft fee. The common divisor is defined as the least common multiple (in 0.50 increments) of amount values corresponding to transactions with overdraft = True. This multiple must fall between 25 and 60 (inclusive) otherwise overdraft_divisor = null and no scaling occurs.
Overdraft fee count (NOT including common divisor logic) grouped by calendar month. Each key is a month in YYYY-MM format.
Returned item deposit count grouped by calendar month. Each key is a month in YYYY-MM format.
Returned item withdrawal count grouped by calendar month. Each key is a month in YYYY-MM format.
Number of unique fintech loan sources detected in this Book.
Number of unique fintech MCA sources detected in this Book.
The total count of <glossary:Document>s uploaded to this <glossary:Book>.
The total count of <glossary:Document>s in this <glossary:Book> that completed verification.
Universally unique identifier (UUID) for the <glossary:Book>.
Example response
{
"business_verification_data": {
"website": "https://www.jillscoffee.com"
},
"cash_flow_at_a_glance": {
"average_deposit_count": 42,
"average_monthly_revenue": 32383.6,
"average_monthly_expense": 39418.2
}
}Changes
No recorded changes to this operation across all 1 revision of this API.