This page is the build reference. It assumes the argument is settled and the obligations are known. What follows is the shape of the system: where a call enters, what it returns, which states are legal, and what has to be true before the service is allowed to say yes.
Two labels appear throughout the portal. Statutory Standard means the requirement comes from the Consent Management System Specification and is not optional. Suggested Design means the Recommended Engineering Baseline adds it to make the standard buildable; an engineering team may choose a different shape, but should record why.
The request path
One path should be true for every fiduciary integration. The UI and the fiduciary enter through the gateway, the consent service decides, the store persists, the event bus fans out, and the ledger records.
System map
Ten subsystems, one request path
The specification fixes what must be true. These are the boundaries that make it buildable. Select one to see its responsibility and where it sits on the path.
Consent UI and SDK
Renders notices, banners and the control centre, and captures the person's affirmative action.
Web and mobile components that meet accessibility requirements, switch language at runtime, and never pre-select a purpose. The SDK must surface refusal as clearly as acceptance, and must hand the consent service a real user event rather than a default value.
On the request path
Person to UI to API gateway
Two rules keep the path honest. The gateway proves who is calling; the consent service proves what they may do. And no component writes consent state directly to the store. A dashboard, a batch job and an administrator are all clients of the service, or they are defects.
Endpoint reference
The catalogue below is a reference design. Endpoint names are not fixed by the specification; the behaviours are.
| Method | Path | What it does | Caller |
|---|---|---|---|
| POST | /v1/consents | Create a consent artifact from an affirmative action | Consent UI, fiduciary app |
| POST | /v1/consents/validate | Answer the pre-processing check | Fiduciary backend, gateway |
| PATCH | /v1/consents/{consent_id} | Update one or more purposes, appending a version | Dashboard, fiduciary app |
| POST | /v1/consents/{consent_id}/renew | Renew a time-limited consent after confirmation | Dashboard |
| POST | /v1/consents/{consent_id}/withdraw | Withdraw purposes with immediate effect | Dashboard, grievance handler |
| POST | /v1/cookie-consents | Record category choices and return expiry | Web and app front end |
| GET | /v1/principals/{principal_id}/consents | Read the principal's own consent history | Dashboard |
| POST | /v1/requests | Open an access, correction, erasure or grievance request | Dashboard, assisted channel |
| POST | /v1/notifications | Queue a templated principal message | Internal event consumer |
| POST | /api/alerts/notify | Broadcast a consent change to fiduciaries and processors | Alert service |
| POST | /api/alerts/{alert_id}/ack | Acknowledge that processing stopped | Fiduciary, processor |
| POST | /v1/grievances | Log a complaint over TLS 1.3 | Dashboard, assisted channel |
| GET | /v1/grievances/{reference} | Read case status, owner and escalation deadline | Dashboard |
| POST | /v1/admin/roles/assign | Grant or change an administrative role | Admin |
| PUT | /v1/admin/retention-policies/{data_category} | Set retention, legal hold and erasure method | Admin, with approval |
| GET | /v1/audit-logs | Query the hash-chained ledger | Auditor, DPO |
Authentication is OAuth2 or per-fiduciary credentials on the API, and SSO with MFA on the administrative path. Every write accepts an idempotency key. Every response carries a request identifier that appears in the ledger.
The core contracts
Five contracts carry the lifecycle. The other modules in this portal show the rest, with the same request and response shapes.
API contract
Create a consent artifact
/v1/consentsResponse 201Records one affirmative consent event against a notice version, purpose set, language and capture method.
Request body
{
"principal_id": "usr_8f3a",
"fiduciary_id": "df_102",
"notice_version": "2.3",
"language": "hi",
"method": "web_checkbox",
"session_id": "sess_91c",
"guardian_ref": null,
"purposes": [
{
"purpose_id": "P-ACCT",
"granted": true
},
{
"purpose_id": "P-MKT",
"granted": false
}
]
}Response
{
"consent_id": "con_7c21",
"version": 1,
"status": "ACTIVE",
"artifact_hash": "sha256:9b1e4f0c7a...",
"created_at": "2026-11-19T10:15:00Z",
"expires_at": "2027-11-19T10:15:00Z"
}What the implementation must hold
- Reject any purpose that arrives granted without a recorded affirmative user event. A pre-checked box is not consent.
- Store the notice version and the language actually shown, so the record proves what the person saw.
- For a person under eighteen, require a verified guardian reference before the status becomes ACTIVE.
- Write the artifact, the audit entry and the consent.granted event in one transaction.
API contract
Validate consent before processing
/v1/consents/validateResponse 200Answers one question before any processing starts: is there a live consent for this principal, this fiduciary and this purpose?
Request body
{
"principal_id": "usr_8f3a",
"fiduciary_id": "df_102",
"purpose_id": "P-MKT"
}Response
{
"valid": false,
"reason": "WITHDRAWN",
"consent_id": "con_7c21",
"checked_at": "2026-11-19T10:15:00Z"
}What the implementation must hold
- Reason codes: NONE_FOUND, EXPIRED, WITHDRAWN, DENIED, PURPOSE_MISMATCH.
- Fail closed. If the consent service cannot answer, the fiduciary must not process.
- Log every call, valid or not, to the audit ledger.
- If results are cached, invalidate on consent.granted, consent.updated, consent.renewed and consent.withdrawn.
API contract
Update granted purposes
/v1/consents/{consent_id}Response 200Adds or removes one purpose without disturbing the others, and appends a new version instead of overwriting the old record.
Request body
{
"reason": "purpose_added",
"purposes": [
{
"purpose_id": "P-ANL",
"granted": true
}
],
"idempotency_key": "7d0f2c4e8b"
}Response
{
"consent_id": "con_7c21",
"version": 2,
"status": "ACTIVE",
"updated_at": "2026-11-19T10:15:00Z"
}What the implementation must hold
- Never overwrite. Each change creates a new version, and older versions stay readable.
- Untouched purposes keep their previous state.
- Emit consent.updated so every fiduciary and processor re-syncs.
- Require an idempotency key on the write, so a retried request cannot double-apply.
API contract
Renew a time-limited consent
/v1/consents/{consent_id}/renewResponse 200Extends validity only after the principal confirms, and records a fresh expiry with a new version.
Request body
{
"purpose_ids": [
"P-ACCT"
],
"validity_days": 365,
"confirmed_by": "principal"
}Response
{
"consent_id": "con_7c21",
"version": 3,
"status": "ACTIVE",
"expires_at": "2027-11-19T10:15:00Z"
}What the implementation must hold
- A scheduler emits consent.expiring thirty days before expires_at, which triggers the principal notification.
- Renewal is a principal-confirmed action. Auto-renewal is not consent.
- An expired consent returns EXPIRED from validation until it is renewed.
- Show the new validity period in plain language before the confirm button.
API contract
Withdraw consent
/v1/consents/{consent_id}/withdrawResponse 200Marks the purpose withdrawn with immediate effect, then tells every fiduciary and processor that must stop.
Request body
{
"purpose_ids": [
"P-MKT"
],
"channel": "dashboard",
"reason": "principal_choice"
}Response
{
"status": "WITHDRAWN",
"effective_at": "2026-11-19T10:15:00Z",
"notified": [
"df_102",
"dp_77"
],
"legal_exception": false
}What the implementation must hold
- Effect is immediate. The very next validation call for that purpose returns WITHDRAWN.
- Fan out consent.withdrawn to every fiduciary and processor, then track their acknowledgements.
- Withdrawal must be as easy as granting. One screen, one action, no retention dark pattern.
- A legal exception is set only by an authorised rule, and the exception is itself audit-logged.
The consent state machine
Statuses are not decoration. Each state changes what the system is allowed to do, and two states are final for that artifact. A new grant creates a new artifact; it does not revive a withdrawn or denied one.
State machine
Five states, two of them final
Select a state to see what it permits, where it can go, and the rule that keeps it honest. A new grant always creates a new artifact; it never revives a terminal one.
PENDING to ACTIVE to EXPIRED or WITHDRAWN. PENDING can also go straight to DENIED.
State
ACTIVE
Granted, in force, and scoped to the recorded purposes.
Processing
Allowed for the consented purposes only.
Can move to
Rule
An update creates a new ACTIVE version of the same artifact. Any other transition needs an event, a timestamp and an audit entry.
Four implementation rules follow from the machine.
- PENDING must resolve. A guardian check or a fiduciary review that never completes must time out to DENIED, never linger as a maybe.
- ACTIVE plus update stays ACTIVE, but as a new version. The version number, not the status, tells you what changed.
- EXPIRED is a scheduled transition. Do not wait for a read to notice that validity ended.
- Terminal means terminal. WITHDRAWN and DENIED do not flip back. A later change of mind is a fresh consent event with its own notice version.
The data model
| Entity | What it holds | Key rule |
|---|---|---|
| Principal | Pseudonymous identifier, language, preferred channel | No unnecessary identity fields in the consent store |
| Fiduciary and Processor | Identifiers, credentials, subscribed events, webhook secrets | Secrets rotate with an overlap window |
| Purpose | Purpose identifier, description, mandatory or optional, retention | One purpose per processing activity, not one per screen |
| ConsentArtifact | Principal, fiduciary, notice version, language, method, session, hash | Immutable identity; changes create versions |
| ConsentVersion | Artifact, version number, purpose states, timestamps, expiry | Append-only; earlier versions remain readable |
| AuditEntry | The nine dimensions plus the hash chain | Append-only, separate retention |
| Request | Type, reference, status, owner, deadline, history | One reference across every channel |
| RetentionPolicy | Category, period, legal hold, erasure method, version | Maker-checker approval, versioned |
| Notification | Template, version, channel, language, delivery, acknowledgement | Template version is part of the evidence |
Two modelling choices repay the effort. Store one row per purpose per version, not a JSON blob, so a purpose can be queried and withdrawn independently. And keep the audit entry referencing the artifact version, so a dispute can move from a ledger line to the exact notice and choice without a fuzzy match on time.
Validation sandbox
The simulator runs the rule the service must implement. Change the stored state, the purpose on the artifact, or the purpose being requested. The answer and the reason code follow.
Validation sandbox
Test a consent decision
Change what is stored and what is asked, and watch the answer. Nothing leaves this page: the rule runs in your browser exactly as the service should.
POST /v1/consents/validate
Preset cases
Production rule: fail closed. A timeout, a 500 or a circuit breaker is a NO, never an assumed yes.
Request
{
"principal_id": "usr_8f3a",
"fiduciary_id": "df_102",
"purpose_id": "P-ACCT"
}Response 200
{
"valid": true,
"consent_id": "con_7c21",
"checked_at": "2026-11-19T10:15:00Z"
}VALID
Fiduciary may process for this purpose only.
Every call is audited, valid or not, with the caller, purpose and source.
Three cases deserve a permanent regression test: a withdrawn purpose (must return WITHDRAWN), an expired artifact (must return EXPIRED), and a live artifact asked for the wrong purpose (must return PURPOSE_MISMATCH). Add a timeout case: when the consent service does not answer, the fiduciary must not process.
Non-functional baseline
| Area | Baseline | Basis |
|---|---|---|
| Validation latency | A published target, for example p95 under 100 milliseconds, with alerting on the budget | Suggested Design |
| Availability | Multi-zone, with a documented degraded mode that still fails closed | Suggested Design |
| Transport | TLS 1.2 minimum for APIs, TLS 1.3 for complaint submission, downgrade refused | Statutory Standard |
| Authentication | OAuth2 or per-fiduciary keys; SSO and MFA for administrators | Statutory Standard |
| Idempotency | A key on every write, retained for the retry window | Suggested Design |
| Webhook security | HMAC-SHA256 over the raw body, timestamped, with secret rotation | Suggested Design |
| Retry | Exponential backoff with jitter, bounded attempts, dead-letter queue with an owner | Suggested Design |
| Rate limiting | Per fiduciary and per endpoint, with 429 and a retry hint | Suggested Design |
| Privacy | Pseudonymous identifiers, encryption at rest, minimum fields in events | Suggested Design |
| Audit | Every decision and action, append-only, hash-chained, access controlled | Statutory Standard |
Versioning and failure behaviour
Version the API, not the truth. A fiduciary may call validation on every transaction, so a breaking change needs a deprecation window and a migration path. Reason codes are part of the contract: adding one is a minor change, renaming one is a breaking change.
Fail closed, and say so in the response. A timeout should surface as an explicit unavailability, not a valid: false that looks like a policy decision. The caller needs to distinguish "no consent" from "no answer", because the operational response differs: one is a denial, the other is an incident.
Make idempotency visible. Return the identifier of the resource that was created or changed, so a retried client can reconcile without creating a duplicate. This matters most on collection, update and withdrawal.
Log the decision, not the secret. The ledger records the caller, purpose, decision and source. It does not record tokens, full payloads or identity documents.
What to test before release
- A withdrawal invalidates the next validation call, on every replica, with no cache exception.
- A purpose mismatch is refused even when another purpose is active.
- A guardian verification timeout ends in DENIED.
- A retried update creates one version, not two.
- A renewal requires a principal action and records the new expiry.
- A webhook signature failure is rejected before parsing, and the alert escalates.
- A hash-chain verification over a sample range passes, and a deliberately edited entry fails at the right position.
- A role revocation takes effect on the next request.
- A retention run skips legal holds and logs the count.
- An expired consent stops downstream processing without waiting for a report.
Next step
Turn the reference into delivery: the interactive implementation planner carries every requirement with an owner and live progress. If you need help with any of this, write to us and we will help.