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

# Update a deal



## OpenAPI

````yaml /generated/specs/sales.json patch /api/v1/deals/{id}
openapi: 3.0.0
info:
  title: Raul API - Ventas
  description: >-
    Cotizaciones, pipeline, outreach comercial, equipos cotizables y ventas de
    equipamiento.
  version: 2.0.0
  contact: {}
servers:
  - url: https://api.raul.ugps.io
    description: Production
security: []
tags: []
paths:
  /api/v1/deals/{id}:
    patch:
      tags:
        - Deals
      summary: Update a deal
      operationId: DealsController_update
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDealDto'
      responses:
        '200':
          description: Deal updated successfully
components:
  schemas:
    UpdateDealDto:
      type: object
      properties:
        client_id:
          type: string
          description: Client ID
        contact_id:
          type: string
          description: Contact ID
        estimated_amount:
          type: number
          description: Estimated amount in UF
          example: 150.5
        pipeline_stage_id:
          type: string
          description: Pipeline stage ID
        owner_user_id:
          type: string
          description: Owner user ID
        notes:
          type: string
          description: Notes
        name:
          type: string
          description: Deal name
        won_reason:
          type: string
          description: Won reason
        lost_reason:
          type: string
          description: Lost reason
        updated_by:
          type: string
          description: Updated by user ID

````

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