1. Help Center
  2. RevContent Native API

CCPA Data Request & Data Deletion Request API

A Guide to making CCPA Data Requests

Publishers now have the ability to forward CCPA data fetch requests and data deletion requests from users to RevContent directly without having to ask the user to submit a separate form.

Publishers can use either of the following implementations:

  1. Javascript Snippet
  2. Rest Api Call (Client side)

1. Javascript Snippet

Implementing the following javascript snippet on your page with the placeholder replaced by valid values will submit a request to RevContent and call the callback function:

var script = document.createElement('script');
script.onload = function () {
 rev_ccpa_request(<REQUEST_ID>, <DELETE_DATA>, <USER_EMAIL>,
   <PUBLISHER_ID>, <CALLBACK(bool, string)>);
}
script.src = 'https://www.revcontent.com/privacy/api_js';
document.body.appendChild(script);

PLACEHOLDERS:

  1. <REQUEST_ID> (String, Max 64 chars): Unique identifier for the request. To be used for polling the request status and result.
  2. <DELETE_DATA> (Integer, 1 or 0): To indicate whether the user data is to be deleted. When set to `1`, revcontent will initiate data deletion.
  3. <USER_EMAIL> (String): The user's email address for auditing purposes. Ensure a valid email address is used.
  4. <PUBLISHER_ID> (Integer): Publisher's account/user ID.
  5. <CALLBACK(bool, string)> (Function): Callback function to be called when the request completes. The callback supports 2 parameters - the first parameter would be boolean to reflect if the request was successfully registered and the second parameter would be a string message returned.

2. Rest Api Call (Client side)

Publishers can make rest api calls client side with the needed parameters to submit a ccpa data request. The request should include credentials so cookies of domain are forwarded with the rest API calls for user identification. 

curl --location --request POST 'https://www.revcontent.com/stats/api/v1.0/data_requests/submit' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Cookie: __ID=identifier_cookie_value' \
--data-urlencode 'domain=https://domain.com' \
--data-urlencode 'pub_id=1000' \
--data-urlencode 'request_id=abc123' \
--data-urlencode 'email=abc1234@gmail.com' \
--data-urlencode 'delete_data=1'

The following parameters need to be sent:

  1. domain (String): Domain from which rest call is being made. This is for CORS headers and needs to include the protocol of the site. For ex `https://abc.com`.
  2. pub_id (Integer): Publisher's account/ user Id.
  3. request_id (String, Max 64 chars): Unique identifier for the request. To be used for polling the request status and result.
  4. email (String): The user's email address for auditing purposes. Ensure a valid email address is used.
  5. delete_data (Integer, 1 or 0): To indicate whether the user's data is to be deleted. When set to `1`, revcontent will initiate data deletion.   
     

 

NOTE:

  1. The request made to RevContent can fail when invalid parameters are passed.
  2. Publishers must ensure the callback is called with true.
    Requests can take a couple of hours before the results are ready.
  3. Request results can be polled by utilizing the following API request: 
    https://www.revcontent.com/docs/stats/#api-CCPA-PostUserData
  4. When a data deletion request is received, RevContent is able to retain some data for auditing and legitimate use purposes. Any retained data is deleted within 90 days.