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

# List Opportunity Mappings

> Every open deal stage and lost reason your synced deals carry, how many deals carry each, and the standard value it maps to (null when unmapped). Won and lost deals are always "closed", so only open stages are listed.

Returns every open deal stage and lost reason your synced Close CRM and HubSpot deals carry, how many deals carry each, and the standard value it maps to. `canonical_value` is `null` for a value nobody has mapped yet. Won and lost deals are always `closed`, so only open stages are listed. A mapping with `deals: 0` is one no deal uses yet.

```json theme={null}
{
  "canonical_options": {
    "stage": ["qualification", "discovery", "evaluation", "proposal", "negotiation"],
    "lost_reason": ["price", "product_gap", "timing", "competitor", "no_decision", "disqualified", "other"]
  },
  "values": [
    {"origin": "closecrm", "kind": "stage", "source_value": "Qualified", "deals": 63, "canonical_value": "qualification"},
    {"origin": "closecrm", "kind": "stage", "source_value": "Proposal Sent", "deals": 62, "canonical_value": null},
    {"origin": "closecrm", "kind": "lost_reason", "source_value": "Lost - Price", "deals": 14, "canonical_value": "price"}
  ]
}
```


## OpenAPI

````yaml GET /public/opportunities/mappings
openapi: 3.0.3
info:
  title: RevyOps API
  version: 1.0.0
servers:
  - url: https://app.revyops.com/api
security:
  - ApiKeyAuth: []
paths:
  /public/opportunities/mappings:
    get:
      tags:
        - public
      description: >-
        Every open deal stage and lost reason your synced deals carry, how many
        deals carry each, and the standard value it maps to (null when
        unmapped). Won and lost deals are always "closed", so only open stages
        are listed.
      operationId: List opportunity mappings
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpportunityMappings'
          description: ''
components:
  schemas:
    OpportunityMappings:
      type: object
      properties:
        canonical_options:
          $ref: '#/components/schemas/OpportunityMappingCanonicalOptions'
        values:
          type: array
          items:
            $ref: '#/components/schemas/OpportunityMappingValue'
      required:
        - canonical_options
        - values
    OpportunityMappingCanonicalOptions:
      type: object
      properties:
        stage:
          type: array
          items:
            type: string
        lost_reason:
          type: array
          items:
            type: string
      required:
        - lost_reason
        - stage
    OpportunityMappingValue:
      type: object
      properties:
        origin:
          $ref: '#/components/schemas/OriginEnum'
        kind:
          $ref: '#/components/schemas/KindEnum'
        source_value:
          type: string
          description: The stage or lost reason exactly as the CRM sends it, trimmed.
        deals:
          type: integer
          description: Deals carrying this value now. 0 means a mapping no deal uses yet.
        canonical_value:
          type: string
          nullable: true
          description: The standard value it maps to. null is unmapped.
      required:
        - canonical_value
        - deals
        - kind
        - origin
        - source_value
    OriginEnum:
      enum:
        - closecrm
        - hubspot
      type: string
      description: |-
        * `closecrm` - closecrm
        * `hubspot` - hubspot
    KindEnum:
      enum:
        - stage
        - lost_reason
      type: string
      description: |-
        * `stage` - stage
        * `lost_reason` - lost_reason
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````

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