Aggregate your data subject's personally identifiable information (PII) into one file using the POST method of the Portability resource. The PII includes data found in the Account, Contact, Individual, Lead, Person, and User objects. You receive a response with a URL to download the file, a policy file ID, and information on the objects and fields you selected when creating the policy. Use the policy file ID to execute the Portability resource with the GET method. This resource is available in REST API version 50.0 and later.
To use the Portability resource, you must have the ModifyAllData or PrivacyDataAccess user permission. Ensure that your Salesforce admin has granted you these permissions.
Syntax
URI: /services/data/vXX.X/consent/dsr/rtp/execute
Formats: JSON
HTTP methods: POST
Authentication: Authorization: Bearer token
Request body
{
“dataSubjectId”:”<root ID>”,
“policyName”:”<policyName>”
}
Request parameters
| Parameter | Description |
|---|---|
dataSubjectId |
The ID of the customer making the request. The ID is 15 or 18 characters long, and found in the Account, Contact, Individual, Lead, Person, and User objects. |
policyName |
The name of an active policy. This contains the object in the dataSubjectId parameter. |
Example
Example Request
curl -X POST https://MyDomainName.my.salesforce.com/services/data/v68.0/consent/dsr/rtp/execute -H "Authorization: Bearer token" -H "Content-Type: application/json" -d "@exampleRequestBody.json"
Example Response Body
{
“status" : "SUCCESS",
"warnings" : [ ],
"result" : {
"policyFileStatus" : "In Progress",
"policyFileUrl" : "https://MyDomainName.my.salesforce.com/servlet/policyFileDownload?file=0jeS70000004CBO",
"policyFileId" : "0jeS70000004CBO"
}
}