Contact Phones

On this page, we'll dive into the different contact phone endpoints you can use to manage them programmatically.

The Contact Phone object

Contact phone objects represent a single phone for a contact related to a commercial risk profile. They contain the following properties and relationships:

Commercial-only Properties

These properties are available only for commercial risk profiles.
  • Name
    contact
    Type
    string
    Filterable
    Description

    The UUID of the contact this phone belongs to. Only applicable when creating a new phone outside the contacts endpoints.

  • Name
    phone
    Type
    string
    Filterable
    Sortable
    Description

    The phone number for the contact

  • Name
    extension
    Type
    nullable string
    Filterable
    Sortable
    Description

    The extension for the phone number, if applicable

  • Name
    type
    Type
    enum
    Filterable
    Sortable
    Description

    The type of phone

    • Name
      work
      Description
      work
    • Name
      home
      Description
      home
    • Name
      mobile
      Description
      mobile
    • Name
      fax
      Description
      fax
    • Name
      other
      Description
      other

Meta

  • Name
    created
    Type
    timestamp
    Filterable
    Sortable
    Description

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

  • Name
    updated
    Type
    timestamp
    Filterable
    Sortable
    Description

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

Commercial-only Relations

Learn more about including relations.

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

List all contact phones

This endpoint allows you to retrieve a paginated list of all contact phones related to contacts in the corresponding commercial risk profile.

Parameters

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

Searchable

You can search for contact phones by providing a search query in the filter[search] parameter. The search query will be matched against the contact phone number, and contact first and last names.

Additional Filters

  • Name
    uuid
    Type
    string
    Filterable
    Description

    Filter contact phones by UUID (comma-delimited list for many)

  • Name
    contact
    Type
    string|string[]
    Filterable
    Description

    Filter contact phones by their contact's UUID (comma-delimited list for many)

  • Name
    contact.first_name
    Type
    string
    Filterable
    Sortable
    Description

    Filter contact phones by their contact's first name

  • Name
    contact.last_name
    Type
    string
    Filterable
    Sortable
    Description

    Filter contact phones by their contact's last name

Request

GET
/api/v1/risks/{risk}/data/contact_phones
curl -G https://app.wunderite.com/api/v1/risks/{risk}/data/contact_phones \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d per_page=50

Response

{ "data": [ { "object": "contact_phone", "uuid": "79f89f51-0aec-4349-b495-9a9ecb59b8d1", "data": { "contact": "c659ff46-968a-40a6-9f18-3f9f48704451", "phone": "5555678901", "extension": null, "type": "work"
}, "meta": { "created": "2024-04-19T18:57:02+00:00", "updated": "2024-04-19T18:57:02+00:00" }, "relations": { "contact": "c659ff46-968a-40a6-9f18-3f9f48704451" } }, { "object": "contact_phone", "uuid": "696fb585-821f-4085-b4a5-d6b787012742", "data": { "contact": "4bcfc75e-da4b-4ff5-bfa7-d73271ff3a64", "phone": "5551234567", "extension": null, "type": "work" }, "meta": { "created": "2024-04-19T18:57:02+00:00", "updated": "2024-04-19T18:57:02+00:00" }, "relations": { "contact": "4bcfc75e-da4b-4ff5-bfa7-d73271ff3a64" } } ], "path": "https:\/\/app.wunderite.com\/api\/v1\/risks\/d10e34bb-4420-47de-ba9f-42a4a3f34b0e\/data\/contact_phones", "per_page": 50, "next_cursor": null, "next_page_url": null, "prev_cursor": null, "prev_page_url": null }

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

Create contact phones

This endpoint allows you to create new contact phones for contacts that exist in the corresponding commercial risk profile.

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

Required properties

  • Name
    contact
    Type
    string
    Description

    The UUID of the contact to which the phone belongs

  • Name
    phone
    Type
    string
    Description

    The phone number of the contact

Optional properties

See all available properties in the contact phone properties section.

  • Name
    type
    Type
    enum
    Description

    If no type is provided, it will default to other

  • Name
    extension
    Type
    string
    Description

    The extension of the contact phone, if applicable

Request

POST
/api/v1/risks/{risk}/data/contact_phones
curl -X POST "https://app.wunderite.com/api/v1/risks/{risk}/data/contact_phones" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \ 
-d '{
"data": [
    {
        "object": "contact_phone",
        "data": {
            "contact": "c659ff46-968a-40a6-9f18-3f9f48704451",
            "phone": "555-555-5555",
            "type": "work"
        }
    }
]
}'

Response

{ "data": [ { "object": "contact_phone", "uuid": "f31cb4e4-3978-4397-ad07-ac8fcd4be45e", "data": { "contact": "c659ff46-968a-40a6-9f18-3f9f48704451", "phone": "555-555-5555", "extension": null, "type": "work"
}, "meta": { "created": "2024-01-01T00:00:00+00:00", "updated": "2024-01-01T00:00:00+00:00" }, "relations": { "contact": "c659ff46-968a-40a6-9f18-3f9f48704451" } } ] }

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

Update contact phones

This endpoint allows you to perform bulk updates on contact phones.

Optional properties

See all available properties in the contact properties section.

Caveats

Contact

  • The contact on a contact_phone object cannot be updated.
  • Attempting to update a contact_phone's contact will result in a validation error.

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" \
-H "Content-Type: application/json" \ 
-d '{
"data": [
    {
        "object": "contact_phone",
        "uuid": "79f89f51-0aec-4349-b495-9a9ecb59b8d1",
        "data": {
            "phone": "5555678901",
            "extension": null,
            "type": "work"
        }
    }
]
}'

Response

{ "data": [ { "object": "contact_phone", "uuid": "79f89f51-0aec-4349-b495-9a9ecb59b8d1", "data": { "phone": "5555678901", "extension": null, "type": "work" },
"profile_type": "commercial" } ] }

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

Delete contact phones

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

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

Required properties

  • Name
    object
    Type
    string
    Description

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

  • Name
    uuid
    Type
    string
    Description

    The UUID of the contact phone 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" \
-H "Content-Type: application/json" \ 
-d '{
"data": [
    {
        "object": "contact_phone",
        "uuid": "79f89f51-0aec-4349-b495-9a9ecb59b8d1"
    }
]
}'

Response

{
    "data": [
        {
            "object": "contact_phone",
            "uuid": "79f89f51-0aec-4349-b495-9a9ecb59b8d1",
            "profile_type": "commercial"
        }
    ]
}