Attachments

An attachment represents a file uploaded to a specific record within a risk data object.

The Attachment object

An attachment contains the following properties:

Meta

  • Name
    name
    Type
    string
    Filterable
    Description

    The original file name

  • Name
    url
    Type
    string
    Description

    The URL of the file

  • Name
    target_object
    Type
    string
    Filterable
    Description

    The object type that the attachment is associated with

  • Name
    target_uuid
    Type
    string
    Filterable
    Description

    The UUID of the object that the attachment is associated with

  • Name
    created
    Type
    timestamp
    Sortable
    Description

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

  • Name
    updated
    Type
    timestamp
    Sortable
    Description

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

Global Relations

Learn more about including relations.

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

List attachments

This endpoint allows you to retrieve a paginated list of attachments for specific objects in the corresponding risk profile.

Parameters

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

Searchable

You can search attachments by providing a search query in the filter[search] parameter. The search query will be matched against an attachment's original file name, or the uploader name.

Required filters

  • Name
    filter[target_object]
    Type
    enum
    Description

    The object type that the attachment is associated with.

Optional filters

  • Name
    filter[target_uuid]
    Type
    string|string[]
    Description

    Used in conjunction with filter[target_object], an optional UUID (or list of UUIDs) of objects to filter attachments by.

Request

GET
/api/v1/risks/{risk}/data/attachments
curl -X GET -G https://app.wunderite.com/api/v1/risks/{risk}/data/attachments?filter[target_object]=vehicle \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"

Response

{ "data": [ { "object": "attachment", "uuid": "3cfc7013-fba1-4e5c-a570-7b7e3cc19193", "meta": { "name": "amwins_access_garage_application", "url": "https:\/\/artifacts-prod1-ph4j4ctz.s3.us-east-2.amazonaws.com\/1\/531649f436c0bffbf4df4e7640b58dda\/q1wfr9VpvMuzJUgpRjFJebULwzd5Q05Q.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=sail%2F20250205%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250205T154144Z&X-Amz-SignedHeaders=host&X-Amz-Expires=-34699304&X-Amz-Signature=86858e1539536b374fdb69f7f8ccf2736269a15e778f91fc88906ec3829e60e1", "target_uuid": "a2ed3810-c5b6-44a0-af0f-37772761d02f", "target_object": "vehicle",
"created": "2025-02-05T15:41:37+00:00", "updated": "2025-02-05T15:41:37+00:00" }, "relations": { "uploader": "aa58abc5-9f59-4af7-b52b-83135246acad" } } ], "path": "https:\/\/app.wunderite.com\/api\/v1\/risks\/d10e34bb-4420-47de-ba9f-42a4a3f34b0e\/data\/attachments", "per_page": 50, "next_cursor": null, "next_page_url": null, "prev_cursor": null, "prev_page_url": null }

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

Create attachments

This endpoint allows you to create new attachments for risk data records within various risk data objects in the corresponding risk profile.

Each attachment object requires a file property. This property is the uuid returned by the Upload Files POST.

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

Required properties

  • Name
    target.object
    Type
    enum
    Description

    The object type that the attachment is associated with

  • Name
    target.uuid
    Type
    string
    Description

    The UUID of the object (specified by target.object) that the attachment is associated with

  • Name
    file
    Type
    string
    Description

    The UUID of the file object that the attachment is associated with. Upload a file to get a file UUID by using the files endpoint.

Request

POST
/api/v1/risks/{risk}/data/attachments
curl -X POST https://app.wunderite.com/api/v1/risks/{risk}/data/attachments \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d '{
"data": [
    {
        "object": "attachment",
        "data": {
            "target": {
                "object": "premise",
                "uuid": "a27deef4-2f2a-47c1-a49b-37e52054e5f8"
            },
            "file": "XqhJ96BJYcs1L4cihUYO2uJe9SrU5bUmqx5MxtOFZhjPxbfT7KbjoExsEHebjoiI"
        }
    }
]
}'

Response

{ "data": [ { "object": "attachment", "uuid": "b3f9e374-74ff-41e2-8f51-5b9d5effde00", "meta": { "name": "file", "url": "https:\/\/artifacts-prod1-ph4j4ctz.s3.us-east-2.amazonaws.com\/1\/743b93e53af341500bf211c3e1198d1b\/LKtTcwaahS4wiCz0THBz8gVTnWWhy36o.txt?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=sail%2F20250205%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250205T154144Z&X-Amz-SignedHeaders=host&X-Amz-Expires=-34699304&X-Amz-Signature=3eccab3bf533d4e9243590ee755b64994e9bb9f866abc76d4aa68eba7570e9e3", "target_uuid": "a27deef4-2f2a-47c1-a49b-37e52054e5f8", "target_object": "premise",
"created": "2024-01-01T00:00:00+00:00", "updated": "2024-01-01T00:00:00+00:00" }, "relations": { "uploader": "55ad55a2-d65e-4635-931f-36c8ba8e5c1b" } } ] }

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

Delete attachments

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

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

Required properties

  • Name
    object
    Type
    string
    Description

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

  • Name
    uuid
    Type
    string
    Description

    The UUID of the attachment 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": "attachment",
        "uuid": "fae21e7e-874c-4e2f-9324-afb26c1c885c"
    }
]
}'

Response

{
    "data": [
        {
            "object": "attachment",
            "uuid": "fae21e7e-874c-4e2f-9324-afb26c1c885c",
            "profile_type": "personal"
        }
    ]
}