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

# Get historical analogues of a deal

> Returns other deals whose recorded state is similar to the latest state snapshot of this deal. `state` tells you if results are ready. If `state` is not `ready`, `analogues` is empty. Rate limit: 300 requests per minute for each workspace.



## OpenAPI

````yaml /openapi.json get /deal/{deal_id}/historical-analogues
openapi: 3.1.0
info:
  title: Doris Ontology API
  version: 1.0.0
  description: >-
    The REST API of the Doris ontology. Use it to read deals, accounts, people,
    meetings, commitments and the other types in your workspace. All routes
    share one quota of 10,000 requests a day for each workspace. The MCP server
    uses the same quota. When the quota is used up, the API returns `429
    quota_exceeded`.
servers:
  - url: https://server.meetdoris.com/api/v1/ontology
    description: Ontology API
security:
  - BearerAuth: []
tags:
  - name: Schema
    description: Types and the OpenAPI document.
  - name: Query
    description: Search, list and aggregate.
  - name: Resolve
    description: Read objects by ID.
  - name: Graph
    description: Follow links between objects.
  - name: Deals
    description: Deal-only reads.
  - name: Write
    description: Field writes and actions.
paths:
  /deal/{deal_id}/historical-analogues:
    get:
      tags:
        - Deals
      summary: Get historical analogues of a deal
      description: >-
        Returns other deals whose recorded state is similar to the latest state
        snapshot of this deal. `state` tells you if results are ready. If
        `state` is not `ready`, `analogues` is empty. Rate limit: 300 requests
        per minute for each workspace.
      operationId: getHistoricalAnalogues
      parameters:
        - name: deal_id
          in: path
          required: true
          schema:
            type: string
          description: The deal ID.
        - name: limit
          in: query
          schema:
            type: integer
            default: 5
            minimum: 1
            maximum: 25
          description: The number of analogues to return.
      responses:
        '200':
          description: The analogues and their state.
          content:
            application/json:
              schema:
                type: object
                properties:
                  state:
                    type: string
                    enum:
                      - ready
                      - disabled
                      - snapshot_unavailable
                      - target_embedding_unavailable
                      - unsupported_target_context
                      - no_candidates
                      - low_signal
                  target_deal:
                    type: object
                  target_snapshot_id:
                    type:
                      - string
                      - 'null'
                  target_observed_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                  analogues:
                    type: array
                    items:
                      type: object
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        A Doris API key that starts with `sk-live-`. A workspace admin creates
        keys in Settings > Workspace > Developer. A key works only on
        `/api/v1/ontology/` routes.

````