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

# Get a deal

> Retrieves a single deal by its ID.



## OpenAPI

````yaml /openapi.v2.json get /deals/{id}
openapi: 3.1.1
info:
  title: Heffl API v2 (Beta)
  version: 2.0.0
  description: >-
    Heffl REST API v2 (beta) — resource-oriented endpoints with consistent
    response envelopes. Endpoints, schemas, and behavior may change until GA.
    See Agent workflows and ID prefixes guides for automation.
  contact:
    name: Heffl Support
    url: https://heffl.com/support
    email: support@heffl.com
servers:
  - url: https://api.heffl.com/api/v2
    description: Production API Server
security:
  - ApiKeyAuth: []
paths:
  /deals/{id}:
    get:
      tags:
        - Objects
      summary: Get a deal
      description: Retrieves a single deal by its ID.
      operationId: objects.deals.read
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Deal ID
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deal'
        '400':
          description: Validation error or bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ApiError'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ApiError'
        '403':
          description: Insufficient permission
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ApiError'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ApiError'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ApiError'
components:
  schemas:
    Deal:
      type: object
      properties:
        id:
          type: string
          description: Deal ID
        number:
          type: string
          description: Auto-generated deal number
        title:
          type: string
          description: Deal title
        clientId:
          anyOf:
            - type: string
            - type: 'null'
          description: Contact or company ID (clt_ prefix)
        client:
          anyOf:
            - type: object
            - type: 'null'
          description: Linked client record
        price:
          anyOf:
            - type: number
            - type: 'null'
          description: Deal value
        expectedCloseDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          description: Expected close date
        status:
          anyOf:
            - type: string
              enum:
                - ACTIVE
                - WON
                - LOST
            - type: 'null'
          description: Deal status
        priority:
          anyOf:
            - type: string
              enum:
                - LOW
                - MEDIUM
                - HIGH
            - type: 'null'
          description: Deal priority
        pipelineId:
          anyOf:
            - type: string
            - type: 'null'
          description: Pipeline ID (dpl_ prefix)
        stageId:
          anyOf:
            - type: string
            - type: 'null'
          description: Pipeline stage ID (dps_ prefix)
        stage:
          anyOf:
            - type: string
            - type: 'null'
          description: Pipeline stage name
        leadId:
          anyOf:
            - type: string
            - type: 'null'
          description: Lead ID
        leadName:
          anyOf:
            - type: string
            - type: 'null'
          description: Lead name
        crmSourceId:
          anyOf:
            - type: string
            - type: 'null'
          description: CRM source ID (src_ prefix)
        source:
          anyOf:
            - type: string
            - type: 'null'
          description: CRM source name
        ownerUserId:
          anyOf:
            - type: string
            - type: 'null'
          description: Owner user ID (usr_ prefix)
        ownerId:
          anyOf:
            - type: string
            - type: 'null'
          description: Owner user ID (usr_ prefix)
        ownerName:
          anyOf:
            - type: string
            - type: 'null'
          description: Owner name
        contactEmails:
          type: array
          items:
            type: string
          description: Emails of linked contacts
        createdAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          description: When the deal was created
        updatedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          description: When the deal was last updated
      required:
        - id
        - number
        - title
        - contactEmails
      additionalProperties:
        description: >-
          Custom field values as top-level cf_* keys (for example cf_priority).
          There is no customFields wrapper.
    V2ApiError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: object
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Get yours at
        app.heffl.com/settings/developers

````