Preventing data destruction

You can prevent a specific contact, account, or policy from being destroyed by setting its doNotDestroy attribute to true. (This attribute is false by default.) For example, if account pc:500 is set to doNotDestroy: true, and account pc:600 is set to doNotDestroy: false (the default), you can destroy account pc:600 but you cannot destroy account pc:500.

Use the following endpoints to set the doNotDestroy attribute:

  • POST /common/v1/contacts/{contactId}/do-not-destroy
  • POST /account/v1/accounts/{accountId}/do-not-destroy
  • POST /policy/v1/policies/{policyId}/do-not-destroy

Set the doNotDestroy attribute to either true or false in the request body. For example, use the following command and request to specify that contact pc:234 cannot be destroyed:

Command

POST /common/v1/contacts/pc:234/do-not-destroy

Request

{
    "data": {
        "attributes": {
            "doNotDestroy": true
        }
    }
}