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
| Field | Type | Required | Notes |
|---|---|---|---|
caption | String | no | Optional: when omitted the per-type default applies — the channel + line count (pos order 2 lines); when supplied it must be non-blank. |
organizationId | ID ID! | yes | The selling Organization — tenant-scoped + ACTIVE. |
channel | OrderChannel OrderChannel! | yes | No further notes. |
orderType | OrderType OrderType! | yes | ALL FOUR profiles accepted; special_order lines are variant-keyed + method-coupled. |
validUntil | String | no | The draft/quote validity window end — REQUIRED iff quote, OPTIONAL on draft, forbidden elsewhere; must be FUTURE at create. |
termEndsAt | String | no | The layaway term end: OPTIONAL on layaway (absent ⇒ no scheduled default), forbidden elsewhere; must be FUTURE at create. |
logicalFacilityId | ID ID! | yes | The selling/fulfilling LF — ACTIVE + belongs to the selling org. |
customer | OrderCustomerInput | no | No further notes. |
exemptionCertificateId | ID | no | Optional cert ref — same-group + active at attach; at-USE validity re-gated at place. |
discounts | OrderDiscountInput [OrderDiscountInput!] | no | Order-level pre-tax discounts (manual only). |
lines | OrderLineInput [OrderLineInput!]! | yes | The lines (0..45). |