AlmondTill/G3N API

StoredValueInstrument

object type

A StoredValueInstrument — a balance-bearing money instrument: gift_card (purchasable, reloadable-by-field, bearer) · gift_certificate (fixed-amount) · store_credit (refund/goodwill-born, customer-BOUND, never purchasable as a line). Dual-birth: immediate active (the issue entry rides the create) or staged inactive printed stock (activated at sale via the Order line arm, or directly via activateStoredValueInstrument). Selling/reloading one is an Order line (untaxed — basis instrument_sale; engine-invisible); redeeming one is an applyTender step-5 internal tender; store credit from a return mints via refundReturn method=store_credit. Doom is gated by CONFLICT/BALANCE_OUTSTANDING while value remains (zero via reason-coded adjust first — no silent money destruction).

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 SV-… — stable for the record’s life.
typeString String!The kind of record — always StoredValueInstrument here.
captionString String!The record’s display name — what people see it called.
statusString String!The record’s current state — one of active, inactive, depleted or doomed.
parentIdID ID!The parent org group; for a StoredValueInstrument parentId === rootId (group-scoped — any org in the group redeems it).
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.
instrumentTypeStoredValueInstrumentType StoredValueInstrumentType!The canned type — immutable at birth.
codeString String!The normalized code (trim+uppercase; A–Z/0–9 start then A–Z/0–9/_/-, 4..64 — a money key needs collision room) — immutable at birth; burned at doom.
reloadableBoolean Boolean!The reload law: true ⟺ a reloadable gift_card; forced false on certificate/credit (strict both ways).
balanceMinorInt Int!The cached ledger sum (minor units) — stamped in the same transaction as every StoredValueEntry; never negative; never directly editable (adjust/redeem/reload are the only balance surfaces).
currencyString String!The instrument currency — the issuing org default stamped at birth.
customerOrderCustomerThe inline customer binding.

Used by