postCustomConsent 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 postCustomConsent command can be used to edit a user's consent profile by changing the opt-in status for consented vendors, categories (purposes) and legitimate interest categories (purposes).
Use Case
Apply vendor-specific consent experiences to handle social media plugins. Or apply consent because an end-user accepts the website's T&Cs or a contract provided by a publisher or advertiser.

postCustomConsent command

The command returns a JSON object that contains information on the purposes attributed to each vendor and their legal basis. Below is the format of the postCustomConsent command:
window._sp_.gdpr.postCustomConsent(callback function,[vendors ids],[purpose ids],[legitimate interest purposes ids])
Browser console
1
// call the postCustomConsent command to update consented vendors
2
window._sp_.gdpr.postCustomConsent((vendorConsents, success) => console.log(vendorConsents, success), ["5f3bc0d7b8e05c606f3dfc27", "5f477cc6c442796aa67839d9", "5fd78083fc186126cb9fabad", "5f3a3e66ee0a81887437291c", "5fda5252b4f7ae27b97a1dfe", "5e7ced57b8e05c47e418b73c"], [], [] );
3
// call the postCustomConsent command to update consented purposes
4
window._sp_.gdpr.postCustomConsent((vendorConsents, success) => console.log(vendorConsents, success), [], ["6011ea75c5d9c787531b3ecf", "6011ea75c5d9c787531b3f0e"], [] );
5
// call the postCustomConsent command to update legitimate interest purposes
6
window._sp_.gdpr.postCustomConsent((vendorConsents, success) => console.log(vendorConsents, success), [], [], ["6011ea75c5d9c787531b3ecf", "6011ea75c5d9c787531b3f0e"] );
Copied!
Parameter
Description
vendor ids
List of vendor IDs your organization wish to update. Comma delimited.
purpose ids
List of purpose IDs your organization wish to update to 'consent only'. Comma delimited.
legitimate interest purpose ids
List of purpose IDs your organization wish to update to 'legitimate interest'. Comma delimited.
Note: You will need to consent to both vendors and purposes. Consenting to a vendor only does not include the purposes.

postCustomConsent response

The response is a JSON object that contains the updated consent data and is divided into six parts - categories, customVendorResponse, grants, legIntCategories, legIntVendors and vendors
categories
custom Vendor Response
grants
LegIntCategories
legIntVendors
vendors
The categories section lists the purpose ids mapped to consented vendors. The output format is as follows:
categories: ["purpose id 1", "purpose id 2", ...]
1
//list of purpose ids
2
categories:
3
0: "5ff4ca88f485275018dd8b9e"
4
1: "5ff4ca88f485275018dd8b99"
5
2: "5ff4ca88f485275018dd8ba3"
6
//number of purpose ids
7
length: 3
Copied!
The customVendorsResponse section lists the purpose ids and purpose descriptions mapped to the vendors. For consentedPurposes and legIntPurposes the output format is as follows:
Parameter
Description
_id
Purpose ID
name
Purpose name as defined in each vendor list
1
customVendorsResponse:
2
//list of purpose ids and their names
3
consentedPurposes:
4
0: {_id: "5ff4ca88f485275018dd8b9e", name: "Performance"}
5
1: {_id: "5ff4ca88f485275018dd8b99", name: "Social Media"}
6
2: {_id: "5ff4ca88f485275018dd8ba3", name: "Personal Ads"}
7
//number of purposes consented to
8
length: 3
9
10
//list of legitimate interest purpose ids and their names
11
legIntPurposes:
12
0: {_id: "5ff4ca88f485275018dd8b99", name: "Social Media"}
13
1: {_id: "5ff4ca88f485275018dd8ba3", name: "Personal Ads"}
14
2: {_id: "5f3a3e66ee0a81887437291c"}
15
3: {_id: "5fd78083fc186126cb9fabad"}
16
// number of purposes consented to
17
length: 4
Copied!
For consentedVendors the output format is as follows:
Parameter
Description
_id
Internal purpose ID, vendor list specific
name
Purpose name as defined in each vendor list
vendorType
Does the vendor belong to the IAB or to another affiliation
1
//list of vendor ids, their names and vendor type "CUSTOM" or "IAB"
2
consentedVendors:
3
0: {_id: "5f44223409125a7ed754367e", name: "Ceros", vendorType: "CUSTOM"}
4
1: {_id: "5fd78083fc186126cb9fabad", name: "media control GmbH", vendorType: "CUSTOM"}
5
2: {_id: "5f3a3e66ee0a81887437291c", name: "Trivago", vendorType: "CUSTOM"}
6
3: {_id: "5f3a3e66ee0a81887437291c", name: "Trivago", vendorType: "CUSTOM"}
7
4: {_id: "5fd78083fc186126cb9fabad", name: "media control GmbH", vendorType: "CUSTOM"}
8
//number of vendors consented to
9
length: 5
Copied!
The grants section lists the purpose ids mapped to vendors that apply to the end-user after the command has been executed. The grants are listed as follows:
Parameter
Description
vendor_id
Vendor ID
purpose_id
Purpose ID
status
Status is true if the purpose applies to the end-user.
vendorGrant
• Status is true if all purposes for a vendor apply to the end-user • Status is false if one or more purposes for the vendor do not apply to the end-user.
grants: 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
//list of vendor grants. for each vendor, list of purpose ids and if consent has been granted to each purpose
2
grants:
3
5f3a3e66ee0a81887437291c:
4
purposeGrants:
5
5ff4ca88f485275018dd8b9e: true
6
5ff4ca88f485275018dd8b99: true
7
5ff4ca88f485275018dd8ba3: true
8
//vendorGrant is true if end-user has consented to all purposes for a vendor
9
vendorGrant: true
Copied!
The legitimate interest categories section lists the legitimate interest purpose ids mapped to consented vendors. The output format is as follows:
legIntCategories: ["purpose id 1", "purpose id 2", ...]
1
//list of legitimate interest purpose ids
2
legIntCategories:
3
0: "5ff4ca88f485275018dd8b99"
4
1: "5ff4ca88f485275018dd8ba3"
5
2: "5f3a3e66ee0a81887437291c"
6
3: "5fd78083fc186126cb9fabad"
7
//number of legitimate interest purpose ids
8
length: 4
Copied!
The legitimate interest vendors section lists the legitimate interest vendor ids approved by the end-user. The output format is as follows:
legIntVendors: ["vendor id 1", "vendor id 2", ...]
1
//list of legitimate interest vendors approved by the end-user
2
legIntVendors:
3
0: "5f3a3e66ee0a81887437291c"
4
1: "5fd78083fc186126cb9fabad"
5
//number of approved legitimate interest vendors
6
length: 2
Copied!
The vendors section lists the vendor ids approved by the end-user. The output format is as follows:
vendors: ["vendor id 1", "vendor id 2", ...]
1
//list of vendors approved by the end-user
2
vendors:
3
0: "5f44223409125a7ed754367e"
4
1: "5fd78083fc186126cb9fabad"
5
2: "5f3a3e66ee0a81887437291c"
6
//number of approved vendors
7
length: 3
Copied!
Last modified 4mo ago