> ## 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.

# Export the MRR financials as XLSX

> Sheet "MRR financials" is the table as on screen (months as columns, total column, "of which" reason rows, contraction and lost negative, rates as percent). With `includeDetails=1` the sheets "Movements" (one line per item of an account with a movement), "Non-recurring" (one line per one-off or variable invoice position) and "Cashflow" (one line per payment or refund, then the open invoices at each month end) follow. "Data quality" lists the findings and "Definitions" the terms. Amounts are numbers, not text. Line sheets stop at 50,000 rows and say so in their last row. File name: `mrr-financials_{organisation}_{from}_{to}_{scope}_{currency}.xlsx`.

Required permission: `analytics:read`.



## OpenAPI

````yaml assets/openapi-v2-finance.json get /api/analytics/mrr-financials/export/excel
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/mrr-financials/export/excel:
    get:
      tags:
        - Excel-Exporte
      summary: Export the MRR financials as XLSX
      description: >-
        Sheet "MRR financials" is the table as on screen (months as columns,
        total column, "of which" reason rows, contraction and lost negative,
        rates as percent). With `includeDetails=1` the sheets "Movements" (one
        line per item of an account with a movement), "Non-recurring" (one line
        per one-off or variable invoice position) and "Cashflow" (one line per
        payment or refund, then the open invoices at each month end) follow.
        "Data quality" lists the findings and "Definitions" the terms. Amounts
        are numbers, not text. Line sheets stop at 50,000 rows and say so in
        their last row. File name:
        `mrr-financials_{organisation}_{from}_{to}_{scope}_{currency}.xlsx`.


        Required permission: `analytics:read`.
      operationId: exportMrrFinancialsExcel
      parameters:
        - name: from
          in: query
          description: 'First month (YYYY-MM). 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. 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.
          required: false
          schema:
            type: array
            items:
              type: string
              format: uuid
        - name: includeDetails
          in: query
          description: '`1` adds the line sheets.'
          required: false
          schema:
            type: string
            enum:
              - '0'
              - '1'
      responses:
        '200':
          description: XLSX file download.
          content:
            application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
              schema:
                type: string
                format: binary
        '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'
        '500':
          description: >-
            The workbook could not be written on the server
            (`ANALYTICS_FINANCE__WORKBOOK_WRITE_FAILED`). Download it again.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - ApiToken: []
components:
  schemas:
    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
    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
  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.

````