AlmondTill/G3N API

On this page

verifyInventoryItem

query · in the family Reading your records

What it does

Reconcile one item’s ledger against its cached balances — “do the books add up?”.

The two-way reconciliation read: recompute the bucket balances from the ACTIVE Stock-Card entries and compare against the II cached balances — the bounded per-II verify (the standing auditor is the catalogued escalation). Since ALSO reconciles the StockRecord shards against the relocate entries and reports the binned/un-binned split. Requires authentication; reads null on a cross-tenant/missing id.

What happens

Reads and compares two ways; answers consistent or names the difference. Changes nothing.

Who may call it

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

Arguments

NameTypeRequiredNotes
inventoryItemIdID ID!yesNo further notes.

Returns

InventoryVerification — The two-way reconciliation report: the Stock-Card sum per bucket (ACTIVE entries; to minus from) vs the cached balances on the II.

Example request

query ExampleVerifyInventoryItem($inventoryItemId: ID!) {
  verifyInventoryItem(inventoryItemId: $inventoryItemId) {
    entryCount
    consistent
    recordCount
    recordsConsistent
    openTransferReservedQty
    reservedConsistent
  }
}

Variables:

{
  "inventoryItemId": "01900000-0000-7000-8000-9307d9650000"
}

Example response

{
  "data": {
    "verifyInventoryItem": {
      "entryCount": 1,
      "consistent": true,
      "recordCount": 1,
      "recordsConsistent": true,
      "openTransferReservedQty": "<open transfer reserved qty>",
      "reservedConsistent": true
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer

Used in