AlmondTill/G3N API

createPrivacyRequest

mutation · in the family Privacy request

What it does

Record a privacy request the moment it arrives — who asked, for which right, under which law.

Record a received data-subject request. requestType/regime/channel are canned vocabularies. A supplied consumerId must exist in-group, ANY status (a doomed [de-identified] subject’s repeat request is recordable, then rejectable). A supplied subjectOrderId must be an in-group agent sale whose stored receipt token equals the supplied receiptToken. Every miss answers ONE opaque NOT_FOUND/CONSTRUCT; the token is never stored. Template class (privacy & compliance).

Before you call

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

Capability area: Privacy and compliance — Tax and fiscal configuration, certificates and privacy requests.

Roles that may call it:

What happens

Name the subject by their customer record or an inline email/name; the arrival channel and instant go on the record.

Careful

The register holds the requester’s identity by design — it must, to honor the request later.

Arguments

NameTypeRequiredNotes
inputNewPrivacyRequestInput NewPrivacyRequestInput!yesCreate-input for a PrivacyRequest.

Returns

PrivacyRequest PrivacyRequest! — A PrivacyRequest — the GDPR/CCPA request register: every data-subject request received (erasure · access · portability · rectification · opt_out) is recorded with full provenance — the regime (gdpr · ccpa), the arrival channel, the received instant, and the subject. The ladder: verify (the identity gate — v1 the verifier's assertion, the proof narrative on the revision cause) → start → fulfill; reject serves received AND verified (ONE op, two edges — the reason is required: a refused privacy request states its grounds). The FULFILLMENT mechanics stay the existing ops — the register records and links, it never executes. NOT searchable (a compliance register holding subject PII — the gated paginated listing); the listing pages newest-first; rejected drops per page as doomed while fulfilled records stay listed.

Example request

graphql
mutation ExampleCreatePrivacyRequest($input: NewPrivacyRequestInput!) {
  createPrivacyRequest(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    requestType
    regime
    channel
    receivedAt
    consumerId
    subjectRef
    subjectOrderId
  }
}

Variables:

json
{
  "input": {
    "caption": "Blue jeans",
    "requestType": "<request type>",
    "regime": "<regime>",
    "channel": "<channel>"
  }
}

Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.

Example response

json
{
  "data": {
    "createPrivacyRequest": {
      "id": "01900000-0000-7000-8000-22f6d6580000",
      "sysId": "PV-EXMP-0000-000F",
      "type": "PrivacyRequest",
      "caption": "Blue jeans",
      "status": "received",
      "parentId": "01900000-0000-7000-8000-eacdfcfd0000",
      "rootId": "01900000-0000-7000-8000-a1295a650000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 0,
      "revision": "01900000-0000-7000-8000-53c6eea90000",
      "requestType": "<request type>",
      "regime": "<regime>",
      "channel": "<channel>",
      "receivedAt": "2027-01-31T00:00:00.000Z",
      "consumerId": "01900000-0000-7000-8000-3cbb3ce90000",
      "subjectRef": "<subject ref>",
      "subjectOrderId": "01900000-0000-7000-8000-b42b04c10000"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer

Dry run

Add dryRun: true to the request envelope (extensions.at) to rehearse this call: every check runs, the write is rehearsed against the current records and nothing is stored; the answer is the refusal a real call would give, or the record it would create. Every response to a rehearsal carries dryRun: true, so a rehearsed record is never mistaken for a saved one.

Used in