Skenarios support
Creating a building and getting modeled EPC values
To find out more about Skenariolabs APIs and authorization please visit Skenarios API documentation
In this example, we will create a new property, unit and get a modeled EPC value.
In the API examples change yourPortfolioId
to the actual numeric portfolio id and change yourTokenHere
to your actual JWT token
To create a new property you need to send a POST request like so:
curl --location --request POST 'https://staging-service-skenarios-priv.herokuapp.com/api/v1/portfolio/yourPortfolioId/building' \
--header 'Authorization: Bearer yourTokenHere' \
--header 'Content-Type: application/json' \
--data-raw '{
"description": "",
"address": "Parklaan 18",
"postalCode": "1060",
"city": "St-Gilles",
"country": "BE",
"buildingType": "semi-detached house",
"floors": 2,
"floorArea": 160,
"latitude": 50.82649781683444,
"longitude": 4.343390067166455,
"buildingName": "My building'\''s name",
"buildYear":1960,
"buildingId":"MyFirstBuilding",
"heatingEnergyType": "ELECTRICITY",
"coolingEnergyType": "NONE",
"electricityEnergyType": "ELECTRICITY",
"attributes":[
{
"key": "CONDITION",
"value": "Good"
}
]
}'
Heating Types that the application accepts:
GAS_CONDENSING_BOILER
NONE
GAS_BOILER
OIL_BOILER
ELECTRICITY
WATER_SOURCE_HEAT_PUMP
GROUND_SOURCE_HEAT_PUMP
EXHAUST_AIR_HEAT_PUMP
AIR_TO_WATER_HEAT_PUMP
AIR_TO_AIR_HEAT_PUMP
Cooling Types that the application accepts:
NONE
AIR_TO_AIR_HEAT_PUMP
GENERIC_COOLING_SYSTEM
GROUND-SOURCE_HEAT_PUMP
Electricity Types that the application accepts:
ELECTRICITY
NONE
A condition that the application accepts
Good, Poor, Mediocre (or don’t send it)
Building Types that the application accepts:
single-family house
semi-detached house
row house
apartment
vacation home
office
commercial building
garage
generic building
school
warehouse
other
This will create a property building in Skenariolabs system and will return a created building back such as:
{
"groupId": "BESt-Gilles1060Parklaan 18",
"buildingId": "MyFirstBuilding",
"description": "",
"address": "Parklaan 18,",
"postalCode": "1060",
"city": "St-Gilles",
"country": "BE",
"province": null,
"buildingType": "semi-detached house",
"floors": 2,
"floorArea": 160,
"buildYear": 1960,
"volume": null,
"balconies": null,
"units": null,
"lifts": null,
"latitude": 50.82649781683444,
"longitude": 4.343390067166455,
"created": "2023-03-07T17:43:36.550",
"updated": "2023-03-07T17:43:37.006",
"buildingName": "My building's name",
"polygonUniqueId": null,
"nationalBuildingId": null,
"attributes": [],
"heatingEnergyType": "gas",
"electricityEnergyType": "none",
"coolingEnergyType": "none",
"metadata": {},
"grossInternalArea": null,
"netInternalArea": null,
"energyClass": "D-",
"eValue": 198,
"userConfirmed": false
}
2. To add a new property unit you need to call a POST API such as
curl --location --request POST 'https://staging-service-skenarios-priv.herokuapp.com/api/v1/portfolio/yourPortfolioId/unit/' \
--header 'Authorization: Bearer yourTokenHere' \
--header 'Content-Type: application/json' \
--data-raw '{
"unitId": "MyFirstUnit",
"name": "My First Unit",
"groupId": "BESt-Gilles1060Parklaan 18",
"buildingId": "MyFirstBuilding",
"description": "",
"usageType": "RESIDENTIAL",
"externalApplicationId": "",
"floorArea": 100,
"floor": 2,
"attributes": [
{
"key": "NUMBER_OF_BEDROOMS",
"value": 3
},
{
"key": "CONDITION",
"value": "Good"
}
]
}'
3. After unit is created give it few seconds and then you can get Unit details including the E-value and Energy class like so. The reason for waiting for few seconds as valuations, epc models etc are calculated in the background
curl --location --request GET 'localhost:9000/api/v1/portfolio/5926/unit/MyFirstUnit' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiJRaHNwWnNDNHBpZUhKS0oxaXFBWEdKU1NzeE83bW8zTiIsImlhdCI6MTY3ODIxNDI3NywiYXVkIjoiYXBpLnNrZW5hcmlvcy5jb20iLCJleHAiOjE2NzgyNTc0NzcsImlzcyI6InNrZW5hcmlvcy5jb20iLCJzdWIiOiJpbGphQHNrZW5hcmlvbGFicy5jb20iLCJ1c2VyTmFtZSI6ImlsamFAc2tlbmFyaW9sYWJzLmNvbSIsImVtYWlsIjoiaWxqYUBza2VuYXJpb2xhYnMuY29tIiwic2tlbmFyaW9zVXNlcklkIjo1OSwib3JnYW5pemF0aW9uSWQiOjE1M30.Smn14TREGOBC-xlG4esp-aLu9XyDOb06P912kV-Hk_NfftULr0SOJyPgufEaEuj3NP5jxreQ90KbJO4HQw3XoQ'
The response will include eValue and energyClass such as:
{
"unitId": "MyFirstUnit",
"name": "My First Unit",
"groupId": "BESt-Gilles1060Parklaan 18",
"buildingId": "MyFirstBuilding",
"description": "",
"usageType": "RESIDENTIAL",
"externalApplicationId": null,
"floorArea": 100,
"floor": 1,
"created": "2023-03-07T18:50:10.189",
"updated": "2023-03-07T18:50:10.548",
"address": "Av. du Parc 32",
"postalCode": "1060",
"city": "St-Gilles",
"country": "BE",
"attributes": [
{
"key": "CONDITION",
"value": "Good"
},
{
"key": "NUMBER_OF_BEDROOMS",
"value": 3
}
],
"metadata": {
"attribute.CONDITION": {
"dataSourceType": "INPUT",
"userId": "ilja@skenariolabs.com",
"dataSource": null,
"timestamp": "2023-03-07T18:50:10.245961599"
},
"attribute.NUMBER_OF_ROOMS": {
"dataSourceType": "INPUT",
"userId": "ilja@skenariolabs.com",
"dataSource": null,
"timestamp": "2023-03-07T18:50:10.245961599"
},
"unit.eValue": {
"dataSourceType": "ASSUMED",
"userId": null,
"dataSource": "20221110-201202",
"timestamp": "2023-03-07T18:50:10.546570004"
},
"unit.energyClass": {
"dataSourceType": "ASSUMED",
"userId": null,
"dataSource": "20221110-201202",
"timestamp": "2023-03-07T18:50:10.546570004"
}
},
"energyClass": "D-",
"eValue": 198
}
Related content
SkenarioLabs