Retrieve and store a OneTrust consent receipt after a preference-center submission

domain: developer.onetrust.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Embed the OneTrust Preference Center JavaScript snippet on your page, or use the Preference Center Schema API to build a custom UI; both flows produce a receiptId on submission.
  2. When the onConsentChanged callback fires (or when your custom form POSTs), capture the receiptId from the response payload.
  3. Retrieve the full receipt via GET https://{hostname}/api/consentmanager/v3/receipt/{receiptId} using a server-side call with YOUR_ONETRUST_TOKEN in the Authorization header.
  4. Parse the response to extract the purposes array (each entry has purposeId, status, and timestamp) and persist these to your consent store or data warehouse.
  5. For audits, re-fetch receipts by data-subject identifier using GET https://{hostname}/api/consentmanager/v3/receipt?identifier={email} and compare historic versions.
  6. Expose a self-service endpoint in your app that proxies this call so users can download their own consent record on demand.

Known gotchas

Related routes

Build a preference center using the OneTrust Preference Center Schema API for a custom front-end
developer.onetrust.com · 6 steps · unrated
Submit and poll a DSAR fulfillment request via the OneTrust Privacy Rights Automation REST API
developer.onetrust.com · 6 steps · unrated
Create and track a GDPR data subject access request through its fulfillment lifecycle using the OneTrust Data Subject Request (Privacy Rights) API
onetrust.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans