# Device Endpoints
## Crear un dispositivo
### Request
```bash
curl -X 'POST' \
'https://api-cocoapp-ml.azurewebsites.net/v1/device/save' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"farm_id": 1,
"android_id": "2fc4b5912826ad9",
"version_sdk": 29,
"version_release": 29,
"version_codename": "Android_10.453.2",
"version_base_os": "10.32",
"brand": "xiaomi",
"device": "REDMI_9T",
"hardware": "4565rt_revision",
"model": "M2010J19SG",
"type": "smartphone"
}'
```
### Response
```json
{
"id": 1,
"farm_id": 1,
"android_id": "2fc4b5912826ad9",
"version_sdk": 29,
"version_release": 29,
"version_codename": "Android_10.453.2",
"version_base_os": "10.32",
"brand": "xiaomi",
"device": "REDMI_9T",
"hardware": "4565rt_revision",
"model": "M2010J19SG",
"type": "smartphone",
"created_at": "2022-08-17T17:16:25.979329"
}
```
## Crear un fruto
### Request
```bash
curl -X 'POST' \
'https://api-cocoapp-ml.azurewebsites.net/v1/device/save' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"farm_id": 1,
"short_code": "FRUIT_0003",
"image_src": "https://docplayer.es/docs-images/76/73656318/images/20-1.jpg",
"lat": -1.497789,
"long": -79.398109,
"disease_data": {
"disease_id": 1,
"hit_percentage": 0.96
}
}'
### Response
```json
```