CreatePurchaseOrderCommandRequestInput
Creates a purchase order with its line items in one call. The order input is a one-of: exactly one variant is sent and it is the kind of the order, to a warehouse or drop shipping to a customer. The number is drawn from the number range; currency and language are the supplier’s. The ERP adds the discount from the supplier’s discount scale, its freight charge and its minimum quantity surcharge as computed lines. Raises the workflow event ‘created’; an order that starts released also raises ‘changed’, and an order to a warehouse ‘released’ as well. Errors arrive as GraphQL errors with the code in ‘extensions.code’; a refusal because of the current state also lists every reason in ‘extensions.blockers’. Codes: PURCHASE_ORDER_LINE_ITEMS_REQUIRED, WAREHOUSE_REQUIRED (neither a warehouse nor a default warehouse of the supplier) or another invalid request, for example a quantity below 0, a tax rate outside 0 to 100 or a text with control characters; SUPPLIER_NOT_FOUND, COMPANY_NOT_FOUND, WAREHOUSE_NOT_FOUND, CUSTOMER_NOT_FOUND, SUPPLIER_CONTACT_NOT_FOUND or ITEM_NOT_FOUND (a referenced record was not found); SUPPLIER_INACTIVE (the supplier is not active); SUPPLIER_CURRENCY_NOT_RESOLVABLE or SUPPLIER_LANGUAGE_NOT_RESOLVABLE (the supplier’s currency or language is missing in the ERP); WAREHOUSE_NOT_USABLE (the warehouse is inactive or a drop shipping target); ITEM_INACTIVE, ITEM_IS_VARIATION_PARENT, ITEM_IS_BILL_OF_MATERIALS or ITEM_NOT_ASSIGNED_TO_SUPPLIER (an item cannot be ordered from this supplier as it is). - Request
CreatePurchaseOrderCommandRequestInputFields
A temporary identifier chosen by the client, for example to match the answer to an optimistic update. It is not stored and is returned unchanged.
The data of the new order. Exactly one variant.
The line items, at least one, in their order. Each is exactly one variant.
Suppresses the automatic workflow triggers of this call. Defaults to false when omitted.
Client-supplied idempotency key. When provided, a repeated request with the same key and payload replays the original result instead of re-executing the mutation.
Was this page helpful?