Notifications
The person's notices and preferences by type.
List the person's notifications
GET /me/notificacoes
Access: Any signed-in person. Success status: 200.
Query parameters
| Parameter | Type | Required | Constraints | Description |
|---|---|---|---|---|
cursor | string | no | to 200 characters; ^[A-Za-z0-9_-]+$ | Cursor returned by the previous page. |
limite | integer | no | 1…50; default: 20 | How many items per page (1 to 200; the default varies by route, usually 50). |
naoLidas | "0" | "1" | no | true returns unread ones only. |
Response
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
items | list of NotificacaoDto | yes | ||
proximo | string or null | yes | ||
naoLidas | integer | yes | 0… |
On error: ErroApi model.
Example
curl -X GET "$API/me/notificacoes" -H "Authorization: Bearer $TOKEN"Count of unread notifications
GET /me/notificacoes/contador
Access: Any signed-in person. Success status: 200.
Response
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
naoLidas | integer | yes | 0… |
On error: ErroApi model.
Example
curl -X GET "$API/me/notificacoes/contador" -H "Authorization: Bearer $TOKEN"Mark notifications as read
POST /me/notificacoes/lidas
Access: Any signed-in person. Rate limit: up to 60 calls every 60 s per origin. Success status: 200.
Request body (MarcarLidas)
Option 1
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
ids | list of string (uuid) | yes | 1–100 items |
Option 2
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
todas | true | yes |
Response
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
naoLidas | integer | yes | 0… |
On error: ErroApi model.
Example
curl -X POST "$API/me/notificacoes/lidas" -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"ids":["0198a000-0000-7000-8000-000000000001"]}'Read notification preferences
GET /me/notificacoes/preferencias
Access: Any signed-in person. Success status: 200.
Response
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
items | list of Preferencia | yes |
On error: ErroApi model.
Example
curl -X GET "$API/me/notificacoes/preferencias" -H "Authorization: Bearer $TOKEN"Update notification preferences
PUT /me/notificacoes/preferencias
Access: Any signed-in person. Rate limit: up to 30 calls every 60 s per origin. Success status: 200.
Request body (PreferenciasAtualizar)
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
items | list of Preferencia | yes | 1–7 items |
Response
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
items | list of Preferencia | yes |
On error: ErroApi model.
Example
curl -X PUT "$API/me/notificacoes/preferencias" -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"items":[{"evento":null,"inApp":null,"push":null}]}'