AlmondTill/G3N API

PurchasePack

object type

A purchase pack — a purchasing/handling packaging definition ON a variant (case of 24, pallet of 480): NOT a UoM conversion (the inventory ledger is ALWAYS in the variant stock UoM — reaffirmed); a pack is packaging metadata + a line-ENTRY breakdown step (PO/Receipt lines entered in packs resolve to stock units at entry: packQuantity x unitsPerPack). Parent = the VARIANT (0..N packs per variant). unitsPerPack is IMMUTABLE at birth, which keeps every stored document line reconstructible forever. The code is a dup-gated LABEL (trim+case-fold vs LIVE siblings on the same variant, naming the holder — lean 1: no UNIQ marker). Live packs block the parent Variant doom (the children law); live OrgVendorItems naming a pack block ITS doom; deactivate stays FREE everywhere (an inactive pack refuses NEW line entry while its unitsPerPack keeps denominating stored terms).

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 group-scoped human-facing system id (PK-…).
typeString String!The kind of record — always PurchasePack here.
captionString String!The record’s display name — what people see it called.
statusString String!The FSM state: active | inactive | doomed.
parentIdID ID!The parent Variant; for a PurchasePack parentId!== rootId.
rootIdID ID!The org-group family root.
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 OCC revision token — supply it on every mutation of this record; rotates on every write.
refCaptionsRefCaption [RefCaption!]!The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption.
codeString String!The pack label (at most 64 chars) — dup-gated among LIVE siblings on the same variant; editable (re-gated).
unitsPerPackString String!Stock units per pack in the variant stock UoM (strictly positive decimal, 4 dp — covers weight-UoM variants). IMMUTABLE at birth.
packGtinStringOptional pack GTIN — GTIN-14/ITF-14 validated (14 digits + check digit, helpers; a PLAIN field — the org-scoped identifier LEDGER stays variant-only, lean 3); optional + editable.
nominalWeightKgStringOptional nominal pack weight in KILOGRAMS (fixed unit — lean 4); optional + editable.
lengthCmStringOptional outer length in CENTIMETERS (the dims trio — all three or none, lean 4); optional + editable.
widthCmStringOptional outer width in CENTIMETERS (the dims trio); optional + editable.
heightCmStringOptional outer height in CENTIMETERS (the dims trio); optional + editable.

Used by