AlmondTill/G3N API

StockRecord

object type

One StockRecord bin/lot SHARD of an InventoryItem: NOT a construct — sysId-less and FSM-less, existing only where stock has landed in a bin (zero records = everything un-binned, the small-merchant case). Carries ONLY the three LOCATABLE buckets (reserved is a claim overlay, in_transit is not physically here — both stay on the item caches); quantities are NON-NEGATIVE (a relocate refuses driving a record negative — CONFLICT/INSUFFICIENT_STOCK). The DERIVED un-binned pool = item caches minus the record sums (see verifyInventoryItem). Records persist at zero; a zeroed record does NOT block its bin (the moved-or-zeroed rule).

Fields

FieldTypeNotes
inventoryItemIdID ID!The owning InventoryItem.
binIdID ID!The Bin holding this shard.
lotCodeStringThe lot identity.
lotExpiresAtStringThe lot expiry (UTC instant) — birth-stamped; a later mismatch refuses; a record missing it is enriched by the next lotted relocate that supplies one.
onHandQtyString String!No further notes.
damagedQtyString String!No further notes.
heldQtyString String!No further notes.
createdAtString String!No further notes.
updatedAtString String!No further notes.
revisionNumInt Int!No further notes.

Used by