# API - GET em Leads e Oportunidades

## 1. Clientes/Leads

**Informações do Cliente/Lead**

```http
GET /leads/{id}?apitoken=55127977-99ef-4d9b-982c-ae6d3255fb10&i=instancia
```

**Parâmetros de URL**

* `id` (obrigatório): ID do cliente
* `allFields` (opcional): Se 1, retorna todos os campos do lead
* `apitoken` (obrigatório): Token de autenticação da API
* i (obrigatório): sua instância

**Headers**

```http
Content-Type: application/json
```

**Query GraphQL**

```graphql
{
  lead {
    firstname,
    lastname,
    email,
    phone,
    whatsapp,
    mobile,
    address,
    zipcode,
    city,
    state,
    country,
    timezone,
    id,
    firstname,
    lastname,
    fullname,
    company,
    notes {
      id,
      note,
      createdBy,
      createDate
    }
  },
  tags {
    id,
    tag,
    color
  }
}
```

## 2. Oportunidades

**Informações da Oportunidade**

```http
GET /crmopportunity/{id}?apitoken=55127977-99ef-4d9b-982c-ae6d3255fb10&i=instancia
```

**Parâmetros de URL**

* `id` (obrigatório): ID da oportunidade
* `apitoken` (obrigatório): Token de autenticação da API
* i (obrigatório): sua instância

**Headers**

```http
Content-Type: application/json
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sprinthub.com/topicos/api/api-get-em-leads-e-oportunidades.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
