getVendorPurposeMapping command (non-TCF)
Sourcepoint offers your organization additional commands that can be used for GDPR non-TCF web implementation. This provides a level of consistency and feature overlap between IAB TCF v2 and non-TCF integrations.
The getVendorPurposeMapping command enables your organization to handle vendors participating in non-TCF campaigns.

getVendorPurposeMapping command

The command returns a JSON object that contains information on the purposes and corresponding legal basis attributed to each vendor and their legal basis. The format of the getVendorPurposeMapping command is as follows:Browser console command
Browser console command
Server-side script (PHP example)
1
//Input into browser console to receive response
2
window._sp_.gdpr.getVendorPurposeMapping((data, success) => { console.log(data,success); });
Copied!
Your organization could use a server side script using code similar to the following PHP example to retrieve the vendor purpose mapping. You will need to provide the correct values for site id in the script.
1
$site_id = "XXXXX";
2
$api_endpoint = "https://sourcepoint.mgr.consensu.org/tcfv2/vendor-list/vendor-purpose-mapping?siteId=".$site_id;
3
$handle = curl_init($api_endpoint);
4
$fileHandle = fopen("vendor_purpose_mapping.json", "w");
5
6
/* If you encounter an 'SSL certificate problem: unable to get local issuer certificate' then enable the following two lines */
7
/* This is NOT recommended as a solution and should only be used as a quick and temporary fix */
8
//curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, 0);
9
//curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, 0);
10
11
curl_setopt($handle, CURLOPT_FILE, $fileHandle);
12
13
curl_exec($handle);
14
15
curl_close($handle);
16
fclose($fileHandle);
Copied!

getVendorPurposeMapping response

The response contains the consent data that maps the purposes and legal basis to the vendor. The categories section lists the purpose ids for each vendor with their legal basis type.
Parameter
Description
_id
Purpose ID
type
The legal basis set for this purpose - consent, legitimate interest, not allowed, disclosure only
vendorId
Vendor ID
length
Number of purposes attached to this vendor
1
0:
2
categories:
3
0: {_id: "5ff4ca88f485275018dd8b9e", type: "CONSENT"}
4
1: {_id: "5ff4ca88f485275018dd8b99", type: "CONSENT"}
5
2: {_id: "5ff4ca88f485275018dd8ba3", type: "CONSENT"}
6
vendorId: "5e7ced57b8e05c47e418b73c"
7
length: 3
8
1:
9
categories:
10
0: {_id: "5ff4ca88f485275018dd8b9e", type: "CONSENT"}
11
1: {_id: "5ff4ca88f485275018dd8b99", type: "LEGITIMATE_INTEREST"}
12
2: {_id: "5ff4ca88f485275018dd8ba3", type: "CONSENT"}
13
vendorId: "5fd78083fc186126cb9fabad"
14
length: 3
Copied!
Last modified 4mo ago