"<p>A soft delete, in the context of MDM applications, is a system-level method of flagging a record as ""inactive"". It is most commonly used in scenarios where the requirements are to retain a record, while not making it visible/editable through the UI. It differs from a ""hard delete"" in the fact that the record continues to persist in the database, and can be reactivated if needed.</p><p>While attempting to execute a <code>SOFT_DELETE</code><i> </i>operation with the REST API (for more details, see the <a href=""https://www.semarchy.com/doc/semarchy-xdm/xdm/5.3/Integrate/publish-data-with-rest.html#_publish_deletions"">documentation</a>)<i>, </i>users or external systems may receive a<i> </i><code>RECORD<i>_</i>NOT<i>_</i>FOUND</code> error. The JSON response for this specific error should resemble the JSON snippet below. </p><pre><code class=""language-plaintext"">RESPONSE:

 ""deleteRecords"": {

  ""CustomerPolicy"": [

  {

  ""entityName"": ""CustomerPolicy"",

  ""recordId"": {  

  ""CustomerPolicyID"": ""00000Y6QOU82PRD3571C-0521826-20090502-DR""  

  },

  ""status"": ""RECORD_NOT_FOUND""

  }

  ]

 }</code></pre><h3>Root Cause Analysis</h3><p>When executing the same operation using an API key with admin privileges, the operation works as expected. Using this knowledge, we can determine the error is related to the assigned privileges.</p><h3>Troubleshooting and Resolution</h3><ol><li>Under <strong>Model Privileges Grants</strong>, verify the user has <strong>Allow Checkout</strong> and <strong>Allow Delete</strong> privileges assigned.</li><li>Retest the operation after saving changes.</li><li>Review documentation on <a href=""https://www.semarchy.com/doc/semarchy-xdm/xdm/5.3/Admin/security/manage-the-security.html"">Managing Security</a> and <a href=""https://www.semarchy.com/doc/semarchy-xdm/xdm/5.3/Design/security/data-hub-security.html#_privileges_types"">Privileges</a>.</li></ol><figure class=""image""><img src=""https://app-us-east-1.t-cdn.net/5ef1e3639f2bb04fc7204631/posts/614e3e0fbef23e56d2d6a03c/614e3e0fbef23e56d2d6a03c_88359.png"" /><figcaption>Image 1. Assign <strong>Allow Checkout</strong> and <strong>Allow Delete</strong> Privileges </figcaption></figure>"