> For the complete documentation index, see [llms.txt](https://docs.milksrota.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.milksrota.com.br/espanol/milks-rota/viagens/coleta-real.md).

# Colecciones reales

{% hint style="danger" %}
El tratamiento de la distribución pendiente y otras validaciones son responsabilidad del proceso de integración implementado por el ERP del cliente.
{% endhint %}

> ## Método POST
>
> <http://app.milksrota.com.br/api/retaguardasync/readColetaReal>

## Requisição

### Dados da requisição

```javascript
{
    "conta_id": 99999,
    "token": "afbd-b926-8b33-b771",
    "doc": 99.999.999/9999-99
    "dt_inicio": "2020-09-03",
    "dt_fim": "2020-09-03"
}
```

{% hint style="info" %}
**conta\_id**: Deve ser informado o ID da conta que você encontra na tela ***"Sua conta"*** no menu principal no painel do Milk's Rota.

**token**: Deve ser informado o Token da conta, que você encontra na tela ***"Sua conta"*** no menu principal no painel do Milk's Rota.

**doc:** Deve ser informado o CNPJ da conta cadastra. Pode ser encontrado na tela *"sua conta"* no menu principal do painel Milk's Rota.

**dt\_inicio:** Data inicial do período que se deseja consultar as coletas.

**dt\_fim:** Data final do período que se deseja consultar as coletas.
{% endhint %}

## Resposta

### 200: Registros localizados

```javascript
{
    "success": true,
    "message": "OK",
    "data": [
        {
            "id": "2474217",
            "parada_id": "1695623",
            "coletor_id": "1813",
            "tanque_id": "61229",
            "produtor_id": null,
            "conta_id": null,
            "dt_push": null,
            "quantidade": "3070",  // volume registrado pelo agente de coleta
            "dt_coleta": "2019-11-03 06:26:25",
            "coletada": "1",
            "alizarol": "1",
            "tipo_alizarol": null,
            "temperatura": "4.00",
            "dt_edicao": null,
            "regua": "100.50",
            "amostra": "",
            "contraprova": "",
            "comunitaria": "0",
            "vinculada": "0",
            "diferenca": "0",
            "distribuida": "1",
            "informado": "0",
            "latitude": null,
            "longitude": null,
            "exame_visual": null,
            "fora_da_linha": "0",
            "fora_da_media": "0",
            "dt_exclusao": null,
            "usuario_id": null,
            "dt_atualizacao": null,
            "tanque": "4117-01/1",
            "tipo_leite": "V",
            "fazenda": "35251999",
            "viagem_id": "149061",
            "coletor": "322",
            "produtor": "4117",
            "rota": "105",
            "linha": "00120",
            "veiculo": "PUJ4267",
            "coletivo": "0",
            "boca": "2",
            "armazenamentos": "3070"
        },
    ],
    "monitor.time": 0.10523581504822
}
```

{% hint style="success" %}
Os registros de coleta cadastrados no período foram retornados com sucesso.
{% endhint %}

### 404: Conta não localizada

```javascript
{    
    "success": false,
    "message": "Conta não localizada",
    "data": [],
    "monitor.time": 2.14737200737 // Tempo de execução
}
```

{% hint style="danger" %}
**O que isso significa?** Significa que o ID da conta não foi localizado na Plataforma Milk's.
{% endhint %}

### 403: Token inválido

```javascript
{
    "success": false,
    "message": "Token inválido",
    "data": [],
    "monitor.time": 2.14737200737 // Tempo de execução
}
```

{% hint style="danger" %}
**O que isso significa?** Significa que o token informado na requisição não corresponde ao token cadastrado para a conta.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.milksrota.com.br/espanol/milks-rota/viagens/coleta-real.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
