AlmondTill/G3N API

On this page

voidIdentifierEntry

mutation · in the family Catalog editing

What it does

Void an identifier assignment made in error — the honest correction of a mistaken assignment.

VOID one ledger entry. Refused while the bearer variant is doomed (frozen history → CONFLICT/REF_STATE). Requires the unrestricted capability + the entry's CURRENT revision.

Careful

Voiding is permanent and recorded; the identifier frees for correct use.

Who may call it

Capability area: Catalog editing — Changing what you sell — the details of styles, products, variants and their identifiers.

Arguments

NameTypeRequiredNotes
idID ID!yesThe id of the record.
revisionID ID!yesThe revision id you read on the record; the change is refused if an edit landed in the meantime.
reasonStringnoNo further notes.

Returns

IdentifierEntry IdentifierEntry! — ONE ledgered identifier assignment: a kind + value borne by a Variant over an assignment window. sysId-LESS; IMMUTABLE (no edit op exists; supersededAt is the ONE set-once SYSTEM stamp; doomed = VOIDED, a correction).

Example request

mutation ExampleVoidIdentifierEntry($id: ID!, $revision: ID!, $reason: String) {
  voidIdentifierEntry(id: $id, revision: $revision, reason: $reason) {
    id
    type
    caption
    status
    parentId
    rootId
    kind
    value
    organizationId
    assignedAt
    supersededAt
    createdAt
    updatedAt
    revision
    revisionNum
  }
}

Variables:

{
  "id": "01900000-0000-7000-8000-37386ae00000",
  "revision": "01900000-0000-7000-8000-b7960e180000",
  "reason": "Correcting a miscount."
}

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

Example response

{
  "data": {
    "voidIdentifierEntry": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "type": "<type>",
      "caption": "Blue jeans",
      "status": "<status>",
      "parentId": "01900000-0000-7000-8000-065235280000",
      "rootId": "01900000-0000-7000-8000-a093dd800000",
      "kind": "<kind>",
      "value": "<value>",
      "organizationId": "01900000-0000-7000-8000-44b781470000",
      "assignedAt": "2027-01-31T00:00:00.000Z",
      "supersededAt": "2027-01-31T00:00:00.000Z",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revision": "01900000-0000-7000-8000-b7960e180000",
      "revisionNum": 1
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer

Used in