# Acessos

{% tabs %}
{% tab title="Dates" %}
O formato utilizado para a busca por data é : `YYYY-MM-DD`

**Exemplo de requisições de Data:**

De 12/07/2023 até 12/07/2023:

dates`[0] = "2023-07-12"`

dates`[1] = "2023-07-12"`
{% endtab %}
{% endtabs %}

## Busca de Acessos

<mark style="color:blue;">`GET`</mark> `https://api.beepayapp.com.br/api/accesses`

#### Query Parameters

| Name      | Type    | Description   |
| --------- | ------- | ------------- |
| cpf       | String  |               |
| dates\[0] | String  | \*obrigatório |
| dates\[1] | String  |               |
| pdv\_id   | Integer | \*obrigatório |

{% tabs %}
{% tab title="200: OK " %}

````json
```json
{
    "current_page": 1,
    "data": [
        {
            "id": int,
            "created_at": string,
            "user_name": string,
            "user_cpf": string,
            "user_telefone": string,
            "device": string,
            "pdv": string,
            "access_order_time": int,
            "order_lifetime": int,
            "order": [
                {
                    "id": int,
                    "status_pedido_id": int
                }
            ]
        }
    ],
    "first_page_url": "",
    "from": 1,
    "last_page": 1,
    "last_page_url": "",
    "links": [
        {
            "url": null,
            "label": "&laquo; Anterior",
            "active": false
        }
    ],
    "next_page_url": "",
    "path": "",
    "per_page": 1,
    "prev_page_url": null,
    "to": 1,
    "total": 1
}
```
````

{% endtab %}

{% tab title="422: Unprocessable Entity " %}

```json
{
    "message": "The given data was invalid.",
    "errors": {
        "campo": [
            "MENSAGEM DE ERRO"
        ]
    }
}
```

{% endtab %}
{% endtabs %}
