UC Purposes

Get Universal Consent Purposes

Use this API to retrieve the required interface attributes to be rendered for Universal Consent Purposes.

get/cfw/cmp/v1/uc-purposes

Request

  • Base URL
    https://mobile-data.onetrust.io
  • URL
    https://mobile-data.onetrust.io/cfw/cmp/v1/uc-purposes
  • Auth
    none declared. Required headers: OT-CDN-Location, OT-App-Id, OT-Device-Type, OT-SDK-Version

Headers

OT-CDN-Location'cdn.cookielaw.org' | 'cdn-apac.onetrust.com' | 'cdn.au.onetrust.com' | 'cdn-ukwest.onetrust.com' | 'cookie-cdn.cookiepro.com' | 'otcc-demo.otprivacy.com' | 'otcc-training.onetrust.com' required

The location of the CDN.

OT-App-Idstring required

The unique identifier for the app or domain.

Example:95c1b37a-c271-44e8-9dd3-1742d82ec948-test
OT-Device-Type'mobile' | 'ctv' required

The type of device.

OT-SDK-Versionstring required

The published version of the app or domain.

Example:202403.2.0
OT-SDK-Identificationstring nullable

The OT SDK identification.

Example:iOS/17.0/202411.1.0
OT-Languagestring nullable

The language in which the user interface should be displayed.

Example:en
OT-Country-Codestring nullable

The country code from which the user is accessing the app or website.

Example:US
OT-Region-Codestring nullable

The region code from which the user is accessing the app or website.

Example:GA
OT-Fetch-Type'APP_DATA_ONLY' | 'APP_DATA_AND_PROFILE' | 'APP_DATA_AND_SYNC_PROFILE' nullable

The type of data to download.

OT-Consent-Stringstring nullable

The encoded consent string that contains the interface's metadata.

Example:eyJsYXN0TGF1bmNoRGF0ZSI6MTcxMjMzMDgyOTEwMywic2hvdWxkU2hvd0Jhbm5lciI6MSwiZHNJZCI6IjljZDFjZGM1LTMwNmUtNGQ0Yi05MWFiLTg2MzdjODQ3ZjA3NyIsImFwcElkIjoiOTVjMWIzN2EtYzI3MS00NGU4LTlkZDMtMTc0MmQ4MmVjOTQ4LXRlc3QiLCJjZG4iOiJjZG4uY29va2llbGF3Lm9yZyIsImlzQW5vbnltb3VzIjoxLCJleHBpcnlEYXRlIjpudWxsfQ==
OT-Identifierstring nullable

The unique identifier for the data subject.

Example:9cd1cdc5-306e-4d4b-91ab-8637c847f077
OT-Identifier-Typestring nullable

The identifier type associated with the unique identifier in OT-Identifier header

Example:Email
OT-Identifier-UpdateType'Rename-Identifier' nullable

The update type for the identifier. This header is used to specify how the identifier should be updated.

OT-Sync-Profile-Authstring nullable

The JSON Web Token (JWT) generated using Public Keys within the OneTrust application.

Example:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJncGJ1cmRlbGxAb25ldHJ1c3QuY29tIiwibmFtZSI6Ikdlb3JnZSBQLiBCdXJkZWxsIiwiaWF0IjoxNTE2MjM5MDIyfQ.qisq7xmfAqXkkSckWpeJKs86JlXuKmClEgMaooSaih0
OT-Platform'Apple' | 'Android' nullable

To handle platform-specific features like ATT (App Tracking Transparency for Apple) or GoogleAdId (for Android) in a structured way, you can send the platform type in the parameters of an API or request.

OT-Exclude-Html-Tagsboolean nullable

This is specifically to unbold the vendor numbers only.

OT-Is-Anonymous-Userboolean nullable

This flag indicates whether the request is anonymous. When true, profile creation is skipped.

Response

Success

Example response

{
  "errors": [
    {
      "code": "ERROR_CODE_BLOB_LOCATIONS_UNAVAILABLE",
      "message": "Unable to fetch data for the specified Application ID. Please check your configurations."
    }
  ],
  "warnings": [
    {
      "code": "WARNING_CODE_PUBLISHED_VERSION_MISMATCH",
      "message": "Requested data for the OT-SDK-Version does not match the published version on the OneTrust server. The latest published version will be returned instead."
    }
  ],
  "ucPurposesData": {
    "general": {
      "pageHeader": "Your Preferences",
      "cpOptionsTitle": "Options"
    },
    "summary": {
      "description": {
        "text": "At Onetrust, we want you to fully understand and enjoy the product and services we offer. To help keep you informed, we encourage you to review and edit your preferences below. For more information about our Privacy Policy and how we manage your data, please review our Privacy Policy"
      },
      "title": {
        "text": "Your Preferences"
      }
    },
    "purposes": [
      {
        "id": "74d97f88-47ea-4088-ae5d-017b4be09f0c",
        "label": "UCP",
        "description": "UCP Descrtiption",
        "consentStatus": 1,
        "lastConsentedDate": "2022-06-22T07:40:06.203Z",
        "version": 1,
        "createdDate": "2022-06-22T07:40:06.203Z",
        "lastModifiedDate": "2022-06-22T07:40:21.890Z",
        "expiryDateType": "LAST_TRANSACTION_DATE",
        "order": 1,
        "customPreferences": [
          {
            "id": "aefd759c-faaa-4024-b114-d2cff6dbe9d8",
            "name": "Preference",
            "description": "Description of the preference",
            "displayAs": "CHECKBOXES",
            "options": [
              {
                "id": "92bcb92d-f48b-4e87-8b96-ce3b3080df6f",
                "consentStatus": 1,
                "label": "Option 1",
                "order": 0,
                "isDefault": false
              }
            ]
          }
        ],
        "attributes": {
          "purposeId": [
            "11"
          ]
        }
      }
    ]
  },
  "storageKeys": {
    "OT_GroupConsents": {
      "C0001": 1
    },
    "OT_GroupLIConsents": {
      "IAB2V2_1": 1
    },
    "OT_SdkConsents": {
      "d5fe3c22-2266-40c0-91b7-35844fde37a1": 1
    },
    "OT_GeneralVendorsConsents": {
      "V34": 1
    },
    "OT_UCPConsents": {
      "6c105523-9b73-4ef0-8908-c99d8d63ecea": {
        "consentStatus": 0,
        "options": {
          "638f54bd-6fc5-455d-aa87-8fe0c3a6eb47": 0
        }
      }
    },
    "OT_LastConsentedDate": "2024-11-19T04:59:48.059Z"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.