The __uspapi
function takes three arguments: the command, US privacy version and callback function:
Argument | Description |
---|---|
Command | The specific action your organization wishes to perform. |
U.S. Privacy Specification version | A callback function can be custom code defined by your organization to complete a task depending on the value of success and using the data in uspData. See below for more information. |
Example
Your organization could write a custom callback function that returns the contents in the
uspData
. The callback function has two arguments:
uspData
- a JSON object that contains the unencoded values of the stringsuccess
- a boolean value (true
/false
) that informs if the command request was successfulThe callback function should be called immediately and without any asynchronous logic. The callback shall be invoked only once per API call with this command.
A value of
false
will be passed as the value to the success argument to the callback when nouspData
object could be returned.
The articles in this section will cover various commands your organization can make using the __uspapi
API. This includes commands that are standard with the __uspapi
call and additional commands that Sourcepoint has created to extend the functionality of the IAB's U.S. Privacy - CCPA API for custom function integrations
For more detailed information, click here to access the IAB's repository regarding the USP API.