# 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

| Field | Type | Notes |
| --- | --- | --- |
| `id` | [ID](/types/#scalars) `ID!` | The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it. |
| `sysId` | [String](/types/#scalars) `String!` | The group-scoped human-facing system id (PK-…). |
| `type` | [String](/types/#scalars) `String!` | The kind of record — always `PurchasePack` here. |
| `caption` | [String](/types/#scalars) `String!` | The record’s display name — what people see it called. |
| `status` | [String](/types/#scalars) `String!` | The FSM state: active \| inactive \| doomed. |
| `parentId` | [ID](/types/#scalars) `ID!` | The parent Variant; for a PurchasePack parentId!== rootId. |
| `rootId` | [ID](/types/#scalars) `ID!` | The org-group family root. |
| `createdAt` | [String](/types/#scalars) `String!` | When the record was created, as a UTC timestamp. |
| `updatedAt` | [String](/types/#scalars) `String!` | When the record last changed, as a UTC timestamp. |
| `revisionNum` | [Int](/types/#scalars) `Int!` | How many times this record has been edited; the first save is 0. |
| `revision` | [ID](/types/#scalars) `ID!` | The OCC revision token — supply it on every mutation of this record; rotates on every write. |
| `refCaptions` | [RefCaption](/types/RefCaption/) `[RefCaption!]!` | The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption. |
| `code` | [String](/types/#scalars) `String!` | The pack label (at most 64 chars) — dup-gated among LIVE siblings on the same variant; editable (re-gated). |
| `unitsPerPack` | [String](/types/#scalars) `String!` | Stock units per pack in the variant stock UoM (strictly positive decimal, 4 dp — covers weight-UoM variants). IMMUTABLE at birth. |
| `packGtin` | [String](/types/#scalars) | Optional 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. |
| `nominalWeightKg` | [String](/types/#scalars) | Optional nominal pack weight in KILOGRAMS (fixed unit — lean 4); optional + editable. |
| `lengthCm` | [String](/types/#scalars) | Optional outer length in CENTIMETERS (the dims trio — all three or none, lean 4); optional + editable. |
| `widthCm` | [String](/types/#scalars) | Optional outer width in CENTIMETERS (the dims trio); optional + editable. |
| `heightCm` | [String](/types/#scalars) | Optional outer height in CENTIMETERS (the dims trio); optional + editable. |

## Used by

- [createPurchasePack](/reference/purchase-pack/createPurchasePack/)
- [deactivatePurchasePack](/reference/purchase-pack/deactivatePurchasePack/)
- [doomPurchasePack](/reference/purchase-pack/doomPurchasePack/)
- [purchasePack](/reference/purchase-pack/purchasePack/)
- [purchasePacks](/reference/purchase-pack/purchasePacks/)
- [reactivatePurchasePack](/reference/purchase-pack/reactivatePurchasePack/)
- [updatePurchasePack](/reference/purchase-pack/updatePurchasePack/)
