Destroying a contact

Destroying, or purging, is a form of data destruction that completely removes contact data and policy or account data from PolicyCenter. There can be multiple objects associated with the contact, account, or policy that are also removed as they are detected by traversing the entity domain graph.

Search for contacts

Before destroying any data, you first need to find the record for the contact whose data you want to destroy. You can do this using the following endpoint:

In the request body, you must include at least one of these fields:

  • For a person:
    • firstName and lastName
    • taxId
  • For a company:
    • companyName
    • phoneNumber

This example retrieves the user named John Smith:

Command

POST /common/v1/search/contacts

Request

{
    "data": {
        "attributes": {
            "lastName": "Smith",
            "firstName": "John"
        }
    }
}

This example retrieves the company named Wright Construction:

Request

{
    "data": {
        "attributes": {
            "companyName": "Wright Construction"
        }
    }
}

Destroy the contact

When you call the endpoint to destroy a contact, the contact is not destroyed immediately. Instead, the contact is placed in the DestroyContactForPersonalData work queue, and continues to exist until a scheduled batch process is run to destroy all data in the queue. See the InsuranceSuite Server Administration for information on the DestroyContactForPersonalData work queue.

Use the following endpoint to destroy a contact:

  • POST /common/v1/contacts/{userId}/destroy

The following example destroys the contact with user ID pc:234.

Command

POST /common/v1/contacts/pc:234/destroy

The request contains only the ID of the requester. This requester ID does not have to match the ID of a user in PolicyCenter.

Request

{
    "data": {
        "attributes": {
            "requesterId": "5678"
        }
    }
}

Retrieve contacts scheduled for destruction

You can retrieve a list of contacts that are scheduled to be destroyed but have not yet been run through the batch process. Use the following endpoints to retrieve contacts that are scheduled for destruction:

  • GET /systemtools/v1/personal-data-destruction-requests
  • GET /systemtools/v1/personal-data-destruction-requests/pc:999

For example:

Command

GET /systemtools/v1/personal-data-destruction-requests

Response

{
    "data": [
        {
            "attributes": {
                "allRequestsFulfilled": false,
                "destructionRequestStatus": {
                    "code": "Unprocessed",
                    "name": "Unprocessed"
                },
                "displayName": "PersonalDataDestructionRequest pc:234",
                "id": "pc:234",
                "requesterIds": [
                    "5678"
                ]
            },
        ...

You can also filter based on the ID of the destruction requester:

GET /systemtools/v1/personal-data-destruction-requests?filter=requeterIds:in:5678