Premises

Premises represent the physical locations that are being insured in a commercial risk profile. On this page, we'll dive into the different premises endpoints you can use to manage them programmatically.

The Premise object

Premise objects represent a single premise in a commercial risk profile. They contain the following properties and relationships:

Commercial-only Properties

These properties are available only for commercial risk profiles.
  • Name
    loc
    Type
    int
    Filterable
    Sortable
    Description

    The location number for the premise

  • Name
    description
    Type
    nullable string
    Filterable
    Sortable
    Description

    The description of the premise

  • Name
    image
    Type
    nullable string
    Description

    The URL of the premise's image, if uploaded via the Wunderite UI

Meta

  • Name
    created
    Type
    timestamp
    Filterable
    Sortable
    Description

    An ISO-8601 timestamp (UTC) indicating when the premise was created

  • Name
    updated
    Type
    timestamp
    Filterable
    Sortable
    Description

    An ISO-8601 timestamp (UTC) indicating when the premise was last updated

Commercial-only Relations

Learn more about including relations.

GET/api/v1/risks/{risk}/data/premises

List all premises

This endpoint allows you to retrieve a paginated list of all premises in the corresponding commercial risk profile.

Parameters

See the premise object for a list of all available filters and sorts.

Searchable

You can search for premise by providing a search query in the filter[search] parameter. The search query will be matched against a premise's location number, description, or address.

Request

GET
/api/v1/risks/{risk}/data/premises
curl -G https://app.wunderite.com/api/v1/risks/{risk}/data/premises \
-H "Authorization: Bearer {token}" \
-d filter[search]=Location \
-d per_page=50

Response

{ "data": [ { "object": "premise", "uuid": "aee2f644-9b1d-4481-8735-19827528da15", "data": { "loc": 1, "description": "Pied Piper", "image": null },
"meta": { "created": "2025-02-04T15:58:16+00:00", "updated": "2025-02-04T16:03:50+00:00" }, "relations": { "address": { "object": "address", "uuid": "31d86f13-35b2-4b8d-92a6-d945a9c8f829", "data": { "street_number": "1600", "address1": "Amphitheatre Parkway", "address2": null, "city": "Mountain View", "state": "CA", "zip": "94043", "county": "Santa Clara County", "lat": "37.4225508", "lng": "-122.0846338" }, "meta": { "created": "2025-02-04T15:58:16+00:00", "updated": "2025-02-04T15:58:16+00:00" } } } }, { "object": "premise", "uuid": "a27deef4-2f2a-47c1-a49b-37e52054e5f8", "data": { "loc": 2, "description": "Data Center", "image": null }, "meta": { "created": "2024-04-19T12:42:44+00:00", "updated": "2024-04-23T17:57:19+00:00" }, "relations": { "address": { "object": "address", "uuid": "c66b85c9-a578-47ba-8758-71fb20ee99c6", "data": { "street_number": "5827", "address1": "Adderley Street", "address2": null, "city": "Norfolk", "state": "VA", "zip": "23502", "county": "Chesapeake County", "lat": "36.84276180000001", "lng": "-76.20594899999999" }, "meta": { "created": "2024-04-19T12:42:44+00:00", "updated": "2024-04-23T17:57:19+00:00" } } } } ], "path": "https:\/\/app.wunderite.com\/api\/v1\/risks\/d10e34bb-4420-47de-ba9f-42a4a3f34b0e\/data\/premises", "per_page": 50, "next_cursor": null, "next_page_url": null, "prev_cursor": null, "prev_page_url": null }

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

Create premises

This endpoint allows you to create new premises in the corresponding commercial risk profile.

At least one premise object must be provided in the request body.

You can also create an address in the same request if you provide the address property.

Optional properties

See all available properties in the premise properties section.

  • Name
    loc
    Type
    nullable int
    Description

    The premise's location number. When this property is not provided, or uses a null value, the premise will be assigned a number automatically.

  • Name
    address
    Type
    Address
    Description

    An address object that should be created with the premise

Request

POST
/api/v1/risks/{risk}/data/premises
curl -X POST https://app.wunderite.com/api/v1/risks/{risk}/data/premises \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d '{
"data": [
    {
        "object": "premise",
        "data": {
            "description": "Industrial Park"
        }
    }
]
}'

Response

{ "data": [ { "object": "premise", "uuid": "4813cde2-d02c-423e-9647-bb7705b52c6a", "data": { "loc": 33, "description": "Industrial Park", "image": null },
"meta": { "created": "2024-01-01T00:00:00+00:00", "updated": "2024-01-01T00:00:00+00:00" }, "relations": { "address": null } } ] }

Request with sub resources

POST
/api/v1/risks/{risk}/data/premises
curl -X POST https://app.wunderite.com/api/v1/risks/{risk}/data/premises?include=address \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d '{
"data": [
    {
        "object": "premise",
        "data": {
            "description": "Industrial Park",
            "address": {
                "object": "address",
                "data": {
                    "street_number": "123",
                    "address1": "Main St",
                    "city": "Boston",
                    "state": "MA",
                    "zip": "02108"
                }
            }
        }
    }
]
}'

Response

{ "data": [ { "object": "premise", "uuid": "c0903578-bdac-43f4-b138-be3d6240be1c", "data": { "loc": 33, "description": "Industrial Park", "image": null },
"meta": { "created": "2024-01-01T00:00:00+00:00", "updated": "2024-01-01T00:00:00+00:00" }, "relations": { "address": { "object": "address", "uuid": "195f2b36-4ba4-4948-95b7-f45f98cd269c", "data": { "street_number": "123", "address1": "Main St", "address2": null, "city": "Boston", "state": "MA", "zip": "02108", "county": null, "lat": null, "lng": 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 premises

This endpoint allows you to perform bulk updates on premises.

At least one premise object must be provided in the request body. Each object must contain at least one property from the premise properties section.

You can also create or update an address in the same request if you provide the address property with an Address object.

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": "premise",
        "uuid": "a27deef4-2f2a-47c1-a49b-37e52054e5f8",
        "data": {
            "loc": 2,
            "description": "Data Center",
            "image": null
        }
    }
]
}'

Response

{ "data": [ { "object": "premise", "uuid": "a27deef4-2f2a-47c1-a49b-37e52054e5f8", "data": { "loc": 2, "description": "Data Center", "image": null },
"profile_type": "commercial" } ] }

Request with sub resources

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": "premise",
        "uuid": "a27deef4-2f2a-47c1-a49b-37e52054e5f8",
        "data": {
            "loc": 2,
            "description": "Data Center",
            "image": null,
            "address": {
                "object": "address",
                "data": {
                    "street_number": 123,
                    "address1": "Test Street",
                    "address2": null,
                    "city": "Boston",
                    "state": "MA",
                    "zip": "08077",
                    "county": "Suffolk",
                    "lat": 0,
                    "lng": 0
                }
            }
        }
    }
]
}'

Response

{ "data": [ { "object": "premise", "uuid": "a27deef4-2f2a-47c1-a49b-37e52054e5f8", "data": { "loc": 2, "description": "Data Center", "image": null, "address": {
"object": "address", "data": { "street_number": 123, "address1": "Test Street", "address2": null, "city": "Boston", "state": "MA", "zip": "08077", "county": "Suffolk", "lat": 0, "lng": 0 } } }, "profile_type": "commercial" } ] }

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

Delete premises

This endpoint allows you to bulk delete risk data, including premises.

At least one premise object must be provided in the request body to delete the corresponding premise.

Deleting a premise will also delete any associated buildings, as well as remove the premise from any equipment or related workers compensation exposures.

Required properties

  • Name
    object
    Type
    string
    Description

    The object type of the data to delete. Must be premise in this case.

  • Name
    uuid
    Type
    string
    Description

    The UUID of the premise 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": "premise",
        "uuid": "a27deef4-2f2a-47c1-a49b-37e52054e5f8"
    }
]
}'

Response

{
    "data": [
        {
            "object": "premise",
            "uuid": "a27deef4-2f2a-47c1-a49b-37e52054e5f8",
            "profile_type": "commercial"
        }
    ]
}