> ## 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.

# Crear un negocio canónico y asociarlo al ticket atómicamente



## OpenAPI

````yaml /generated/specs/operations.json post /api/v1/tickets/{ticketId}/associations/opportunities/creation-attempts
openapi: 3.0.0
info:
  title: Raul API - Operaciones
  description: Suscripciones, GPS, actividades, visitas y operacion tecnica.
  version: 2.0.0
  contact: {}
servers:
  - url: https://api.raul.ugps.io
    description: Production
security: []
tags: []
paths:
  /api/v1/tickets/{ticketId}/associations/opportunities/creation-attempts:
    post:
      tags:
        - Ticket associations
      summary: Crear un negocio canónico y asociarlo al ticket atómicamente
      operationId: TicketOpportunityCreateController_create
      parameters:
        - name: ticketId
          required: true
          in: path
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TicketOpportunityCreateDto'
      responses:
        '201':
          description: ''
components:
  schemas:
    TicketOpportunityCreateDto:
      type: object
      properties:
        expected_version:
          type: integer
          minimum: 1
          maximum: 2147483647
        opportunity:
          $ref: '#/components/schemas/TicketOpportunityCreateDataDto'
      required:
        - expected_version
        - opportunity
    TicketOpportunityCreateDataDto:
      type: object
      properties:
        contact_id:
          type: string
          description: Related contact UUID
        client_id:
          type: string
          description: Related client UUID
        owner_user_id:
          type: string
          description: Owner user UUID
        source_channel:
          type: string
          description: Source channel (primer toque)
          enum:
            - web-cotizador
            - web-demo
            - web-contacto
            - whatsapp
            - email
            - llamada
            - linkedin
            - feria
            - partner
            - referido
            - outbound
            - desconocido
        source_detail:
          type: string
          description: Detalle del origen (página, feria, quién refirió)
        deal_type:
          type: string
          description: Tipo de negocio
          enum:
            - gps
            - unificador
        next_action:
          type: string
          description: Suggested next action
        next_action_due_at:
          type: string
          description: Next action due date
        priority:
          type: object
          description: Prioridad del negocio (1–4); null la deja sin definir
          minimum: 1
          maximum: 4
          nullable: true
        title:
          type: string
          description: Opportunity title
        prospect_name:
          type: string
          description: Prospect snapshot name
        prospect_email:
          type: string
          description: Prospect snapshot email
        prospect_phone:
          type: string
          description: Prospect snapshot phone
        prospect_company:
          type: string
          description: Prospect snapshot company
        prospect_company_rut:
          type: string
          description: Prospect snapshot company RUT
        prospect_company_email:
          type: string
          description: Prospect snapshot company email
        prospect_company_phone:
          type: string
          description: Prospect snapshot company phone
        prospect_company_address:
          type: string
          description: Prospect snapshot company address
        prospect_company_website:
          type: string
          description: Prospect snapshot company website
        prospect_company_size:
          type: string
          description: Prospect snapshot company size
        prospect_company_headquarters:
          type: string
          description: Prospect snapshot company headquarters
        scheduled_resume_at:
          type: string
          description: Scheduled resume date for waiting opportunities
        manual_monthly_uf:
          type: object
          description: Manual monthly business amount in UF
          minimum: 0
        summary:
          type: string
          description: Commercial summary
        private_notes:
          type: string
          description: Private commercial notes
        additional_client_ids:
          description: Additional client UUIDs for the opportunity
          type: array
          items:
            type: string
        additional_contact_ids:
          description: Additional contact UUIDs for the opportunity
          type: array
          items:
            type: string
        pipeline_id:
          type: string
          format: uuid
        stage_id:
          type: string
          format: uuid
      required:
        - title
        - pipeline_id
        - stage_id

````

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