Buildings
Buildings represent the physical structures that are being insured on a premises in a commercial risk profile. On this page, we’ll dive into the different buildings endpoints you can use to manage them programmatically.
The Building object
Building objects represent a single building in a commercial risk profile. They contain the following properties and relationships:
Properties
- Name
premise
- Type
- string
- Filterable
- Description
- The UUID of the premise this building belongs to.
- Name
number
- Type
- string
- Filterable
- Sortable
- Description
- The building's number
- Name
description
- Type
- nullable string
- Filterable
- Sortable
- Name
year_built
- Type
- nullable string
- Filterable
- Sortable
- Name
number_stories
- Type
- nullable int
- Filterable
- Sortable
- Name
floor_area
- Type
- nullable int
- Filterable
- Sortable
- Name
construction
- Type
- nullable string
- Filterable
- Sortable
- Name
occupancy
- Type
- nullable string
- Sortable
- Name
protection_class
- Type
- nullable string
- Sortable
- Name
sprinkler
- Type
- nullable string
- Filterable
- Sortable
- Name
flood_zone
- Type
- nullable string
- Sortable
- Name
itv
- Type
- nullable float
- Filterable
- Sortable
- Name
assessor
- Type
- nullable float
- Filterable
- Sortable
- Name
appraisal
- Type
- nullable float
- Filterable
- Sortable
- Name
notes
- Type
- nullable string
- Name
image
- Type
- nullable string
Meta
- Name
created
- Type
- timestamp
- Filterable
- Sortable
- Name
updated
- Type
- timestamp
- Filterable
- Sortable
- Name
has_property_data
- Type
- bool
- Filterable
Relations
Learn more about including relations.- Name
premise
- Type
- Premise
- Description
- Name
premise.address
- Type
- Address
- Description
- Name
subjects_of_insurance
- Type
- Subject of Insurance
- Description
List all buildings
This endpoint allows you to retrieve a paginated list of all buildings in the corresponding commercial risk profile. By default, 50 buildings are shown per page.
Parameters
See the building model for a list of all available filters and sorts.
Searchable
You can search for buildings by providing a search query in the filter[search]
parameter.
The search query will be matched against a building's number, description, premise's description or address.
Request
curl -G https://app.wunderite.com/api/v1/risks/{risk}/data/buildings \
-H "Authorization: Bearer {token}" \
-d filter[search]=Location \
-d per_page=50
Response
{ "data": [ { "object": "building", "uuid": "8f2c9f0a-c74a-4d3a-9eb2-842a54c1643c", "data": { "premise": "8f2c9f0b-6b31-4149-9e27-2771b439bf2b", "number": 1, "description": "Headquarters", "year_built": null,
Create buildings
This endpoint allows you to create new buildings in the corresponding commercial risk profile.
At least one building object must be provided in the request body.
You can also create subjects of insurance in the same request if you provide the subjects_of_insurance
property.
Required properties
- Name
premise
- Type
- string
- Description
The premise UUID that the building should belong to.
Optional properties
See all available properties in the building properties section.
- Name
number
- Type
- int|null
- Description
The building's number. When this property is not provided, or uses a
null
value, the building will be assigned a number automatically.
- Name
subjects_of_insurance
- Type
- SubjectOfInsurance[]
- Description
An array of subject of insurance objects that should be created with the building.
Request
curl -X POST https://app.wunderite.com/api/v1/risks/{risk}/data/buildings \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d '{
"data": [
{
"object": "building",
"data": {
"premise": "8f2c9f0b-6375-4091-bcf8-f7142e25ba3d",
"number": 5,
"description": "Headquarters",
"year_built": 2000,
"number_stories": 2,
"floor_area": 10000,
"construction": "Joisted Masonry",
"protection_class": "P3, Protected 3",
"notes": "This is the main building"
}
}
]
}'
Response
{ "data": [ { "object": "building", "uuid": "9831255e-4591-4b2e-a652-b3c0143eacf1", "data": { "premise": "8f2c9f0b-6375-4091-bcf8-f7142e25ba3d", "number": 5, "description": "Headquarters", "year_built": "2000",
Request with sub resources
curl -X POST https://app.wunderite.com/api/v1/risks/{risk}/data/buildings?include=subjects_of_insurance \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d '{
"data": [
{
"object": "building",
"data": {
"premise": "8f2c9f0b-6375-4091-bcf8-f7142e25ba3d",
"number": 5,
"description": "Headquarters",
"year_built": 2000,
"number_stories": 2,
"floor_area": 10000,
"construction": "Joisted Masonry",
"protection_class": "P3, Protected 3",
"notes": "This is the main building",
"subjects_of_insurance": [
{
"object": "subject_of_insurance",
"data": {
"type": "b",
"amount": 1000000
}
}
]
}
}
]
}'
Response
{ "data": [ { "object": "building", "uuid": "ed09b79d-698b-4e84-94b5-89bfa64bc998", "data": { "premise": "8f2c9f0b-6375-4091-bcf8-f7142e25ba3d", "number": 5, "description": "Headquarters", "year_built": "2000",
Update buildings
This endpoint allows you to perform bulk updates on buildings.
At least one building object must be provided in the request body. Each object must contain at least one property from the building properties section.
Properties that are not provided will not be updated.
To clear a property, provide a null
value.
Request
curl -X PATCH https://app.wunderite.com/api/v1/risks/{risk}/data \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d '{
"data": [
{
"object": "building",
"uuid": "8f2c9f0a-cd6a-4ea7-9ed3-b5d013d01c5b",
"data": {
"premise": "8f2c9f0b-6375-4091-bcf8-f7142e25ba3d",
"number": 4,
"description": "Headquarters",
"year_built": null,
"number_stories": null,
"floor_area": null,
"construction": null,
"occupancy": null,
"protection_class": null,
"sprinkler": null,
"flood_zone": null,
"itv": "0.00",
"assessor": "0.00",
"appraisal": "0.00",
"notes": null
}
}
]
}'
Response
{ "data": [ { "object": "building", "uuid": "8f2c9f0a-cd6a-4ea7-9ed3-b5d013d01c5b", "data": { "premise": "8f2c9f0b-6375-4091-bcf8-f7142e25ba3d", "number": 4, "description": "Headquarters", "year_built": null,
Delete buildings
This endpoint allows you to bulk delete risk data, including buildings.
At least one building object must be provided in the request body to delete the corresponding building.
Required properties
- Name
object
- Type
- string
- Description
The object type of the data to delete. Must be
building
in this case.
- Name
uuid
- Type
- string
- Description
The UUID of the building to delete.
Request
curl -X DELETE https://app.wunderite.com/api/v1/risks/{risk}/data \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d '{
"data": [
{
"object": "building",
"uuid": "8f2c9f0a-cd6a-4ea7-9ed3-b5d013d01c5b"
}
]
}'
Response
{
"data": [
{
"object": "building",
"uuid": "8f2c9f0a-cd6a-4ea7-9ed3-b5d013d01c5b",
"profile_type": "commercial"
}
]
}