> ## 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 customer base page as XLSX

> The page with the same query as `GET /api/analytics/finance/customers`, one sheet per card with the numbers of the page: "Info", "Kennzahlen", "NRR und GRR", "Logos je Monat", "Kohorten" (the triangle as on the page) and "Kohorten Liste" (cohort, age, month, accounts, MRR, retention), "Konzentration", "Verloren nach Grund", "Segmentvergleich"; then without a row limit, over the segment's customers: "Rohdaten Konten je Monat" (every account with MRR at the start or the end of a month, its movement and cohort month), "Rohdaten Kohorten-Zellen" (the item lines of every monthly cohort cell), "Rohdaten Logos" (the item lines of new, resurrected and lost accounts, lost ones with their cancellation reason); last "Definitionen". File name: `customers_{organisation}_{from}_{to}.xlsx`.

Required permission: `analytics:read`.



## OpenAPI

````yaml assets/openapi-v2-finance.json get /api/analytics/finance/customers/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/finance/customers/excel:
    get:
      tags:
        - Excel-Exporte
      summary: Export the customer base page as XLSX
      description: >-
        The page with the same query as `GET /api/analytics/finance/customers`,
        one sheet per card with the numbers of the page: "Info", "Kennzahlen",
        "NRR und GRR", "Logos je Monat", "Kohorten" (the triangle as on the
        page) and "Kohorten Liste" (cohort, age, month, accounts, MRR,
        retention), "Konzentration", "Verloren nach Grund", "Segmentvergleich";
        then without a row limit, over the segment's customers: "Rohdaten Konten
        je Monat" (every account with MRR at the start or the end of a month,
        its movement and cohort month), "Rohdaten Kohorten-Zellen" (the item
        lines of every monthly cohort cell), "Rohdaten Logos" (the item lines of
        new, resurrected and lost accounts, lost ones with their cancellation
        reason); last "Definitionen". File name:
        `customers_{organisation}_{from}_{to}.xlsx`.


        Required permission: `analytics:read`.
      operationId: exportCustomersExcel
      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. Default: the organisation setting.'
          required: false
          schema:
            type: string
            enum:
              - subscription
              - invoice_address
              - customer
              - organisation
        - name: segmentId
          in: query
          description: 'Analytics segment: only its customers.'
          required: false
          schema:
            type: string
            format: uuid
        - name: compareSegmentId
          in: query
          description: Second analytics segment for the comparison.
          required: false
          schema:
            type: string
            format: uuid
        - name: granularity
          in: query
          description: Cohorts per month (default) or per quarter.
          required: false
          schema:
            type: string
            enum:
              - month
              - quarter
      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.

````