post
https://{hostname}/api/consent/v2/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
fromDateandtoDatevalues 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:00andtoDate=2026-03-25T23:59:59). Omitting the time may result in partial or unexpected data results.- The
fromDateandtoDateare 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
includeArchivedparameter must be used. Setting theincludeArchivedparameter totrueorfalsereturns 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 thereceiptIdin the request parameters or theidentifierin the request headers. Optional parameters such asincludeDataElements,includeConsentStrings,page, andnextMarkercan also be used. IfincludeArchived=trueis set and additional parameters such asfromDateortoDateare 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
requestContinuationvalue, which must be included in the next request body to continue pagination.- When retrieving archived receipts,
nextMarkermust 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.
400Bad Request
500Internal Server Error