---
title: "Get List of Purpose Versions"
method: GET
path: "/api/consentmanager/v2/purposes"
tags: ["Purposes V2"]
---

# Get List of Purpose Versions

`GET /api/consentmanager/v2/purposes`

Use this API to retrieve a list of Purpose versions. The response will include details for each Purpose version along with the corresponding Purpose ID, created date, and published date.

> 🗒 Things to Know
> 
> - This API returns Purpose descriptions inside `<p>` and `</p> `HTML tags. These can be sanitized depending on your formatting needs.

## Query parameters

- `latestVersion` boolean
- `includeRetired` boolean
- `organization` string, uuid
- `includeCustomPreferences` boolean
- `includeTopics` boolean
- `fromLastModifiedDate` string, date-time
- `toLastModifiedDate` string, date-time
- `page` integer
- `size` integer
- `sort` 'guid,asc' | 'guid,desc' | 'name,asc' | 'name,desc' | 'description,asc' | 'description,desc' | 'version,asc' | 'version,desc' | 'purposeStatus,asc' | 'purposeStatus,desc' | 'purposeType,asc' | 'purposeType,desc' | 'consentLifeSpan,asc' | 'consentLifeSpan,desc' | 'implicitConsentLifeSpan,asc' | 'implicitConsentLifeSpan,desc' | 'createdDate,asc' | 'createdDate,desc' | 'lastModifiedDate,asc' | 'lastModifiedDate,desc' | 'createdBy,asc' | 'createdBy,desc' | 'lastModifiedBy,asc' | 'lastModifiedBy,desc' | 'publishedDate,asc' | 'publishedDate,desc' | 'retireOnDate,asc' | 'retireOnDate,desc' | 'publishedBy,asc' | 'publishedBy,desc' | 'externalReference,asc' | 'externalReference,desc' | 'defaultConsentStatus,asc' | 'defaultConsentStatus,desc'

## Response `200`

OK - Successfully retrieved purpose versions

- ConsentPreferencesUniversalConsentPreferenceManagPagePurposeVersionsGroupedByGuidSimple
  - `content` ConsentPreferencesUniversalConsentPreferenceManagPurposeVersionsGroupedByGuidSimple[] — The list of items for the current page.
    - `purposeId` string, uuid, required — Unique identifier of the purpose
    - `retireOnDate` string, date-time — Date when the purpose will be retired
    - `createdDate` string, date-time, required — Date when the purpose was created
    - `publishedBy` string — ID of the user who last published the purpose
    - `publishedDate` string, date-time — Date when the purpose was last published
    - `lastModifiedDate` string, date-time — Date when the purpose was last modified
    - `versions` ConsentPreferencesUniversalConsentPreferenceManagPurposeDtoV2Simple[], required — List of all versions of the purpose
      - `label` string, required — Name or label of the purpose version
      - `description` string — Detailed description of the purpose version
      - `status` 'DRAFT' | 'ACTIVE' | 'RETIRED', required — Current status of the purpose version
      - `version` integer, required — Version number of the purpose
      - `consentLifeSpan` integer — Lifespan of consents recorded against this purpose version in seconds
      - `implicitConsentLifeSpan` integer — Lifespan of implicit consents recorded against this purpose version in seconds
      - `implicitConsentConfirmDesc` string — Description text for the implicit consent confirmation checkbox
      - `purposeType` 'STANDARD' | 'COOKIE' | 'IAB' | 'MOBILE' | 'NOTIFICATION_OPT_OUT', required — Type of the purpose
      - `parentPurposeId` string, uuid — Unique identifier of the parent purpose, if this is a child purpose
      - `retireOnDate` string, date-time — Date when the purpose will be retired
      - `createdBy` string — ID of the user who created the purpose
      - `createdDate` string, date-time — Date and time when the purpose version was created
      - `lastModifiedBy` string — ID of the user who last modified the purpose
      - `lastModifiedDate` string, date-time — Date and time when the purpose version was last modified
      - `publishedBy` string — ID of the user who published the purpose
      - `publishedDate` string, date-time — Date and time when the purpose version was published
      - `detail` string — URL to get the detailed information of this purpose version
      - `customPreferences` ConsentPreferencesUniversalConsentPreferenceManagPurposeCustomPreferenceDtoV2Simple[] — List of custom preferences associated with this purpose
        - `id` string, required — Unique identifier of the purpose-custom preference relationship
        - `name` string, required — Name of the custom preference
        - `displayAs` 'BUTTONS' | 'CHECKBOXES', required — Display type for rendering the custom preference in the UI
        - `customPreferenceOptions` ConsentPreferencesUniversalConsentPreferenceManagCustomPreferenceOptionDtoV2Simple[] — List of available options for this custom preference
          - `id` string
          - `label` string
        - `languages` ConsentPreferencesUniversalConsentPreferenceManagCustomPreferenceLanguageDtoV2Simple[] — List of language-specific content for the custom preference
          - `name` string
          - `description` string
          - `language` string
          - `default` boolean
          - `options` ConsentPreferencesUniversalConsentPreferenceManagCustomPreferenceOptionDtoV2Simple[]
            - `id` string
            - `label` string
      - `topics` ConsentPreferencesUniversalConsentPreferenceManagPurposeTopicDtoV2Simple[] — List of topics associated with this purpose
        - `id` string, uuid, required — Unique identifier of the purpose-topic relationship
        - `transactionType` string — Type of transaction associated with the topic
        - `name` string, required — Name of the topic
        - `integrationKey` string — Integration key formed by combining purpose and topic names
        - `languages` ConsentPreferencesUniversalConsentPreferenceManagTopicLanguageDtoV2Simple[] — List of language-specific content for the topic
          - `name` string
          - `language` string
          - `default` boolean
        - `canDelete` boolean — Indicates whether this topic can be deleted
      - `organizations` string[] — List of organization IDs associated with this purpose
      - `expiryDateType` 'LAST_TRANSACTION_DATE' | 'CONSENT_DATE' — Type of date field used for calculating purpose lifespan/expiry
      - `enableGeolocation` boolean — Flag indicating whether to capture the data subject's geolocation when consent is provided
      - `LastMajorVersion` integer
      - `VersionNotes` string
      - `IsMajorVersion` boolean
      - `HardOptOutDisplayFormat` 'HIDE' | 'LOCK' — The format in which the purpose displays in a Trust Center when the consent status is Hard opt-out. Hard opt-out purposes can either be displayed but locked, or hidden.
      - `HardOptOutMessage` string — The message to display with the purpose when the consent status is Hard opt-out. This message only displays when hardOptOutDisplayFormat is set to LOCK.
    - `attributes` object — Additional attributes attached to the purpose
  - `empty` boolean — The flag to check if the entity is empty or not.
  - `first` boolean — The flag to check if the entity is first entity or not.
  - `last` boolean — The flag to check if the entity is last entity or not.
  - `number` integer — The number associated with the result.
  - `numberOfElements` integer — Total number of elements in the result.
  - `pageable` ConsentPreferencesUniversalConsentPreferenceManagPageableObjectSimple
    - `offset` integer
    - `sort` ConsentPreferencesUniversalConsentPreferenceManagSortObjectSimple
      - `empty` boolean
      - `unsorted` boolean
      - `sorted` boolean
    - `pageNumber` integer
    - `pageSize` integer
    - `paged` boolean
    - `unpaged` boolean
  - `sort` ConsentPreferencesUniversalConsentPreferenceManagSortObjectSimple
    - `empty` boolean
    - `unsorted` boolean
    - `sorted` boolean
  - `totalPages` integer — Total number of pages in the result list.
  - `totalElements` integer — Total number of elements in the result.
  - `size` integer — Size of the result list.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `429` — Too Many Requests. For more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).
- `500` — Internal Server Error

---

[API](https://skmtc.net/onetrust/apis/platform-access-management.md) · [All operations](https://skmtc.net/onetrust/apis/platform-access-management/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/onetrust/platform-access-management/revisions/21de3aa0b170/schema)
