> For the complete documentation index, see [llms.txt](https://docs.americasoftalmocenter.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.americasoftalmocenter.com/onboarding-americas-oftalmocenter.md).

# Onboarding - Americas Oftalmocenter

## Iniciar Sessão

## Acesso ao Onboarding

<mark style="color:green;">`POST`</mark> `https://grade-backend.vercel.app/session`

Essa rota realiza login com credenciais válidas para obter o **token** e poder utilizar em outras rotas.

#### Request Body

| Name                                    | Type   | Description       |
| --------------------------------------- | ------ | ----------------- |
| email<mark style="color:red;">\*</mark> | String | E-mail do Usuário |
| senha<mark style="color:red;">\*</mark> | String | Senha             |

{% tabs %}
{% tab title="400: Bad Request Resposta Negativa" %}
Quando o token está errado:&#x20;

```javascript
{
  "error": usuário ou senha incorretas. 
}
```

{% endtab %}

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

```javascript
{
  "id": "399e23e2-4eb7-4369-bd7f-2dce80fe2c53",
  "name": "Nome Sobrenome",
  "email": "nome@dominio.com",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiTWF0aGV1cyBTYW50b3MiLCJlbWFpbCI6Im1zYW50b3NAYW1lcmljYXNvZnRhbG1vY2VudGVyLmNvbSIsImlhdCI6MTY3MzA0NDgzOSwiZXhwIjoxNjc1NjM2ODM5LCJzdWIiOiIzOTllMjNlMi00ZWI3LTQzNjktYmQ3Zi0yZGNlODBmZTJjNTMifQ.FyAYPUyd2Cbe4KoiAEOKT7oxc3h_ita4C4rGbwi4MWc"
}
```

{% endtab %}

{% tab title="400: Bad Request Resposta Negativa" %}
Quando não informa o token:&#x20;

```
{
 "error": "O token precisa ser informado."
}
```

{% endtab %}
{% endtabs %}
