Generate Consolidated Statement
Generates a consolidated statement of transactions for the given period and provides a
link to download the file (JSON or OFX). The generated file is downloaded via the
public endpoint GET /api/statement/consolidated/files/{token}.
Once the file is ready, an asynchronous notification is sent to the
channel (Channel-Id) informing the download link.
| Method | POST |
| Path | /api/statement/consolidated |
| Authentication | Authorization (****** + Channel-Id |
Authentication
Requires the Authorization header with a valid, non-expired token, previously
issued for the integrator. If missing, malformed, or the token is
invalid/expired, the API returns 401 Unauthorized:
{ "error": "Token ausente ou inválido" }
or
{ "error": "Token inválido" }
Also requires the Channel-Id: <channel_id> header. If missing, it returns
400 Bad Request:
{ "message": "Channel-Id header is required" }
Request body
{
"start_date": "2025-01-01",
"end_date": "2025-01-31",
"file_type": "json"
}
| Field | Type | Required | Description |
|---|---|---|---|
start_date | string | Yes | Period start date, format YYYY-MM-DD |
end_date | string | Yes | Period end date, format YYYY-MM-DD |
file_type | string | No | File format: json or ofx. Any value other than json is treated as ofx (default when omitted) |
Period validation rules
start_dateandend_datemust be in theYYYY-MM-DDformat.end_datecannot be earlier thanstart_date.- The maximum allowed range is 31 days.
Responses
200 OK — statement generated successfully:
{
"start_date": "2025-01-01",
"end_date": "2025-01-31",
"link": "https://.../api/statement/consolidated/files/<token>?file_type=json",
"expires_at": "2025-02-07T00:00:00Z",
"groups": [
{
"status": "PAID",
"total_amount": 1500.50,
"items": [
{ "id": "tx-123", "amount": 500.00, "fee": 1.50 }
]
}
]
}
400 Bad Request — invalid body, missing Channel-Id, invalid date format,
invalid date range, or no transactions found in the period:
{ "message": "Formato de data invalido. Use YYYY-MM-DD" }
{ "message": "Range maximo permitido e de 31 dias" }
{ "message": "Channel-Id header is required" }
Retention
The generated file remains available for download for a limited period (default: 7 calendar days), as described in Download Consolidated Statement.