Purposes
Get List of Data Subjects by Purpose
Use this API to retrieve a list of data subjects by Purpose. The response will include details for each data subject such as the last transaction date, the transaction status for that Purpose, and Purpose Preferences they have interacted with.
🗒 Things to Know
- This API can be used as an alternative to the Get List of Data Subjects API when data subject records for a specific Purpose are required.
- This API returns Purpose descriptions inside <p> and </p> HTML tags. These can be sanitized depending on your formatting needs.
get/api/consentmanager/v1/purposes/{purposeId}/datasubjects
Path parameters
purposeIdstring uuid required
Unique identifier of the Purpose for which to retrieve data subjects
Query parameters
lastTransactionDatestring date-time
Filter data subjects by last transaction date (ISO 8601 format: yyyy-MM-dd'T'HH:mm:ss)
transactionStatus'ACTIVE' | 'WITHDRAWN' | 'EXPIRED'
Example:ACTIVE
Filter data subjects by transaction status
includeCustomPreferencesboolean
Include custom preference options in the response
Response
OK - Successfully retrieved data subjects for purpose
Example response
{
"content": [
{
"DataSubjectId": "example@otprivacy.com",
"Status": "ACTIVE",
"FirstTransactionDate": "2020-01-06T10:54:30.974Z",
"LastTransactionDate": "2020-01-12T12:42:12.842Z",
"CustomPreferences": [
{
"Id": "64f8ebb3-b43d-4e4b-a84a-3d301b6d95f1",
"Name": "Fiscal preference",
"CustomPreferenceOptions": [
{
"Id": "331f4c1c-2dc6-4a04-8603-7edab63e36d4",
"Name": "Monthly"
}
]
}
]
}
],
"first": true,
"numberOfElements": 20,
"totalPages": 5,
"totalElements": 50,
"size": 20
}