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
Browser console
// call the postCustomConsent command to update consented vendors
window._sp_.gdpr.postCustomConsent((vendorConsents, success) => console.log(vendorConsents, success), ["5f3bc0d7b8e05c606f3dfc27", "5f477cc6c442796aa67839d9", "5fd78083fc186126cb9fabad", "5f3a3e66ee0a81887437291c", "5fda5252b4f7ae27b97a1dfe", "5e7ced57b8e05c47e418b73c"], [], [] );
// call the postCustomConsent command to update consented purposes
window._sp_.gdpr.postCustomConsent((vendorConsents, success) => console.log(vendorConsents, success), [], ["6011ea75c5d9c787531b3ecf", "6011ea75c5d9c787531b3f0e"], [] );
// call the postCustomConsent command to update legitimate interest purposes
window._sp_.gdpr.postCustomConsent((vendorConsents, success) => console.log(vendorConsents, success), [], [], ["6011ea75c5d9c787531b3ecf", "6011ea75c5d9c787531b3f0e"] );

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
categories

The categories section lists the purpose ids mapped to consented vendors. The output format is as follows:

categories: ["purpose id 1", "purpose id 2", ...]

//list of purpose ids
categories:
0: "5ff4ca88f485275018dd8b9e"
1: "5ff4ca88f485275018dd8b99"
2: "5ff4ca88f485275018dd8ba3"
//number of purpose ids
length: 3
custom Vendor Response

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

customVendorsResponse:
//list of purpose ids and their names
consentedPurposes:
0: {_id: "5ff4ca88f485275018dd8b9e", name: "Performance"}
1: {_id: "5ff4ca88f485275018dd8b99", name: "Social Media"}
2: {_id: "5ff4ca88f485275018dd8ba3", name: "Personal Ads"}
//number of purposes consented to
length: 3
//list of legitimate interest purpose ids and their names
legIntPurposes:
0: {_id: "5ff4ca88f485275018dd8b99", name: "Social Media"}
1: {_id: "5ff4ca88f485275018dd8ba3", name: "Personal Ads"}
2: {_id: "5f3a3e66ee0a81887437291c"}
3: {_id: "5fd78083fc186126cb9fabad"}
// number of purposes consented to
length: 4

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

//list of vendor ids, their names and vendor type "CUSTOM" or "IAB"
consentedVendors:
0: {_id: "5f44223409125a7ed754367e", name: "Ceros", vendorType: "CUSTOM"}
1: {_id: "5fd78083fc186126cb9fabad", name: "media control GmbH", vendorType: "CUSTOM"}
2: {_id: "5f3a3e66ee0a81887437291c", name: "Trivago", vendorType: "CUSTOM"}
3: {_id: "5f3a3e66ee0a81887437291c", name: "Trivago", vendorType: "CUSTOM"}
4: {_id: "5fd78083fc186126cb9fabad", name: "media control GmbH", vendorType: "CUSTOM"}
//number of vendors consented to
length: 5
grants

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.

//list of vendor grants. for each vendor, list of purpose ids and if consent has been granted to each purpose
grants:
5f3a3e66ee0a81887437291c:
purposeGrants:
5ff4ca88f485275018dd8b9e: true
5ff4ca88f485275018dd8b99: true
5ff4ca88f485275018dd8ba3: true
//vendorGrant is true if end-user has consented to all purposes for a vendor
vendorGrant: true
LegIntCategories

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", ...]

//list of legitimate interest purpose ids
legIntCategories:
0: "5ff4ca88f485275018dd8b99"
1: "5ff4ca88f485275018dd8ba3"
2: "5f3a3e66ee0a81887437291c"
3: "5fd78083fc186126cb9fabad"
//number of legitimate interest purpose ids
length: 4
legIntVendors

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", ...]

//list of legitimate interest vendors approved by the end-user
legIntVendors:
0: "5f3a3e66ee0a81887437291c"
1: "5fd78083fc186126cb9fabad"
//number of approved legitimate interest vendors
length: 2
vendors

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", ...]

//list of vendors approved by the end-user
vendors:
0: "5f44223409125a7ed754367e"
1: "5fd78083fc186126cb9fabad"
2: "5f3a3e66ee0a81887437291c"
//number of approved vendors
length: 3