AlmondTill/G3N API

recordRegistryFulfillment

mutation · in the family Selling

What it does

Record that a registry item was bought — the gift is covered.

Staff: record ONE purchase fact against a registry item: immutable once recorded; the registry must be non-doomed; the item active; the order in-tenant + non-doomed; the named line's variant must equal the item's variant; over-fulfillment records legally (remaining floors 0). Requires the unrestricted capability. Template class (the capture tier — 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:

What happens

The registry’s fulfilment story updates so others do not double-buy.

Arguments

NameTypeRequiredNotes
inputRecordRegistryFulfillmentInput RecordRegistryFulfillmentInput!yesFulfillment record input.

Returns

RegistryFulfillment RegistryFulfillment! — One recorded purchase against a registry item. Purchased qty per item = Σ these rows' qty; remaining = max(0, desired − purchased) — over-fulfillment records legally.

Example request

graphql
mutation ExampleRecordRegistryFulfillment($input: RecordRegistryFulfillmentInput!) {
  recordRegistryFulfillment(input: $input) {
    id
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    registryItemId
    orderId
    orderLineNo
    qty
    purchaserConsumerId
  }
}

Variables:

json
{
  "input": {
    "registryId": "01900000-0000-7000-8000-3255b1ae0000",
    "registryItemId": "01900000-0000-7000-8000-21c97c6d0000",
    "orderId": "01900000-0000-7000-8000-18e782370000",
    "orderLineNo": 1,
    "qty": 1,
    "purchaserConsumerId": "01900000-0000-7000-8000-168ef9fc0000"
  }
}

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

Example response

json
{
  "data": {
    "recordRegistryFulfillment": {
      "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",
      "registryItemId": "01900000-0000-7000-8000-21c97c6d0000",
      "orderId": "01900000-0000-7000-8000-18e782370000",
      "orderLineNo": 1,
      "qty": 1,
      "purchaserConsumerId": "01900000-0000-7000-8000-168ef9fc0000"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer

Used in