Get legal bases for user data processing

Get legal bases for user data processing, such as consents, contracts or legitimate interest using GET.

Request

GET https://www.kursguiden.no/api/v2/privacy/users/:id/legalbases

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.

Parameters

Name Required Value Description
limit optional number Amount of results (default: 75) (maximum: 250)
page optional number Page to show (default: 1)
since_id optional number Restrict results to after the specified ID.

Example code in PHP

$request_url = 'https://www.kursguiden.no/api/v2/privacy/users/154420/legalbases';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $request_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 

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": 2911,
        "idLead": null,
        "consent": {
            "id": 146,
            "title": "Yes, I want e-mail about new courses once a week",
            "version": 1,
            "created_at": "2020-04-27T22:27:16+02:00",
            "updated_at": "2020-04-27T22:27:16+02:00",
            "deleted_at": null
        },
        "legal_basis": {
            "id": 1,
            "title": "Consent"
        },
        "purpose": {
            "id": 112,
            "title": "Marketing",
            "created_at": "2020-04-27T22:16:58+02:00",
            "updated_at": null,
            "deleted_at": null
        },
        "source": {
            "id": 3,
            "title": "Incoming request"
        },
        "comment": "Consent given via registration form",
        "created_at": "2020-04-27T22:34:58+02:00",
        "updated_at": "2023-08-28T02:41:08+02:00",
        "deleted_at": null,
        "customer": {
            "id": 32714,
            "title": "Beste Kunde AS",
            "department": "",
            "phone": "",
            "fax": "",
            "email": "",
            "webaddress": "",
            "orgnr": "85454545",
            "invoice_email": "",
            "customer_reference_id": "",
            "customer_reference": "Per Pedersen",
            "note": "",
            "turnover": "",
            "idParentCustomer": null,
            "idType": 1,
            "idStatus": 1,
            "idSeller": null,
            "duedate_days": "10",
            "type": "Company",
            "idAgreementType": "0",
            "address": "",
            "address_2": "",
            "address_3": "",
            "place": "",
            "zipcode": "",
            "idCountry": 159,
            "invoice_address": "Kundeveien 10",
            "invoice_address_2": "",
            "invoice_address_3": "",
            "invoice_place": "Oslo",
            "invoice_zipcode": "2130",
            "email_invoice": "",
            "office_address": "",
            "office_address_2": "",
            "office_address_3": "",
            "office_place": "",
            "office_idPlace": "637",
            "office_zipcode": "",
            "default_idContact": "0",
            "default_idContactBooker": "0",
            "idInvoiceMethod": 1,
            "emails_disabled": false,
            "merged_at": null,
            "has_booking_module": false,
            "booking_module_title": ""
        },
        "userinstance": {
            "id": 511921,
            "booker_name": "",
            "booker_email": "",
            "booker_phone": "",
            "booker_language_id": null
        }
    }
]

Unsuccessful response sample:

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