AlmondTill/G3N API

consentRecord

query · in the family Consent record

What it does

Look up one record — one customer’s decision on one consent purpose — a legal fact.

One ConsentRecord by id. The record must belong to your organization group; an id from another group reads as not found.

Before you call

A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.

Capability area: Reading your records — Looking up and listing the records of your organization.

Roles that may call it:

What happens

Reads only — changes nothing.

Arguments

NameTypeRequiredNotes
idID ID!yesThe id of the record.

Returns

ConsentRecord — 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.

Example request

graphql
query ExampleConsentRecord($id: ID!) {
  consentRecord(id: $id) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    purposeId
    policyVersion
    captureSurface
    captureLocale
  }
}

Variables:

json
{
  "id": "01900000-0000-7000-8000-c942ced40000"
}

Example response

json
{
  "data": {
    "consentRecord": {
      "id": "01900000-0000-7000-8000-c942ced40000",
      "sysId": "CD-EXMP-0000-000F",
      "type": "ConsentRecord",
      "caption": "Blue jeans",
      "status": "granted",
      "parentId": "01900000-0000-7000-8000-3cbb3ce90000",
      "rootId": "01900000-0000-7000-8000-a1295a650000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-53c6eea90000",
      "purposeId": "01900000-0000-7000-8000-0faf80a10000",
      "policyVersion": "<policy version>",
      "captureSurface": "<capture surface>",
      "captureLocale": "<capture locale>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer