Addresses

An address object represents a physical address. It is used in various places in the API, such as the Premise object.

Addresses cannot be created directly like other objects. Instead, they are created as part of other objects. For example, when creating a premise, you can include an address object in the request to create the address.

Addresses can be updated directly if you have the address UUID, or can be created or updated as part of the object that contains the address.

You can update an address object by sending it as part of a PATCH request.

You can also update or create an address on a corresponding object (for example Premises) by sending the address object as an address property on a PATCH request to that corresponding object.

The Address object

An address contains the following properties:

Global Properties

These properties are available for all risk profile types.
  • Name
    street_number
    Type
    nullable string
    Description

    The street number of the address

  • Name
    address1
    Type
    nullable string
    Description

    The first line of the address

  • Name
    address2
    Type
    nullable string
    Description

    The second line of the address

  • Name
    city
    Type
    nullable string
    Description

    The city of the address

  • Name
    state
    Type
    nullable string
    Description

    The two-letter state abbreviation of the address

  • Name
    zip
    Type
    nullable string
    Description

    The zip/postal code of the address

  • Name
    county
    Type
    nullable string
    Description

    The county of the address

  • Name
    lat
    Type
    nullable numeric-string
    Description

    The latitude of the address

  • Name
    lng
    Type
    nullable numeric-string
    Description

    The longitude of the address

Meta

  • Name
    created
    Type
    timestamp
    Description

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

  • Name
    updated
    Type
    timestamp
    Description

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


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

Update addresses

This endpoint allows you to perform bulk updates on addresses.

At least one address object must be provided in the request body. Each object must contain at least one property from the address 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": "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"
        }
    }
]
}'

Response

{ "data": [ { "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" }, "profile_type": "commercial" } ] }