Anonymize course user

Remove identifying details and personal data from the course user. Anonymize user using DELETE.

Request

DELETE https://www.kursguiden.no/api/v2/privacy/users/:id/anonymize

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.

Example code in PHP

$request_url = 'https://www.kursguiden.no/api/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);
               

Response

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": "2024-05-04T00:09:33+02:00"
}

Unsuccessful response sample:

{
    "error": "Wrong API Key"
}      
© 2024 FrontCore