curl --request GET \
--url https://{host}/consent/v1/UserConsents/all \
--header 'Authorization: <api-key>'import requests
url = "https://{host}/consent/v1/UserConsents/all"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://{host}/consent/v1/UserConsents/all', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/consent/v1/UserConsents/all",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{host}/consent/v1/UserConsents/all"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{host}/consent/v1/UserConsents/all")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/consent/v1/UserConsents/all")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"consent": {
"id": "<string>",
"component": "<string>",
"version": 123,
"revision": 123,
"key": "<string>"
},
"acceptedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"isActive": true,
"acceptedBy": "<string>",
"activationSource": "<string>",
"revokedAt": "2023-11-07T05:31:56Z",
"revokedBy": "<string>",
"revocationSource": "<string>",
"metadata": {}
}
]{
"name": "<string>",
"message": "<string>",
"details": null
}Returns a list of all user consents. Can be filtered by Active flag.
curl --request GET \
--url https://{host}/consent/v1/UserConsents/all \
--header 'Authorization: <api-key>'import requests
url = "https://{host}/consent/v1/UserConsents/all"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://{host}/consent/v1/UserConsents/all', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/consent/v1/UserConsents/all",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{host}/consent/v1/UserConsents/all"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{host}/consent/v1/UserConsents/all")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/consent/v1/UserConsents/all")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"consent": {
"id": "<string>",
"component": "<string>",
"version": 123,
"revision": 123,
"key": "<string>"
},
"acceptedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"isActive": true,
"acceptedBy": "<string>",
"activationSource": "<string>",
"revokedAt": "2023-11-07T05:31:56Z",
"revokedBy": "<string>",
"revocationSource": "<string>",
"metadata": {}
}
]{
"name": "<string>",
"message": "<string>",
"details": null
}Authorizations
Query Parameters
The id of the user
The enum to filter the returned consents by activation. Filter options for querying consents by their status
NotActive, Active, All, AllAvailable Response
Collection of all user consents that match the filter.
Consent instance information
Show child attributes
Show child attributes
UTC date, when consent was accepted by user
UTC date, when consent will expire
Who accepted the consent. It can be a user, member service representative, etc.
The source which triggered activation of UserConsent Possible values for Coop: "WEB" Internettet "EMAIL" E-mail "TELEF" Telefon "SKM" Skema "BUTIK" Samtykke i butik "MOAPP" MobilApp "M16AP" M16 MobilApp "FRDKA" Freemium APP DK "KNB" KNB NETOPRETTELSE
UTC date, when consent was revoked Null if consent is active
Who revoked the consent. It can be a user, member service representative, etc.
The source which triggered revocation of UserConsent
Metadata for user consent
Show child attributes
Show child attributes