v1

latestOpenAPI 3.1.0Apache 2.02026-07-245981,1853.0 MB
Purposes

Get List of Purposes

❗️ End of Support Notification

This API is now deprecated. Any customers leveraging this API are encouraged to use the Get List of Purpose Versions API. For more information, see OneTrust API Sunsetting & Deprecation Guidelines.

Use this API to retrieve a paged list of purposes.

get/api/consentmanager/v1/purposes

Query parameters

pageinteger

Results page you want to retrieve (0-based).

sizeinteger
Example:20

Number of records per page.

sort'id,asc' | 'id,desc' | 'name,asc' | 'name,desc' | 'purposeStatus,asc' | 'purposeStatus,desc' | 'purposeType,asc' | 'purposeType,desc' | 'version,asc' | 'version,desc' | 'createdDate,asc' | 'createdDate,desc' | 'lastModifiedDate,asc' | 'lastModifiedDate,desc' | 'publishedDate,asc' | 'publishedDate,desc'
Example:name,asc

Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

Response

OK - Successfully retrieved purposes

emptyboolean

The flag to check if the entity is empty or not.

firstboolean

The flag to check if the entity is first entity or not.

lastboolean

The flag to check if the entity is last entity or not.

numberinteger

The number associated with the result.

numberOfElementsinteger

Total number of elements in the result.

totalPagesinteger

Total number of pages in the result list.

totalElementsinteger

Total number of elements in the result.

sizeinteger

Size of the result list.

Example response

{
  "content": [
    {
      "Id": "f2229953-b4b5-4042-8cb9-b78038cc4c46",
      "Label": "Marketing Communications",
      "Description": "Collect customer emails for marketing purposes",
      "Status": "ACTIVE",
      "Version": 2,
      "RetireOnDate": "2025-12-31T23:59:59Z",
      "ParentPurposeId": "ba54eb25-90f0-4633-ab12-c7bf5afdd856",
      "ExternalReference": "EXT-REF-12345",
      "PurposeType": "STANDARD",
      "ConsentLifeSpan": 7776000,
      "ImplicitConsentLifeSpan": 31536000,
      "ImplicitConsentConfirmDesc": "By continuing, you agree to our terms and conditions",
      "PurposeCategory": {
        "id": "a34ccec7-1ec0-4d65-9075-bdd0d923f1d1",
        "value": "Text Value",
        "valueKey": "attribute.option.valueKey",
        "colorCode": "red",
        "optionSelectionValue": "\"3.5\"",
        "displayLabel": "United State | San Francisco",
        "associatedAttributeValueInformation": [
          {
            "id": "a34ccec7-1ec0-4d65-9075-bdd0d923f1d1",
            "value": "Text Value",
            "valueKey": "attribute.option.valueKey",
            "colorCode": "red"
          }
        ]
      },
      "Languages": [
        {
          "Name": "Marketing Communications",
          "Description": "Collect customer emails for marketing purposes",
          "Description of Implicit Purpose Confirmation checkbox": "I can confirm",
          "Language": "en-us",
          "Default": true,
          "HardOptOutMessage": "This purpose is required and cannot be opted out"
        }
      ],
      "Topics": [
        {
          "Id": "497c4383-2c61-4906-aed0-660e3fd03ef0",
          "Name": "Car Marketing",
          "IntegrationKey": "Marketing-Communications_Car-Marketing",
          "CanDelete": true
        }
      ],
      "CustomPreferences": [
        {
          "Id": "194e0d3b-0ba8-4bc7-b046-e3ae42b2bd25",
          "Name": "Email Frequency",
          "Description": "Options for different frequencies to receive emails",
          "SelectionType": "SINGLE_CHOICE",
          "DisplayAs": "BUTTONs",
          "CreatedDate": "2023-01-15T10:52:30.974Z",
          "UpdatedDate": "2023-01-15T10:55:30.974Z",
          "NumberOfOptions": 4,
          "NumberOfLanguages": 3,
          "DefaultLanguage": "en-us",
          "Options": [
            {
              "Id": "ca0fc41b-b28a-4335-804c-44d1f0f782ed",
              "Label": "Weekly",
              "Order": 1,
              "IsDefault": true,
              "CanDelete": true
            }
          ],
          "Languages": [
            {
              "Name": "Email Frequency",
              "Description": "Options for different frequencies to receive emails",
              "Language": "en-us",
              "Default": true,
              "Options": [
                {
                  "Id": "ca0fc41b-b28a-4335-804c-44d1f0f782ed",
                  "Label": "Weekly",
                  "Order": 1,
                  "IsDefault": true,
                  "CanDelete": true
                }
              ]
            }
          ],
          "Organizations": [
            "712a1f61-a548-432f-afc4-5a383c28eeb2"
          ],
          "TotalLinkedActivePurposes": 5,
          "PurposeCustomPreferenceId": "c4a57a38-3774-45ad-9fa4-dbc545542232"
        }
      ],
      "ExpiryDateType": "LAST_TRANSACTION_DATE",
      "HardOptOutDisplayFormat": "HIDE",
      "LastMajorVersion": 2,
      "VersionNotes": "Updated to include new data retention policies",
      "HardOptOutMessage": "This purpose is required and cannot be opted out"
    }
  ],
  "first": true,
  "numberOfElements": 20,
  "totalPages": 5,
  "totalElements": 50,
  "size": 20
}