getCustomVendorRejects command
Sourcepoint has extended the functionality of the IAB's CCPA API to offer your organization additional commands that can be used with the __uspapi() function call. This provides a level of consistency and feature overlap between the IAB CCPA API and custom function integrations.
The getCustomVendorRejects command enables your organization to retrieve a list of categories and vendors an end-user has rejected.

getCustomVendorRejects command

The command returns a JSON object that lists each IAB and custom vendor, and each purpose an end-user has rejected. The format of the getCustomVendorRejects command is as follows:
Code example
Browser console command
1
function callback_fn(uspData, success) {
2
// your custom callback code can be included here
3
console.log(uspData, success)
4
}
5
6
// call the __uspapi() function with callback only
7
__uspapi('getCustomVendorRejects', 1, callback_fn);
Copied!
1
// call the __uspapi() function from the browser console
2
__uspapi('getCustomVendorRejects', 1, function(uspData, success){console.log(uspData, success);});
Copied!

getCustomVendorRejects response

The JSON object response is in two parts. The first part is a list of purpose names and their IDs an end-user has rejected. The second part is a list of vendor names, their IDs and types the end-user has rejected. There is a flag that indicates if CCPA rules apply for current situation
This data can then be parsed and the appropriate measures can be taken.
rejectedCategories
The rejectedCategories section lists the purpose ids and purpose names rejected by the end-user. The purposes are listed as follows:
Parameter
Description
_id
Purpose ID
type
The legal basis set for this purpose - consent, legitimate interest, not allowed, disclosure only
vendorId
Vendor ID
ccpaApplies
Does CCPA apply in this situation?
1
rejectedCategories:
2
0: {_id: "5ede9a62ffbdcd235d9923f5", name: "Advertising"}
3
1: {_id: "5ede9a62ffbdcd235d9923f6", name: "Marketing"}
4
2: {_id: "5ede9a62ffbdcd235d9923f7", name: "Functional"}
5
ccpaApplies: true
Copied!
Last modified 3mo ago