AlmondTill/G3N API

NewOrderInput

input type

Create-input to open an Order — a sale/layaway/special_order is born open (the cart IS the open state); a draft/quote is born draft. The org + LF are gated live (ACTIVE, same group, the LF belongs to the org); the currency snapshots the org defaultCurrency (UNSET refuses VALIDATION/INVALID naming it; outside the registry refuses VALIDATION/UNSUPPORTED_CURRENCY); lines MAY be empty (the ecom cart-birth shape). ALL FOUR orderType profiles are accepted; a special_order line is VARIANT-keyed with fulfillmentMethod=special_order (defaulted; an explicit other method or an openItem refuses — the coupling). validUntil is REQUIRED on quote (FUTURE instant), OPTIONAL on draft, forbidden elsewhere.

Fields

FieldTypeRequiredNotes
captionStringnoOptional: when omitted the per-type default applies — the channel + line count (pos order 2 lines); when supplied it must be non-blank.
organizationIdID ID!yesThe selling Organization — tenant-scoped + ACTIVE.
channelOrderChannel OrderChannel!yesNo further notes.
orderTypeOrderType OrderType!yesALL FOUR profiles accepted; special_order lines are variant-keyed + method-coupled.
validUntilStringnoThe draft/quote validity window end — REQUIRED iff quote, OPTIONAL on draft, forbidden elsewhere; must be FUTURE at create.
termEndsAtStringnoThe layaway term end: OPTIONAL on layaway (absent ⇒ no scheduled default), forbidden elsewhere; must be FUTURE at create.
logicalFacilityIdID ID!yesThe selling/fulfilling LF — ACTIVE + belongs to the selling org.
customerOrderCustomerInputnoNo further notes.
exemptionCertificateIdIDnoOptional cert ref — same-group + active at attach; at-USE validity re-gated at place.
discountsOrderDiscountInput [OrderDiscountInput!]noOrder-level pre-tax discounts (manual only).
linesOrderLineInput [OrderLineInput!]!yesThe lines (0..45).

Used by