> ## Documentation Index
> Fetch the complete documentation index at: https://developer.onetrust.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get List of All Purpose Details by Data Subject

Use this API to retrieve a data subject’s purpose details for all purposes. The response will include all purposes that the data subject interacted with along with details such as status, last transaction date, consent date, and purpose preferences.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Consent & Preferences - Universal Consent & Preference Management (OAS)",
    "version": "1.0",
    "contact": {
      "name": "OneTrust Support",
      "url": "https://my.onetrust.com/s/contactsupport"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "description": "The Universal Consent & Preference Management APIs are used to integrate external systems and streamline the flow of data with Universal Consent & Preference Management in the OneTrust Platform."
  },
  "servers": [
    {
      "url": "https://{hostname}",
      "variables": {
        "hostname": {
          "default": "hostname",
          "description": "The OneTrust hostname such as app.onetrust.com, app-eu.onetrust.com, app-de.onetrust.com, app-uk.onetrust.com, app-apac.onetrust.com, trial.onetrust.com, or uat.onetrust.com."
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Data Subjects V4",
      "description": "The Data Subjects V4 APIs are used to manage data subject information, preferences, and consent records.",
      "externalDocs": {
        "description": "OpenAPI 3.1.0 - Download Definition",
        "url": "https://developer.onetrust.com/onetrust/openapi/consent-preferences-universal-consent-preference-management-oas.json"
      },
      "x-displayName": "Data Subjects V4"
    }
  ],
  "paths": {
    "/rest/api/consent/v4/datasubjects/ds-profiles": {
      "get": {
        "operationId": "getAllProfilesByDataSubjectV4",
        "summary": "Get List of All Purpose Details by Data Subject",
        "description": "Use this API to retrieve a data subject’s purpose details for all purposes. The response will include all purposes that the data subject interacted with along with details such as status, last transaction date, consent date, and purpose preferences.",
        "tags": [
          "Data Subjects V4"
        ],
        "x-onetrust": {
          "spec-label": "https://developer.onetrust.com/onetrust/openapi/consent-preferences-universal-consent-preference-management-oas.json"
        },
        "parameters": [
          {
            "name": "identifier",
            "in": "header",
            "description": "The unique identifier for a data subject.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "example@otprivacy.com"
          },
          {
            "name": "requestContinuation",
            "in": "header",
            "description": "The token used to paginate a response if the number of records is more than a page.",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "{\\\"compositeToken\\\": \\\"jmxpAKZxe9nZkAoAAAAAAA==\\\"}"
          },
          {
            "name": "page",
            "in": "query",
            "description": "The page number of the results.",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "size",
            "in": "query",
            "description": "The number of results per page.",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 50,
              "minimum": 1
            },
            "example": 20
          },
          {
            "name": "sort",
            "in": "query",
            "description": "The sort criteria that dictates the order of the results.",
            "schema": {
              "type": "string",
              "default": "lastUpdatedDate,desc",
              "enum": [
                "lastUpdatedDate,asc",
                "lastUpdatedDate,desc"
              ]
            },
            "example": "lastUpdatedDate,desc"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentAPI_DataSubjectProfileResponseSliceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests. \nFor more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).",
            "headers": {
              "Retry-After": {
                "schema": {
                  "description": "The number of seconds after which requests will be allowed again.",
                  "format": "int32"
                }
              },
              "ot-period": {
                "schema": {
                  "description": "The unit of time for which the rate limit applies",
                  "enum": [
                    "HOUR",
                    "MINUTE"
                  ]
                }
              },
              "ot-ratelimit-event-id": {
                "schema": {
                  "description": "The unique identifier for the rate-limiting event.",
                  "format": "uuid"
                }
              },
              "ot-request-made": {
                "schema": {
                  "description": "The number of requests made within the specified period.",
                  "format": "int32"
                }
              },
              "ot-requests-allowed": {
                "schema": {
                  "description": "The number of requests allowed within the specified period.",
                  "format": "int32"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "ConsentAPI_OAUTH2": [
              "CONSENT",
              "CONSENT_READ"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ConsentAPI_SortObject": {
        "type": "object",
        "properties": {
          "empty": {
            "type": "boolean"
          },
          "sorted": {
            "type": "boolean"
          },
          "unsorted": {
            "type": "boolean"
          }
        }
      },
      "ConsentAPI_PageableObject": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer",
            "format": "int64"
          },
          "sort": {
            "$ref": "#/components/schemas/ConsentAPI_SortObject"
          },
          "pageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "paged": {
            "type": "boolean"
          },
          "unpaged": {
            "type": "boolean"
          }
        }
      },
      "ConsentAPI_DataSubjectAttachmentResponseDto": {
        "type": "object",
        "properties": {
          "attachmentId": {
            "description": "The unique identifier of the file attached to the data subject record.",
            "type": "string",
            "format": "uuid",
            "example": "25d9ccac-db88-4d34-849c-3d602a629961"
          },
          "fileName": {
            "description": "The name of the file attached to the data subject record.",
            "type": "string",
            "example": "policy.pdf"
          },
          "uploadedBy": {
            "description": "The name of the user who uploaded the file.",
            "type": "string",
            "example": "John Doe"
          },
          "uploadDate": {
            "description": "The date and time on which the file was uploaded.",
            "type": "string",
            "format": "date-time",
            "example": "2024-01-01T00:00:00"
          }
        }
      },
      "ConsentAPI_DataSubjectGeolocationResponseDto": {
        "type": "object",
        "properties": {
          "dataSubjectId": {
            "description": "The unique identifier of the data subject.",
            "type": "string",
            "format": "uuid",
            "example": "633ba071-61b0-485f-81a0-a2245777b432"
          },
          "receiptGuid": {
            "description": "The unique identifier of the consent receipt for which geolocation details were sent.",
            "type": "string",
            "format": "uuid",
            "example": "633ba071-61b0-485f-81a0-a2245777b432"
          },
          "country": {
            "description": "The country where the consent interaction occurred.",
            "type": "string",
            "example": "US"
          },
          "state": {
            "description": "The state code where the consent interaction occurred.",
            "type": "string",
            "example": "GA"
          },
          "stateName": {
            "description": "The name of the state where the consent interaction occurred.",
            "type": "string",
            "example": "Georgia"
          }
        }
      },
      "ConsentAPI_DataSubjectSourceResponseDto": {
        "type": "object",
        "properties": {
          "dataSubjectId": {
            "description": "The unique identifier of the data subject.",
            "type": "string",
            "format": "uuid",
            "example": "633ba071-61b0-485f-81a0-a2245777b432"
          },
          "receiptGuid": {
            "description": "The unique identifier of the consent receipt for which source details were sent.",
            "type": "string",
            "format": "uuid",
            "example": "633ba071-61b0-485f-81a0-a2245777b432"
          },
          "sourceType": {
            "description": "The type of source that captured the consent interaction.",
            "type": "string",
            "example": "WEB"
          },
          "sourceContent": {
            "description": "The URL or identifier of the source where the consent interaction took place.",
            "type": "string",
            "example": "https://example.com/consent"
          }
        }
      },
      "ConsentAPI_DataSubjectProfileResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Unique Identifier identifying a Purpose",
            "type": "string",
            "format": "uuid",
            "example": "f2229953-b4b5-4042-8cb9-b78038cc4c46"
          },
          "identifier": {
            "description": "The data subject identifier of the data subject.",
            "type": "string",
            "example": "example@otprivacy.com"
          },
          "lastReceiptId": {
            "description": "Unique Identifier identifying a Receipt",
            "type": "string",
            "format": "uuid",
            "example": "f2229953-b4b5-4042-8cb9-b78038cc4c46"
          },
          "name": {
            "description": "The Purpose name",
            "type": "string",
            "example": "Marketing Communications"
          },
          "version": {
            "description": "Version of the Purpose",
            "type": "integer",
            "format": "int64",
            "example": 2
          },
          "status": {
            "description": "The status of the purpose for the data subject.",
            "type": "string",
            "example": "ACTIVE"
          },
          "firstTransactionDate": {
            "description": "The date and time that the first transaction was written to the database.",
            "type": "string",
            "format": "date-time",
            "example": "2020-01-05T11:34:30.974Z"
          },
          "lastTransactionDate": {
            "description": "The date and time that the last transaction was written to the database.",
            "type": "string",
            "format": "date-time",
            "example": "2020-01-12T16:11:25.479Z"
          },
          "withdrawalDate": {
            "description": "The date and time that the data subject withdrew consent for the purpose.",
            "type": "string",
            "format": "date-time",
            "example": "2020-01-12T16:11:25.479Z"
          },
          "consentDate": {
            "description": "The date and time that the data subject gave their last active consent.",
            "type": "string",
            "format": "date-time",
            "example": "2020-01-07T13:18:23.123Z"
          },
          "expiryDate": {
            "description": "The explicit expiration date after which the purpose is no longer valid and no further consent is collected against it.",
            "type": "string",
            "format": "date-time",
            "example": "2020-01-07T13:18:23.123Z"
          },
          "totalTransactionCount": {
            "description": "The total number of Transactions recorded against this Purpose",
            "type": "integer",
            "format": "int64",
            "example": 3
          },
          "topicsList": {
            "description": "The list of topics associated with the purpose.",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "writeOnly": true
          },
          "topics": {
            "description": "The details of the topics for which transactions were recorded.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsentAPI_DataSubjectProfileTopicResponseDto"
            }
          },
          "customPreferencesMap": {
            "description": "The list of purpose preferences associated with the purpose.",
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "writeOnly": true
          },
          "customPreferences": {
            "description": "The details of the purpose preferences for which transactions were recorded.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsentAPI_DsProfileCustomPreferenceResponseDto"
            }
          },
          "lastTransactionCollectionPointId": {
            "type": "string",
            "format": "uuid"
          },
          "lastTransactionCollectionPointVersion": {
            "type": "integer",
            "format": "int64"
          },
          "purposeNote": {
            "description": "The details of the reason template used to explain changes to the data subject's preferences.",
            "$ref": "#/components/schemas/ConsentAPI_PurposeNoteResponseDto"
          },
          "lastUpdatedDate": {
            "description": "The date and time of the latest change to the data subject profile in the database.to any of: Purpose version, Purpose Status, or Topic/Custom Preference selections",
            "type": "string",
            "format": "date-time",
            "example": "2020-01-05T11:34:30.974Z"
          },
          "lastInteractionDate": {
            "description": "The date and time of the data subject's last interaction with the purpose.",
            "type": "string",
            "format": "date-time",
            "example": "2020-01-05T11:34:30.974Z"
          },
          "attributes": {
            "description": "The additional attributes associated with the purpose.",
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "geolocation": {
            "description": "The geolocation details of the consent interaction.",
            "$ref": "#/components/schemas/ConsentAPI_DataSubjectGeolocationResponseDto"
          },
          "attachments": {
            "description": "Documents attached to Data Subject Profile",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsentAPI_DataSubjectAttachmentResponseDto"
            }
          },
          "source": {
            "description": "The source details of the consent interaction.",
            "$ref": "#/components/schemas/ConsentAPI_DataSubjectSourceResponseDto"
          }
        }
      },
      "ConsentAPI_DataSubjectProfileResponseSliceDto": {
        "type": "object",
        "properties": {
          "content": {
            "items": {
              "$ref": "#/components/schemas/ConsentAPI_DataSubjectProfileResponseDto"
            },
            "type": "array"
          },
          "number": {
            "description": "The page number of the results.",
            "type": "integer",
            "format": "int32",
            "example": 1
          },
          "size": {
            "description": "The number of results per page.",
            "type": "integer",
            "format": "int32",
            "example": 20
          },
          "pageable": {
            "$ref": "#/components/schemas/ConsentAPI_PageableObject"
          },
          "last": {
            "description": "Flag indicating whether this is the last page or not.",
            "type": "boolean",
            "example": false
          },
          "sort": {
            "$ref": "#/components/schemas/ConsentAPI_SortObject"
          },
          "first": {
            "type": "boolean"
          },
          "numberOfElements": {
            "type": "integer",
            "format": "int32"
          },
          "empty": {
            "type": "boolean"
          },
          "requestContinuation": {
            "description": "The token used to paginate a response if the number of records is more than a page.",
            "type": "string",
            "example": "{\\\"compositeToken\\\": \\\"jmxpAKZxe9nZkAoAAAAAAA==\\\"}"
          }
        }
      },
      "ConsentAPI_DataSubjectProfileTopicResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Unique Identifier identifying a Purpose Topic",
            "type": "string",
            "format": "uuid",
            "example": "497c4383-2c61-4906-aed0-660e3fd03ef0"
          },
          "name": {
            "description": "The name of the topic.",
            "type": "string",
            "example": "Car Marketing"
          }
        }
      },
      "ConsentAPI_DsProfileCustomPreferenceOptionResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The unique identifiers of the purpose preference options.",
            "type": "string",
            "format": "uuid",
            "example": "ca0fc41b-b28a-4335-804c-44d1f0f782ed"
          },
          "name": {
            "description": "The name of the purpose preference options.",
            "type": "string",
            "example": "Weekly"
          }
        }
      },
      "ConsentAPI_DsProfileCustomPreferenceResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The unique identifier of the purpose preference.",
            "type": "string",
            "format": "uuid",
            "example": "c4a57a38-3774-45ad-9fa4-dbc545542232"
          },
          "name": {
            "description": "The name of the purpose preference.",
            "type": "string",
            "example": "Email Frequency"
          },
          "options": {
            "description": "List containing the Custom Preference's Options",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsentAPI_DsProfileCustomPreferenceOptionResponseDto"
            }
          }
        }
      },
      "ConsentAPI_PurposeNoteResponseDto": {
        "type": "object",
        "properties": {
          "noteId": {
            "description": "The unique identifier of the reason template.",
            "type": "string",
            "format": "uuid",
            "example": "f312dd9b-58b4-4f34-b5ff-10b9b464bc4f"
          },
          "noteType": {
            "description": "The type of reason template.",
            "type": "string",
            "example": "UNSUBSCRIBE_REASON",
            "enum": [
              "UNSUBSCRIBE_REASON"
            ]
          },
          "noteLanguage": {
            "description": "The ISO code for the language of the reason template.",
            "type": "string",
            "example": "en-us"
          },
          "noteText": {
            "description": "The text of the reason template.",
            "type": "string",
            "example": "I did not sign up for this."
          },
          "isValidNote": {
            "description": "This flag indicates whether the note is a valid reason template.",
            "type": "boolean",
            "example": true
          }
        }
      }
    },
    "securitySchemes": {
      "ConsentAPI_OAUTH2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://{hostname}/api/access/v1/oauth/token",
            "scopes": {
              "CONSENT": "Consent Scope gives the user access to read/write operations",
              "CONSENT_READ": "Consent Read Scope gives the user read-only access"
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false,
    "proxy-enabled": false,
    "metrics-enabled": false
  },
  "x-onetrust": {
    "spec-label": "OpenAPI 3.1.0"
  }
}
```