ConsentRecord
object type
A ConsentRecord — the proof-of-decision per (Consumer × Purpose): consumer-parented (parentId = the Consumer id — the LoyaltyMember construct-parented class), family document, sparse. The permanent (consumer × purpose) uniq pair marker is both the singleton guarantee AND the O(1) lookup (never released, never taken over; purge reaps). NO update op — the only writes are the 4 decide ops (grantConsent/withdrawConsent staff · grantMyConsent/withdrawMyConsent consumer) + the system doom; a same-decision re-capture is a capture-context revision under a new policyVersion. Capture context ∈ {policyVersion, captureSurface ∈ [storefront, pos, back_office, cli, import], captureLocale?} reflects the latest decision. Effective consent = resolveEffectiveConsent (the myConsents view): consumer doomed ⇒ denied · purpose inactive/doomed ⇒ denied · granted ⇒ allowed · withdrawn/doomed ⇒ denied · absent ⇒ opt_in? Denied: allowed. Audit rides existing machinery — NO bespoke ledger. NOT searchable.
Fields
| Field | Type | Notes |
|---|---|---|
id | ID ID! | The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it. |
sysId | String String! | The human-readable id, shaped like CD-… — stable for the record’s life. |
type | String String! | The kind of record — always ConsentRecord here. |
caption | String String! | The record’s display name — what people see it called. |
status | String String! | The record’s current state — one of granted, withdrawn or doomed. |
parentId | ID ID! | The parent consumer; rootId = the org group. NOT the family root. |
rootId | ID ID! | The id of your organization group — every record of yours carries the same one. |
createdAt | String String! | When the record was created, as a UTC timestamp. |
updatedAt | String String! | When the record last changed, as a UTC timestamp. |
revisionNum | Int Int! | How many times this record has been edited; the first save is 0. |
revision | ID ID! | The id of the record’s current edit — send it back with a change so an edit made in the meantime is refused instead of overwritten. |
refCaptions | RefCaption [RefCaption!]! | The captions of the records this one refers to, composed for you — one row per referenced id; see RefCaption. |
purposeId | ID ID! | The ConsentPurpose this decision is FOR. Immutable at birth; the (parentId × purposeId) pair is singleton via the consentPair uniq marker. |
policyVersion | String String! | The consent-notice/policy version presented at the latest decision. Re-consent under a NEW version with the same decision = the route-3 capture-context revision. |
captureSurface | String String! | Where the latest decision was captured — storefront | pos | back_office | cli | import (canned v1 registry; 's banner vocabulary). The consumer channel is server-fixed storefront (a consumer session cannot claim an in-store capture); the staff lane requires one explicitly. |
captureLocale | String | The locale presented at the latest decision; absent ⇒ not recorded. |