> ## Documentation Index
> Fetch the complete documentation index at: https://entendre.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get financial insights

> Returns selected financial metrics and their formulas, including revenue, profit, expenses, spending, burn rate, runway and cash flow.



## OpenAPI

````yaml openapi-public-preview.json GET /v1/reports/financial-insights
openapi: 3.1.0
info:
  title: Entendre API
  version: 1.0.0
  description: Programmatic access to crypto-native accounting and treasury operations.
servers:
  - url: https://api.entendre.finance
    description: Production API.
security:
  - ApiKey: []
tags:
  - name: Organization
    description: Read your organization profile and find members for agent assignments.
  - name: Transactions
    description: Find transactions, inspect their details and create manual records.
  - name: Sources
    description: >-
      Manage wallets, exchange accounts, bank accounts and other transaction
      sources.
  - name: Assets
    description: Inspect asset acquisitions, remaining quantities and cost basis.
  - name: Journals
    description: >-
      Create and post journal entries, correct eligible entries and sync posted
      journals to a connected general ledger.
  - name: Documents
    description: >-
      Upload documents, check processing status and link supporting evidence to
      transactions.
  - name: Legal Entities
    description: Manage the legal entities used in your accounting records.
  - name: Ledger Accounts
    description: Manage your chart of accounts and find accounts for journal entries.
  - name: Tags
    description: Create and manage tags to classify your records.
  - name: Accruals
    description: >-
      Create and post accruals, inspect their status and reverse eligible
      entries.
  - name: Cash Application
    description: Match deposits to invoices and manage the resulting cash applications.
  - name: Classification
    description: >-
      Classify transactions in a batch, post eligible entries and inspect the
      results.
  - name: Revaluation
    description: Run asset revaluations for an accounting period and check their results.
  - name: Accounting Periods
    description: Check whether a period is ready to close, then close or reopen it.
  - name: Income Statement
    description: View revenue, expenses and net income for a reporting period.
  - name: Balance Sheet
    description: View assets, liabilities and equity as of a reporting date.
  - name: Trial Balance
    description: Review ledger account balances and debit and credit totals.
  - name: Closing Positions
    description: View asset positions at the end of a reporting period.
  - name: Treasury Balances
    description: Review treasury balances by asset and source.
  - name: Realized Gains & Losses
    description: Review realized gains and losses from asset dispositions.
  - name: Asset Tax Lots
    description: Inspect asset tax lots, remaining quantities and cost basis.
  - name: Schedule of Dispositions
    description: >-
      Review asset dispositions and their proceeds, cost basis and gains or
      losses.
  - name: Financial Insights
    description: Review financial insights for your selected reporting context.
  - name: Agents
    description: Create agents, schedule their work and inspect their runs.
  - name: Memory
    description: Read, search and maintain the memory files your agents use.
  - name: Connections
    description: Connect providers, manage authorization and disconnect.
  - name: GL Mapping
    description: >-
      Map ledger accounts and legal entities to your ERP. Import legal entities,
      tags and chart of accounts.
  - name: Request
    description: Request information, documents or connections from a client.
  - name: Client
    description: Manage your firm’s client relationships.
  - name: Team
    description: Invite team members and manage their access to your firm.
  - name: Settings
    description: Read and update your firm settings.
paths:
  /v1/reports/financial-insights:
    get:
      tags:
        - Financial Insights
      summary: Get financial insights
      description: >-
        Returns selected financial metrics and their formulas, including
        revenue, profit, expenses, spending, burn rate, runway and cash flow.
        Not paginated — this is a computed report, not a resource list; request
        only the metrics a question needs.
      operationId: get_financial_insights
      parameters:
        - name: legal_entity_id
          in: query
          required: false
          description: Legal entity ID (`le_…`). Can be combined with `legal_entity_ids`.
          schema:
            type: string
            example: le_507f1f77bcf86cd799439011
        - name: legal_entity_ids
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              description: Legal entity ID (`le_…`).
              example: le_507f1f77bcf86cd799439011
            maxItems: 100
            uniqueItems: true
          style: form
          explode: true
          description: Legal entities to include (`le_…`). Omit to include all.
        - name: account_ids
          in: query
          required: false
          description: >-
            Comma-separated fac_ financial account IDs. Ignored when
            `basis=ledger`; `meta.account_ids_ignored` is then set.
          schema:
            type: array
            items:
              type: string
          style: form
          explode: false
        - name: start_date
          in: query
          required: true
          description: Inclusive interval start.
          schema:
            type: string
            format: date-time
            example: '2026-08-31T12:00:00Z'
        - name: end_date
          in: query
          required: true
          description: Inclusive interval end; start must not exceed end.
          schema:
            type: string
            format: date-time
            example: '2026-08-31T12:00:00Z'
        - name: metrics
          in: query
          required: true
          schema:
            type: array
            items:
              type: string
              description: Metric identifier.
              enum:
                - revenue
                - profit
                - expenses
                - spending
                - burn_rate
                - runway
                - cash_flow
            minItems: 1
            maxItems: 7
          style: form
          explode: true
          description: Metrics to return.
        - name: basis
          in: query
          required: true
          description: >-
            Required. `ledger` for the posted books, or `transactions` for
            observed cash movements.
          schema:
            type: string
            enum:
              - ledger
              - transactions
        - name: granularity
          in: query
          required: false
          description: >-
            Bucket size. For `basis=ledger`, the response shows the monthly
            buckets used.
          schema:
            type: string
            enum:
              - daily
              - weekly
              - monthly
      responses:
        '200':
          description: The request succeeded.
          headers:
            X-Request-Id:
              description: Support correlation ID.
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Not paginated. Each item has its own `meta`. Burn rate and
                  runway always use monthly buckets, whatever the `granularity`.
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/FinancialInsight'
                    description: The records.
                required:
                  - data
                additionalProperties: false
              example:
                data:
                  - metric: expenses
                    value: '100.00'
                    unit: USD
                    formula: sum(expense account balances)
                    reason: null
                    details:
                      total: '100.00'
                      by_category:
                        - category: Software
                          amount: '100.00'
                      currency: USD
                      time_series:
                        - period_start: '2026-08-01T00:00:00Z'
                          period_end: '2026-08-31T23:59:59.999Z'
                          total: '100.00'
                          categories:
                            - category: Software
                              amount: '100.00'
                    meta:
                      source: gl
                      granularity: monthly
                      start_date: '2026-08-01T00:00:00Z'
                      end_date: '2026-08-31T23:59:59.999Z'
                      currency: USD
                      granularity_note: null
                      period_snapped_note: null
                      account_ids_ignored: false
                      account_ids_ignored_reason: null
                      basis: accrual
                      cash_basis_caveat: null
        '400':
          description: >-
            The request is invalid. `error.fields` lists the fields to correct.
            Nothing was changed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: VALIDATION_ERROR
                  message: Invalid path, query or request body.
                  request_id: req_example
        '401':
          description: The API key is missing, invalid or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: UNAUTHORIZED
                  message: Authentication is required.
                  request_id: req_example
        '403':
          description: >-
            The API key does not have the required scope or is not associated
            with a user, or the action needs a review in the dashboard.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: FORBIDDEN
                  message: Insufficient access to organization
                  request_id: req_example
        '404':
          description: The resource does not exist, or your organization cannot access it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: RESOURCE_NOT_FOUND
                  message: Resource not found
                  request_id: req_example
        '429':
          description: >-
            Too many requests. If the response has a `Retry-After` header, wait
            that many seconds before you retry. Otherwise, read `error.message`.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: RATE_LIMITED
                  message: Rate limit exceeded. Retry after 30s.
                  request_id: req_example
        '500':
          description: >-
            An unexpected error occurred. A write can still have taken effect;
            check the resource before you retry. Give the `request_id` to
            support.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: INTERNAL_ERROR
                  message: Internal server error
                  request_id: req_example
        '503':
          description: >-
            A service that this operation needs is unavailable. If the response
            has a `Retry-After` header, wait that many seconds. Check for
            earlier accepted work before you send the request again.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: SERVICE_UNAVAILABLE
                  message: Service unavailable.
                  request_id: req_example
components:
  schemas:
    FinancialInsight:
      oneOf:
        - type: object
          properties:
            metric:
              type: string
              const: revenue
              description: Metric name.
            value:
              type:
                - string
                - 'null'
              description: >-
                Summary decimal value; null for unavailable or inapplicable
                metrics.
            unit:
              type: string
              description: Unit of the value, such as `USD` or `months`.
            formula:
              type: string
              description: Formula and effective calculation basis.
            reason:
              type:
                - string
                - 'null'
              description: Why a value is unavailable or qualified.
            details:
              type: object
              required:
                - total
                - currency
                - time_series
              properties:
                data_quality:
                  $ref: '#/components/schemas/TransactionInsightDataQuality'
                total:
                  type: string
                  description: Total income over the window (decimal string).
                currency:
                  type: string
                  example: USD
                  description: Currency of the amounts.
                time_series:
                  type: array
                  items:
                    $ref: '#/components/schemas/V1FinancialInsightSeriesPoint'
                  description: Values for each bucket.
              description: Values of the metric.
            meta:
              $ref: '#/components/schemas/V1FinancialInsightMeta'
          required:
            - metric
            - value
            - unit
            - formula
            - reason
            - details
            - meta
          additionalProperties: false
        - type: object
          properties:
            metric:
              type: string
              const: profit
              description: Metric name.
            value:
              type:
                - string
                - 'null'
              description: >-
                Summary decimal value; null for unavailable or inapplicable
                metrics.
            unit:
              type: string
              description: Unit of the value, such as `USD` or `months`.
            formula:
              type: string
              description: Formula and effective calculation basis.
            reason:
              type:
                - string
                - 'null'
              description: Why a value is unavailable or qualified.
            details:
              type: object
              required:
                - total_revenue
                - total_expenses
                - total_profit
                - currency
                - time_series
              properties:
                data_quality:
                  $ref: '#/components/schemas/TransactionInsightDataQuality'
                total_revenue:
                  type: string
                  description: Total income (decimal string).
                total_expenses:
                  type: string
                  description: Total expenses (decimal string).
                total_profit:
                  type: string
                  description: total_revenue minus total_expenses (decimal string).
                currency:
                  type: string
                  example: USD
                  description: Currency of the amounts.
                time_series:
                  type: array
                  items:
                    type: object
                    required:
                      - period_start
                      - period_end
                      - revenue
                      - expenses
                      - profit
                    properties:
                      period_start:
                        type: string
                        format: date-time
                        description: Start of the bucket.
                      period_end:
                        type: string
                        format: date-time
                        description: End of the bucket.
                      revenue:
                        type: string
                        description: Revenue in the bucket (decimal string).
                      expenses:
                        type: string
                        description: Expenses in the bucket (decimal string).
                      profit:
                        type: string
                        description: Revenue minus expenses in the bucket (decimal string).
                  description: Values for each bucket.
              description: Values of the metric.
            meta:
              $ref: '#/components/schemas/V1FinancialInsightMeta'
          required:
            - metric
            - value
            - unit
            - formula
            - reason
            - details
            - meta
          additionalProperties: false
        - type: object
          properties:
            metric:
              type: string
              const: expenses
              description: Metric name.
            value:
              type:
                - string
                - 'null'
              description: >-
                Summary decimal value; null for unavailable or inapplicable
                metrics.
            unit:
              type: string
              description: Unit of the value, such as `USD` or `months`.
            formula:
              type: string
              description: Formula and effective calculation basis.
            reason:
              type:
                - string
                - 'null'
              description: Why a value is unavailable or qualified.
            details:
              type: object
              required:
                - total
                - by_category
                - currency
                - time_series
              properties:
                data_quality:
                  $ref: '#/components/schemas/TransactionInsightDataQuality'
                total:
                  type: string
                  description: Total expenses over the window (decimal string).
                by_category:
                  type: array
                  items:
                    $ref: '#/components/schemas/V1FinancialInsightCategoryAmount'
                  description: Totals by category.
                currency:
                  type: string
                  example: USD
                  description: Currency of the amounts.
                time_series:
                  type: array
                  items:
                    type: object
                    required:
                      - period_start
                      - period_end
                      - total
                      - categories
                    properties:
                      period_start:
                        type: string
                        format: date-time
                        description: Start of the bucket.
                      period_end:
                        type: string
                        format: date-time
                        description: End of the bucket.
                      total:
                        type: string
                        description: Total in the bucket (decimal string).
                      categories:
                        type: array
                        items:
                          $ref: >-
                            #/components/schemas/V1FinancialInsightCategoryAmount
                        description: Totals by category in the bucket.
                  description: Values for each bucket.
              description: Values of the metric.
            meta:
              $ref: '#/components/schemas/V1FinancialInsightMeta'
          required:
            - metric
            - value
            - unit
            - formula
            - reason
            - details
            - meta
          additionalProperties: false
        - type: object
          properties:
            metric:
              type: string
              const: spending
              description: Metric name.
            value:
              type:
                - string
                - 'null'
              description: >-
                Summary decimal value; null for unavailable or inapplicable
                metrics.
            unit:
              type: string
              description: Unit of the value, such as `USD` or `months`.
            formula:
              type: string
              description: Formula and effective calculation basis.
            reason:
              type:
                - string
                - 'null'
              description: Why a value is unavailable or qualified.
            details:
              type: object
              required:
                - total
                - by_source_type
                - by_classification
                - currency
                - time_series
              properties:
                data_quality:
                  $ref: '#/components/schemas/TransactionInsightDataQuality'
                total:
                  type: string
                  description: Total spending over the window (decimal string).
                by_source_type:
                  type: array
                  items:
                    $ref: '#/components/schemas/V1FinancialInsightSpendingEntry'
                  description: Totals by source type.
                by_classification:
                  type: array
                  items:
                    $ref: '#/components/schemas/V1FinancialInsightSpendingEntry'
                  description: Totals by transaction type.
                currency:
                  type: string
                  example: USD
                  description: Currency of the amounts.
                time_series:
                  type: array
                  items:
                    type: object
                    required:
                      - period_start
                      - period_end
                      - total
                      - by_source_type
                      - by_classification
                    properties:
                      period_start:
                        type: string
                        format: date-time
                        description: Start of the bucket.
                      period_end:
                        type: string
                        format: date-time
                        description: End of the bucket.
                      total:
                        type: string
                        description: Total in the bucket (decimal string).
                      by_source_type:
                        type: array
                        items:
                          $ref: '#/components/schemas/V1FinancialInsightSpendingEntry'
                        description: Totals by source type in the bucket.
                      by_classification:
                        type: array
                        items:
                          $ref: '#/components/schemas/V1FinancialInsightSpendingEntry'
                        description: Totals by transaction type in the bucket.
                  description: Values for each bucket.
              description: Values of the metric.
            meta:
              $ref: '#/components/schemas/V1FinancialInsightMeta'
          required:
            - metric
            - value
            - unit
            - formula
            - reason
            - details
            - meta
          additionalProperties: false
        - type: object
          properties:
            metric:
              type: string
              const: burn_rate
              description: Metric name.
            value:
              type:
                - string
                - 'null'
              description: >-
                Summary decimal value; null for unavailable or inapplicable
                metrics.
            unit:
              type: string
              description: Unit of the value, such as `USD` or `months`.
            formula:
              type: string
              description: Formula and effective calculation basis.
            reason:
              type:
                - string
                - 'null'
              description: Why a value is unavailable or qualified.
            details:
              type: object
              required:
                - average_monthly_burn
                - cash_flow_positive
                - total_expenses
                - total_income
                - months_analyzed
                - currency
                - trend
                - no_data
              properties:
                data_quality:
                  $ref: '#/components/schemas/TransactionInsightDataQuality'
                average_monthly_burn:
                  type: string
                  description: >-
                    Net burn (total outflows minus inflows) divided by months in
                    the window (decimal string). Negative when the organization
                    is net cash-flow positive.
                cash_flow_positive:
                  type: boolean
                  description: >-
                    True when net burn is <= 0 (inflows cover outflows over the
                    window).
                total_expenses:
                  type: string
                  description: Total expenses (outflows) over the window (decimal string).
                total_income:
                  type: string
                  description: Total income (inflows) over the window (decimal string).
                months_analyzed:
                  type: integer
                  description: >-
                    Number of whole months in the window. Normally >= 1; 0 only
                    when basis=ledger and the window overlaps no accounting
                    period (see no_data).
                currency:
                  type: string
                  example: USD
                  description: Currency of the amounts.
                trend:
                  type: array
                  description: >-
                    Per-bucket net burn (outflows minus inflows) as
                    single-amount series points.
                  items:
                    $ref: '#/components/schemas/V1FinancialInsightSeriesPoint'
                no_data:
                  type: boolean
                  description: >-
                    `true` when `basis=ledger` and the window has no accounting
                    periods.
              description: Values of the metric.
            meta:
              $ref: '#/components/schemas/V1FinancialInsightMeta'
          required:
            - metric
            - value
            - unit
            - formula
            - reason
            - details
            - meta
          additionalProperties: false
        - type: object
          properties:
            metric:
              type: string
              const: runway
              description: Metric name.
            value:
              type:
                - string
                - 'null'
              description: >-
                Summary decimal value; null for unavailable or inapplicable
                metrics.
            unit:
              type: string
              description: Unit of the value, such as `USD` or `months`.
            formula:
              type: string
              description: Formula and effective calculation basis.
            reason:
              type:
                - string
                - 'null'
              description: Why a value is unavailable or qualified.
            details:
              type: object
              required:
                - months_remaining
                - cash_flow_positive
                - current_cash
                - average_monthly_burn
                - currency
                - no_data
              properties:
                data_quality:
                  $ref: '#/components/schemas/TransactionInsightDataQuality'
                months_remaining:
                  type:
                    - string
                    - 'null'
                  description: >-
                    `current_cash` divided by `average_monthly_burn` (decimal
                    string). `null` when the organization is cash-flow positive.
                cash_flow_positive:
                  type: boolean
                  description: >-
                    True when net burn (outflows minus inflows) is <= 0. When
                    true, months_remaining is null and runway is not applicable.
                current_cash:
                  type: string
                  description: Current cash position (decimal string).
                average_monthly_burn:
                  type: string
                  description: >-
                    Net burn (total outflows minus inflows) divided by months in
                    the window (decimal string). Negative when the organization
                    is net cash-flow positive.
                currency:
                  type: string
                  example: USD
                  description: Currency of the amounts.
                no_data:
                  type: boolean
                  description: >-
                    `true` when `basis=ledger` and the window has no accounting
                    periods, so runway cannot be calculated.
              description: Values of the metric.
            meta:
              $ref: '#/components/schemas/V1FinancialInsightMeta'
          required:
            - metric
            - value
            - unit
            - formula
            - reason
            - details
            - meta
          additionalProperties: false
        - type: object
          properties:
            metric:
              type: string
              const: cash_flow
              description: Metric name.
            value:
              type:
                - string
                - 'null'
              description: >-
                Summary decimal value; null for unavailable or inapplicable
                metrics.
            unit:
              type: string
              description: Unit of the value, such as `USD` or `months`.
            formula:
              type: string
              description: Formula and effective calculation basis.
            reason:
              type:
                - string
                - 'null'
              description: Why a value is unavailable or qualified.
            details:
              type: object
              required:
                - net_flow
                - total_inflows
                - total_outflows
                - currency
                - time_series
              properties:
                net_flow:
                  type: string
                  description: total_inflows minus total_outflows (decimal string).
                total_inflows:
                  type: string
                  description: Total income over the window (decimal string).
                total_outflows:
                  type: string
                  description: Total expenses over the window (decimal string).
                currency:
                  type: string
                  example: USD
                  description: Currency of the amounts.
                time_series:
                  type: array
                  items:
                    type: object
                    required:
                      - period_start
                      - period_end
                      - inflows
                      - outflows
                      - net
                      - cumulative_net
                    properties:
                      period_start:
                        type: string
                        format: date-time
                        description: Start of the bucket.
                      period_end:
                        type: string
                        format: date-time
                        description: End of the bucket.
                      inflows:
                        type: string
                        description: Money in during the bucket (decimal string).
                      outflows:
                        type: string
                        description: Money out during the bucket (decimal string).
                      net:
                        type: string
                        description: Inflows minus outflows in the bucket (decimal string).
                      cumulative_net:
                        type: string
                        description: >-
                          Net flow from the window start through this bucket
                          (decimal string).
                  description: Values for each bucket.
                data_quality:
                  $ref: '#/components/schemas/TransactionInsightDataQuality'
              description: Values of the metric.
            meta:
              $ref: '#/components/schemas/V1FinancialInsightMeta'
          required:
            - metric
            - value
            - unit
            - formula
            - reason
            - details
            - meta
          additionalProperties: false
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - request_id
          properties:
            code:
              type: string
              description: Machine-readable error code.
            message:
              type: string
              description: Technical description for developers.
            fields:
              type: object
              additionalProperties:
                type: string
              description: >-
                Present only on VALIDATION_ERROR. Maps failing field paths to
                reason strings.
            details:
              type: object
              additionalProperties: true
              description: >-
                Optional redacted diagnostic details. Request validation uses
                fields or field_errors.
            suggested_action:
              type: string
              description: A suggested next step.
            documentation_url:
              type: string
              format: uri
              description: Link to documentation about this error.
            request_id:
              type: string
              description: Unique request ID for support escalation.
          description: Error details.
    TransactionInsightDataQuality:
      type: object
      description: >-
        Transactions that the figures exclude, and why. Bank removals and
        amounts without a USD value are excluded.
      required:
        - status
        - window_transaction_count
        - excluded_spam_count
        - excluded_spam_by_currency
        - excluded_non_pl_classification_count
        - excluded_non_pl_classification_by_currency
        - no_posted_journal_entry_count
        - warnings
        - excluded_bank_removed_count
        - excluded_bank_removed_by_currency
        - excluded_currency_valuation_count
        - excluded_currency_valuation_by_currency
        - bank_correction_review_count
        - plaid_enrichment
      properties:
        status:
          type: string
          enum:
            - ok
            - warnings
            - unavailable
          description: >-
            `ok`, `warnings`, or `unavailable` when the exclusions could not be
            calculated.
        window_transaction_count:
          type: integer
          description: Transactions in the window, including excluded ones.
        excluded_spam_count:
          type: integer
          description: Spam-flagged transactions excluded from the figures.
        excluded_spam_by_currency:
          type: array
          items:
            $ref: '#/components/schemas/TransactionInsightExclusionByCurrency'
          description: >-
            Excluded spam transactions, by currency. Amounts are decimal
            strings.
        excluded_non_pl_classification_count:
          type: integer
          description: >-
            Transactions excluded because their type is not income or expense,
            such as transfers and swaps.
        excluded_non_pl_classification_by_currency:
          type: array
          items:
            $ref: '#/components/schemas/TransactionInsightExclusionByCurrency'
          description: >-
            Excluded transfers and other non-income, non-expense transactions,
            by currency.
        no_posted_journal_entry_count:
          type: integer
          description: >-
            Transactions in the window with no posted journal. Same as the
            `has_posted_journal_entry=false` filter.
        warnings:
          type: array
          items:
            type: string
          description: >-
            [WARNING]-prefixed prose for each non-zero excluded bucket. Surface
            these whenever material.
        excluded_bank_removed_count:
          type: integer
          minimum: 0
          description: Transactions excluded because the bank removed them.
        excluded_bank_removed_by_currency:
          type: array
          items:
            $ref: '#/components/schemas/TransactionInsightExclusionByCurrency'
          description: Bank removals grouped by currency.
        excluded_currency_valuation_count:
          type: integer
          minimum: 0
          description: Transactions excluded because they have no USD value.
        excluded_currency_valuation_by_currency:
          type: array
          items:
            $ref: '#/components/schemas/TransactionInsightExclusionByCurrency'
          description: Transactions without a USD value, grouped by currency.
        bank_correction_review_count:
          type: integer
          minimum: 0
          description: Transactions with a bank correction to review.
        plaid_enrichment:
          type: object
          description: Coverage of Plaid enrichment in the window.
          required:
            - transaction_count
            - merchant_identity_count
            - running_balance_count
            - category_versions
            - category_confidence
          properties:
            transaction_count:
              type: integer
              minimum: 0
              description: Transactions with Plaid enrichment.
            merchant_identity_count:
              type: integer
              minimum: 0
              description: Transactions with a Plaid merchant ID.
            running_balance_count:
              type: integer
              minimum: 0
              description: Transactions with a running balance.
            category_versions:
              type: array
              items:
                type: object
                required:
                  - version
                  - transaction_count
                properties:
                  version:
                    type: string
                    description: Plaid category version.
                  transaction_count:
                    type: integer
                    minimum: 0
                    description: Transactions with this version.
              description: Transactions by Plaid category version.
            category_confidence:
              type: array
              items:
                type: object
                required:
                  - confidence
                  - transaction_count
                properties:
                  confidence:
                    type: string
                    description: Plaid confidence level.
                  transaction_count:
                    type: integer
                    minimum: 0
                    description: Transactions with this confidence.
              description: Transactions by Plaid category confidence.
    V1FinancialInsightSeriesPoint:
      type: object
      required:
        - period_start
        - period_end
        - amount
      description: >-
        One bucket of a single-amount financial-insight time series (used by
        revenue `time_series` and burn-rate `trend`). Monetary amounts are
        decimal strings.
      properties:
        period_start:
          type: string
          format: date-time
          description: Start of the bucket.
        period_end:
          type: string
          format: date-time
          description: End of the bucket.
        amount:
          type: string
          description: >-
            Decimal-string amount for the bucket (revenue: income; burn-rate:
            expenses).
    V1FinancialInsightMeta:
      type: object
      required:
        - source
        - granularity
        - start_date
        - end_date
        - currency
      properties:
        source:
          type: string
          enum:
            - gl
            - transactions
          description: >-
            Data source: `gl` for `basis=ledger`, `transactions` for
            `basis=transactions`.
        granularity:
          type: string
          enum:
            - daily
            - weekly
            - monthly
          description: Bucket size.
        start_date:
          type: string
          format: date-time
          description: Start of the window.
        end_date:
          type: string
          format: date-time
          description: End of the window.
        currency:
          type: string
          example: USD
          description: Currency of the amounts.
        granularity_note:
          type:
            - string
            - 'null'
          description: Note when the bucket size differs from the request.
        period_snapped_note:
          type:
            - string
            - 'null'
          description: >-
            Present when `basis=ledger` and the window is not whole months. The
            totals then cover the full accounting periods.
        account_ids_ignored:
          type:
            - boolean
            - 'null'
          description: '`true` when `account_ids` was ignored.'
        account_ids_ignored_reason:
          type:
            - string
            - 'null'
          description: Why `account_ids` was ignored.
        basis:
          type: string
          enum:
            - cash
            - accrual
          description: >-
            Accounting basis of the figures: cash (basis=transactions, settled
            cash movements) or accrual (basis=ledger, the posted double-entry
            ledger).
        cash_basis_caveat:
          type:
            - string
            - 'null'
          description: >-
            Present when `basis=transactions`. Expenses do not include unpaid
            bills, accruals or non-cash journals.
    V1FinancialInsightCategoryAmount:
      type: object
      required:
        - category
        - amount
      description: A named category total. `amount` is a decimal string.
      properties:
        category:
          type: string
          description: Category name.
        amount:
          type: string
          description: Category total (decimal string).
    V1FinancialInsightSpendingEntry:
      type: object
      required:
        - key
        - amount
      description: >-
        A keyed spending total (by source type or classification). `amount` is a
        decimal string.
      properties:
        key:
          type: string
          description: Source type or transaction type.
        amount:
          type: string
          description: Spending total (decimal string).
    TransactionInsightExclusionByCurrency:
      type: object
      required:
        - currency
        - transaction_count
        - amount
      properties:
        currency:
          type: string
          description: >-
            Currency code from the excluded transaction rows. `UNKNOWN` means
            the source row has no currency.
        transaction_count:
          type: integer
          description: Excluded transactions in this currency block.
        amount:
          type: string
          description: Gross value for this currency (decimal string, 2 decimal places).
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Your organization API key. Some operations also need a key that is
        associated with a user; their pages say so.

````