Gets insights data in Cashflow Report
POST /cashflow_report/insights/get
The /cashflow_report/insights/get endpoint retrieves insights data associated with an item. Insights are only calculated on credit and depository accounts.
Request Body
Required
CashflowReportInsightsGetRequest defines the request schema for /cashflow_report/insights/get
Parameters
client_id
Your Plaid API
client_id. The client_id is required and may be provided either in the PLAID-CLIENT-ID header or as part of a request body.
access_token
The access token associated with the Item data is being requested for.
secret
Your Plaid API
secret. The secret is required and may be provided either in the PLAID-SECRET header or as part of a request body.
Response
CashflowReportInsightsGetResponse defines the response schema for /cashflow_report/insights/get
Response Properties
item
Metadata about the Item.
item_id
The Plaid Item ID. The
item_id is always unique; linking the same account at the same institution twice will result in two Items with different item_id values. Like all Plaid identifiers, the item_id is case-sensitive.
institution_id
The Plaid Institution ID associated with the Item. Field is
null for Items created without an institution connection, such as Items created via Same Day Micro-deposits.
institution_name
The name of the institution associated with the Item. Field is
null for Items created without an institution connection, such as Items created via Same Day Micro-deposits.
webhook
The URL registered to receive webhooks for the Item.
auth_method
The method used to populate Auth data for the Item. This field is only populated for Items that have had Auth numbers data set on at least one of its accounts, and will be
null otherwise. For info about the various flows, see our Auth coverage documentation.
INSTANT_AUTH: The Item’s Auth data was provided directly by the user’s institution connection.
INSTANT_MATCH: The Item’s Auth data was provided via the Instant Match fallback flow.
AUTOMATED_MICRODEPOSITS: The Item’s Auth data was provided via the Automated Micro-deposits flow.
SAME_DAY_MICRODEPOSITS: The Item’s Auth data was provided via the Same Day Micro-deposits flow.
INSTANT_MICRODEPOSITS: The Item’s Auth data was provided via the Instant Micro-deposits flow.
DATABASE_MATCH: The Item’s Auth data was provided via the Database Match flow.
DATABASE_INSIGHTS: The Item’s Auth data was provided via the Database Insights flow.
TRANSFER_MIGRATED: The Item’s Auth data was provided via /transfer/migrate_account.
INVESTMENTS_FALLBACK: The Item’s Auth data for Investments Move was provided via a fallback flow.
error
Errors are identified by
error_code and categorized by error_type. Use these in preference to HTTP status codes to identify and handle specific errors. HTTP status codes are set and provide the broadest categorization of errors: 4xx codes are for developer- or user-related errors, and 5xx codes are for Plaid-related errors, and the status will be 2xx in non-error cases. An Item with a non-null error object will only be part of an API response when calling /item/get to view Item status. Otherwise, error fields will be null if no error has occurred; if an error has occurred, an error code will be returned instead.
error_type
A broad categorization of the error. Safe for programmatic use.
error_code
The particular error code. Safe for programmatic use.
error_code_reason
The specific reason for the error code. Currently, reasons are only supported OAuth-based item errors;
null will be returned otherwise. Safe for programmatic use.
Possible values:
OAUTH_INVALID_TOKEN: The user’s OAuth connection to this institution has been invalidated.
OAUTH_CONSENT_EXPIRED: The user’s access consent for this OAuth connection to this institution has expired.
OAUTH_USER_REVOKED: The user’s OAuth connection to this institution is invalid because the user revoked their connection.
error_message
A developer-friendly representation of the error code. This may change over time and is not safe for programmatic use.
display_message
A user-friendly representation of the error code.
null if the error is not related to user action.
This may change over time and is not safe for programmatic use.
request_id
A unique ID identifying the request, to be used for troubleshooting purposes. This field will be omitted in errors provided by webhooks.
causes
In this product, a request can pertain to more than one Item. If an error is returned for such a request,
causes will return an array of errors containing a breakdown of these errors on the individual Item level, if any can be identified.
causes will be provided for the error_type ASSET_REPORT_ERROR or CHECK_REPORT_ERROR. causes will also not be populated inside an error nested within a warning object.
status
The HTTP status code associated with the error. This will only be returned in the response body when the error information is provided via a webhook.
documentation_url
The URL of a Plaid documentation page with more information about the error
suggested_action
Suggested steps for resolving the error
available_products
A list of products available for the Item that have not yet been accessed. The contents of this array will be mutually exclusive with
billed_products.
billed_products
A list of products that have been billed for the Item. The contents of this array will be mutually exclusive with
available_products. Note - billed_products is populated in all environments but only requests in Production are billed. Also note that products that are billed on a pay-per-call basis rather than a pay-per-Item basis, such as balance, will not appear here.
products
A list of products added to the Item. In almost all cases, this will be the same as the
billed_products field. For some products, it is possible for the product to be added to an Item but not yet billed (e.g. Assets, before /asset_report/create has been called, or Auth or Identity when added as Optional Products but before their endpoints have been called), in which case the product may appear in products but not in billed_products.
consented_products
A list of products that the user has consented to for the Item via Data Transparency Messaging. This will consist of all products where both of the following are true: the user has consented to the required data scopes for that product and you have Production access for that product.
consent_expiration_time
The date and time at which the Item’s access consent will expire, in ISO 8601 format. If the Item does not have consent expiration scheduled, this field will be
null. Currently, only institutions in Europe and a small number of institutions in the US have expiring consent. For a list of US institutions that currently expire consent, see the OAuth Guide.
update_type
Indicates whether an Item requires user interaction to be updated, which can be the case for Items with some forms of two-factor authentication.
background - Item can be updated in the background
user_present_required - Item requires user interaction to be updated
accounts
An array containing the
accounts associated with the Item for which transactions are being returned. Each transaction can be mapped to its corresponding account via the account_id field.
account_insights
Insights on the account level. These are only returned for Credit and Depository type accounts.
historical_balances
Calculated data about the historical balances on the account.
date
The date of the calculated historical balance, in an ISO 8601 format (YYYY-MM-DD)
amount
The total amount of funds in the account, calculated from the
current balance in the balance object by subtracting inflows and adding back outflows according to the posted date of each transaction.
If the account has any pending transactions, historical balance amounts on or after the date of the earliest pending transaction may differ if retrieved in subsequent Asset Reports as a result of those pending transactions posting.
iso_currency_code
The ISO-4217 currency code of the balance. Always
null if unofficial_currency_code is non-null.
unofficial_currency_code
The unofficial currency code associated with the balance. Always
null if iso_currency_code is non-null.
See the currency code schema for a full listing of supported unofficial_currency_codes.
monthly_summaries
Monthly summary statistics derived from transaction-level data.
start_date
The start date of the period covered in this monthly summary.
This date will be the first day of the month, unless the month being covered is a partial month because it is the first month included in the summary and the date range being requested does not begin with the first day of the month.
The date will be returned in an ISO 8601 format (YYYY-MM-DD).
end_date
The end date of the period included in this monthly summary.
This date will be the last day of the month, unless the month being covered is a partial month because it is the last month included in the summary and the date range being requested does not end with the last day of the month.
The date will be returned in an ISO 8601 format (YYYY-MM-DD).
starting_balance
The starting balance of the month. This will be the same as the ending balance of the previous month. This field will not be available for the first monthly summary.
amount
Value of amount with up to 2 decimal places.
iso_currency_code
The ISO-4217 currency code of the amount. Always
null if unofficial_currency_code is non-null
unofficial_currency_code
The unofficial currency code of the amount. Always
null if iso_currency_code is non-null. Unofficial currency codes are used for currencies that do not have official ISO currency codes, such as cryptocurrencies and the currencies of certain countries.
ending_balance
The ending balance of the month. This will be the same as the starting balance of the next month. This field will not be available for the last monthly summary.
amount
Value of amount with up to 2 decimal places.
iso_currency_code
The ISO-4217 currency code of the amount. Always
null if unofficial_currency_code is non-null
unofficial_currency_code
The unofficial currency code of the amount. Always
null if iso_currency_code is non-null. Unofficial currency codes are used for currencies that do not have official ISO currency codes, such as cryptocurrencies and the currencies of certain countries.
average_daily_ending_balance
Calendar-day average of the ending balance.
amount
Value of amount with up to 2 decimal places.
iso_currency_code
The ISO-4217 currency code of the amount. Always
null if unofficial_currency_code is non-null
unofficial_currency_code
The unofficial currency code of the amount. Always
null if iso_currency_code is non-null. Unofficial currency codes are used for currencies that do not have official ISO currency codes, such as cryptocurrencies and the currencies of certain countries.
average_daily_inflow_amount
The average daily sum of inflow transactions, calculated over the month. Always represented as a positive monetary amount.
amount
Value of amount with up to 2 decimal places.
iso_currency_code
The ISO-4217 currency code of the amount. Always
null if unofficial_currency_code is non-null
unofficial_currency_code
The unofficial currency code of the amount. Always
null if iso_currency_code is non-null. Unofficial currency codes are used for currencies that do not have official ISO currency codes, such as cryptocurrencies and the currencies of certain countries.
average_daily_outflow_amount
The average daily sum of outflow transactions, calculated over the month. Always represented as a positive monetary amount.
amount
Value of amount with up to 2 decimal places.
iso_currency_code
The ISO-4217 currency code of the amount. Always
null if unofficial_currency_code is non-null
unofficial_currency_code
The unofficial currency code of the amount. Always
null if iso_currency_code is non-null. Unofficial currency codes are used for currencies that do not have official ISO currency codes, such as cryptocurrencies and the currencies of certain countries.
average_daily_net_cashflow_amount
The average daily net cash flow amount, calculated as total daily inflows less total daily outflows.
amount
Value of amount with up to 2 decimal places.
iso_currency_code
The ISO-4217 currency code of the amount. Always
null if unofficial_currency_code is non-null
unofficial_currency_code
The unofficial currency code of the amount. Always
null if iso_currency_code is non-null. Unofficial currency codes are used for currencies that do not have official ISO currency codes, such as cryptocurrencies and the currencies of certain countries.
average_daily_inflow_transaction_count
The average count of the number of daily inflow transactions. Rounded to 2 decimal places.
average_daily_outflow_transaction_count
The average count of the number of daily outflow transactions. Rounded to 2 decimal places.
total_revenue
The total amount of all revenue transactions during this month.
amount
Value of amount with up to 2 decimal places.
iso_currency_code
The ISO-4217 currency code of the amount. Always
null if unofficial_currency_code is non-null
unofficial_currency_code
The unofficial currency code of the amount. Always
null if iso_currency_code is non-null. Unofficial currency codes are used for currencies that do not have official ISO currency codes, such as cryptocurrencies and the currencies of certain countries.
total_loan_payment
The total amount of all loan payment transactions during this month.
amount
Value of amount with up to 2 decimal places.
iso_currency_code
The ISO-4217 currency code of the amount. Always
null if unofficial_currency_code is non-null
unofficial_currency_code
The unofficial currency code of the amount. Always
null if iso_currency_code is non-null. Unofficial currency codes are used for currencies that do not have official ISO currency codes, such as cryptocurrencies and the currencies of certain countries.
total_variable_expense
The total amount of all variable expense transactions during this month.
amount
Value of amount with up to 2 decimal places.
iso_currency_code
The ISO-4217 currency code of the amount. Always
null if unofficial_currency_code is non-null
unofficial_currency_code
The unofficial currency code of the amount. Always
null if iso_currency_code is non-null. Unofficial currency codes are used for currencies that do not have official ISO currency codes, such as cryptocurrencies and the currencies of certain countries.
total_payroll
The total amount of all payroll transactions during this month.
amount
Value of amount with up to 2 decimal places.
iso_currency_code
The ISO-4217 currency code of the amount. Always
null if unofficial_currency_code is non-null
unofficial_currency_code
The unofficial currency code of the amount. Always
null if iso_currency_code is non-null. Unofficial currency codes are used for currencies that do not have official ISO currency codes, such as cryptocurrencies and the currencies of certain countries.
nsf_transaction_count
The total number of all NSF transactions during this month.
overdraft_transaction_count
The total number of all overdraft transactions during this month.
negative_ending_balance_day_count
The number of days with a negative daily average ending balance. The daily average is calculated across all valid accounts. Values will be in the range [0, 31].
last_generated_time
Datetime of last cashflow report generation in ISO 8601 format (
YYYY-MM-DDTHH:mm:ssZ )
request_id
A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.