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

Meta

Relations

Learn more about including relations.

GET/api/v1/risks/{risk}/buildings

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

GET
/api/v1/risks/{risk}/data/buildings
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,
"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, "image": null }, "meta": { "created": "2022-05-27T16:29:05+00:00", "updated": "2022-05-27T16:29:05+00:00", "has_property_data": false }, "relations": { "premise": "8f2c9f0b-6b31-4149-9e27-2771b439bf2b", "subjects_of_insurance": [ "004ed48e-fc78-4da5-9124-99818ac1b74f", "5a71f82e-f0b3-4e8c-bcf7-83dc32b6043f" ] } }, { "object": "building", "uuid": "8f2c9f0a-c7c8-44d0-9bd5-d24d9486a8cd", "data": { "premise": "8f2c9f0b-6b9c-40ff-ba0d-145c790e083c", "number": 1, "description": "Satellite office", "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, "image": null }, "meta": { "created": "2022-05-27T16:29:05+00:00", "updated": "2022-05-27T16:29:05+00:00", "has_property_data": false }, "relations": { "premise": "8f2c9f0b-6b9c-40ff-ba0d-145c790e083c", "subjects_of_insurance": [ "2c6bc586-ff46-4d9a-8920-e0689b7d9458", "6c808001-2a64-43e5-bcf0-9a34750025ac" ] } }, { "object": "building", "uuid": "8f2c9f0a-c960-4ae1-892d-090bea3111e6", "data": { "premise": "8f2c9f0b-63e5-4198-a3da-4f8c206bc857", "number": 2, "description": "Storage Unit", "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, "image": "https:\/\/app.wunderite.com\/proxy\/media\/avatar\/dc821023-f3de-4fcd-a147-428294204473" }, "meta": { "created": "2022-05-27T16:29:05+00:00", "updated": "2022-05-27T16:29:05+00:00", "has_property_data": true }, "relations": { "premise": "8f2c9f0b-63e5-4198-a3da-4f8c206bc857", "subjects_of_insurance": [ "a1a0aa49-e13a-4c3e-a8b3-dad715b75db0", "83e8e7d7-f92b-4928-bc49-b9dd6a513b7d" ] } }, { "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, "image": "https:\/\/app.wunderite.com\/proxy\/media\/avatar\/4b350d1a-085e-4f5f-ad7b-9f04b20d749f" }, "meta": { "created": "2022-05-27T16:29:05+00:00", "updated": "2022-05-27T16:29:05+00:00", "has_property_data": true }, "relations": { "premise": "8f2c9f0b-6375-4091-bcf8-f7142e25ba3d", "subjects_of_insurance": [ "512d413f-5229-429c-9140-1f4c817cfe7f", "0116b882-12bb-45e7-8dc1-2505d4a5d46c" ] } } ], "path": "https:\/\/app.wunderite.com\/api\/v1\/risks\/66edc9e0-a056-4f22-bc47-06e81c997458\/data\/buildings", "per_page": 50, "next_cursor": null, "next_page_url": null, "prev_cursor": null, "prev_page_url": null }

POST/api/v1/risks/{risk}/data/buildings

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

POST
/api/v1/risks/{risk}/data/buildings
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",
"number_stories": 2, "floor_area": 10000, "construction": "Joisted Masonry", "occupancy": null, "protection_class": "P3, Protected 3", "sprinkler": null, "flood_zone": null, "itv": "0.00", "assessor": "0.00", "appraisal": "0.00", "notes": "This is the main building", "image": null }, "meta": { "created": "2024-01-01T00:00:00+00:00", "updated": "2024-01-01T00:00:00+00:00", "has_property_data": false }, "relations": { "premise": "8f2c9f0b-6375-4091-bcf8-f7142e25ba3d", "subjects_of_insurance": [] } } ] }

Request with sub resources

POST
/api/v1/risks/{risk}/data/buildings
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",
"number_stories": 2, "floor_area": 10000, "construction": "Joisted Masonry", "occupancy": null, "protection_class": "P3, Protected 3", "sprinkler": null, "flood_zone": null, "itv": "0.00", "assessor": "0.00", "appraisal": "0.00", "notes": "This is the main building", "image": null }, "meta": { "created": "2024-01-01T00:00:00+00:00", "updated": "2024-01-01T00:00:00+00:00", "has_property_data": false }, "relations": { "premise": "8f2c9f0b-6375-4091-bcf8-f7142e25ba3d", "subjects_of_insurance": [ { "object": "subject_of_insurance", "uuid": "14490e92-7812-45bd-84f1-660a5a8072a7", "data": { "type": "b", "amount": 1000000, "display_value": null }, "meta": { "created": "2024-01-01T00:00:00+00:00", "updated": "2024-01-01T00:00:00+00:00" } } ] } } ] }

PATCH/api/v1/risks/{risk}/data

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

PATCH
/api/v1/risks/{risk}/data
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,
"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 }, "profile_type": "commercial" } ] }

DELETE/api/v1/risks/{risk}/data

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

DELETE
/api/v1/risks/{risk}/data
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"
        }
    ]
}