AlmondTill/G3N API

InventoryItem

object type

An inventory item: ONE per (Variant x LogicalFacility), carrying the cached bucket balances + the weighted-moving-average cost. Parent = the Variant; the other junction leg is the immutable logicalFacilityId. The junction (variant x LF) is unique (a live duplicate is CONFLICT/IDENTITY_TAKEN naming the holder). styleType is birth-stamped from the spine (immutable upstream): simple/kit IIs are stocked; service/bundle IIs are stockless price-carriers refusing quantity movements. Buckets are signed decimal strings moved only by the movement ops; available = on_hand − reserved, always derived, never stored. Doom requires every bucket exactly zero (CONFLICT/REFERENCED naming the non-zero buckets); deactivate is free and reversible. onOrderQty is a sixth field, NOT a bucket: the open quantity of the issued purchase orders for this junction, maintained by the purchase-order walks + the receipt post — never by movements, never inside available; a pre-walk row reads 0; the audit/repair pair (inventoryOnOrderAudit / repairInventoryOnOrder) stamps the derived truth over drift.

Fields

FieldTypeNotes
idID ID!The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it.
sysIdString String!The human-readable id, shaped like IV-… — stable for the record’s life.
typeString String!The kind of record — always InventoryItem here.
captionString String!The record’s display name — what people see it called.
statusString String!The record’s current state — one of active, inactive or doomed.
parentIdID ID!The parent Variant; for an InventoryItem parentId!== rootId.
rootIdID ID!The id of your organization group — every record of yours carries the same one.
createdAtString String!When the record was created, as a UTC timestamp.
updatedAtString String!When the record last changed, as a UTC timestamp.
revisionNumInt Int!How many times this record has been edited; the first save is 0.
revisionID ID!The id of the record’s current edit — send it back with a change so an edit made in the meantime is refused instead of overwritten.
refCaptionsRefCaption [RefCaption!]!The captions of the records this one refers to, composed for you — one row per referenced id; see RefCaption.
logicalFacilityIdID ID!The LogicalFacility leg of the junction — set at creation, immutable thereafter.
styleTypeString String!The birth-stamped spine styleType: simple | service | kit | bundle; service/bundle IIs are stockless price-carriers.
controlClassString String!The control class (canned: non-controlled | lot-controlled | serially-controlled — server-validated, the DC-d shape). Mutable — an ordinary edit.
onHandQtyString String!The cached on_hand balance — a signed decimal string; moves only via movements.
reservedQtyString String!The cached reserved claim overlay.
inTransitQtyString String!The cached in_transit balance (the transfer saga — zero until that slice).
damagedQtyString String!The cached damaged balance.
heldQtyString String!The cached held balance (reason-coded via the movement entries).
onOrderQtyString String!On order — the issued purchase orders’ open quantity for this item: maintained by the purchase-order walks (+ at issue/approve, − at cancel, − the open remainder at close_short) and the receipt post (− the arriving quantity); NOT part of available; every decrement clamps at 0. A pre-walk row reads 0; the audit/repair pair (inventoryOnOrderAudit / repairInventoryOnOrder) stamps the derived truth over any drift.
availableQtyString String!Derived, never stored: on_hand − reserved, computed at read time (exact decimal-string arithmetic).
wmaCostMoneyEntryThe weighted-moving-average unit cost. Absent until the first costed receive.

Used by