Remove identifying details and personal data from the course user. Anonymize user using DELETE.
For every API request you make, you'll need to present the API access key in the HTTP Header as X-API-Key to be authenticated.
$request_url = 'https://api.frontcore.com/v2/privacy/users/338204/anonymize';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $request_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'X-API-Key: {your-api-key}',
'Accept: application/json',
));
$result = curl_exec($ch);
curl_close($ch);
If the method is successful it responds with an JSON structure, as it is shown below.
{ "id": 338204, "firstname": "Anonymous", "lastname": "User", "email": "", "username": "", "phone": "", "company": "", "orgnr": "", "position": "", "department": null, "legaldepartment": null, "date_of_birth": "2020-01-01", "invoice_address": { "address": "", "address_2": "", "address_3": "", "zipcode": "", "city": "Oslo", "invoice_phone": "" }, "home_address": { "address": "", "address_2": "", "address_3": "", "zipcode": "", "city": "Oslo" }, "work_address": { "address": "", "address_2": "", "address_3": "", "zipcode": "", "city": "" }, "external_id": "", "created_at": "2020-04-27T22:57:01+02:00", "updated_at": "2025-01-22T08:25:11+01:00" }
Unsuccessful response sample:
{ "error": "Wrong API Key" }