File Exports¶
RECreation can generate ready-made reports and data files in Excel, PDF, and CSV formats. All file generation is asynchronous — you submit a request, poll until the file is ready, then download it.
Billing Guides (Excel / PDF)¶
A Billing Guide is a financial summary report generated for a date range, showing each member's revenues, costs, and energy data.
Generation Flow¶
sequenceDiagram
participant Client
participant API
participant Celery
participant Storage
Client->>API: POST /billing-guides/excel
API->>Celery: Queue async task
API-->>Client: 202 Accepted
Celery->>Storage: Generate & save file
Client->>API: GET /billing-guides (poll)
API-->>Client: File ready
Client->>API: GET /billing-guides/{file_name}
API-->>Client: Download file
Request¶
curl -X POST \
https://<host>/core/api/communities/{community_id}/sessions/settlement/billing-guides/excel \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"start_date": "2024-01-01",
"end_date": "2024-01-31",
"user_ids": [],
"sheets": ["summary", "transactions", "settlement"]
}'
user_ids: empty array = all members; or provide specific user UUIDssheets: which content sheets to include in the Excel
Polling for Completion¶
When the file appears in the list, it is ready to download.
Download¶
Returns the file as a binary download (Content-Type: application/octet-stream).
PDF Billing Guides¶
PDF generation follows the same flow using:
Performance
Large date ranges or communities with many members may take 30–120 seconds to generate. Always use async polling rather than expecting an immediate response.
Dynamic Allocation Coefficients Export (CSV)¶
For communities using DYNAMIC allocation (TREE_DNAC), after running clear_market you
can export the bilateral energy allocation coefficients as a DSO-compliant ZIP file containing
CSVs. This file is typically submitted to E-REDES for validation before final settlement.
JSON response¶
GET /core/api/communities/{community_id}/bilateral_energy_allocations/data?start_date=YYYY-MM-DD&end_date=YYYY-MM-DD
Returns the coefficients as JSON — only pairs with a non-zero coefficient are included.
[
{
"datetime_timestamp": "2026-04-23T09:54:51.770Z",
"receiver_identifier": "PT000...1AA",
"provider_identifier": "PT000...1BB",
"coefficient_value": 0.45
}
]
DSO-compliant ZIP export¶
GET /core/api/communities/{community_id}/bilateral_energy_allocations/export?start_date=YYYY-MM-DD&end_date=YYYY-MM-DD
Downloads a ZIP archive with CSVs formatted to the DSO's specification, ready to submit directly to E-REDES.