Skenarios support
Skenarios API documentation
Skenarios service has an API which can be used to maintain portfolio and properties. The base URL for all requests is https://api.skenarios.com/
Swagger
Swagger documentation can be found here:
https://app.skenarios.com/ui/vendor/swagger-ui/index.html#/
Authorization and security
Authentication is handled by JSON Web Tokens. The token must be passed as a query parameter (apiKey) or as an HTTP header parameter (Authorization). The token is provided same way is in the JWT specification with Bearer initials. For example Authorization: Bearer <your JWT token here>
An optional way of providing the toke is to add it to end of the requested URL as a query parameter: apiKey=<your JWT token here>
The user's token can be found in the Settings page after the user has logged in. Since the API token allows full access as a user of the Skenarios service, it is very important to keep the token in a secure place.
Only secure HTTPS connections are allowed.
Data format and response codes
The API accepts only JSON as a parameter, except those parameters, which are delivered as a query parameter. All responses are in JSON.
By default, the service sends the following responses:
Response | Explanation |
---|---|
200 OK | Your request was processed successfully |
201 Created | Your request was processed successfully, an object was created |
400 Bad Request | Something is wrong in the received data or query. This is most likely a format issue. |
401 Unauthorized | Your request was not authorized, please check the JWT token. |
403 Forbidden | The user-specified in the JWT token has no access privileges on the given object. |
404 Not Found | The requested service doesn't exist |
422 Unprocessable Entity | Sent parameters were understood, but their content was problematic. Please check your input. |
500 Internal Server Error | Whoops! This is embarrassing, something unexpected happened. We'll take a look at the issue as soon as possible. |
Examples
This is an example, how to create a new portfolio for the user.
Create a portfolio
wget --quiet \
--method POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your JWT token here>' \
--header 'Cache-Control: no-cache' \
--body-data '{"title":"My new portfolio!", "description":"All your base are belong to us!","countryCode":"FI"
}' \
--output-document \
- https://api.skenarios.com/api/v1/portfolio
The expected response should look like something like this:
{"portfolioId":961,"title":"My new portfolio!","description":"All your base are belong to us!","ownerUserId":"<username>","organization":"SkenarioLabs",
"dataCountry":{"countryCode":"FI","name":"Finland","currencyName":"EURO","currencyCode":"EUR","currencySymbol":"€"}
,"projectId":961}
Take a note about the portfolioId, that's needed later for adding properties into the portfolio.
Create a property to the portfolio
First, we need to add a building to a recently created portfolio.
wget --quiet \
--method POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <Your JWT token here>' \
--header 'Cache-Control: no-cache' \
--body-data '[{"country":"FI","address":"Ruutikuja 1","postalCode":"02650","city":"Espoo"}]' \
--output-document \
- https://api.skenarios.com/api/v1/portfolio/<portfolioId>/property
This might take a while and the response should be something like:
[
{
"prototypeId": 34,
"buildYear": 1995,
"demolitionYear": null,
"electricityId": 7,
"heatingId": 20,
"coolingId": null,
"floors": 3,
"floorArea": 730,
"volume": null,
"propertyBuildingId": 150605,
"propertyGroupId": 61837,
"balconies": 0,
"units": null,
"lifts": 0,
"name": "Ruutikuja 1",
"address": "Ruutikuja 1",
"postalCode": "02650",
"city": "Espoo",
"key": "1002854993",
"groupKey": "49-51-79-2",
"polygonUniqueId": "ud9wsg7u5_2",
"country": "FI",
"description": null,
"lat": 60.223643550000006,
"lon": 24.8234182,
"analyticsLat": 60.223643550000006,
"analyticsLon": 24.8234182
}
]
Here, remember the propertyBuildingId, which is needed for creating the unit into the building.
Add a unit into the property and getting its values
Each property consists of units, which are typically for example apartments.
wget --quiet \
--method POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <Your JWT token here>' \
--header 'Cache-Control: no-cache' \
--body-data '{"key":"A4","description":"Studio apartment","usageType":"RESIDENTIAL","address":"Ruutikuja 1 A 4","zipCode":"02650","propertyBuildingId":<propertyBuildingId>,"city":"Espoo","floorArea":28,"floor":2}' \
--output-document \
- https://api.skenarios.com/api/v1/unit
This adds a new unit to the property. The result contains property unit details.
{
"propertyUnitId": 168046,
"propertyBuildingId": 150605,
"propertyGroupId": 61837,
"floorArea": 28,
"floor": 2,
"name": null,
"key": "A4",
"description": "Studio apartment",
"address": "Ruutikuja 1 A 4",
"zipCode": "02650",
"city": "Espoo",
"countryCode": "FI",
"buildingKey": "1002854993",
"usageType": "RESIDENTIAL",
"params": {},
"lat": null,
"lon": null
}
To get value for the new property unit, get the analytics values:
wget --quiet \
--method GET \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <Your JWT token here>' \
--header 'Cache-Control: no-cache' \
--output-document \
- https://api.skenarios.com/api/v1/unit/<propertyUnitId>/analytics
The response consists of an array of possible analytical values created by Skenarios service. Here is an example of property value.
[
{
"year": 2018,
"month": null,
"propertyBuildingId": null,
"propertyUnitId": 168046,
"valueId": 1254209,
"value": 147000,
"type": "PROPERTY_TOTAL_VALUE",
"periodStart": "2018-09-18T11:55:49.909",
"periodEnd": "2099-12-31T23:59:59"
}
]
The value is in the user's organization's local currency. The results may also contain historical and estimated value development. Those values can be found by their period start and end days.
At the moment the value is still a little bit inaccurate. To improve the valuation, check what kind of properties were used in calculating the value.
wget --quiet \
--method GET \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <Your JWT token here>' \
--header 'Cache-Control: no-cache' \
--output-document \
- https://api.skenarios.com/api/v1/unit/168046/properties
The query returns an array of property values.
[
{
"title": "Condition",
"externalKey": "CONDITION",
"valueType": "TEXT",
"value": null,
"valueOptions": [
"Good",
"Mediocre",
"Poor"
],
"parameterTypeId": 15
}
...
]
Currently, the property has no condition level set, which means that it's assumed to be in mediocre condition.
To change that, put a condition value for the property:
wget --quiet \
--method PUT \
--header 'Content-Type: application/json' \
--header 'Authorization: ' \
--header 'Cache-Control: no-cache' \
--body-data '{"value": "Good","externalKey": "CONDITION"}' \
--output-document \
- http://api.skenarios.com/api/v1/unit/115486/properties
After this, you can get the properties value estimation again.
Common interfaces
In following general overview of the available APIs are presented.
Property valuation interfaces
This section contains the two main interfaces needed for the property value estimations. These calls are essentially the same that can be used to add any kind of property to the portfolio.
Typically the process goes:
- Add (POST) a property to the API, the API returns used building id and property id's which are necessary for the next step
- Add (POST) unit for the property. Use previous building and property id. The API result set contains value estimations of the given unit.
POST /api/v1/portfolio/:portfolioId/property
Inserts a building to a portfolio corresponding the id. Portfolio Id is got either from the API call or from the web service's portfolio overview.
To add the building to portfolio, provide buildingId and name. To calculate renovations for building you need to provide floorArea, buildYear, buildingType, floors and location details. Location details should be address, postalCode and city.
Parameters
Name | Type | Is mandatory? | Description |
---|---|---|---|
buildingId | String | Yes | Unique Building id, given by the organization |
name | String | Yes | Building name |
buildYear | Integer | Build year of the property building | |
description | String | Free text description of the property | |
country | String | Country code of the property building, allowed values are FI and UK. | |
buildingType | String | Type of the main property: row house, office, commercial building, detached house, leisure house, apartment, school, retail building, industrial building, garage, warehouse, generic building | |
facadeMaterial | String | The primary building material of the walls of the building. Allowed values are empty, brick, wood, concrete | |
heatingEnergyType | String | primary heating source, allowed values are: ground, electric, district, wood, oil, gas, other. | |
balconies | Integer | Number of balconies in the property | |
units | Integer | Total number of property units in the property | |
lifts | Integer | Total number of lifts in the property | |
floors | Integer/Double | The total number of floors in the property, the ground floor being 1. If a double value is sent, it will be rounded up to the nearest integer e.g. 1.5 will be rounded to 2 | |
balconies | Integer | Total number of balconies in the property | |
floorArea | Integer/Double | Total gross floor area of the property, including cold and heated spaces in m2. If a double value is sent, it will be rounded up to the nearest integer e.g. 99.80 will be rounded to 100 | |
volume | Integer | Total gross volume of the property, including cold and heated spaces in m3. | |
address | String | Street address of a building. This is mandatory unless building id matches with known national property ids. | |
postalCode | String | Postcode of a building. | |
city | String | City where a building is located. | |
useExistingIfAvailable | boolean | If true, tries to find an existing property with building and address details. If found uses that and updates with given other details. Otherwise, creates a new one and returns it. | |
properties | array | An array of specific properties related to this building. The exact keys depend on the organization, however, common keys for everybody are presented in table below. For example: [{"propertyId":"LOT_OWNED", "value" :"yes"},{"propertyId":"LOT_SIZE", "value" :1400}] | |
measures | array | An array of specific values related to this property. Keys are presented in the table below. For example: [{"type":"MONTHLY_LOT_LEASE_AMOUNT", "value" :350}] |
Property properties
Values used with the properties array. Note, that all of these values can be left out, however, they make value estimations much more accurate.
Property id | Description |
---|---|
LOT_OWNED | A boolean value, if the lot is owned by the property |
LOT_SIZE | Size of the lot in square meters. |
LOT_LEASE_END | End year of current lot lease contract, if applicable |
PARKING | Type of available parking for the property. Allowed values are: None, Parking space, Garage, Carport, Undercover parking |
IS_HOUSING_COMPANY | A boolean value, true when the property is a housing company. Generally, this is already part of the value estimation algorithm, but setting this can give more accurate results for example for single family houses, if applicable. |
GARDEN_BUILDINGS | A boolean value, set true if the property has one or more unheated buildings in the property such as garden sheds or barbecue huts. |
WATERSIDE_LOT | A boolean value to indicate if the plot is next to a body of water, such as lake, river or sea. |
ALL_YEAR_ROUND_LIVING | A boolean value to indicate if the property is suitable for all year round living. This is applicable for properties which building type is "leisure house" and it's not relevant for other property types. |
These properties are given as JSON array, as property id/value pairs in the above call's 'properties' property. For example: [{"propertyId":"LOT_OWNED", "value" :"yes"},{"propertyId":"LOT_SIZE", "value" :1400}]
Property measures
Property measurements are values related to property which also may have time element and they may vary over the course of time. Values used with the properties array. Note, that all of these values can be left out, however, they make value estimations much more accurate.
Property id | Description |
---|---|
MONTHLY_LOT_LEASE_AMOUNT | Monthly lot lease in local currency. |
ANNUAL_PROPERTY_TAX_AMOUNT | Annual property tax in local currency. |
ANNUAL_HEATING_COSTS | Annual heating costs in local currency. |
These properties are given as JSON array, as property id/value pairs in the above call's 'properties' property. For example: [{"type":"MONTHLY_LOT_LEASE_AMOUNT", "value" :350},{"type":"ANNUAL_HEATING_COSTS", "value" :1400}]
Results
On success, returns 200
Name | Type | Description |
---|---|---|
address | String | Street address of the building |
analyticsLat | Double | Latitude inside building outlines or in the vicinity of the building |
analyticsLon | Double | Longitude inside building outlines or in the vicinity of the building |
balconies | Integer | Count of balconies in the building |
buildYear | Integer | Build year of the building |
city | String | City of the building |
coolingId | Integer | The ID of the cooling system used in the building |
country | String | Country code |
demolitionYear | Integer | Year of the demolition of the building |
description | String | Description text |
electricityId | Integer | The ID of the electricity system used in the building |
floorArea | Integer | Total floor area of the building |
floors | Integer | Count of floors in the building |
groupKey | String | Mutable key of the property group |
heatingId | Integer | The ID of the heating system used in the building |
key | String | A mutable ID of the building |
lat | Double | Latitude inside building outlines |
lifts | Integer | Count of lifts in the building |
lon | Double | Longitude inside building outlines |
name | String | Name of the building |
polygonUniqueId | String | An immutable ID of the building |
postalCode | String | Postcode of the building |
propertyBuildingId | Integer | An immutable ID of the building |
propertyGroupId | Integer | An immutable ID of the property group |
prototypeId | Integer | An immutable ID of the building prototype |
units | Integer | Amount of property units in the building |
volume | Integer | The total volume of the building |
measures | Array | An array containing measures related to the property. |
properties | Array | An array containing properties and their values related to the property. |
analytics | Array | An array containing analytics values related to the property. Analytics values are generated by Skenarios service and can't be set anywhere, however they are based on the property features, properties and measures. |
On error, returns 404.
Measures and analytics arrays
The measures and analytics arrays have the following format. Note, that result set may contain multiple same type values, but different validity periods.
Field name | Description |
---|---|
accuracy | The accuracy of the estimated value. This is always null for the measured values. Accuracy is presented as a value between 0 and 1, indicating an estimated error in 70% accuracy. The smaller value is better. The possible range depends on the accuracy of the properties of the property. |
valueId | A unique identifier for the stored value. |
value | The actual value may be either number, boolean or string. |
type | The type code of the value. |
periodStart | Start of value's (estimated) validity. |
periodEnd | The end of value's (estimated) validity. |
POST /api/v1/portfolio/:portfolioId/unit
Inserts a new unit to a portfolio corresponding the id.
Parameters
Name | Type | Description |
---|---|---|
buildingId | String | Building id from the create building. Group id or building id is mandatory. |
groupId | String | The group id of this property group. Group id or building id is mandatory. |
floorArea | Integer/Double | Floor area of the unit in m2 This is mandatory for getting value estimation. If a double value is sent, it will be rounded up to the nearest integer e.g. 99.80 will be rounded to 100 |
floor | Integer/Double | Floor number of the unit, ground floor being 1. If a double value is sent, it will be rounded up to the nearest integer e.g. 1.5 will be rounded to 2 |
name | String | Name of the unit |
unitId | String | Identifying id for the unit, for example, apartment number. Must be unique within the building id. If not given, it'll be generated. |
description | String | Description of the unit. |
usageType | String | Type of the property unit, the allowed values are RESIDENTIAL, OFFICE, RETAIL, STORAGE, OTHER. None is defined, this defaults to RESIDENTIAL. Property value is estimated only for the RESIDENTIAL type. |
address | String | Street address, with the house and apartment number, if available. |
postalCode | String | Postal code of the address. This is mandatory for getting value estimation. |
city | String | City name of the address. This is mandatory for getting value estimation. |
countryCode | String | Either FI or UK |
useExistingIfAvailable | Boolean | True or False, if true, tries to find an existing unit from the group which matches with the unit id or address. If found updates it and returns, otherwise creates a new one with given data. |
properties | Array | An array of specific properties related to this unit. The exact keys depend on the organization, however, common keys for everybody are presented in the table below. For example: [{"propertyId":"SAUNA", "value" :"true"},{"propertyId":"NUMBER_OF_ROOMS", "value" :3}]. These values are elementary for getting the correct price estimation. |
measures | Array | An array of specific values related to this property. Keys are presented in the table below. For example: [{"type":"MONTHLY_MAINTENANCE_FEE", "value" :240}] |
Property properties
The current property detail keys are as follows. Also note, that all of these values can be left out, however they make value estimations much more accurate.
PropertyId | Description |
---|---|
NUMBER_OF_ROOMS | Total count of bedrooms and living room(s). Leave out kitchen and bathrooms. This is mandatory for getting value estimation. |
KITCHEN_TYPE | Type of the kitchen in the property. Allowed values are: Kitchen, Open Plan Kitchen, Kitchenette, Small Kitchen, Kitchenette w/ window, Scullery |
SAUNA | Does the property have a sauna, Allowed values are: Yes, No, Sauna building, Lakeside sauna. |
BALCONY_TYPE | Type of the balcony in the property. Allowed values are: Balcony, Glazed Balcony, French Balcony |
CONDITION | The general condition of the property, allowed values are: New, Excellent, Good, Mediocre, Poor. This is very good for getting the correct value estimation. |
TERRACE_TYPE | Type of the terrace in the property. Allowed values are: Yes, No, Glazed Terrace |
These properties are given as JSON array, as property id/value pairs in the above call's 'properties' property. For example: [{"propertyId":"SAUNA", "value" :"true"},{"propertyId":"NUMBER_OF_ROOMS", "value" :3}]
Property measures
Property measurements are values related to the property which also may have a time element and they may vary over the course of time. Values used with the properties array. Note, that all of these values can be left out, however, they make value estimations much more accurate.
Property id | Description |
---|---|
MONTHLY_MAINTENANCE_FEE | Monthly total maintenance fee in local currency. |
MONTHLY_HOUSING_LOAN_FEE | Monthly total housing loan fee in local currency. |
PROPERTY_VALUE_WITHOUT_DEBT | Total property value without the housing debt part of the unit. "Myyntihinta" |
PROPERTY_TOTAL_VALUE | Total property value. "Velatonhinta" |
TOTAL_HOUSING_COMPANY_LOAN | Total housing company debt coming with this property. Usually same as distract PROPERTY_TOTAL_VALUE from PROPERTY_VALUE_WITHOUT_DEBT |
MONTHLY_RENT | Monthly total rent in local currency. |
These properties are given as JSON array, as property id/value pairs in the above call's 'measures' property. For example: [{"type":"MONTHLY_MAINTENANCE_FEE", "value" :320},{"type":"MONTHLY_HOUSING_LOAN_FEE", "value" :145}]
Results
On success, returns 200
On Success, returns 200 and a list of property unit related analytics values where one element consists of the following parameters
Name | Type | Description |
---|---|---|
propertyUnitId | Integer | The id of the property unit |
propertyBuildingId | Integer | The id of the property building this unit is part of. |
propertyGroupId | Integer | The id of the property group this unit is part of. |
floorArea | Integer | Floor area of the unit in m2 |
floor | Integer | Floor number of the unit, ground floor being 1. |
name | String | Name of the unit |
key | String | Identifying id for the unit |
description | String | Description of the unit |
usageType | String | Type of the property unit, the allowed values are: RESIDENTIAL, OFFICE, RETAIL, STORAGE, OTHER |
address | String | Street address, with the house and apartment number, if available. |
zipCode | String | Postal code of the address |
city | String | City name of the address |
countryCode | String | Either FI or UK |
properties | Array | Contains unit properties |
measures | Array | Contains unit measurements, which were added to the unit. |
analytics | Array | An array containing analytics values related to the property. Analytics values are generated by Skenarios service and can't be set anywhere, however they are based on the property features, properties and measurements. The format of the returned arrays is described above. |
On error, returns 404.
Property analytics values
Property analytics values are values related to property which are generated through Skenarios service. They are always best effort estimates. The accuracy of the relevant estimation is provided along with the value. At the moment property units get only one value.
Property id | Description |
---|---|
PROPERTY_TOTAL_VALUE | Total property value in local currency. This includes possible house debt for the apartments. This value is only calculated for residential buildings when (building) postal code, unit floor area, amount of rooms -property parameter and (building) city are available and unit's usage type is either null or RESIDENTIAL. In other cases, it's left out. |
GET /api/v1/portfolio/: portfolioId/building/:buildingId/renovation
Get all renovations of a building (buildingId) in a portfolio (portfolioId).
Parameters
None.
Results
On Success, returns 200 and an array of renovations where one element consists of the following parameters
Name | Type | Description |
---|---|---|
year | Integer | Renovation year |
propertyBuildingId | Integer | Immutable building ID |
partPeriodId | Integer | Immutable building part period ID |
propertyUnitId | Integer | Immutable unit ID |
cost | Integer | Cost of renovation |
partId | Integer | Immutable building part ID |
renovationId | Integer | Immutable renovation ID |
unitCost | Integer | Cost per effective unit of a renovation |
quantity | Integer | The amount in effective units to calculate the cost |
description | String | Description text |
title | String | Title of renovation |
partType | String | Building part type under renovation. Values are: LIFT, FIRE_PROTECTION, AUTOMATION, COOLING_SYSTEM, HEAT_DISTRIBUTION, HEATING_SYSTEM, INTERIOR, BALCONY, SITEWORK, VENTILATION, ELECTRIC, PIPE, FACADE, WINDOW, OUTER_WALL, ROOF, FOUNDATION, FLOOR, BASE_FLOOR, and OTHER |
changeType | String | Refers to the state of a building part period. ORIGINAL denotes the part to be original, ASSUMED denotes the part is statistically assumed to be installed and PLANNED denotes the part known to be installed. |
partName | String | Name of the building part |
renovationType | String | Type of renovation. Values are PART_CHANGE, TIMBER_CLADDING_PAINTING, CONCRETE_ELEMENT_MORTAR_JOINT, FACADE_PAINTING, BRICK_CLADDING_MORTAR_JOINT, WINDOW_FENCES_AND_FRAMES_PAINTING, WINDOW_SEALING, ROOF_PAINTING, and MISC. |
effectiveUnit | String | The effective unit used in cost calculation |
On error, returns 404.
Portfolio
Portfolios are collections of properties.
POST /api/v1/portfolio
Creates a new portfolio.
Parameters
Name | Type | Is mandatory? | Description |
---|---|---|---|
title | String | Yes | Title of the new portfolio. |
description | String | Description text | |
ownerUserId | String | Yes | Username of the owner of the portfolio |
organization | String | Yes | Name of the owning organization |
dataCountry | String | Yes | Data country. Allowed values are either FI or UK |
Results
On success, returns 200:
Name | Type | Description |
---|---|---|
portfolioId | Number | ID of created portfolio. |
title | String | Title of the new portfolio. |
description | String | Description text |
ownerUserId | String | User name of the owner of the portfolio |
organization | String | Name of the owning organization |
dataCountry | String | Data code of the country. |
projectId | Number | ID of the project. |
On error, returns 404.
PUT /api/v1/portfolio/:portfolioId
Updates given portfolio with given id.
Parameters
Name | Type | Is mandatory? | Description |
---|---|---|---|
title | String | Yes | Title of the new portfolio. |
description | String | Description text | |
ownerUserId | String | User name of the owner of the portfolio | |
organization | String | Yes | Name of the owning organization |
dataCountry | String | Yes | Data country. Allowed values are either FI or UK |
Results
On success, returns 200:
Name | Type | Description |
---|---|---|
portfolioId | Number | ID of the portfolio. |
title | String | Title of the portfolio. |
description | String | Description text |
ownerUserId | String | User name of the owner of the portfolio |
organization | String | Name of the owning organization |
dataCountry | String | Data code of the country. |
projectId | Number | ID of the project. |
On error, returns 404.
GET /api/v1/portfolio/:portfolioId
Gets details of given portfolio.
Parameters
None
Results
On success, returns 200:
Name | Type | Description |
---|---|---|
portfolioId | Number | ID of the portfolio. |
title | String | Title of the portfolio. |
description | String | Description text |
ownerUserId | String | Username of the owner of the portfolio |
organization | String | Name of the owning organization |
dataCountry | String | Data code of the country. |
projectId | Number | ID of the project. |
On error, returns 404.
GET /api/v1/portfolio/:portfolioId/search
Do text search to portfolios properties. Add query parameter query to the URL. Search matches property names and addresses.
Parameters
Query parameter: quert
Results
On success, returns 200. The Response contains an array for matched units, buildings and groups.
Name | Type | Description |
---|---|---|
propertyUnitId | Number | The id of the property unit if applicable. |
propertyBuildingId | Number | The id of the property building if applicable. |
propertyGroupId | Number | The id of the property group if applicable. |
name | String | Name of the property |
address | String | Address of the property |
key | String | User set key of the property |
parentKey | String | User set key of the parent property of the current property |
On error, returns 404.
DELETE /api/v1/portfolio/:portfolioId
Removes portfolio with given ID.
Parameters
None.
Results
On Success, returns 200.
On error, returns 404.
Buildings
Buildings are physical constructions. A building is a part of the property group and may contain property units. Renovations are done for the building.
For more building-related APIs, please refer to the property valuation part in this document.
DELETE /api/v1/portfolio/:portfolioId/building/:buildingId
Removes a property building (buildingId) from a portfolio (portfolioId).
Parameters
None.
Results
On Success, returns 200.
On error, returns 404.
DELETE /api/v1/portfolio/:portfolioId/group/:groupId
Removes a property group (groupId) from a portfolio (portfolioId).
Parameters
None.
Results
On Success, returns 200.
On error, returns 404.
POST /api/v1/building/:propertyBuildingId/renovation
Inserts a renovation into a building (buildingId) in a portfolio (portfolioId).
Parameters
Name | Type | Is mandatory? | Description |
---|---|---|---|
year | Integer | Yes | Renovation year |
partType | String | Yes | Part subject to renovation, allowed values are LIFT, FIRE_PROTECTION, AUTOMATION, COOLING_SYSTEM, HEAT_DISTRIBUTION, HEATING_SYSTEM, INTERIOR, BALCONY, SITEWORK, VENTILATION, ELECTRIC, PIPE, FACADE, WINDOW, OUTER_WALL, ROOF, FOUNDATION, FLOOR, BASE_FLOOR, and OTHER |
renovationType | String | Yes | Type of renovation, allowed values are PART_CHANGE, TIMBER_CLADDING_PAINTING, CONCRETE_ELEMENT_MORTAR_JOINT, FACADE_PAINTING, BRICK_CLADDING_MORTAR_JOINT, WINDOW_FENCES_AND_FRAMES_PAINTING, WINDOW_SEALING, ROOF_PAINTING, and MISC. |
partPeriodId | Integer | Immutable building part period ID | |
propertyBuildingId | Integer | Immutable building ID |
Results
On Success, returns 200.
Name | Type | Description |
---|---|---|
year | Integer | Renovation year |
propertyBuildingId | Integer | Immutable building ID |
partPeriodId | Integer | Immutable building part period ID |
propertyUnitId | Integer | Immutable unit ID |
cost | Integer | Cost of renovation |
partId | Integer | Immutable building part ID |
renovationId | Integer | Immutable renovation ID |
unitCost | Integer | Cost per effective unit of a renovation |
quantity | Integer | Amount in effective units to calculate cost |
description | String | Description text |
title | String | Title of renovation |
partType | String | Building part type under renovation |
changeType | String | Refers to the state of a building part period. ORIGINAL denotes the part to be original, ASSUMED denotes the part is statistically assumed to be installed and PLANNED denotes the part known to be installed. |
partName | String | Name of the building part |
renovationType | String | Type of renovation |
effectiveUnit | String | Effective unit used in cost calculation |
On error, returns 404.
GET /api/v1/building/:propertyBuildingId/renovation
Get all renovations of a building (buildingId) in a portfolio (portfolioId).
Parameters
None.
Results
On Success, returns 200 and a list of renovations where one element consists of the following parameters
Name | Type | Description |
---|---|---|
year | Integer | Renovation year |
propertyBuildingId | Integer | Immutable building ID |
partPeriodId | Integer | Immutable building part period ID |
propertyUnitId | Integer | Immutable unit ID |
cost | Integer | Cost of renovation |
partId | Integer | Immutable building part ID |
renovationId | Integer | Immutable renovation ID |
unitCost | Integer | Cost per effective unit of a renovation |
quantity | Integer | Amount in effective units to calculate cost |
description | String | Description text |
title | String | Title of renovation |
partType | String | Building part type under renovation |
changeType | String | Refers to the state of a building part period. ORIGINAL denotes the part to be original, ASSUMED denotes the part is statistically assumed to be installed and PLANNED denotes the part known to be installed. |
partName | String | Name of the building part |
renovationType | String | Type of renovation |
effectiveUnit | String | Effective unit used in cost calculation |
On error, returns 404.
DELETE /api/v1/buildingRenovation/:renovationId
Removes a renovation (renovationId).
Parameters
None.
Results
On Success, returns 200.
On error, returns 404.
GET /api/v1/building/:buildingId/analytics
Get analytical values of a building (buildingId).
Parameters
None.
Results
On Success, returns 200 and a list of building-related analytics values where one element consists of the following parameters
Name | Type | Description |
---|---|---|
year | Integer | Value year |
month | Value month | |
propertyBuildingId | Integer | Immutable building ID |
propertyUnitId | Integer | Immutable unit ID |
valueId | Integer | Immutable value ID |
value | Integer | Analytics value |
type | String | Analytics type |
periodStart | String | Value's validity period start |
periodEnd | String | Value's validity period start |
On error, returns 404.
Units
Property units are leasable units within properties, such as apartments, parking places or commercial spaces.
POST /api/v1/unit
Adds a new property unit. A typical property unit is a commercial place in a shopping centre or an apartment in an apartment block.
Parameters
Name | Type | Description |
---|---|---|
propertyBuildingId | Integer | The id of the property building this unit is part of. This or property group id is mandatory. |
propertyGroupId | The id of the property group this unit is part of. This or property building id is mandatory. | |
floorArea | Integer | Floor area of the unit in m2 |
floor | Integer | Floor number of the unit, ground floor being 1. |
name | String | Name of the unit |
key | String | Identifying id for the unit |
description | String | Description of the unit |
usageType | String | Type of the property unit, the allowed values are: RESIDENTIAL, OFFICE, RETAIL, STORAGE, OTHER |
address | String | Street address, with the house and apartment number, if available. |
zipCode | String | Postal code of the address |
city | String | City name of the address |
countryCode | String | Either FI or UK |
Results
On Success, returns 200 and a list of property unit related analytics values where one element consists of the following parameters
Name | Type | Description |
---|---|---|
propertyUnitId | Integer | The id of the property unit |
propertyBuildingId | Integer | The id of the property building this unit is part of. |
propertyGroupId | Integer | The id of the property group this unit is part of. |
floorArea | Integer | Floor area of the unit in m2 |
floor | Integer | Floor number of the unit, ground floor being 1. |
name | String | Name of the unit |
key | String | Identifying id for the unit |
description | String | Description of the unit |
usageType | String | Type of the property unit, the allowed values are: RESIDENTIAL, OFFICE, RETAIL, STORAGE, OTHER |
address | String | Street address, with the house and apartment number, if available. |
zipCode | String | Postal code of the address |
city | String | City name of the address |
countryCode | String | Either FI or UK |
On error, returns 404.
GET /api/v1/unit/:unitId
Gets the property unit with given id. A typical property unit is a commercial place in a shopping center or an apartment in an apartment block.
Parameters
None
Results
On Success, returns 200 and a list of property unit related analytics values where one element consists of the following parameters
Name | Type | Description |
---|---|---|
propertyUnitId | Integer | The id of the property unit |
propertyBuildingId | Integer | The id of the property building this unit is part of. |
propertyGroupId | Integer | The id of the property group this unit is part of. |
floorArea | Integer | Floor area of the unit in m2 |
floor | Integer | Floor number of the unit, ground floor being 1. |
name | String | Name of the unit |
key | String | Identifying id for the unit |
description | String | Description of the unit |
usageType | String | Type of the property unit, the allowed values are: RESIDENTIAL, OFFICE, RETAIL, STORAGE, OTHER |
address | String | Street address, with the house and apartment number, if available. |
zipCode | String | Postal code of the address |
city | String | City name of the address |
countryCode | String | Either FI or UK |
On error, returns 404.
PUT /api/v1/unit/:unitId
Updates an existing property unit specified by the ID in the URL. All fields must have value when updating or else they will be replaced with empty values.
Parameters
Name | Type | Description |
---|---|---|
propertyBuildingId | Integer | The id of the property building this unit is part of. This or property group id is mandatory. |
propertyGroupId | The id of the property group this unit is part of. This or property building id is mandatory. | |
floorArea | Integer | Floor area of the unit in m2 |
floor | Integer | Floor number of the unit, ground floor being 1. |
name | String | Name of the unit |
key | String | Identifying id for the unit |
description | String | Description of the unit |
usageType | String | Type of the property unit, the allowed values are: RESIDENTIAL, OFFICE, RETAIL, STORAGE, OTHER |
address | String | Street address, with the house and apartment number, if available. |
zipCode | String | Postal code of the address |
city | String | City name of the address |
countryCode | String | Either FI or UK |
Results
On Success, returns 200 and a list of property unit related analytics values where one element consists of the following parameters
Name | Type | Description |
---|---|---|
propertyUnitId | Integer | The id of the property unit |
propertyBuildingId | Integer | The id of the property building this unit is part of. |
propertyGroupId | Integer | The id of the property group this unit is part of. |
floorArea | Integer | Floor area of the unit in m2 |
floor | Integer | Floor number of the unit, ground floor being 1. |
name | String | Name of the unit |
key | String | Identifying id for the unit |
description | String | Description of the unit |
usageType | String | Type of the property unit, the allowed values are: RESIDENTIAL, OFFICE, RETAIL, STORAGE, OTHER |
address | String | Street address, with the house and apartment number, if available. |
zipCode | String | Postal code of the address |
city | String | City name of the address |
countryCode | String | Either FI or UK |
On error, returns 404.
DELETE /api/v1/unit/:unitId
Removes the property unit with given id.
Parameters
None
Results
On Success, returns 200
GET /api/v1/unit/:unitId/properties
Gets all property unit related properties. Properties are additional details related to the property unit.
Parameters
None
Results
On Success, returns 200 and an array of properties and their values. The array contains following fields:
Name | Type | Description |
---|---|---|
title | String | Title of the property |
externalKey | String | Identifying key of the property |
valueType | String | Type of the expected value. May be TEXT, NUMBERIC or BOOLEAN |
value | String/Numeric | The current value for the propery |
valueOptions | Array | An array containing allowed values for the property. If empty, doesn't contain any restriction for the value. |
parameterTypeId | Numeric | Identifying id for the property |
On error, returns 404.
PUT /api/v1/unit/:unitId/properties
Sets property details.
The current property detail keys are:
ExternalKey | Value |
---|---|
NUMBER_OF_ROOMS | Number |
KITCHEN_TYPE | Kitchen , Open Plan Kitchen , Kitchenette , Small Kitchen , Kitchenette w/ window , Scullery |
SAUNA | True / False |
BALCONY_TYPE | Balcony,Glazed Balcony,French Balcony |
LOT_SIZE | Number |
LOT_OWNED | True / False |
CONDITION | New, Excellent, Good, Mediocre, Poor |
Parameters
Name | Type | Description |
---|---|---|
value | String/Numeric | The new current value for the property |
externalKey | String | Identifying key for the property value |
Results
On Success, returns 200 and an array of properties and their values. It's recommended to check these parameters before getting value for the property since they can affect in that. The array contains following fields:
Name | Type | Description |
---|---|---|
title | String | Title of the property |
externalKey | String | Identifying key of the property |
valueType | String | Type of the expected value. The value is either TEXT, NUMERIC or BOOLEAN |
value | String/Numeric | The current value for the property |
valueOptions | Array | An array containing allowed values for the property. If empty, doesn't contain any restriction for the value. |
parameterTypeId | Numeric | Identifying id for the property |
On error, returns 404.
GET /api/v1/unit/:unitId/analytics
Get analytical values, such as monetary value of a unit. (unitId).
Parameters
None.
Results
On Success, returns 200 and a list of property unit related analytics values where one element consists of the following parameters
Name | Type | Description |
---|---|---|
year | Integer | Value year |
month | Value month | |
propertyBuildingId | Integer | Immutable building ID |
propertyUnitId | Integer | Immutable unit ID |
valueId | Integer | Immutable value ID |
value | Integer | Analytics value |
type | String | Analytics type |
periodStart | String | Value's validity period start |
periodEnd | String | Value's validity period start |
On error, returns 404.
SkenarioLabs