> ## 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 Data Subjects

Use this API to retrieve a list of data subjects that were last updated between the specified date range. The response will include basic details, such as each data subject’s identifier, created date, data elements, and last updated date.

> 🗒 Things to Know
> 
> - The maximum date range that can be returned is 7 days.

# 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": {
      "get": {
        "operationId": "getDataSubjectsV4",
        "summary": "Get List of Data Subjects",
        "description": "Use this API to retrieve a list of data subjects that were last updated between the specified date range. The response will include basic details, such as each data subject’s identifier, created date, data elements, and last updated date.\n\n> 🗒 Things to Know\n> \n> - The maximum date range that can be returned is 7 days.",
        "tags": [
          "Data Subjects V4"
        ],
        "x-onetrust": {
          "spec-label": "https://developer.onetrust.com/onetrust/openapi/consent-preferences-universal-consent-preference-management-oas.json"
        },
        "parameters": [
          {
            "name": "fromDate",
            "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": "toDate",
            "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": "isDNCInclude",
            "in": "query",
            "description": "Indicates whether to include data subject in the response if the data subject is in the DNC list.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "example": true
          },
          {
            "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": "lastModifiedDate,desc",
              "enum": [
                "lastModifiedDate,asc",
                "lastModifiedDate,desc",
                "createdDate,asc",
                "createdDate,desc"
              ]
            },
            "example": "lastModifiedDate,desc"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentAPI_DataSubjectResponseSliceDto"
                }
              }
            }
          },
          "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_DataSubjectElementResponseDto": {
        "type": "object",
        "properties": {
          "name": {
            "description": "The name of the data element.",
            "type": "string",
            "example": "Work Email"
          },
          "value": {
            "description": "The value of the data element.",
            "type": "object",
            "example": "example@otprivacy.com, [Red, Blue]"
          },
          "doNotCall": {
            "description": "This flag indicates whether the data subject's phone number is on the Federal Trade Commissions (FTC's) Do Not Call list.",
            "type": "boolean",
            "example": true
          },
          "linked": {
            "description": "This flag indicates whether the data element is linked to the data subject.",
            "type": "boolean"
          }
        }
      },
      "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_DataSubjectResponseDto": {
        "type": "object",
        "properties": {
          "identifier": {
            "description": "The data subject identifier of the data subject.",
            "type": "string",
            "example": "example@otprivacy.com"
          },
          "identifierType": {
            "description": "The type of data subject identifier used for the data subject's identifier.",
            "type": "string",
            "example": "Email"
          },
          "language": {
            "description": "The language set for the data subject.",
            "type": "string",
            "example": "en-us"
          },
          "createdDate": {
            "description": "The date and time that the data subject record was created.",
            "type": "string",
            "format": "date-time",
            "example": "2020-01-12T16:11:25.479Z"
          },
          "lastTransactionDate": {
            "description": "The date and time that the last transaction for the data subject was written to the database.",
            "type": "string",
            "format": "date-time",
            "example": "2020-01-12T16:11:25.479Z"
          },
          "lastReceiptGuid": {
            "description": "The unique identifier of the latest consent receipt for the data subject.",
            "type": "string",
            "format": "uuid",
            "example": "f2229953-b4b5-4042-8cb9-b78038cc4c46"
          },
          "testDataSubject": {
            "description": "This flag indicates whether the data subject is used for testing purposes.",
            "type": "boolean",
            "example": true
          },
          "dataElements": {
            "description": "The additional information about the data subject.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsentAPI_DataSubjectElementResponseDto"
            }
          },
          "latestGeoLocation": {
            "description": "The geolocation details of the latest consent receipt.",
            "$ref": "#/components/schemas/ConsentAPI_DataSubjectGeolocationResponseDto"
          },
          "consentGroups": {
            "description": "The list of data subject group identifiers to which the data subject belongs.",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "example": "[633ba071-61b0-485f-81a0-a2245777b432, 25d9ccac-db88-4d34-849c-3d602a629961]"
          },
          "latestSource": {
            "description": "The source details of the latest consent receipt.",
            "$ref": "#/components/schemas/ConsentAPI_DataSubjectSourceResponseDto"
          },
          "id": {
            "description": "Unique Identifier identifying a Data Subject",
            "type": "string",
            "format": "uuid",
            "example": "633ba071-61b0-485f-81a0-a2245777b432"
          },
          "lastUpdatedDate": {
            "description": "The date that the Data Subject record was last updated on",
            "type": "string",
            "format": "date-time",
            "example": "2020-01-12T16:11:25.479Z"
          },
          "doNotCall": {
            "description": "This attribute determines if a phone number is listed in FCC’s Do Not Call list",
            "type": "boolean",
            "example": true
          },
          "notices": {
            "description": "The Data Subject notices.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsentAPI_NoticeDetailResponseDto"
            }
          },
          "attachments": {
            "description": "Documents attached to Data Subject",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsentAPI_DataSubjectAttachmentResponseDto"
            }
          }
        }
      },
      "ConsentAPI_DataSubjectResponseSliceDto": {
        "type": "object",
        "properties": {
          "content": {
            "items": {
              "$ref": "#/components/schemas/ConsentAPI_DataSubjectResponseDto"
            },
            "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_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_NameGuidPair": {
        "type": "object",
        "properties": {
          "guid": {
            "description": "The unique identifier of the entity.",
            "type": "string",
            "format": "uuid",
            "example": "15e30742-7e6c-4916-a5a1-7742a14ee284"
          },
          "name": {
            "description": "The name of the entity.",
            "type": "string",
            "example": "Marketing"
          }
        }
      },
      "ConsentAPI_NoticeDetailResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The unique identifier of the collection point notice.",
            "type": "string",
            "format": "uuid",
            "example": "05e30742-7e6c-4916-a5a1-7742a14ee984"
          },
          "name": {
            "description": "The name of the collection point notice.",
            "type": "string",
            "example": "Marketing Notice"
          },
          "url": {
            "description": "The URL where the collection point notice can be found.",
            "type": "string",
            "example": "www.onetrust.com"
          },
          "guid": {
            "description": "The unique identifier of a embedded privacy notice.",
            "type": "string",
            "format": "uuid",
            "example": "1439b150-ef4c-444c-a20e-44622c8ccaf3"
          },
          "type": {
            "description": "The type of collection point notice.",
            "type": "string",
            "example": "EMBEDDED",
            "enum": [
              "LINKED",
              "EMBEDDED"
            ]
          },
          "purposes": {
            "description": "The details of the purposes linked to the collection point notice.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsentAPI_NameGuidPair"
            },
            "uniqueItems": true
          },
          "privacyNoticeVersion": {
            "description": "The version details of the collection point notice.",
            "$ref": "#/components/schemas/ConsentAPI_VersionedEntity"
          },
          "collectionPoint": {
            "description": "The details of the collection point to which the privacy notice is linked.",
            "$ref": "#/components/schemas/ConsentAPI_VersionedEntity"
          }
        }
      },
      "ConsentAPI_VersionedEntity": {
        "type": "object",
        "properties": {
          "guid": {
            "description": "The unique identifier of the entity.",
            "type": "string",
            "format": "uuid",
            "example": "15e30742-7e6c-4916-a5a1-7742a14ee284"
          },
          "name": {
            "description": "The name of the entity.",
            "type": "string",
            "example": "Marketing"
          },
          "version": {
            "description": "The version of the entity.",
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "minorVersion": {
            "description": "The minor version of the entity.",
            "type": "integer",
            "format": "int64",
            "example": 2
          }
        }
      }
    },
    "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"
  }
}
```