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

# Finance overview datasets

> Cash flow (collected counts settled payments with status captured, booked, refunded or partial_refunded, by payment date), MRR movements (signed), billed net revenue by class (net = gross − tax after position discounts, credit notes negative), outstanding receivables at each month end, ageing of the invoices open today, and the receivables table. One currency, never converted. Cash and receivables have no product dimension: a product filter does not narrow them (`meta.filtersNotApplied`).

Required permission: `analytics:read`.



## OpenAPI

````yaml assets/openapi-v2-finance.json get /api/analytics/finance/overview
openapi: 3.0.3
info:
  title: Fynn Finanzberichte API
  version: 2026-09
  description: >-
    The finance reporting API returns the same figures as the finance pages of
    the app: MRR and its movements, Accounted MRR, cash, receivables, revenue,
    the customer base, month-end snapshots with their restatements and the Excel
    books. Every amount is an exact decimal string in one currency, never
    converted and never a float. Months are `YYYY-MM` in the time zone of the
    organisation.


    Authenticate every request with an API token of your organisation
    (`Authorization: Bearer api_...`). Reading needs `analytics:read`, taking a
    snapshot and changing the settings `analytics:write`. Every route also needs
    the finance reports to be enabled for the organisation (feature flag
    `analytics.advanced`); otherwise it answers 403 `feature-not-available`.
servers:
  - url: https://coreapi.io
    description: Production
  - url: https://preview.coreapi.io
    description: Sandbox
security:
  - ApiToken: []
tags:
  - name: Datensätze
    description: Page datasets and the MRR table.
  - name: Drill-downs und Hinweise
    description: Lines behind a cell and data-quality findings.
  - name: Snapshots
    description: Month-end snapshots and their versions.
  - name: Excel-Exporte
    description: Excel books of the finance pages.
  - name: Definitionen
    description: The versioned definitions catalogue with its changelog.
  - name: Einstellungen
    description: Organisation-wide settings of the finance figures.
paths:
  /api/analytics/finance/overview:
    get:
      tags:
        - Datensätze
      summary: Finance overview datasets
      description: >-
        Cash flow (collected counts settled payments with status captured,
        booked, refunded or partial_refunded, by payment date), MRR movements
        (signed), billed net revenue by class (net = gross − tax after position
        discounts, credit notes negative), outstanding receivables at each month
        end, ageing of the invoices open today, and the receivables table. One
        currency, never converted. Cash and receivables have no product
        dimension: a product filter does not narrow them
        (`meta.filtersNotApplied`).


        Required permission: `analytics:read`.
      operationId: getFinanceOverview
      parameters:
        - name: from
          in: query
          description: >-
            First month (YYYY-MM, time zone of the organisation). Default: `to`
            minus 11 months.
          required: false
          schema:
            type: string
        - name: to
          in: query
          description: 'Last month (YYYY-MM). Default: the current month. At most 36 months.'
          required: false
          schema:
            type: string
        - name: currency
          in: query
          description: 'ISO-4217 code. Default: the default currency.'
          required: false
          schema:
            type: string
        - name: scope
          in: query
          description: 'Movement scope of `mrrMovements`. Default: the organisation setting.'
          required: false
          schema:
            type: string
            enum:
              - subscription
              - invoice_address
              - customer
              - organisation
        - name: segmentId
          in: query
          description: Analytics segment filter.
          required: false
          schema:
            type: string
            format: uuid
        - name: customerIds[]
          in: query
          description: Customer filter.
          required: false
          schema:
            type: array
            items:
              type: string
              format: uuid
        - name: productIds[]
          in: query
          description: Product filter (MRR movements and revenue).
          required: false
          schema:
            type: array
            items:
              type: string
              format: uuid
      responses:
        '200':
          description: The datasets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FinanceOverviewView'
        '401':
          description: Missing or invalid authentication.
        '403':
          description: >-
            Missing permission `analytics:read` (`FRAMEWORK__ACCESS_DENIED`), or
            the finance reports are not enabled for the organisation (feature
            flag `analytics.advanced`, `type`
            https://fynn.dev/problems/feature-not-available).
          content:
            application/problem+json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/Problem'
                  - $ref: '#/components/schemas/FeatureNotAvailableProblem'
        '422':
          description: >-
            Invalid query parameter. The body lists the offending parameters in
            `violations` (`propertyPath`, `message`, `code`).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ValidationProblem'
      security:
        - ApiToken: []
components:
  schemas:
    FinanceOverviewView:
      description: >-
        Datasets of the finance overview: cash flow, MRR movements, revenue by
        class, receivables at each month end, ageing of open invoices today, and
        the receivables table. Every series is aligned with `months`.
      properties:
        months:
          description: >-
            Months of the range (YYYY-MM, time zone of the organisation),
            ascending.
          type: array
          items:
            type: string
        cashflow:
          description: >-
            Collected, refunded and net cash per month (by payment date; null
            after the current month) and the invoice forecast
            ("Rechnungsprognose", gross by invoice month; null before the
            current month). Collected counts settled payments (status captured,
            booked, refunded, partial_refunded).
          allOf:
            - $ref: '#/components/schemas/CashflowView'
        mrrMovements:
          description: 'MRR movements per month, signed: contraction and lost are negative.'
          allOf:
            - $ref: '#/components/schemas/MovementSeriesView'
        revenueBreakdown:
          description: >-
            Billed net revenue per month by class (net = gross − tax, after
            position discounts; credit notes negative).
          allOf:
            - $ref: '#/components/schemas/RevenueBreakdownView'
        receivablesTrend:
          description: >-
            Outstanding receivables at each month end. Months after the current
            one carry the invoices open today forward (no payment assumed).
          type: array
          items:
            $ref: '#/components/schemas/MoneyView'
        receivablesTrendOverdue:
          description: >-
            Part of `receivablesTrend` overdue at each month end (due date
            before the last day of the month); the rest is not yet due.
          type: array
          items:
            $ref: '#/components/schemas/MoneyView'
        ageing:
          description: Open invoices today by days past due.
          allOf:
            - $ref: '#/components/schemas/AgeingView'
        receivablesTable:
          description: >-
            Receivables table: per invoice month the billed amounts, the status
            of those invoices today, cash in and out, and the outstanding amount
            at the month end.
          allOf:
            - $ref: '#/components/schemas/ReceivablesTableView'
        totals:
          description: >-
            Totals over the range: `cash_collected`, `cash_refunded`, `cash_net`
            (elapsed and current months), `cash_forecast` (invoice forecast,
            gross, current and later months), `recurring`, `one_off`,
            `variable`, `revenue_total`, `new`, `expansion`, `contraction`,
            `lost`, `resurrecting` (contraction and lost negative).
          type: object
          additionalProperties:
            oneOf:
              - $ref: '#/components/schemas/MoneyView'
            nullable: true
        meta:
          description: >-
            Calculation time, effective scope and currency, finding counts,
            datasets that ignore the filter.
          allOf:
            - $ref: '#/components/schemas/FinanceMetaView'
      type: object
    Problem:
      type: object
      description: >-
        Error body (problem+json). `type` is the error key, e.g.
        `ANALYTICS_MRR_FINANCIALS__SNAPSHOT_MONTH_NOT_ENDED`; further keys carry
        the parameters of the error.
      properties:
        status:
          type: integer
          example: 409
        type:
          type: string
          example: ANALYTICS_MRR_FINANCIALS__SNAPSHOT_MONTH_NOT_ENDED
        title:
          type: string
          example: An error occurred
        detail:
          type: string
          description: German sentence that can be shown to the user.
      required:
        - status
        - type
        - title
        - detail
      additionalProperties: true
    FeatureNotAvailableProblem:
      type: object
      description: >-
        403 body when the finance reports are not enabled for the organisation
        (feature flag `analytics.advanced`).
      properties:
        type:
          type: string
          enum:
            - https://fynn.dev/problems/feature-not-available
        title:
          type: string
          example: Feature not available
        detail:
          type: string
          example: >-
            The requested feature is not available. Please contact customer
            support.
        featureFlags:
          type: array
          items:
            type: string
          example:
            - analytics.advanced
      required:
        - type
        - title
        - detail
        - featureFlags
      additionalProperties: true
    ValidationProblem:
      type: object
      description: '422 body: one entry per rejected field in `violations`.'
      properties:
        status:
          type: integer
          example: 422
        type:
          type: string
          example: https://tools.ietf.org/html/rfc2616#section-10
        title:
          type: string
          example: Validation Failed
        detail:
          type: string
        violations:
          type: array
          items:
            $ref: '#/components/schemas/Violation'
      required:
        - status
        - type
        - violations
      additionalProperties: true
    CashflowView:
      description: >-
        Cash per month by payment date, and the invoice forecast by invoice
        month.
      properties:
        collected:
          description: >-
            Collected per month; null after the current month (nothing happened
            yet).
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MoneyView'
            nullable: true
        refunded:
          description: >-
            Cash out per month (positive): refunds, chargebacks, payouts and
            return debit fees; null after the current month.
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MoneyView'
            nullable: true
        net:
          description: Collected minus refunded per month; null after the current month.
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MoneyView'
            nullable: true
        totals:
          description: >-
            Totals over the range: `collected`, `collected_this_month`,
            `collected_other_months`, `collected_unassigned` (the split of
            `collected`), `refunded`, `refunded_refund`, `refunded_chargeback`,
            `refunded_payout`, `refunded_return_fee` (the split of `refunded`),
            `collected_refund_returned` (the fourth part of `collected`),
            `corrections`, `corrections_reversed`, `corrections_counter` (the
            correction pairs, outside `collected` and `refunded`), `net`,
            `cash_net` (same as `net`), `forecast_billed` (sum of
            `forecastBilled`); and the averages per month for the chart's dashed
            line, rounded half-up to the cent, over the months that have a value
            (null when none has): `averageCollected`, `averageRefunded`,
            `averageNet` over the months up to the current one,
            `averageForecastBilled` over the months with a forecast (the current
            month and later).
          type: object
          additionalProperties:
            oneOf:
              - $ref: '#/components/schemas/MoneyView'
            nullable: true
        forecastBilled:
          description: >-
            Invoice forecast ("Rechnungsprognose"): gross of the invoices the
            billing forecast expects, by invoice month, for the current month
            (the invoices not yet issued) and later months; null for elapsed
            months. No assumption about the payment date.
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MoneyView'
            nullable: true
        collectedThisMonth:
          description: >-
            Collected per month for invoices finalized in the same month; null
            after the current month.
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MoneyView'
            nullable: true
        collectedOtherMonths:
          description: >-
            Collected per month for invoices finalized in another month (earlier
            invoices paid late, or paid before the invoice was finalized); null
            after the current month.
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MoneyView'
            nullable: true
        collectedUnassigned:
          description: >-
            Collected per month that pays no finalized invoice (balance top-ups,
            prepayments without an invoice, the part above the gross of an
            overpaid invoice); null after the current month. The three parts add
            up to `collected`.
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MoneyView'
            nullable: true
        refundedRefund:
          description: >-
            Refunds per month (part of `refunded`); null after the current
            month.
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MoneyView'
            nullable: true
        refundedChargeback:
          description: >-
            Chargebacks per month: SEPA returns and card chargebacks (part of
            `refunded`); null after the current month.
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MoneyView'
            nullable: true
        refundedPayout:
          description: >-
            Payouts of customer balances per month (part of `refunded`); null
            after the current month. With `refundedReturnFee` the four parts add
            up to `refunded`.
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MoneyView'
            nullable: true
        collectedRefundReturned:
          description: >-
            Refunds that came back from the customer's bank per month
            ("Erstattung zurückgekommen": a negative refund matched from the
            bank account), part of `collected`; null after the current month.
            With it the four parts add up to `collected`.
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MoneyView'
            nullable: true
        corrections:
          description: >-
            Corrections per month ("Korrekturen"): refunds entered by hand and
            cancelled by a counter-entry with the same amount; no money moved,
            so they are part of neither `collected` nor `refunded`. The sum of
            `correctionsReversed` and `correctionsCounter`; 0 over any range
            that holds both entries of every pair. Null after the current month.
            Shown in the tooltip, not as a bar.
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MoneyView'
            nullable: true
        correctionsReversed:
          description: >-
            The cancelled refunds of the corrections per month ("storniert",
            positive); null after the current month.
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MoneyView'
            nullable: true
        correctionsCounter:
          description: >-
            The counter-entries of the corrections per month ("Gegenbuchung",
            negative); null after the current month.
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MoneyView'
            nullable: true
        correctionCount:
          description: >-
            Number of correction pairs per month, counted in the month of the
            counter-entry; null after the current month.
          type: array
          items:
            type: integer
            nullable: true
        refundedReturnFee:
          description: >-
            Bank fees of return debits per month ("Rücklastschrift-Gebühren": a
            negative direct-debit payment without a return case that is a
            collected payment plus a fee; the fee is not part of the invoice),
            part of `refunded`; null after the current month.
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MoneyView'
            nullable: true
      type: object
    MovementSeriesView:
      description: >-
        MRR movements per month, signed (contraction and lost negative). A value
        is null when the month has no data.
      properties:
        new:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MoneyView'
            nullable: true
        expansion:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MoneyView'
            nullable: true
        contraction:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MoneyView'
            nullable: true
        lost:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MoneyView'
            nullable: true
        resurrecting:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/MoneyView'
            nullable: true
      type: object
    RevenueBreakdownView:
      description: Billed net revenue per month by class.
      properties:
        recurring:
          description: Recurring positions (subscription charges).
          type: array
          items:
            $ref: '#/components/schemas/MoneyView'
        oneOff:
          description: >-
            Net (gross − tax, after position discounts) of the one-off positions
            of the documents finalized in the month: one-time prices of
            subscription items, manual positions, setup fees, and discounts
            without a parent position (dunning fees are other operating income,
            not revenue); credit notes and cancellations count negative.
          type: array
          items:
            $ref: '#/components/schemas/MoneyView'
        variable:
          description: >-
            Net (gross − tax, after position discounts) of the usage-based
            positions of the documents finalized in the month: usage quantities,
            metered measurements and percentage prices; credit notes and
            cancellations count negative.
          type: array
          items:
            $ref: '#/components/schemas/MoneyView'
        total:
          description: Sum of the three classes per month.
          type: array
          items:
            $ref: '#/components/schemas/MoneyView'
      type: object
    MoneyView:
      description: >-
        A money amount. `amount` is an exact decimal string with two decimal
        places (net, excluding VAT, unless stated otherwise); `currency` is the
        ISO-4217 code.
      properties:
        amount:
          description: >-
            Exact decimal amount with two decimal places, dot as separator.
            Negative amounts carry a leading minus.
          type: string
          example: '1234.56'
        currency:
          description: ISO-4217 currency code.
          type: string
          example: EUR
      type: object
    AgeingView:
      description: >-
        Open invoices today by days past the due date (time zone of the
        organisation).
      properties:
        asOf:
          description: The instant the ageing refers to (ISO 8601).
          type: string
          format: date-time
        total:
          description: Open amount over all buckets.
          allOf:
            - $ref: '#/components/schemas/MoneyView'
        overdueTotal:
          description: Open amount past due (all buckets except `not_due`).
          allOf:
            - $ref: '#/components/schemas/MoneyView'
        buckets:
          description: >-
            The five buckets in order: `not_due`, `1_30`, `31_60`, `61_90`,
            `over_90`.
          type: array
          items:
            $ref: '#/components/schemas/AgeingBucketView'
        over365:
          description: >-
            Part of `over_90` more than 365 days past due ("davon über 365
            Tage"): claims that need a value adjustment and approach the
            limitation period.
          allOf:
            - $ref: '#/components/schemas/MoneyView'
      type: object
    ReceivablesTableView:
      description: Receivables table per invoice month (time zone of the organisation).
      properties:
        rows:
          description: >-
            Series per row key: `billed_gross`, `billed_net` (invoices finalized
            in the month; credit notes and cancellations are not rows, they
            reduce the invoice they reference through `status_credited`); status
            of those invoices today, mutually exclusive and adding up to
            `billed_gross`: `status_paid` (paid through payment transactions),
            `status_settled` (settled without a payment transaction, e.g.
            customer balance), `status_open` (open, not yet due),
            `status_overdue`, `status_credited` (credited or cancelled),
            `status_written_off`; `status_total` ("Summe Status": the sum of the
            six status buckets, equal to `billed_gross`); `billed_after_credits`
            ("Rechnungsbetrag nach Gutschriften und Stornos": `billed_gross −
            status_credited`); `status_overpaid` ("Überzahlt": paid above the
            gross, e.g. an invoice paid twice; NOT one of the buckets, they
            still add up to `billed_gross`); `cash_in_for_month` ("Bezahlt bis
            heute (Rechnungen dieses Monats)": every payment for the invoices of
            the month, whatever its payment date, as of today; shown with the
            status rows); `cash_in` / `cash_out` ("Zahlungseingang" /
            "Zahlungsausgang": payments in and money out by payment date, all
            invoices, not comparable with the status rows); `cash_out` split by
            kind, adding up to it: `cash_refunded_refund` (refunds),
            `cash_refunded_chargeback` (chargebacks), `cash_refunded_payout`
            (payouts of customer balances), `cash_refunded_return_fee`
            ("Rücklastschrift-Gebühren": bank fees of return debits without a
            return case, not part of the invoice); `cash_in` split by the
            invoice the money pays, adding up to `cash_in`:
            `cash_collected_this_month` (for invoices finalized in the same
            month), `cash_collected_other_months` (for invoices of other
            months), `cash_collected_unassigned` (no finalized invoice: top-ups,
            prepayments, the part above the gross of an overpaid invoice),
            `cash_collected_refund_returned` ("Erstattung zurückgekommen");
            `cash_corrections` ("Korrekturen": refunds entered by hand and
            cancelled by a counter-entry, outside `cash_in` and `cash_out`) with
            `cash_corrections_reversed` ("storniert") and
            `cash_corrections_counter` ("Gegenbuchung", negative);
            `outstanding_eop` (open at the month end; months after the current
            one carry the invoices open today forward, no payment assumed),
            split into `outstanding_not_due_eop` ("Offen": due date on or after
            the last day of the month) and `outstanding_overdue_eop`
            ("Überfällig" at the month end); `owed_to_customers` ("Guthaben an
            Kunden": at the month end, what customers paid above what their
            invoices still claim, e.g. a paid invoice credited without a refund,
            neither refunded nor moved to the customer balance; never netted
            with `outstanding_eop`); invoice forecast, separate from the real
            buckets: `forecast_billed_gross`, `forecast_billed_net` (the
            invoices the billing forecast expects in the month; 0 for elapsed
            months).
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/MoneyView'
        totals:
          description: >-
            Total column: sums over the range, `outstanding_eop`,
            `outstanding_not_due_eop`, `outstanding_overdue_eop` and
            `owed_to_customers` = the last month.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/MoneyView'
        forecastInvoiceCount:
          description: Number of forecast invoices per month (aligned with `months`).
          type: array
          items:
            type: integer
      type: object
    FinanceMetaView:
      description: >-
        Context of a finance response: calculation time, the effective scope,
        currency and month range, and the finding counts.
      properties:
        asOf:
          description: >-
            When the figures were last calculated (ISO 8601). Null when no
            calculation exists yet.
          type: string
          format: date-time
          nullable: true
        buildId:
          description: >-
            Id of the calculation the figures come from. Null when no
            calculation exists yet.
          type: string
          nullable: true
        scope:
          description: >-
            Effective movement scope: the level on which new, expansion,
            contraction, lost and resurrecting are classified.
          type: string
          enum:
            - subscription
            - invoice_address
            - customer
            - organisation
          example: invoice_address
        currency:
          description: >-
            Effective currency (ISO-4217). Amounts are never converted between
            currencies.
          type: string
          example: EUR
        from:
          description: First month of the range (YYYY-MM, time zone of the organisation).
          type: string
          example: 2025-10
        to:
          description: Last month of the range (YYYY-MM, time zone of the organisation).
          type: string
          example: 2026-09
        findings:
          description: Number of data-quality findings of the calculation.
          allOf:
            - $ref: '#/components/schemas/FindingCountsView'
        filtersNotApplied:
          description: >-
            Datasets of this response that ignore the customer, product or
            segment filter because the underlying facts have no such dimension
            (for example receivables at past month ends).
          type: array
          items:
            type: string
        notSnapshotted:
          description: >-
            MRR table rows a month-end snapshot does not hold (invoice, cash and
            forecast figures). In the snapshot view they keep their current
            values. Empty when the range has no snapshot or a segment is
            applied.
          type: array
          items:
            type: string
          example:
            - one_off
            - accounted_mrr
            - cash_collected
        projectedFrom:
          description: >-
            First month of the range after the current one (YYYY-MM): from there
            the month-end stocks (open receivables, amounts owed to customers)
            carry today's open invoices forward, a projection as of today
            ("Prognose (Stand heute)"), not a fact. Null when the range ends in
            or before the current month.
          type: string
          example: 2026-10
          nullable: true
        forecast:
          description: >-
            Completeness of the invoice forecast ("Rechnungsprognose") in the
            range: `incomplete` with the number of subscriptions whose forecast
            failed. The forecast rows then show what the other subscriptions
            bring; they are marked "unvollständig", never read as 0.
          allOf:
            - $ref: '#/components/schemas/ForecastStatusView'
        build:
          description: >-
            The latest calculation attempt, also when it failed ("Berechnung
            abgebrochen"). Null when the organisation was never calculated.
          nullable: true
          allOf:
            - $ref: '#/components/schemas/BuildAttemptView'
        dataBuildId:
          description: >-
            Id of the calculation the figures come from (the last successful
            one). Differs from `build.buildId` when the latest attempt failed.
            Null when no calculation exists yet.
          type: string
          nullable: true
      type: object
    Violation:
      type: object
      properties:
        propertyPath:
          type: string
          example: to
        message:
          type: string
          example: Der Zeitraum darf höchstens 36 Monate umfassen.
        code:
          type: string
          example: analytics.mrr_financials.range_too_long
      required:
        - propertyPath
        - message
        - code
    AgeingBucketView:
      description: One ageing bucket.
      properties:
        key:
          description: Bucket key.
          type: string
          enum:
            - not_due
            - 1_30
            - 31_60
            - 61_90
            - over_90
        amount:
          description: Open amount in the bucket.
          allOf:
            - $ref: '#/components/schemas/MoneyView'
        invoiceCount:
          description: Number of open invoices in the bucket.
          type: integer
        topCustomers:
          description: The ten customers with the largest open amount in the bucket.
          type: array
          items:
            $ref: '#/components/schemas/AgeingCustomerView'
      type: object
    FindingCountsView:
      description: Number of data-quality findings of the latest calculation per severity.
      properties:
        error:
          description: Findings that point at wrong numbers.
          type: integer
          example: 0
        warning:
          description: Findings that point at data that should be checked.
          type: integer
          example: 3
        info:
          description: Informational findings.
          type: integer
          example: 12
      type: object
    ForecastStatusView:
      description: >-
        Whether the invoice forecast of the range is complete: the billing
        forecast of a subscription can fail (finding `FORECAST_FAILED`), and
        that subscription is then missing from every forecast month. A forecast
        cell of an incomplete forecast is a lower bound, never "no invoices".
      properties:
        incomplete:
          description: >-
            True when the forecast of at least one subscription failed and the
            range contains forecast months (the current month or later).
          type: boolean
          example: false
        failedSubscriptions:
          description: >-
            Number of subscriptions whose billing forecast failed (0 when
            complete).
          type: integer
          example: 0
      type: object
    BuildAttemptView:
      description: >-
        The latest calculation attempt. When it failed, the figures still come
        from the last successful calculation (`meta.dataBuildId`, `meta.asOf`).
      properties:
        status:
          description: >-
            Outcome of the attempt: `succeeded`, or `failed` when it broke a
            consistency check and was cancelled (nothing of it was stored).
          type: string
          enum:
            - succeeded
            - failed
          example: failed
        builtAt:
          description: When the attempt started (ISO 8601).
          type: string
          format: date-time
        buildId:
          description: Id of the attempt. Equal to `meta.dataBuildId` when it succeeded.
          type: string
        failed:
          description: The broken checks; null unless `status` is `failed`.
          nullable: true
          allOf:
            - $ref: '#/components/schemas/BuildFailureView'
      type: object
    AgeingCustomerView:
      description: A customer's open amount in one ageing bucket.
      properties:
        customer:
          description: The customer.
          allOf:
            - $ref: '#/components/schemas/RefView'
        amount:
          description: Open amount of the customer in the bucket.
          allOf:
            - $ref: '#/components/schemas/MoneyView'
        invoiceCount:
          description: Number of the customer's open invoices in the bucket.
          type: integer
      type: object
    BuildFailureView:
      description: >-
        Why the latest calculation was cancelled: the consistency checks it
        broke. The rows are listed by the details metric `build_failure`.
      properties:
        invariants:
          description: >-
            Codes of the broken checks (sorted), e.g. `CASH_WITHIN_DOCUMENT`;
            `IDENTITY` for the MRR identity.
          type: array
          items:
            type: string
          example:
            - CASH_WITHIN_DOCUMENT
        rowCount:
          description: >-
            Number of rows that broke a check (complete, also above the listed
            rows).
          type: integer
          example: 5
        invoiceRowCount:
          description: >-
            Number of the listed rows that name an invoice. Equal to `rowCount`
            when every row is an invoice.
          type: integer
          example: 5
      type: object
    RefView:
      description: >-
        Reference to a customer, subscription, product or invoice: id, number
        and display name where they exist.
      properties:
        id:
          description: Id (UUID).
          type: string
          nullable: true
        number:
          description: >-
            Human-readable number (customer number, subscription number, invoice
            number).
          type: string
          nullable: true
        name:
          description: Display name.
          type: string
          nullable: true
      type: object
  securitySchemes:
    ApiToken:
      type: http
      scheme: bearer
      description: >-
        API token of the organisation. Send it as Authorization: Bearer api_...
        The token is bound to exactly one organisation.

````