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

# Listar Negócios do Pipeline

> Retorna a lista de negócios do pipeline de CRM da conta autenticada, com suporte a filtros.

## Requisição

`GET https://crm.wavups.com/api/v1/account-crm-pipeline-deal`

<ParamField header="Token" type="string" required>
  Seu token de autenticação.
</ParamField>

### Query Parameters

<ParamField query="stageId" type="string">
  Filtra negócios pelo ID do estágio do pipeline.
</ParamField>

<ParamField query="leadId" type="string">
  Filtra negócios pelo ID do lead vinculado.
</ParamField>

<ParamField query="dealOwner" type="string">
  Filtra negócios pelo ID do usuário responsável.
</ParamField>

***

## Resposta

Retorna um array de objetos de negócio. Os campos `accountId` e `updatedAt` são omitidos.

<ResponseField name="id" type="string">
  Identificador único do negócio.
</ResponseField>

<ResponseField name="title" type="string">
  Título do negócio.
</ResponseField>

<ResponseField name="stageId" type="string | null">
  ID do estágio em que o negócio se encontra.
</ResponseField>

<ResponseField name="leadId" type="string | null">
  ID do lead vinculado ao negócio.
</ResponseField>

<ResponseField name="dealOwner" type="string | null">
  ID do usuário responsável pelo negócio.
</ResponseField>

<ResponseField name="value" type="number | null">
  Valor estimado do negócio.
</ResponseField>

<ResponseField name="status" type="string | null">
  Status do negócio (ex: `open`, `won`, `lost`).
</ResponseField>

<ResponseField name="expectedCloseDate" type="string | null">
  Data prevista de fechamento (ISO 8601).
</ResponseField>

<ResponseField name="createdAt" type="string">
  Data de criação (ISO 8601).
</ResponseField>

***

## Exemplos

<RequestExample>
  ```bash GET /api/v1/account-crm-pipeline-deal theme={null}
  curl --request GET \
    --url 'https://crm.wavups.com/api/v1/account-crm-pipeline-deal?stageId=clstg0001' \
    --header 'Token: SEU_TOKEN_DE_API'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  [
    {
      "id": "cldeal001",
      "title": "Contrato Empresa X",
      "stageId": "clstg0001",
      "leadId": "cllead001",
      "dealOwner": "cluser001",
      "value": 15000,
      "status": "open",
      "expectedCloseDate": "2025-08-01T00:00:00.000Z",
      "createdAt": "2025-06-15T14:30:00.000Z"
    }
  ]
  ```

  ```json 500 theme={null}
  {
    "error": "Error to get account CRM pipeline deals"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /account-crm-pipeline-deal
openapi: 3.0.3
info:
  title: WavUps CRM API
  description: >-
    API pública da plataforma WavUps CRM — gerencie leads, produtos, categorias,
    atendimentos, agendamentos, conversas e pipelines de CRM.
  version: 1.0.0
servers:
  - url: https://crm.wavups.com/api/v1
    description: Servidor de produção
security:
  - Token: []
paths:
  /account-crm-pipeline-deal:
    get:
      tags:
        - Negócios do Pipeline
      summary: Listar Negócios do Pipeline
      description: Retorna a lista de negócios do pipeline de CRM da conta autenticada.
      operationId: listCrmPipelineDeals
      parameters:
        - name: stageId
          in: query
          description: Filtra negócios pelo ID do estágio.
          schema:
            type: string
        - name: leadId
          in: query
          description: Filtra negócios pelo ID do lead.
          schema:
            type: string
        - name: dealOwner
          in: query
          description: Filtra negócios pelo ID do responsável.
          schema:
            type: string
      responses:
        '200':
          description: Lista de negócios retornada com sucesso.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CrmPipelineDeal'
        '500':
          $ref: '#/components/responses/Error500'
components:
  schemas:
    CrmPipelineDeal:
      type: object
      properties:
        id:
          type: string
        stageId:
          type: string
          nullable: true
        leadId:
          type: string
          nullable: true
        dealOwner:
          type: string
          nullable: true
        title:
          type: string
        value:
          type: number
          nullable: true
        status:
          type: string
          nullable: true
        expectedCloseDate:
          type: string
          format: date-time
          nullable: true
        createdAt:
          type: string
          format: date-time
    ErrorMessage:
      type: object
      properties:
        error:
          type: string
          example: Recurso não encontrado.
  responses:
    Error500:
      description: Erro interno no servidor.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
  securitySchemes:
    Token:
      type: apiKey
      in: header
      name: Token
      description: Token de autenticacao gerado na plataforma WavUps CRM.

````