v1

latestOpenAPI 3.1.0Apache 2.02026-07-245981,1853.0 MB
Receipts V2

Get List of Receipts

Use this API to retrieve a list of all receipts. Depending on the query or header parameter values passed in the request, the response will return specific details about receipts, including relevant information about collection point interactions, purposes, and the associated purpose preferences and attributes.

🗒 Things to Know

Usage Guidelines

  • Date & Time Range:
    • The timespan between the fromDate and toDate values must be 24 hours or less.
    • To ensure accurate and complete data retrieval across the intended date range, include full timestamps (e.g., fromDate=2026-03-24T00:00:00 and toDate=2026-03-25T23:59:59). Omitting the time may result in partial or unexpected data results.
    • The fromDate and toDate are evaluated against the consent creation date (i.e. when the receipt was sent), not when the receipt was saved. The saved date may occur slightly later due to processing delays. As a result, short time windows may temporarily show different totals across the OneTrust Platform, APIs, and dashboards.
  • Data Scope & includeArchived Behavior:
    • By default, only receipts created within the last 90 days are returned. To retrieve receipts stored for more than 90 days, the includeArchived parameter must be used. Setting the includeArchived parameter to true or false returns all receipts. The pagination behavior differs based on this value.
      • When includeArchived=true: Page size is customizable. When retrieving historic receipts, you can provide either the receiptId in the request parameters or the identifier in the request headers. Optional parameters such as includeDataElements, includeConsentStrings, page, and nextMarker can also be used. If includeArchived=true is set and additional parameters such as fromDate or toDate are included, this API will instead search only receipts stored within the last 90 days.
      • When includeArchived=false: Page size is fixed at 20 records per page. For refined results, use the purpose and collection point filters.
  • Filtering:
    • You must choose one querying approach and cannot use both simultaneously to ensure predictable results. You can either:
      • Search by identifier, which disables all other filters
      • OR use the purpose and collection point filters.
  • Pagination:
    • If the number of records exceeds a single page:
      • The response returns a requestContinuation value, which must be included in the next request body to continue pagination.
      • When retrieving archived receipts, nextMarker must also be included in subsequent request bodies to paginate through results.
  • Additional Information:
    • Purpose descriptions in the API response are returned inside <p> and </p> HTML tags. These tags can be sanitized based on your formatting needs.
post/api/consent/v2/receipts

Query parameters

collectionPointGuidstring uuid
Example:3d9a67f4-d9f2-4f07-8d21-89cf6712e878

UUID of the Collection Point.

receiptIdstring uuid
Example:d2c29f4d-fbd9-44d3-9a37-54d85c8aebc7

UUID of the receipt.

purposeGuidstring uuid
Example:b7d17fc8-889f-472e-8c74-f1169821e7e7

UUID of the Purpose. purposeGuid can be obtained using the Get A Paged List Of Purposes endpoint.

organizationIdstring uuid
Example:0b3b36a0-2a63-4f8b-a7e3-37b31fbfcd72

UUID of the Organization. organizationId can be obtained using the Retrieve Organization Structure endpoint.

fromDatestring date-time
Example:2022-07-25T14:00:10

Date from which to return records. Formats accepted are yyyy-MM-dd or yyyy-MM-ddTHH:mm:ss.

toDatestring date-time
Example:2022-07-26T13:20:45

To date to return records. Formats accepted are yyyy-MM-dd or yyyy-MM-ddTHH:mm:ss.

includeDataElementsboolean
Example:true

When set to true will include data subject data elements on the receipt payload.

includeArchivedboolean
Example:true

This parameter will fetch up to 1000 historical receipts per API call that are not yet stored in the Azure Cosmos DB or those that have reached their time-to-live (TTL) expiration of 90 days.

isAnonymousboolean

The isAnonymous parameter will be ignored. Anonymous receipts can only be returned by using the identifier or receiptId parameter.

includeConsentStringsboolean

This parameter will return consent strings stored in receipts. Note that it must be used in conjunction with an identifier or receiptId filter.

pageinteger

Results page to be retrieved (0..N).

sizeinteger

Number of records per page (1..50).

sort'consentCreationDate,asc' | 'consentCreationDate,desc'
Example:consentCreationDate,asc

Sorting criteria in the format: property,direction (where direction is asc or desc). Supported properties: consentCreationDate, interactionDate, id.

Headers

identifierstring
Example:8f5f3a5b-4b32-40d3-9c43-69c5ec91f4af

Data Subject Identifier filter. identifier can be obtained using the Get list of datasubjects endpoint.

dataElementNamestring
Example:FirstName

Filter receipts by data element name. Note that this request header must be used in conjunction with dataElementValue.

dataElementValuestring
Example:Alice

Filter receipts by data element value. Note that this request header must be used in conjunction with dataElementName.

Request body

requestContinuationstring

Request continuation token used to paginate. If the number of records in the response is more than a page, it returns a requestContinuation token in the response. This requestContinuation token should be passed to the next request's body to paginate.

nextMarkerstring

Request continuation token used to paginate over historical receipts

Example request

{
  "nextMarker": "TGp8AqS3Gfnzwc5srJKeaA=="
}

Response

Successfully retrieved list of receipts.

firstboolean
lastboolean

Flag indicating whether this is the last page or not.

numberinteger

The page number of the results.

sizeinteger

The number of results per page.

numberOfElementsinteger
emptyboolean