# API: Coletas

---

- [Store](#store)

<a name="store"></a>
## Store

### Endpoint
|Método|URI|Headers|
|:|:-|:|
|POST|`/coletas`|Default|

### Body
```json
{
    "equipamento_id": 1,
    "collected_at": "2024-11-28 11:22:43",
    "readings": [
        {
            "registered_at": "2024-12-03 16:15:00",
            "battery_level": 7333,
            "external_reading": [
                {
                    "ativo_medicao_id": 1,
                    "value": 9778
                },
                //...
            ],
            "internal_reading": [
                {
                    "module_level": 1,
                    "readings": [
                        {
                            "ativo_medicao_id": 1,
                            "value": 9778
                        },
                        //...
                    ]
                },
                //...
            ]
        },
        //...
    ]
}
```

### Responses
<larecipe-badge type="success" rounded><i class="fa fa-check" style="margin-right:9px"></i>200 - OK</larecipe-badge>
```json
{
    "id": <id>,
    "equipamento_id": <equipamento_id>,
    "collected_at": <collected_at>,
    "updated_at": <updated_at>,
    "created_at": <created_at>,
}
```

<larecipe-badge type="danger" rounded><i class="fa fa-lock" style="margin-right:9px"></i>401 - Unauthorized</larecipe-badge>
```json
{
    "message": "Unauthenticated."
}
```