---
title: "Get Purpose"
method: GET
path: "/api/consentmanager/v2/purposes/{purposeId}"
tags: ["Purposes V2"]
---

# Get Purpose

`GET /api/consentmanager/v2/purposes/{purposeId}`

## Request

- Base URL: `https://hostname`
- URL: `https://hostname/api/consentmanager/v2/purposes/{purposeId}`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://{hostname}/api/access/v1/oauth/token` scopes: `CONSENT`, `CONSENT_READ`

Use this API to retrieve a single Purpose by its unique identifier along with the associated attributes, Purpose Preferences, and created date.

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

## Path parameters

- `purposeId` string, uuid, required

## Query parameters

- `status` 'ACTIVE' | 'DRAFT'
- `version` integer

## Response `200`

OK - Successfully retrieved purpose

- ConsentPreferencesUniversalConsentPreferenceManagPurposeDetailDtoV2Detail
  - `id` string, uuid, required: Unique identifier 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
  - `customPreferences` ConsentPreferencesUniversalConsentPreferenceManagPurposeCustomPreferenceDtoV2Detail[]: List of custom preferences associated with the 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` ConsentPreferencesUniversalConsentPreferenceManagCustomPreferenceOptionDtoV2Detail[]: List of available options for this custom preference
      - `id` string
      - `transactionType` string
      - `label` string
      - `order` integer
      - `isDefault` boolean
    - `languages` ConsentPreferencesUniversalConsentPreferenceManagCustomPreferenceLanguageDtoV2Detail[]: List of language-specific content for the custom preference
      - `name` string
      - `description` string
      - `language` string
      - `default` boolean
      - `options` ConsentPreferencesUniversalConsentPreferenceManagCustomPreferenceOptionDtoV2Detail[]
        - `id` string
        - `transactionType` string
        - `label` string
        - `order` integer
        - `isDefault` boolean
  - `topics` ConsentPreferencesUniversalConsentPreferenceManagPurposeTopicDtoV2Detail[]: List of topics associated with the 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` ConsentPreferencesUniversalConsentPreferenceManagTopicLanguageDtoV2Detail[]: List of language-specific content for the topic
      - `name` string
      - `language` string
      - `default` boolean
    - `canDelete` boolean: Indicates whether this topic can be deleted
  - `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
  - `attributes` object: Additional attributes attached to the purpose
  - `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.
  - `languages` ConsentPreferencesUniversalConsentPreferenceManagPurposeLanguageDtoV2Detail[]: List of languages supported by the purpose
    - `name` string, required: The purpose name in the specified language
    - `description` string, required: The purpose description in the specified language
    - `implicitConsentConfirmDesc` string: Description text for the implicit consent confirmation checkbox in the specified language
    - `language` string: IETF BCP 47 language tag for the content
    - `default` boolean: Indicates if this is the default language for the purpose
    - `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.
  - `receiptInclusionAttributes` object: Attributes that should be included in the receipt

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found - Purpose not found
- `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.dev/onetrust/apis/consent-preferences-universal-consent-preference-management.md) - [All operations](https://skmtc.dev/onetrust/apis/consent-preferences-universal-consent-preference-management/llms.txt) - [OpenAPI document](https://skmtc.dev/onetrust/apis/consent-preferences-universal-consent-preference-management/revisions/fe4a0697ec9d?raw)
