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.

Statutory Standard Suggested Design
Subsystem 01Statutory Standard

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.

MethodPathWhat it doesCaller
POST/v1/consentsCreate a consent artifact from an affirmative actionConsent UI, fiduciary app
POST/v1/consents/validateAnswer the pre-processing checkFiduciary backend, gateway
PATCH/v1/consents/{consent_id}Update one or more purposes, appending a versionDashboard, fiduciary app
POST/v1/consents/{consent_id}/renewRenew a time-limited consent after confirmationDashboard
POST/v1/consents/{consent_id}/withdrawWithdraw purposes with immediate effectDashboard, grievance handler
POST/v1/cookie-consentsRecord category choices and return expiryWeb and app front end
GET/v1/principals/{principal_id}/consentsRead the principal's own consent historyDashboard
POST/v1/requestsOpen an access, correction, erasure or grievance requestDashboard, assisted channel
POST/v1/notificationsQueue a templated principal messageInternal event consumer
POST/api/alerts/notifyBroadcast a consent change to fiduciaries and processorsAlert service
POST/api/alerts/{alert_id}/ackAcknowledge that processing stoppedFiduciary, processor
POST/v1/grievancesLog a complaint over TLS 1.3Dashboard, assisted channel
GET/v1/grievances/{reference}Read case status, owner and escalation deadlineDashboard
POST/v1/admin/roles/assignGrant or change an administrative roleAdmin
PUT/v1/admin/retention-policies/{data_category}Set retention, legal hold and erasure methodAdmin, with approval
GET/v1/audit-logsQuery the hash-chained ledgerAuditor, 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

Statutory Standard
POST/v1/consentsResponse 201

Records 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

Statutory Standard
POST/v1/consents/validateResponse 200

Answers 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

Statutory Standard
PATCH/v1/consents/{consent_id}Response 200

Adds 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

Statutory Standard
POST/v1/consents/{consent_id}/renewResponse 200

Extends 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

Statutory Standard
POST/v1/consents/{consent_id}/withdrawResponse 200

Marks 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.

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

ACTIVEEXPIREDWITHDRAWN

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

EntityWhat it holdsKey rule
PrincipalPseudonymous identifier, language, preferred channelNo unnecessary identity fields in the consent store
Fiduciary and ProcessorIdentifiers, credentials, subscribed events, webhook secretsSecrets rotate with an overlap window
PurposePurpose identifier, description, mandatory or optional, retentionOne purpose per processing activity, not one per screen
ConsentArtifactPrincipal, fiduciary, notice version, language, method, session, hashImmutable identity; changes create versions
ConsentVersionArtifact, version number, purpose states, timestamps, expiryAppend-only; earlier versions remain readable
AuditEntryThe nine dimensions plus the hash chainAppend-only, separate retention
RequestType, reference, status, owner, deadline, historyOne reference across every channel
RetentionPolicyCategory, period, legal hold, erasure method, versionMaker-checker approval, versioned
NotificationTemplate, version, channel, language, delivery, acknowledgementTemplate 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

AreaBaselineBasis
Validation latencyA published target, for example p95 under 100 milliseconds, with alerting on the budgetSuggested Design
AvailabilityMulti-zone, with a documented degraded mode that still fails closedSuggested Design
TransportTLS 1.2 minimum for APIs, TLS 1.3 for complaint submission, downgrade refusedStatutory Standard
AuthenticationOAuth2 or per-fiduciary keys; SSO and MFA for administratorsStatutory Standard
IdempotencyA key on every write, retained for the retry windowSuggested Design
Webhook securityHMAC-SHA256 over the raw body, timestamped, with secret rotationSuggested Design
RetryExponential backoff with jitter, bounded attempts, dead-letter queue with an ownerSuggested Design
Rate limitingPer fiduciary and per endpoint, with 429 and a retry hintSuggested Design
PrivacyPseudonymous identifiers, encryption at rest, minimum fields in eventsSuggested Design
AuditEvery decision and action, append-only, hash-chained, access controlledStatutory 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.