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

# Get Win/Loss Cohort

> Roll up the workspace's Opportunity Watch win/loss postmortems into a cohort analysis: deal/won/lost counts, the top recurring primary loss/win factors, the most common objections (with the fraction addressed before close), competitor frequency, and the 10 most recently closed deals. Filter by outcome (won/lost/all), a close-date floor, and a deal-amount range.



## OpenAPI

````yaml get /api/v2/opportunity-watch/win-loss-cohort
openapi: 3.0.0
info:
  version: 5.1.0
  title: Octave API
  description: API for Octave workspace management and AI-powered content generation
servers:
  - url: https://app.octavehq.com
security:
  - ApiKeyAuth: []
paths:
  /api/v2/opportunity-watch/win-loss-cohort:
    get:
      tags:
        - Opportunity Watch
      summary: Get Win/Loss Cohort
      description: >-
        Roll up the workspace's Opportunity Watch win/loss postmortems into a
        cohort analysis: deal/won/lost counts, the top recurring primary
        loss/win factors, the most common objections (with the fraction
        addressed before close), competitor frequency, and the 10 most recently
        closed deals. Filter by outcome (won/lost/all), a close-date floor, and
        a deal-amount range.
      operationId: getWinLossCohort
      parameters:
        - schema:
            type: string
            enum:
              - won
              - lost
              - all
            description: >-
              Restrict the cohort to won or lost deals. Omit (or pass 'all') to
              include both.
          required: false
          description: >-
            Restrict the cohort to won or lost deals. Omit (or pass 'all') to
            include both.
          name: outcome
          in: query
        - schema:
            type: string
            description: >-
              ISO-8601 date — only include deals that closed on or after this
              date.
          required: false
          description: >-
            ISO-8601 date — only include deals that closed on or after this
            date.
          name: closedAfter
          in: query
        - schema:
            type: number
            nullable: true
            description: Only include deals with amount >= this value.
          required: false
          description: Only include deals with amount >= this value.
          name: amountMin
          in: query
        - schema:
            type: number
            nullable: true
            description: Only include deals with amount <= this value.
          required: false
          description: Only include deals with amount <= this value.
          name: amountMax
          in: query
      responses:
        '200':
          description: Win/loss cohort rollup
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  data:
                    type: object
                    properties:
                      dealCount:
                        type: integer
                      wonCount:
                        type: integer
                      lostCount:
                        type: integer
                      topPrimaryFactors:
                        type: array
                        items:
                          type: object
                          properties:
                            factor:
                              type: string
                            count:
                              type: integer
                          required:
                            - factor
                            - count
                      topObjections:
                        type: array
                        items:
                          type: object
                          properties:
                            objection:
                              type: string
                            count:
                              type: integer
                            entityOId:
                              type: string
                              nullable: true
                            addressedRate:
                              type: number
                          required:
                            - objection
                            - count
                            - entityOId
                            - addressedRate
                      competitorFrequency:
                        type: array
                        items:
                          type: object
                          properties:
                            competitor:
                              type: string
                            count:
                              type: integer
                            entityOId:
                              type: string
                              nullable: true
                          required:
                            - competitor
                            - count
                            - entityOId
                      recentDeals:
                        type: array
                        items:
                          type: object
                          properties:
                            opportunityOId:
                              type: string
                            name:
                              type: string
                            outcome:
                              type: string
                              enum:
                                - won
                                - lost
                            amount:
                              type: number
                              nullable: true
                            currency:
                              type: string
                              nullable: true
                            closeDate:
                              type: string
                              nullable: true
                          required:
                            - opportunityOId
                            - name
                            - outcome
                            - amount
                            - currency
                            - closeDate
                    required:
                      - dealCount
                      - wonCount
                      - lostCount
                      - topPrimaryFactors
                      - topObjections
                      - competitorFrequency
                      - recentDeals
                required:
                  - _metadata
                  - data
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  _metadata:
                    $ref: '#/components/schemas/Metadata'
                  message:
                    type: string
                required:
                  - _metadata
                  - message
      deprecated: false
components:
  schemas:
    Metadata:
      type: object
      properties:
        usage:
          type: number
          default: 0
          example: 0
          description: API usage
        requestId:
          type: string
          example: requestId
          description: Request ID
        message:
          type: string
          example: message
          description: Message
        timestamp:
          type: string
          example: '2021-01-01T00:00:00.000Z'
          description: Timestamp
      required:
        - requestId
        - timestamp
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key

````