94 lines
1.5 KiB
Markdown
94 lines
1.5 KiB
Markdown
# Contract: Admin Boletos Endpoints
|
|
|
|
**Prefix:** `/api/v1/admin/boletos`
|
|
**Auth:** JWT Bearer (admin)
|
|
|
|
---
|
|
|
|
## GET /api/v1/admin/boletos
|
|
Lista todos os boletos.
|
|
|
|
### Response 200
|
|
```json
|
|
[
|
|
{
|
|
"id": "uuid",
|
|
"user_id": "uuid",
|
|
"property_id": "uuid",
|
|
"description": "Aluguel Maio",
|
|
"amount": 3500.00,
|
|
"due_date": "2026-05-10",
|
|
"status": "pending",
|
|
"url": "https://boleto.banco.com.br/abc123"
|
|
}
|
|
]
|
|
```
|
|
|
|
---
|
|
|
|
## POST /api/v1/admin/boletos
|
|
Cria um novo boleto.
|
|
|
|
### Request
|
|
```json
|
|
{
|
|
"user_id": "uuid",
|
|
"property_id": "uuid",
|
|
"description": "Aluguel Maio",
|
|
"amount": 3500.00,
|
|
"due_date": "2026-05-10",
|
|
"url": "https://boleto.banco.com.br/abc123"
|
|
}
|
|
```
|
|
|
|
### Response 201
|
|
```json
|
|
{
|
|
"id": "uuid",
|
|
"user_id": "uuid",
|
|
"property_id": "uuid",
|
|
"description": "Aluguel Maio",
|
|
"amount": 3500.00,
|
|
"due_date": "2026-05-10",
|
|
"status": "pending",
|
|
"url": "https://boleto.banco.com.br/abc123"
|
|
}
|
|
```
|
|
|
|
---
|
|
|
|
## PUT /api/v1/admin/boletos/:id
|
|
Atualiza um boleto existente.
|
|
|
|
### Request
|
|
```json
|
|
{
|
|
"user_id": "uuid",
|
|
"property_id": "uuid",
|
|
"description": "Aluguel Maio",
|
|
"amount": 3500.00,
|
|
"due_date": "2026-05-10",
|
|
"url": "https://boleto.banco.com.br/abc123"
|
|
}
|
|
```
|
|
|
|
### Response 200
|
|
```json
|
|
{
|
|
"id": "uuid",
|
|
"user_id": "uuid",
|
|
"property_id": "uuid",
|
|
"description": "Aluguel Maio",
|
|
"amount": 3500.00,
|
|
"due_date": "2026-05-10",
|
|
"status": "pending",
|
|
"url": "https://boleto.banco.com.br/abc123"
|
|
}
|
|
```
|
|
|
|
---
|
|
|
|
## DELETE /api/v1/admin/boletos/:id
|
|
Remove um boleto.
|
|
|
|
### Response 204
|