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

# Deals performance summary

> Headline sales performance metrics: current open/weighted pipeline (with per-stage breakdown), and won/lost/added totals for the period with optional previous-period comparison.



## OpenAPI

````yaml /api-reference/cx/swagger.json post /deals/reporting/_summary
openapi: 3.0.0
info:
  description: CX API.
  title: CX API
  contact:
    name: API Support
    url: https://stax.ai
    email: support@stax.ai
  version: '1.0'
servers:
  - url: https://api.cx.stax.ai
security: []
paths:
  /deals/reporting/_summary:
    post:
      tags:
        - deals
      summary: Deals performance summary
      description: >-
        Headline sales performance metrics: current open/weighted pipeline (with
        per-stage breakdown), and won/lost/added totals for the period with
        optional previous-period comparison.
      requestBody:
        $ref: '#/components/requestBodies/pkg_routes_deals_reporting.ReportingRequest'
      responses:
        '200':
          description: Performance summary
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/pkg_routes_deals_reporting.SummaryResponse
        '400':
          description: Bad request - invalid request body
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '403':
          description: Forbidden - deals analytics not enabled
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
components:
  requestBodies:
    pkg_routes_deals_reporting.ReportingRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/pkg_routes_deals_reporting.ReportingRequest'
      description: Reporting request
      required: true
  schemas:
    pkg_routes_deals_reporting.SummaryResponse:
      type: object
      properties:
        current:
          $ref: '#/components/schemas/pkg_routes_deals_reporting.SummaryPeriod'
        end_date:
          type: string
        open:
          $ref: '#/components/schemas/pkg_routes_deals_reporting.SummaryOpen'
        previous:
          $ref: '#/components/schemas/pkg_routes_deals_reporting.SummaryPeriod'
        previous_open:
          $ref: '#/components/schemas/pkg_routes_deals_reporting.SummaryOpen'
        stages:
          type: array
          items:
            $ref: '#/components/schemas/pkg_routes_deals_reporting.SummaryStage'
        start_date:
          type: string
        unconfigured_stages:
          type: array
          items:
            $ref: '#/components/schemas/pkg_routes_deals_reporting.SummaryStage'
    pkg_routes_deals_reporting.ReportingRequest:
      type: object
      properties:
        assignee:
          description: empty = all reps per settings
          type: array
          items:
            type: string
        bucket_unit:
          description: 'timeseries only: day | week | month (default: by range length)'
          type: string
        compare_previous:
          type: boolean
        end_date:
          type: string
        funnel:
          description: nil = all funnels
          type: string
        start_date:
          type: string
        timezone:
          type: string
    pkg_routes_deals_reporting.SummaryPeriod:
      type: object
      properties:
        added:
          $ref: '#/components/schemas/pkg_routes_deals_reporting.statusTotals'
        avg_deal_size:
          type: number
        avg_sales_cycle_days:
          type: number
        lost:
          $ref: '#/components/schemas/pkg_routes_deals_reporting.statusTotals'
        win_rate_count:
          type: number
        win_rate_value:
          type: number
        won:
          $ref: '#/components/schemas/pkg_routes_deals_reporting.statusTotals'
    pkg_routes_deals_reporting.SummaryOpen:
      type: object
      properties:
        count:
          type: integer
        total:
          type: number
        weighted:
          type: number
    pkg_routes_deals_reporting.SummaryStage:
      type: object
      properties:
        count:
          type: integer
        funnel:
          type: string
        funnel_name:
          type: string
        stage:
          type: string
        stage_index:
          type: integer
        stage_name:
          type: string
        total:
          type: number
        weighted:
          type: number
    pkg_routes_deals_reporting.statusTotals:
      type: object
      properties:
        count:
          type: integer
        total:
          type: number
  securitySchemes:
    ApiKeyAuth:
      description: CX API key. Create one in CX under Settings → Advanced → API Keys.
      in: header
      name: x-api-key
      type: apiKey

````

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