Key Pydantic Schemas¶
These are the most commonly used request and response schemas.
Community¶
CommunityPayloadSchema (create/update)¶
{
"name": "REC Matosinhos",
"phone": "+351 220 000 000",
"address": "Rua do Porto, 123, Matosinhos",
"nif": "500000000",
"market_rate": "VANILLA_IMR",
"market_divisor": 0.5,
"market_compensation": 0.5,
"lem_trading_fee": 0.01,
"settlement_sale_price_type": "INDIVIDUAL",
"transaction_adjustment_tolerance": 0.001,
"method_alloc_coeff": "FIXED"
}
Energy Management Configuration¶
UnifiedConfigCreateSchema¶
{
"module_type": "OSTEC_SIMPLE",
"horizon": 24,
"delta_t": 1.0,
"strict_pos_coeffs": true,
"total_share_coeffs": false,
"config_data": {
"l_extra": 10.0,
"l_market_buy": 500.0,
"l_market_sell": -500.0,
"solver": "CPLEX"
},
"is_active": true
}
Flexibility Offer¶
ExternalFlexibilityOfferSchema¶
{
"external_offer_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"flexibility_zone_id": "3fa85f64-5717-4562-b3fc-2c963f66afa7",
"quantity": 10.5,
"divisible": true,
"activation_price": 50.0,
"reservation_price": 5.0,
"recovery_time": 30,
"start_datetime": "2024-01-15T10:00:00",
"end_datetime": "2024-01-15T11:00:00",
"offer_data": {}
}
Energy Setpoint¶
ExternalSetpointSchema¶
{
"resource_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"meter_id": null,
"datetime_timestamp": "2024-01-15T10:00:00",
"setpoint_value": 5.2,
"setpoint_type": "STORAGE_CHARGE",
"calculation_metadata": {
"solver_status": "optimal",
"solve_time_ms": 234
}
}
Load Data¶
LoadPayloadSchema¶
{
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"datetime_timestamp": "2024-01-15T10:00:00",
"energy_value": 0.452,
"is_estimated": false
}