getCustomVendorConsents command
Sourcepoint has extended the functionality of the IAB's TCF v2 API to offer your organization additional commands that can be used with the __tcfapi() function call. This provides a level of consistency and feature overlap between IAB TCF v2 API and custom function integrations.
The getCustomVendorConsents command enables your organization to handle vendors that participate in the TCF v2 API and custom vendors that do not participate in the TCFv2 API.

getCustomVendorConsents command

The command returns a JSON object that contains information on IAB and custom vendors an end-user consents to, the legitimate interest and consent purposes mapped to a vendor. The format of the getCustomVendorConsents command is as follows:
Browser console command
Code example
1
//Input into browser console to receive response
2
__tcfapi('getCustomVendorConsents', 2, function(vendorConsents, success) {
3
console.log(vendorConsents);
4
});
Copied!
1
function callback_fn(gvl, success) {
2
// your custom callback code can be included here
3
console.log(gvl, success)
4
}
5
6
// call the __tcfapi() function with callback only
7
__tcfapi('getCustomVendorConsents', 2, callback_fn);
Copied!

getCustomVendorConsents response

The response is a JSON object that contains the consent data and this is divided into four parts - consentedPurposes, consentedVendors, grants, legIntPurposes. The format of these four sections are described next.
grants
consentedPurposes
consentedVendors
legIntPurposes
The grants section lists the consented purposes for each vendor. The consented purposes are listed as follows:
Parameter
Description
vendor_id
Vendor ID
purpose_id
Purpose ID
status
Status is true if the purpose applies to an end-user.
vendorGrant
Status is true if all purposes for a vendor apply to an end-user. Status is false if one or more purposes for a vendor do not apply to an end-user.
vendor_id: purposeGrants: { "purpose_id 1": status, "purpose_id 2": status, ...}, vendorGrant: status
The vendorGrant status is set to true if the end-user has granted consent to all purposes assigned to a vendor. If the end-user denies consent for one or more purposes then the vendorGrant status is set to false.
1
grants:
2
5e37fc3e56a5e6614776722e:
3
purposeGrants: {
4
6011ea75c5d9c787531b3ecf: true,
5
6011ea75c5d9c787531b3ed6: true,
6
6011ea75c5d9c787531b3ede: true,
7
6011ea75c5d9c787531b3efd: true,
8
6011ea75c5d9c787531b3f0e: true,
9
6011ea75c5d9c787531b3f05: true,
10
6011ea75c5d9c787531b3f18: true
11
},
12
vendorGrant: true
Copied!
The consentedPurposes section lists the purposes that applies to the end-user. The consented purposes are listed as follows:
Parameter
Description
_id
Purpose ID
name
Purpose name as defined in each vendor list
index: {_id: "purpose id", name: "purpose description"}
1
consentedPurposes: Array(10)
2
0: {_id: "6011ea75c5d9c787531b3ecf", name: "Select basic ads"}
3
1: {_id: "6011ea75c5d9c787531b3ed6", name: "Measure ad performance"}
4
2: {_id: "6011ea75c5d9c787531b3ede", name: "Apply market research to generate audience insights"}
5
3: {_id: "6011ea75c5d9c787531b3ee6", name: "Select personalised content"}
6
4: {_id: "6011ea75c5d9c787531b3eed", name: "Create a personalised content profile"}
7
5: {_id: "6011ea75c5d9c787531b3ef5", name: "Measure content performance"}
8
6: {_id: "6011ea75c5d9c787531b3efd", name: "Select personalised ads"}
9
7: {_id: "6011ea75c5d9c787531b3f05", name: "Create a personalised ads profile"}
10
8: {_id: "6011ea75c5d9c787531b3f0e", name: "Store and/or access information on a device"}
11
9: {_id: "6011ea75c5d9c787531b3f18", name: "Develop and improve products"}
Copied!
The consentedVendors section lists the custom vendors in the vendor list that applies to the end-user. The custom vendors are listed as follows:
Parameter
Description
_id
Vendor ID
name
Vendor name as defined in each vendor list
vendorType
The vendor type, if the vendor is custom or affiliated to the IAB
index: {_id:"vendor id", name:"vendor name", vendorType:"vendor type"}
1
consentedVendors: Array(5)
2
0: {_id: "5f3bc0d7b8e05c606f3dfc27", name: "Artefact S.A.", vendorType: "CUSTOM"}
3
1: {_id: "5f477cc6c442796aa67839d9", name: "brand eins Medien AG", vendorType: "CUSTOM"}
4
2: {_id: "5fd78083fc186126cb9fabad", name: "media control GmbH", vendorType: "CUSTOM"}
5
3: {_id: "5f3a3e66ee0a81887437291c", name: "Trivago", vendorType: "CUSTOM"}
6
4: {_id: "5fda5252b4f7ae27b97a1dfe", name: "Google Charts", vendorType: "CUSTOM"}
Copied!
The legIntPurposes section lists the purposes that are listed as legitimate interest for all vendors. The legitimate interest purposes are listed as follows:
Parameter
Description
_id
Purpose ID
name
Purpose name as defined in each vendor list
index: {_id: "purpose id", name: "purpose description"}
1
legIntPurposes: Array(6)
2
0: {_id: "6011ea75c5d9c787531b3ede", name: "Apply market research to generate audience insights"}
3
1: {_id: "6011ea75c5d9c787531b3ee6", name: "Select personalised content"}
4
2: {_id: "6011ea75c5d9c787531b3eed", name: "Create a personalised content profile"}
5
3: {_id: "6011ea75c5d9c787531b3ef5", name: "Measure content performance"}
6
4: {_id: "6011ea75c5d9c787531b3f05", name: "Create a personalised ads profile"}
7
5: {_id: "6011ea75c5d9c787531b3f18", name: "Develop and improve products"}
Copied!
Last modified 4mo ago