ConsentPurpose
object type
A ConsentPurpose — the merchant-definable registry of what consent can be requested for. Canned + custom as the role model works: the 6 canned baselines are code-virtual versioned templates (cannedConsentPurposes lists them; copyCannedConsentPurpose materializes an ordinary editable group row — bootstrap materializes zero). Per-channel marketing granularity = distinct purposes (GDPR consent is specific, never bundled). consentModel ∈ {opt_in, opt_out} — opt_in: an absent record ⇒ denied (GDPR) · opt_out: an absent record ⇒ allowed until withdrawn (CCPA Do-Not-Sell) — immutable after birth. The code is the mutable machine handle — unique among non-doomed per group via the consentPurposeCode uniq marker (the organizationCode class: edit = release/reserve swap; doom releases [reissuable]; inactive holds; a collision refuses CONFLICT/IDENTITY_TAKEN). Doom is gated by the everReferenced write-once stamp; deactivate is ungated. NOT searchable (config, not a book); NO description field (captions + decorations do display duty).
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 PP-… — stable for the record’s life. |
type | String String! | The kind of record — always ConsentPurpose here. |
caption | String String! | The record’s display name — what people see it called. |
status | String String! | The record’s current state — one of active, inactive or doomed. |
parentId | ID ID! | The parent org group; for a ConsentPurpose parentId === rootId. |
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. |
code | String String! | The machine-portable handle (^[a-z][a-z0-9_]{1,63}$; stored normalized trim+lowercase) — future comms/segments address purposes BY code. Uniq among non-doomed per group (the consentPurposeCode marker: edit swaps, doom releases, inactive holds; CONFLICT/IDENTITY_TAKEN on collision). |
consentModel | String String! | opt_in | opt_out — the two consent regimes on ONE mechanism. Immutable after birth — EditConsentPurposeInput deliberately omits it. |
templateKey | String | Provenance: the canned template this purpose was copied from (copyCannedConsentPurpose); port-stamped, never caller-suppliable; absent on from-scratch purposes. A copy never auto-revs when the registry does (fork semantics). |
templateVersion | Int | The canned-registry version the copy was compiled from (the templateKey twin; fork semantics). |
everReferenced | Boolean | The write-once first-decision stamp: set true inside the first decide transaction against this purpose, never touched again. Present ⇒ doom refuses CONFLICT/REFERENCED; absent ⇒ virgin, dooms freely. Never caller-suppliable. |