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

# Revenue per customer, paged

> Customers with billed net revenue in the range (all classes; net = gross − tax after position discounts, credit notes negative), ranked by net revenue (descending; equal amounts by customer id), each with product sub-rows and a 12-month sparkline ending with the last month of the range. Same filters as the revenue datasets.

Required permission: `analytics:read`.



## OpenAPI

````yaml assets/openapi-v2-finance.json get /api/analytics/finance/revenue/customers
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/revenue/customers:
    get:
      tags:
        - Datensätze
      summary: Revenue per customer, paged
      description: >-
        Customers with billed net revenue in the range (all classes; net = gross
        − tax after position discounts, credit notes negative), ranked by net
        revenue (descending; equal amounts by customer id), each with product
        sub-rows and a 12-month sparkline ending with the last month of the
        range. Same filters as the revenue datasets.


        Required permission: `analytics:read`.
      operationId: getFinanceRevenueCustomers
      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 (the customer list is scope-independent; accepted for
            a uniform query).
          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: page
          in: query
          description: Page, starting at 1.
          required: false
          schema:
            type: integer
            default: 1
            minimum: 1
        - name: pageSize
          in: query
          description: Customers per page.
          required: false
          schema:
            type: integer
            default: 50
            maximum: 100
            minimum: 1
        - name: search
          in: query
          description: >-
            Customer name, customer number or the name of one of the customer's
            products contains this text (case-insensitive, `%` and `_` are
            literal).
          required: false
          schema:
            type: string
            maxLength: 100
      responses:
        '200':
          description: One page of customers.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerRevenuePageView'
        '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:
    CustomerRevenuePageView:
      description: >-
        One page of the revenue page's customer rows: customers ranked by net
        revenue in the range (descending; equal amounts by customer id, so the
        order is stable across pages), each with product sub-rows and a 12-month
        sparkline ending with the last month of the range.
      properties:
        data:
          description: Customers of this page.
          type: array
          items:
            $ref: '#/components/schemas/CustomerRevenueView'
        meta:
          description: >-
            `page`, `pageSize` and `total` (customers matching the filters and
            the search).
          allOf:
            - $ref: '#/components/schemas/PageMetaView'
      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
    CustomerRevenueView:
      description: Net revenue of one customer per month, with product sub-rows.
      properties:
        customer:
          description: The customer.
          allOf:
            - $ref: '#/components/schemas/RefView'
        values:
          description: Net revenue per month, aligned with `months`.
          type: array
          items:
            $ref: '#/components/schemas/MoneyView'
        total:
          description: Net revenue in the range.
          allOf:
            - $ref: '#/components/schemas/MoneyView'
        sparkline:
          description: >-
            Net revenue of the twelve months ending with the last month of the
            range, as exact decimal strings, oldest first.
          type: array
          items:
            type: string
            example: '1200.00'
        products:
          description: Product sub-rows.
          type: array
          items:
            $ref: '#/components/schemas/ProductSeriesView'
      type: object
    PageMetaView:
      description: Pagination of a list response.
      properties:
        page:
          description: Current page, starting at 1.
          type: integer
          example: 1
        pageSize:
          description: Maximum number of entries per page.
          type: integer
          example: 25
        total:
          description: Number of entries over all pages.
          type: integer
          example: 112
        sum:
          description: >-
            Sum of `amount` over all entries of all pages (drill-down lists
            only). It equals the value of the cell the list explains; for
            contraction and lost the lines carry the signed change, so their sum
            is the negative of the unsigned cell.
          nullable: true
          allOf:
            - $ref: '#/components/schemas/MoneyView'
        asOf:
          description: >-
            When the figures were last calculated (ISO 8601). Null when no
            calculation exists yet.
          type: string
          format: date-time
          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
    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
    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
    ProductSeriesView:
      description: Net revenue of one product per month.
      properties:
        product:
          description: The product; `id` and `name` are null for positions without product.
          allOf:
            - $ref: '#/components/schemas/RefView'
        values:
          description: Net revenue per month, aligned with `months`.
          type: array
          items:
            $ref: '#/components/schemas/MoneyView'
        total:
          description: Net revenue in the range.
          allOf:
            - $ref: '#/components/schemas/MoneyView'
      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.

````