Retrieve end-user consent data history
Sourcepoint offers your organization an API to retrieve an end-user's current consent information. This API can be called by server-side code or through a third-party service like Postman.
An end-user's consent information can be retrieved using the consentUUID value or the authId value.

API endpoints

The API endpoints to retrieve an end-user's consent information using consentUUID or authId are as follows:
This API endpoint has two placeholders that need to be replaced with the correct values:
  • A property's site id {__SITE_ID__}
  • The cookie consentUUID {__CONSENT_UUID__}
1
https://sourcepoint.mgr.consensu.org/tcfv2/consent/v3/history/{__SITE_ID__}?consentUUID={__CONSENT_UUID__}
Copied!
The site id value can be found by selecting a property from the Dialogue dashboard and navigating to the browser address bar. The site id value will be shown in the browser address bar.
The consentUUID value can be retrieved from the first-party cookie consentUUID.
This API endpoint has two placeholders that need to be replaced with the correct values:
  • A property's site id {__SITE_ID__}
  • The authenticated id {__AUTH_ID__}
1
https://sourcepoint.mgr.consensu.org/tcfv2/consent/v3/history/{__SITE_ID__}?consentUUID={__CONSENT_UUID__}
Copied!
The site id value can be found by selecting a property from the Dialogue dashboard and navigating to the browser address bar. The site id value will be shown in the browser address bar.
site_id.png
The authenticated id value can be retrieved from the first-party cookie authId.

Call the API to retrieve end-user consent status

Your organization can call the API endpoint using a server-side script or using a third-party service like Postman.
Server-side script (PHP example)
Using Postman
Your organization could use a server side script using code similar to the following PHP example to retrieve an end-user's consent status. You will need to provide the correct values for site id and consent UUID in the script.
1
$site_id = YYYY;
2
$consent_uuid = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX";
3
$api_endpoint = "https://sourcepoint.mgr.consensu.org/tcfv2/consent/v3/history/".$site_id."?consentUUID=".$consent_uuid;
4
$handle = curl_init($api_endpoint);
5
$fileHandle = fopen("get_permission.json", "w");
6
7
/* If you encounter an 'SSL certificate problem: unable to get local issuer certificate' then enable the following two lines */
8
/* This is NOT recommended as a solution and should only be used as a quick and temporary fix */
9
//curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, 0);
10
//curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, 0);
11
12
curl_setopt($handle, CURLOPT_FILE, $fileHandle);
13
14
curl_exec($handle);
15
16
curl_close($handle);
17
fclose($fileHandle);
Copied!
Your organization can use a third party service like Postman to retrieve an end-user's consent status. You will need to provide the correct API endpoint address and values for siteId, consentUUID or authId.
postman_response.png

API JSON response

The API GET will respond with a list of category and vendor names, IDs and vendor type (IAB or custom) to which the user consented to along with the date/timestamp of when the end-user provided their consent preferences.
Complete example
Consent information
Vendor description
Category description
1
[{
2
{
3
"dateCreated": "2021-08-20T10:35:53.255Z",
4
"consentUUID": "7831f5a8-67c9-4a38-a7cd-6fe4f30a7283",
5
"messageId": 527245,
6
"vendorListId": "5efca560b8e05c06542b2a31",
7
"vendors": [
8
{
9
"_id": "5eff0d77969bfa03746427eb",
10
"name": "Permutive Technologies, Inc.",
11
"vendorType": "CUSTOM"
12
},
13
{
14
"_id": "5ef9bca940f2dd141527cfe5",
15
"name": "Discover Networks Danmark",
16
"vendorType": "CUSTOM"
17
},
18
{
19
"_id": "5e716fc09a0b5040d575080f",
20
"name": "Facebook, Inc.",
21
"vendorType": "CUSTOM"
22
},
23
{
24
"_id": "5e7ac3fae30e7d1bc1ebf5e8",
25
"name": "Youtube",
26
"vendorType": "CUSTOM"
27
},
28
{
29
"_id": "5ecd230a94f7636f2ce14e4e",
30
"name": "SurveyMonkey Inc",
31
"vendorType": "CUSTOM"
32
}
33
],
34
"legIntVendors": [
35
{
36
"_id": "5f1b2fbeb8e05c306f2a1f07",
37
"name": "Better Banners",
38
"vendorType": "CUSTOM"
39
},
40
{
41
"_id": "5f1b2fbeb8e05c306d7249a5",
42
"name": "Cloudflare",
43
"vendorType": "CUSTOM",
44
"googleId": 1097
45
},
46
{
47
"_id": "5f1b2fbeb8e05c3057240f90",
48
"name": "Zuuvi",
49
"vendorType": "CUSTOM",
50
"googleId": 2337
51
},
52
{
53
"_id": "5e37fc3e56a5e66147767229",
54
"name": "Emerse Sverige AB",
55
"vendorType": "IAB"
56
},
57
{
58
"_id": "5e98e7f0b8e05c1c467daaf1",
59
"name": "Adkernel LLC",
60
"vendorType": "IAB"
61
}
62
],
63
"categories": [
64
{
65
"_id": "5efca56014c1b303fd15bde6",
66
"name": "Select personalised content",
67
"iabPurposeRef": {
68
"name": "Select personalised content",
69
"iabId": 6
70
}
71
},
72
{
73
"_id": "5efca56014c1b303fd15bc32",
74
"name": "Select personalised ads",
75
"iabPurposeRef": {
76
"name": "Select personalised ads",
77
"iabId": 4
78
}
79
},
80
{
81
"_id": "5efca56014c1b303fd15b9e8",
82
"name": "Select basic ads",
83
"iabPurposeRef": {
84
"name": "Select basic ads",
85
"iabId": 2
86
}
87
},
88
{
89
"_id": "5efca56014c1b303fd15bb23",
90
"name": "Create a personalised ads profile",
91
"iabPurposeRef": {
92
"name": "Create a personalised ads profile",
93
"iabId": 3
94
}
95
},
96
{
97
"_id": "5efca56014c1b303fd15bd49",
98
"name": "Create a personalised content profile",
99
"iabPurposeRef": {
100
"name": "Create a personalised content profile",
101
"iabId": 5
102
}
103
},
104
{
105
"_id": "5efca56014c1b303fd15be72",
106
"name": "Measure ad performance",
107
"iabPurposeRef": {
108
"name": "Measure ad performance",
109
"iabId": 7
110
}
111
},
112
{
113
"_id": "5efca56014c1b303fd15bfd8",
114
"name": "Measure content performance",
115
"iabPurposeRef": {
116
"name": "Measure content performance",
117
"iabId": 8
118
}
119
},
120
{
121
"_id": "5efca56014c1b303fd15c09b",
122
"name": "Apply market research to generate audience insights",
123
"iabPurposeRef": {
124
"name": "Apply market research to generate audience insights",
125
"iabId": 9
126
}
127
},
128
{
129
"_id": "5efca56014c1b303fd15c192",
130
"name": "Develop and improve products",
131
"iabPurposeRef": {
132
"name": "Develop and improve products",
133
"iabId": 10
134
}
135
},
136
{
137
"_id": "5efca56014c1b303fd15b891",
138
"name": "Store and/or access information on a device",
139
"iabPurposeRef": {
140
"name": "Store and/or access information on a device",
141
"iabId": 1
142
}
143
}
144
],
145
"legIntCategories": [
146
{
147
"_id": "5efca56014c1b303fd15bde6",
148
"name": "Select personalised content",
149
"iabPurposeRef": {
150
"name": "Select personalised content",
151
"iabId": 6
152
}
153
},
154
{
155
"_id": "5efca56014c1b303fd15bc32",
156
"name": "Select personalised ads",
157
"iabPurposeRef": {
158
"name": "Select personalised ads",
159
"iabId": 4
160
}
161
},
162
{
163
"_id": "5efca56014c1b303fd15b9e8",
164
"name": "Select basic ads",
165
"iabPurposeRef": {
166
"name": "Select basic ads",
167
"iabId": 2
168
}
169
},
170
{
171
"_id": "5efca56014c1b303fd15bb23",
172
"name": "Create a personalised ads profile",
173
"iabPurposeRef": {
174
"name": "Create a personalised ads profile",
175
"iabId": 3
176
}
177
},
178
{
179
"_id": "5efca56014c1b303fd15bd49",
180
"name": "Create a personalised content profile",
181
"iabPurposeRef": {
182
"name": "Create a personalised content profile",
183
"iabId": 5
184
}
185
},
186
{
187
"_id": "5efca56014c1b303fd15be72",
188
"name": "Measure ad performance",
189
"iabPurposeRef": {
190
"name": "Measure ad performance",
191
"iabId": 7
192
}
193
},
194
{
195
"_id": "5efca56014c1b303fd15bfd8",
196
"name": "Measure content performance",
197
"iabPurposeRef": {
198
"name": "Measure content performance",
199
"iabId": 8
200
}
201
},
202
{
203
"_id": "5efca56014c1b303fd15c09b",
204
"name": "Apply market research to generate audience insights",
205
"iabPurposeRef": {
206
"name": "Apply market research to generate audience insights",
207
"iabId": 9
208
}
209
},
210
{
211
"_id": "5efca56014c1b303fd15c192",
212
"name": "Develop and improve products",
213
"iabPurposeRef": {
214
"name": "Develop and improve products",
215
"iabId": 10
216
}
217
}
218
]
219
}]
Copied!
1
"dateCreated": "2021-08-20T10:35:53.255Z",
2
"consentUUID": "7831f5a8-67c9-4a38-a7cd-6fe4f30a7283",
3
"messageId": 527245,
4
"vendorListId": "5efca560b8e05c06542b2a31"
Copied!
Parameter
Description
dateCreated
Date consent status was created
consentUUID
Consent UUID
messageId
ID of first layer shown to end-user
vendorListId
ID of vendor list
1
"vendors": [
2
{
3
"_id": "5eff0d77969bfa03746427eb",
4
"name": "Permutive Technologies, Inc.",
5
"vendorType": "CUSTOM"
6
}
7
]
8
9
"legIntVendors": [
10
{
11
"_id": "5f1b2fbeb8e05c306f2a1f07",
12
"name": "Better Banners",
13
"vendorType": "CUSTOM"
14
}
15
]
Copied!
Parameter
Description
_id
Sourcepoint vendor id
name
Vendor name
vendorType
Vendor type
1
"categories": [
2
{
3
"_id": "5efca56014c1b303fd15bde6",
4
"name": "Select personalised content",
5
"iabPurposeRef": {
6
"name": "Select personalised content",
7
"iabId": 6
8
}
9
}
10
]
11
12
"legIntCategories": [
13
{
14
"_id": "5efca56014c1b303fd15bde6",
15
"name": "Select personalised content",
16
"iabPurposeRef": {
17
"name": "Select personalised content",
18
"iabId": 6
19
}
20
}
21
]
Copied!
Parameter
Description
_id
Sourcepoint purpose id
name
Purpose name
iabPurposeRef:name
IAB Purpose name
iabPurposeRef:iabId
IAB Purpose Id
Last modified 4mo ago