mutation UpdatePurchaseOrder($request: UpdatePurchaseOrderCommandRequestInput!) {
UpdatePurchaseOrder(request: $request) {
purchaseOrderId
supplierId
supplierName
orderNumber
externalOrderNumber
referenceOrderNumber
}
}{
"request": {
"purchaseOrderId": "id"
}
}{
"data": {
"UpdatePurchaseOrder": {
"purchaseOrderId": "id",
"supplierId": "id",
"supplierName": "string",
"orderNumber": "string",
"externalOrderNumber": "string",
"referenceOrderNumber": "string"
}
}
}UpdatePurchaseOrder
Patches an existing purchase order’s header: editable fields and a status transition, in any combination. Every field is optional — an omitted field leaves its column unchanged. Field editability depends on the order’s status (structural fields only while Open or Released, confirmation fields in every status except Completed, annotations always) and is evaluated against the status BEFORE any transition requested in the same call. LINE ITEMS ARE NOT PART OF THIS ENDPOINT: they are addressed individually through purchase-orders//line-items, one operation per position. Returns the full re-queried order, so the caller sees the side effects the write triggers.
If a request with this mutation’s Idempotency-Key was already completed, the response’s extensions contains an idempotency.{responseName} entry with wasReplayed: true.
UpdatePurchaseOrder(request: UpdatePurchaseOrderCommandRequestInput!): PurchaseOrder!Arguments
Returns
Unique ID of the purchase order.
ID of the supplier the order was placed with.
The supplier's current display name, resolved at read time. NULL if the supplier could not be resolved.
The order's own number.
The buyer's own order number.
A reference order number.
The order's current status.
ISO code of the order's currency.
Conversion factor of the order's currency.
The delivery date requested from the supplier.
Date the order was created.
Whether the order has been confirmed by the supplier.
Target warehouse of the incoming goods.
The company the order was placed for.
Internal comment on the order, not communicated to the supplier.
The order's line items — article positions and free positions. Summing this list yields the goods value only; freight charges, discounts and minimum quantity charges are not included here and are returned under allowancesAndCharges instead.
Document-level allowances and charges. The document total is the goods value from lineItems plus the entries in this list — there is no header total field, so the client computes it. Rows are grouped by (type, vatRatePercentage); amounts are summed within the group; the note of the row with the lowest sort order in the group wins, ties broken by the lowest line item id. The tiebreaker is mandatory: sort order has no uniqueness guarantee within a group — an import that never sets it leaves every row at the same default. These values are the stored rows, grouped and summed — not a figure this API derives or validates. The Wawi may overwrite them the next time the order is opened and saved in the desktop client: discounts unconditionally, freight charge and minimum quantity surcharge depending on a shipping-position auto-detection setting. An order without charge rows returns an empty list, never null.
Delivery address of the order.
Billing address of the order.
Snapshot of the supplier's master data at the time the order was created.
mutation UpdatePurchaseOrder($request: UpdatePurchaseOrderCommandRequestInput!) {
UpdatePurchaseOrder(request: $request) {
purchaseOrderId
supplierId
supplierName
orderNumber
externalOrderNumber
referenceOrderNumber
}
}{
"request": {
"purchaseOrderId": "id"
}
}{
"data": {
"UpdatePurchaseOrder": {
"purchaseOrderId": "id",
"supplierId": "id",
"supplierName": "string",
"orderNumber": "string",
"externalOrderNumber": "string",
"referenceOrderNumber": "string"
}
}
}Was this page helpful?