delete_data_requests
DELETE /data_requests/:feedback_id
Anonymizes personal data and segments for the provided feedback (GDPR right to erasure / right to be forgotten).
Behavior
When this endpoint is called:
- Client Contact Anonymization: The feedback's
dispatch_to_emailordispatch_to_phone_numberis set to'anonymized'. The respondent reference is detached and replaced with an anonymous system client. If the former client has no remaining feedbacks and is not unsubscribed, the client record is deleted. - Segment Anonymization: Matching segment values on the feedback are set to
'anonymized'.- When calling
/api/v1/data_requests/:feedback_id: all segments on the feedback are anonymized. - When calling
/api/v1/data_requests/:data_subject/:feedback_id: only segments linked to the specifieddata_subjectare anonymized.
- When calling
- Cache Invalidation: Cached query results for the feedback are evicted.
- Logging: The erasure request is logged as a GDPR
DataAccessRequestwithrequest_type: 'anonymize'.
Endpoints
DELETE /api/v1/data_requests/:feedback_id: Anonymizes all segments and client contact data for the feedback.DELETE /api/v1/data_requests/:data_subject/:feedback_id: (legacy) Anonymizes segments matching the specified data subject and client contact data.
Examples
- cURL
- Rails
curl -X DELETE 'https://api.diduenjoy.com/api/v1/data_requests/PUT-YOUR-FEEDBACK-ID' \
-u 'PUT-YOUR-API-KEY-HERE:'
require 'rest-client'
feedback_id = 'PUT-YOUR-FEEDBACK-ID'
RestClient::Request.execute method: :delete,
url: "https://api.diduenjoy.com/api/v1/data_requests/#{feedback_id}",
user: 'PUT-YOUR-API-KEY-HERE'
Legacy Endpoint with data_subject
- cURL
- Rails
curl -X DELETE 'https://api.diduenjoy.com/api/v1/data_requests/PUT-YOUR-DATA-SUBJECT/PUT-YOUR-FEEDBACK-ID' \
-u 'PUT-YOUR-API-KEY-HERE:'
require 'rest-client'
data_subject = 'PUT-YOUR-DATA-SUBJECT'
feedback_id = 'PUT-YOUR-FEEDBACK-ID'
RestClient::Request.execute method: :delete,
url: "https://api.diduenjoy.com/api/v1/data_requests/#{data_subject}/#{feedback_id}",
user: 'PUT-YOUR-API-KEY-HERE'
Possible data_subject values (legacy)
contractorcustomeremployeeotherprospectsuppliersto_be_definedtraineevisitor
Status Codes
| status | description |
|---|---|
| 200 OK | Personal data and segments anonymized successfully. Returns the anonymized resource in JSON:API format. |
| 401 Unauthorized | Missing or invalid API key. |
| 404 Not Found | Feedback not found or does not belong to the company. |
| 422 Unprocessable Content | Missing feedback_id. |