# Listar Dispositivos

Para obtener un listado de los dispositivos, se debe enviar un GET como el que se especifica a continuación.

<mark style="color:blue;">`GET`</mark> `https://api.persat.com.ar/v1/devices`

#### Headers

| Name                                            | Type   | Description     |
| ----------------------------------------------- | ------ | --------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer API\_KEY |

{% tabs %}
{% tab title="200: OK La consulta se ejecutó con éxito" %}

```json
{
    "success": true,
    "data": [
        {
            "id": 2,        
            "type": "VEHICLE",
            "serial_number": "3213213-ABCD....",
            "first_name": "Fiorino",
            "last_name": "JKL-345",
            "working_zones": [
                {
                    "id": 2,
                    "created": "2013-08-16T14:27:20.000Z",
                    "name": " GBA Norte"
                }, { ... }
            ],
            "working_hours": {
                "monday": [],
                "tuesday": [
                    {
                        "start": "05:05",
                        "end": "06:06"
                    }
                ],
                "wednesday": [],
                "thursday": [],
                "friday": [],
                "saturday": [],
                "sunday": [
                    {
                        "start": "01:01",
                        "end": "02:02"
                    }
                ]
            }
        },
        { ... }
    ]
}
```

{% endtab %}
{% endtabs %}

### Analizando la Respuesta

En caso que no haya ningun error, obtenemos

```json
{
    "success": true,
    "data": [
        {
            "id": 2,        
            "type": "VEHICLE",
            "serial_number": "3213213-ABCD....",
            "first_name": "Fiorino",
            "last_name": "JKL-345"
            "working_zones": [
                {
                    "id": 2,
                    "created": "2013-08-16T14:27:20.000Z",
                    "name": " GBA Norte"
                }, { ... }
            ],
            "working_hours": {
                "monday": [],
                "tuesday": [
                    {
                        "start": "05:05",
                        "end": "06:06"
                    }
                ],
                "wednesday": [],
                "thursday": [],
                "friday": [],
                "saturday": [],
                "sunday": [
                    {
                        "start": "01:01",
                        "end": "02:02"
                    }
                ]
            }
        },
        { ... }
    ]
}
```

Lo que se recibe es un array en donde cada elemento del mismo representa un dispositivo.

Los campos de cada dispositivo se explican en [Obtener Dispositivo](/entidades-basicas/dispositivos/obtener-dispositivo.md)


---

# 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.api.persat.com.ar/entidades-basicas/dispositivos/listar-dispositivos.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.
