AlmondTill/G3N API

Order

object type

The fields of Order.

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 SO-… — stable for the record’s life.
typeString String!The kind of record — always Order here.
captionString String!The record’s display name — what people see it called.
statusString String!The record’s current state — one of open, held, placed, completed, voided, abandoned, cancelled, draft, sent, accepted, expired, accruing, paid_in_full, defaulted, sourcing or ready. The orderType profile selects which of these states this record can reach.
parentIdID ID!pos → the selling LogicalFacility; ecom → the Organization — fixed at birth by origin, never reparented; rootId = the org group either way.
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.
organizationIdID ID!The selling Organization — immutable at birth; active-gated at create.
channelOrderChannel OrderChannel!The selling channel — immutable; decides the parent + the reserve arm.
orderTypeOrderType OrderType!All four profiles buildable: sale + draft/quote + layaway + special_order.
validUntilStringThe draft/quote validity window end — required on quote, optional on draft, absent elsewhere; accept past it refuses CONFLICT/EXPIRED (the at-USE gate); once set the scheduler strand fires the draft|sent → expired rows on schedule.
termEndsAtStringThe layaway term end: the instant the scheduler fires placed|accruing → defaulted. Optional (absent ⇒ no scheduled default), layaway-only, future-dated, editable while live (a termEndsAt-ONLY edit stays legal at placed|accruing — the term is schedule, not content).
convertedOrderIdIDThe conversion ref — the placed sale Order this draft/quote minted at accept; accepted-state only.
sourceDocumentIdIDThe conversion back-ref — the draft/quote this sale was converted from (stamped at the mint birth); sale-profile only.
reorderOfOrderIdIDThe reorder provenance ref — the sale-profile source Order this order was reordered from; sale-profile only. Distinct from sourceDocumentId: conversion consumes its doc, a reorder consumes nothing.
logicalFacilityIdID ID!The selling/fulfilling LF — pricing capture + the ecom reserve ride its InventoryItems (per-line sourcing =).
currencyString String!The order currency — the org defaultCurrency snapshot, fixed at create.
customerOrderCustomerOptional inline customer capture.
shipToOrderShipToThe document-level ship-to destination: stamped by the agent checkout when a complete shipping address arrives (the Fulfillment's shipTo at ship is the same shape); absent otherwise.
fulfillmentOptionOrderFulfillmentOptionThe selected fulfillment option snapshot + its fee: the channel's rate card or pickup choice as picked (words · fee in minor units · transit days · the pickup location); the fee is a separate quote line — the accept adds it to the sale.
agentCheckoutOrderAgentCheckoutThe agent checkout block: present ⟺ this Order is a UCP checkout session — the AgentChannel · the platform profile URL (absent on a staff test drive) · the platform's destination id · the buyer names as given · the captured consent decisions.
exemptionCertificateIdIDOptional ExemptionCertificate ref — at-USE validity gated at place.
discountsOrderDiscount [OrderDiscount!]!Order-level pre-tax discounts — allocated to lines pro-rata by discounted subtotal, largest remainder (exact).
paymentStateString String!The payment rollup — stamped from net tendered vs total at every tender post.
fulfillmentStateString String!The fulfillment rollup — born unfulfilled; transitioned by the events.
recognitionStateString String!The recognition rollup — born deferred (deposits-until-delivery); conversion = the delivery events.
taxJurisdictionIdIDThe origin jurisdiction captured at place; absent pre-place or when the PFL is unclassified (the disclosed nexus-none arm).
subtotalMinorInt Int!Σ line bases in minor units.
discountTotalMinorInt Int!Everything taken off pre-tax (line discounts + the order-level reduction), minor units.
taxTotalMinorInt Int!Σ line tax in minor units — 0 until place; inside the captured prices under an inclusive (vat_gst) regime (disclosed, not double-counted).
totalMinorInt Int!The order total in minor units — exclusive regimes add tax; inclusive regimes carry it inside the captured prices.
fulfillmentFeeMinorIntThe fulfillment fee folded into the money at commit: the agent checkout's selected option fee restated as a money rollup on the minted sale (totalMinor = Σ line totals + this + its tax); absent on drafts and on every non-agent sale.
fulfillmentFeeTaxMinorIntThe tax on the fulfillment fee (taxed as a standard good at the origin — the lean), inside taxTotalMinor; present ⟺ fulfillmentFeeMinor.
tenderedNetMinorIntΣ signed applied minor over the order tenders; absent = no tender yet. balance due = totalMinor − this.
tipTotalMinorIntΣ tips captured at tender; absent = none.
paymentIdsID [ID!]The Payment attempts spawned by card tenders; absent = none.
refundIdsID [ID!]The Refund attempts spawned by refundReturn(original_tender); absent = none.
disputeIdsID [ID!]The Disputes webhook-born against this order’s payments; absent = none.
invoiceIdsID [ID!]The Invoices issued from this order. The bounded order→invoice enumeration the settlement/recognition attribution reads; absent = none.
couponIdsID [ID!]The Coupons attached to this order. A trigger coupon's promotion evaluates only while attached; place re-validates every member and refuses a non-applied one. Absent = none.
loyaltyOrderLoyaltyThe loyalty attach. Earn commits at place on the final post-ALL-step-2-reductions discounted taxable base; the redemption emits source=loyalty line entries at position 4. Sale-profile only; absent = none.
employeeOrderEmployeeThe employee-discount attach. The position-5 evaluation emits source=employee line entries (the last pre-tax reduction); every orderType may carry it (the coupon posture — a pure reduction mints nothing); the User re-validates fresh at place. Absent = none.
sourcingSagaIdIDThe special_order_sourcing Saga stamped at launch; special_order-profile only.
commissionAgentUserIdsID [ID!]The commission custody stamp: the distinct union of attributed agents + manager-on-all holders whose entries minted — the deterministic clawback walk-list (the resolvedInventoryItemIds custody class).
affiliateIdIDThe affiliate custody stamp: the attributed Affiliate — the clawback walk key (entries ride affledger#<affiliateId>).
linesOrderLine [OrderLine!]!The embedded lines (0..45 — an empty open cart is legal, place refuses it); lineNo frozen at placed.

Used by