AlmondTill/G3N API

EditPurchaseOrderInput

input type

Edit-input for a PurchaseOrder. Every field optional, at least ONE required; supplied fields REPLACE, omitted fields are preserved (no clearing semantic yet). DRAFT-ONLY WHOLESALE: header fields + a FULL line replace while draft (no per-line patching); the orgVendorId and the currency snapshot are BIRTH-FIXED (re-vendor = cancel + new); a live post-draft doc refuses CONFLICT/REF_STATE naming the required draft state (amend = cancel / close_short + a NEW PO); a write in an immutable terminal (received / closed_short / cancelled) refuses CONFLICT/IMMUTABLE.

Fields

FieldTypeRequiredNotes
captionStringnoNo further notes.
paymentTermsStringnoNo further notes.
incotermCodeStringnoNo further notes.
vendorReferenceStringnoNo further notes.
notesStringnoNo further notes.
linesPurchaseOrderLineInput [PurchaseOrderLineInput!]noThe wholesale line replacement (draft-only) — same shape, defaults and gates as create; the WHOLE set, up to 1000.: it PERSISTS as a DIFF by the natural (variantId x logicalFacilityId) key — an unchanged line costs no write, a kept line KEEPS its lineNo, a new key mints at nextLineNo, an absent key deletes (a line carrying orderLineRef refuses CONFLICT/REFERENCED); a delta past 90 line actions refuses VALIDATION/INVALID naming the budget and the three line ops.

Used by