AlmondTill/G3N API

removeRegistryItem

mutation · in the family Selling

What it does

Remove an item from a gift registry, as staff.

Staff: remove ONE item: the row flips active → doomed through the runner (at.customer.registry_item.doom.ok.v1); the marker stays with the doomed holder for takeover. The registry must be active. Requires the unrestricted capability. Template class (hand-derived v22).

Before you call

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

Capability area: Selling — Ringing sales, serving customers and issuing invoices.

Roles that may call it:

Arguments

NameTypeRequiredNotes
registryIdID ID!yes
itemIdID ID!yes
reasonStringno

Returns

RegistryItem RegistryItem! — One desired variant on a GiftRegistry. variantId is the membership identity (immutable — remove + re-add instead); remove = doom, history preserved.

Example request

graphql
mutation ExampleRemoveRegistryItem($registryId: ID!, $itemId: ID!, $reason: String) {
  removeRegistryItem(registryId: $registryId, itemId: $itemId, reason: $reason) {
    id
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    variantId
    desiredQty
    priority
    note
  }
}

Variables:

json
{
  "registryId": "01900000-0000-7000-8000-3255b1ae0000",
  "itemId": "01900000-0000-7000-8000-1f6480060000",
  "reason": "Correcting a miscount."
}

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

Example response

json
{
  "data": {
    "removeRegistryItem": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "type": "<type>",
      "caption": "Blue jeans",
      "status": "<status>",
      "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": 1,
      "revision": "01900000-0000-7000-8000-53c6eea90000",
      "variantId": "01900000-0000-7000-8000-8433b0260000",
      "desiredQty": 1,
      "priority": "<priority>",
      "note": "Restock before the weekend."
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer