Skip to content

Base URL & Conventions

Base URL

https://<your-host>/core/api

All endpoint paths in this documentation are relative to this base URL.

Response Format

All responses are JSON. Successful responses return 2xx status codes.

Success example

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "name": "REC Matosinhos",
  "created_at": "2024-01-15T10:00:00Z"
}

Error example

{
  "detail": "Community not found"
}

Common HTTP Status Codes

Code Meaning
200 Success
201 Created
204 No content (delete operations)
400 Bad request — invalid payload
401 Unauthorized — missing or invalid token
403 Forbidden — insufficient permissions
404 Resource not found
422 Validation error — see detail for field errors
500 Server error

Date & Time Format

All timestamps use ISO 8601 UTC: 2024-01-15T10:00:00Z or 2024-01-15T10:00:00.

Pagination

Paginated endpoints accept skip (offset) and limit query parameters:

GET /communities/{id}/loads/pagination?skip=0&limit=50&order_by=datetime_timestamp&order=desc

Granularity

Energy data endpoints support the granularity query parameter:

Value Description
MIN15 15-minute intervals (raw)
HOURLY Hourly aggregation
DAILY Daily aggregation
WEEKLY Weekly aggregation
MONTHLY Monthly aggregation