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. 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
captionStringno
paymentTermsStringno
incotermCodeStringno
vendorReferenceStringno
notesStringno
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