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

# Retrieve organization financial analytics



## OpenAPI

````yaml /api-reference/analytics-v1.json get /v1/organizations/{organization_id}/analytics/financials
openapi: 3.0.0
info:
  title: Chataigne Analytics API
  description: Retrieve analytics for Chataigne locations and organizations.
  version: '2026-05-01'
  contact: {}
servers:
  - url: https://server.chataigne.ai
security: []
tags: []
paths:
  /v1/organizations/{organization_id}/analytics/financials:
    get:
      tags:
        - Analytics
      summary: Retrieve organization financial analytics
      operationId: AnalyticsV1Controller_retrieveOrganizationFinancials
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
          example: busorg_k3m9x2p7qw
        - name: from
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: >-
            Start of the analytics period. If both `from` and `to` are omitted,
            the period defaults to the last 30 days.
        - name: to
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: >-
            End of the analytics period. If both `from` and `to` are omitted,
            the period defaults to now.
        - name: service_type
          in: query
          required: false
          schema:
            type: string
            enum:
              - delivery
              - collection
          description: Restrict order-backed statistics to delivery or collection orders.
      responses:
        '200':
          description: The organization financial analytics.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationFinancialAnalytics'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The principal is not allowed to perform this request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: The resource does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - organization-api-key: []
components:
  schemas:
    OrganizationFinancialAnalytics:
      type: object
      required:
        - object
        - organization_id
        - period
        - by_currency
      properties:
        object:
          type: string
          enum:
            - organization_financial_analytics
        organization_id:
          type: string
          example: busorg_k3m9x2p7qw
        period:
          $ref: '#/components/schemas/AnalyticsPeriod'
        by_currency:
          type: array
          description: >-
            Financial totals grouped by location currency; unlike currencies are
            never added.
          items:
            type: object
            required:
              - currency
              - summary
              - daily
            properties:
              currency:
                type: string
                example: EUR
              summary:
                $ref: '#/components/schemas/AnalyticsFinancialSummary'
              daily:
                type: array
                items:
                  $ref: '#/components/schemas/AnalyticsDailyGrossOrderValue'
    Error:
      type: object
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
            - request_id
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - authorization_error
                - not_found_error
                - conflict_error
                - rate_limit_error
                - idempotency_error
                - api_error
            code:
              type: string
              example: resource_missing
            message:
              type: string
            param:
              type: string
            request_id:
              type: string
              example: req_8f2c…
            details:
              type: object
              additionalProperties: true
    AnalyticsPeriod:
      type: object
      required:
        - from
        - to
        - service_type
      properties:
        from:
          type: string
          format: date-time
          nullable: true
        to:
          type: string
          format: date-time
          nullable: true
        service_type:
          type: string
          enum:
            - delivery
            - collection
          nullable: true
    AnalyticsFinancialSummary:
      type: object
      required:
        - gross_order_value
        - average_order_value
      properties:
        gross_order_value:
          type: number
          example: 9120.5
          description: >-
            Value of eligible orders after discounts, including delivery and
            service fees charged to customers.
        average_order_value:
          type: number
          example: 26.69
          description: >-
            Average eligible order value after discounts, excluding delivery and
            service fees.
    AnalyticsDailyGrossOrderValue:
      type: object
      required:
        - date
        - gross_order_value
      properties:
        date:
          type: string
          format: date
          example: '2026-06-01'
        gross_order_value:
          type: number
          example: 420.5
  securitySchemes:
    organization-api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: Location/organization API key.

````