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

# Get Analytics Endpoint

> Forward to `ZunkireeAdminClient.get_analytics`. Window defaults
to last 7 days when either bound is absent. Validates `from < to`
and a max span of 1 year. The S8 client strips tzinfo before
serializing per the §9.11 workaround.



## OpenAPI

````yaml /api-reference/openapi.json get /api/dashboard/integrations/zunkiree/analytics
openapi: 3.1.0
info:
  title: Agentic Commerce API
  description: |2-

        Agentic Commerce API - E-commerce Backend

        ## APIs

        ### Dashboard API (`/api/dashboard`)
        Authenticated endpoints for merchant management:
        - Products, Variants, Options
        - Inventory management
        - Orders and fulfillment
        - Customers
        - Collections

        ### Storefront API (`/api/storefront`)
        Public endpoints for client websites:
        - Product catalog
        - Collections
        - Cart management
        - Checkout

        ### Sync API (`/api/sync`)
        Integration endpoints for zunkiree-search:
        - Product sync
        - Availability checks
        - Order creation from AI widget
        
  version: 1.0.0
servers: []
security: []
paths:
  /api/dashboard/integrations/zunkiree/analytics:
    get:
      tags:
        - Dashboard
        - Integrations
      summary: Get Analytics Endpoint
      description: |-
        Forward to `ZunkireeAdminClient.get_analytics`. Window defaults
        to last 7 days when either bound is absent. Validates `from < to`
        and a max span of 1 year. The S8 client strips tzinfo before
        serializing per the §9.11 workaround.
      operationId: get_analytics_endpoint_api_dashboard_integrations_zunkiree_analytics_get
      parameters:
        - name: from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: From
        - name: to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: To
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
        - name: X-Stella-Merchant-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Stella-Merchant-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AnalyticsResponse:
      properties:
        queries_total:
          type: integer
          title: Queries Total
          default: 0
        queries_with_answer:
          type: integer
          title: Queries With Answer
          default: 0
        leads_captured:
          type: integer
          title: Leads Captured
          default: 0
        orders_via_widget:
          type: integer
          title: Orders Via Widget
          default: 0
        top_questions:
          items:
            $ref: '#/components/schemas/TopQuestion'
          type: array
          title: Top Questions
        response_time_p95:
          anyOf:
            - type: number
            - type: 'null'
          title: Response Time P95
        from:
          type: string
          format: date-time
          title: From
        to:
          type: string
          format: date-time
          title: To
      additionalProperties: true
      type: object
      required:
        - from
        - to
      title: AnalyticsResponse
      description: |-
        The full `GET /analytics` response — same shape as the embedded
        block but with explicit window echoback. Z6 stage doesn't return
        `from`/`to` today; we set them server-side from the validated
        request params so callers always get the window they queried.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TopQuestion:
      properties:
        text:
          type: string
          title: Text
        count:
          type: integer
          title: Count
      additionalProperties: true
      type: object
      required:
        - text
        - count
      title: TopQuestion
      description: |-
        One row of the top_questions list. Z6 may add fields over time;
        we accept whatever it returns and validate only the load-bearing
        ones, so a Z-side enhancement doesn't break the response model.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````