> ## Documentation Index
> Fetch the complete documentation index at: https://omniflow-vpn.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get v1panelreportssales

> Requires finance.read. What was sold over a chosen period, by kind of sale, by plan version, and by day, with trial conversion and refunds issued. The period keys on `orders.paid_at`, which is set once when an order first settles and never moved afterwards, so re-running a report over a closed period returns the same figures. Provider money and wallet credit are reported apart and must never be added: the balance was already revenue when it was funded. A period longer than two years is refused.



## OpenAPI

````yaml https://raw.githubusercontent.com/kewldan/omniflow/main/api/openapi.yaml get /v1/panel/reports/sales
openapi: 3.0.3
info:
  title: Omniflow API
  version: 1.0.0
  description: >-
    Customer, commerce, payment, wallet, fulfillment, and operations API for
    Omniflow.
servers: []
security: []
paths:
  /v1/panel/reports/sales:
    get:
      tags:
        - panel
      description: >-
        Requires finance.read. What was sold over a chosen period, by kind of
        sale, by plan version, and by day, with trial conversion and refunds
        issued. The period keys on `orders.paid_at`, which is set once when an
        order first settles and never moved afterwards, so re-running a report
        over a closed period returns the same figures. Provider money and wallet
        credit are reported apart and must never be added: the balance was
        already revenue when it was funded. A period longer than two years is
        refused.
      operationId: getPanelSalesReport
      parameters:
        - $ref: '#/components/parameters/ReportSince'
        - $ref: '#/components/parameters/ReportUntil'
        - $ref: '#/components/parameters/ReportTimezone'
        - $ref: '#/components/parameters/ReportCurrency'
      responses:
        '200':
          description: Sales report
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PanelSalesReport'
        '403':
          $ref: '#/components/responses/Problem'
        '422':
          $ref: '#/components/responses/Problem'
components:
  parameters:
    ReportSince:
      in: query
      name: since
      schema:
        type: string
        format: date-time
      description: Start of the period, inclusive. Defaults to thirty days before `until`.
    ReportUntil:
      in: query
      name: until
      schema:
        type: string
        format: date-time
      description: End of the period, exclusive. Defaults to now.
    ReportTimezone:
      in: query
      name: timezone
      schema:
        type: string
        default: UTC
      description: >-
        The zone the day boundaries are computed in. "Sales on the third" means
        the operator's third, and a report bucketed in UTC puts an evening sale
        several hours east on the wrong day.
    ReportCurrency:
      in: query
      name: currency
      schema:
        type: string
      description: ISO currency to restrict the report to. Omit for every currency.
  schemas:
    PanelSalesReport:
      type: object
      required:
        - since
        - until
        - timezone
        - byOperation
        - byPlan
        - byDay
        - refunds
        - trials
        - generatedAt
      properties:
        since:
          type: string
          format: date-time
        until:
          type: string
          format: date-time
        timezone:
          type: string
        currency:
          type: string
        byOperation:
          type: array
          items:
            $ref: '#/components/schemas/PanelSalesLine'
        byPlan:
          type: array
          items:
            $ref: '#/components/schemas/PanelPlanSales'
        byDay:
          type: array
          items:
            $ref: '#/components/schemas/PanelDaySales'
        refunds:
          type: array
          items:
            $ref: '#/components/schemas/PanelPeriodRefunds'
        trials:
          $ref: '#/components/schemas/PanelTrialConversion'
        generatedAt:
          type: string
          format: date-time
    PanelSalesLine:
      type: object
      required:
        - operation
        - currency
        - orders
        - subtotalMinor
        - discountMinor
        - paidMinor
        - walletMinor
      properties:
        operation:
          type: string
          description: >-
            purchase, renewal, extension, upgrade, downgrade, addon, topup,
            gift, or goods.
        currency:
          type: string
        orders:
          type: integer
          format: int64
        subtotalMinor:
          type: integer
          format: int64
        discountMinor:
          type: integer
          format: int64
        paidMinor:
          type: integer
          format: int64
          description: Money that arrived through a provider.
        walletMinor:
          type: integer
          format: int64
          description: >-
            Balance spent. Already counted as revenue when funded; never add it
            to paidMinor.
    PanelPlanSales:
      type: object
      required:
        - planCode
        - planVersion
        - billingPeriod
        - currency
        - orders
        - grossMinor
      properties:
        planCode:
          type: string
        planVersion:
          type: integer
        billingPeriod:
          type: string
        currency:
          type: string
        orders:
          type: integer
          format: int64
        grossMinor:
          type: integer
          format: int64
          description: List value of the lines, read off the version the order referenced.
    PanelDaySales:
      type: object
      required:
        - day
        - currency
        - orders
        - paidMinor
        - walletMinor
      properties:
        day:
          type: string
          format: date
          description: A day in the requested timezone, not an instant.
        currency:
          type: string
        orders:
          type: integer
          format: int64
        paidMinor:
          type: integer
          format: int64
        walletMinor:
          type: integer
          format: int64
    PanelPeriodRefunds:
      type: object
      required:
        - currency
        - refunds
        - refundedMinor
      properties:
        currency:
          type: string
        refunds:
          type: integer
          format: int64
        refundedMinor:
          type: integer
          format: int64
    PanelTrialConversion:
      type: object
      required:
        - trials
        - converted
        - cohort
      properties:
        trials:
          type: integer
          format: int64
          description: Trials claimed inside the period.
        converted:
          type: integer
          format: int64
          description: How many of those customers have since paid for anything.
        cohort:
          type: boolean
          description: >-
            Always true. The numerator counts conversions at any later time, so
            a period ending today reads low by construction.
    Problem:
      type: object
      required:
        - type
        - title
        - status
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        request_id:
          type: string
  responses:
    Problem:
      description: Request failed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.