v1

latestOpenAPI 3.1.0Apache 2.02026-07-245981,1853.0 MB
Preferences V2

Get Data Subject's Preferences

Use this API to retrieve a list of all consent preferences for a data subject identifier. The response will include details such as the consent date, purpose preferences, and data subject's geolocation. The response will also include relevant information about data elements and last interaction date, along with the current status of consent for the purposes that the data subject has interacted with.

🗒 Things to Know

  • This API uses a JSON Web Token (JWT) authorization token that will be passed to OneTrust servers to ensure authenticated access to a user's consent profile. This is not the OAuth 2.0 client credential or API key. This JWT authorization token is generated using the cross-device consent process. For more information, see Cross-Domain and Cross-Device Consent.
  • This API does not require an intermediary server-server API call. It is optimized for client-side applications, maintaining security to make quick decisions based on data subject consent.
  • The response of this API will not return updates made via the Update Data Subject's Preferences in a Preference Center API.
get/v2/preferences

Headers

identifierstring required

The data subject identifier of the data subject.

tenantIdstring uuid required

The unique identifier of the OneTrust account. This value is obtained from the OneTrust Platform by clicking the User icon in the Global Header and copying the ID that appears below the email address.

Authorizationstring required

The JSON web token (JWT) that will be passed to OneTrust servers to ensure authenticated access to a user's consent profile. This JWT authorization token is generated using the cross-device consent process.

Response

OK

consentDatestring date-time

The date and time at which the Data Subject gave their consent based on the interaction date for a Confirmed Transaction.

customPreferencesobject

The list of Custom Preferences associated with the Purpose.

dataElementsobject

The names and values of Data Elements added via a consent receipt.

expiryDatestring date-time

The date and time at which the Data Subject's consent expires. The expiryDate will only be included in the response if the expiration date is explicitly set using the Consent Receipt API.

idstring uuid

The preferences id is the Purpose GUID that the consent status relates to.

lastInteractionDatestring date-time

The most recent date and time at which the Data Subject last made a choice for a particular Purpose.

purposeLastUpdatedDatestring date-time

The most recent date and time when the Purpose status was changed, the Purpose version was updated, or any changes were made to Topic or Custom Preference option selections.

purposeVersioninteger

The version of the purpose that the Data Subject consented to.

status'EXPIRED' | 'WITHDRAWN' | 'NO_CONSENT' | 'PENDING' | 'ACTIVE' | 'OPT_OUT' | 'ALWAYS_ACTIVE' | 'HARD_OPT_OUT' | 'EXTEND' | 'NOT_OPT_OUT'

The Data Subject's consent status for the Purpose.

syncGroupsstring uuid

The GUID of the sync group for which preferences are returned. This is an optional parameter that allows you to retrieve only the Purposes for a specified Sync Group.

topicsstring[]

The list of topics associated with the Purpose.

Example response

{
  "geolocation": {
    "receiptGuid": "788ba071-61b0-485f-81a0-a2245777b432",
    "country": "US",
    "state": "GA",
    "stateName": "Georgia"
  },
  "latestGeolocation": {
    "receiptGuid": "788ba071-61b0-485f-81a0-a2245777b432",
    "country": "US",
    "state": "GA",
    "stateName": "Georgia"
  }
}