> ## 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 Optimized List of All Purpose Details for All Data Subjects

Use this optimized for high-performance API to retrieve an unsorted list of purpose details last updated between the specified date range for all data subjects.

> 🗒 Things to Know
>
> - The maximum date range that can be returned is 7 days.  
> - Results are not returned in a specific order and may appear random.  
> - Supports bookmarking for consistent pagination.  
> - Optimized for high-performance bulk retrieval where sorting is not required.  
> - Has more flexible rate limits compared to the standard [Get List of All Purpose Details for All Data Subjects](/onetrust/reference/getdatasubjectprofilesv4) API.

# 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/profiles/unordered": {
      "get": {
        "operationId": "getDataSubjectProfilesUnorderedV4",
        "summary": "Get Optimized List of All Purpose Details for All Data Subjects",
        "description": "Use this optimized for high-performance API to retrieve an unsorted list of purpose details last updated between the specified date range for all data subjects.\n\n> 🗒 Things to Know\n>\n> - The maximum date range that can be returned is 7 days.  \n> - Results are not returned in a specific order and may appear random.  \n> - Supports bookmarking for consistent pagination.  \n> - Optimized for high-performance bulk retrieval where sorting is not required.  \n> - Has more flexible rate limits compared to the standard [Get List of All Purpose Details for All Data Subjects](/onetrust/reference/getdatasubjectprofilesv4) API.",
        "tags": [
          "Data Subjects V4"
        ],
        "x-onetrust": {
          "spec-label": "https://developer.onetrust.com/onetrust/openapi/consent-preferences-universal-consent-preference-management-oas.json"
        },
        "parameters": [
          {
            "name": "collectionPointId",
            "in": "query",
            "description": "The unique identifier for a Collection Point.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "8f5f3a5b-4b32-40d3-9c43-69c5ec91f4af"
          },
          {
            "name": "purposeId",
            "in": "query",
            "description": "The unique identifier for a Purpose.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "25d9ccac-db88-4d34-849c-3d602a629961"
          },
          {
            "name": "status",
            "in": "query",
            "description": "The status of the Purpose for the data subject.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "EXPIRED",
                "WITHDRAWN",
                "NO_CONSENT",
                "PENDING",
                "ACTIVE",
                "OPT_OUT",
                "ALWAYS_ACTIVE",
                "HARD_OPT_OUT",
                "EXTEND",
                "CHANGE_PREFERENCES",
                "NOT_OPT_OUT",
                "OPT_IN",
                "IMPLICIT"
              ]
            },
            "example": "ACTIVE"
          },
          {
            "name": "updatedSince",
            "in": "query",
            "description": "The start of a date and time range used to filter results.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2024-01-01T00:00:00"
          },
          {
            "name": "updatedUntil",
            "in": "query",
            "description": "The end of a date and time range used to filter results.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2024-01-07T23:59:59"
          },
          {
            "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
          }
        ],
        "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"
  }
}
```