Skip to main content

forceUpdatePurchaseOrder

Requires permission purchase:purchase_order:update.

Changes a purchase order in place, whatever its status, except that CANCELLED and CLOSED orders cannot be edited. Once a live goods receipt or purchase invoice references the order, its items, shipping, discount, freight, surcharge, currency and other financial fields are locked and the change is refused: received and billed quantities change only through a reversal document. Needs the purchase orders feature on your plan.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation ForceUpdatePurchaseOrder($input: ForceUpdatePurchaseOrderInput!) {
forceUpdatePurchaseOrder(input: $input) {
id
orderNumber
supplierCode
trackingCode
creatorName
projectName
items {
id
productName
uomName
variantName
createdAt
canceledQuantity
}
}
}

Variables:

{
"input": {
"id": "id"
}
}

Response:

{
"data": {
"forceUpdatePurchaseOrder": {
"id": "id",
"orderNumber": "string",
"supplierCode": "string",
"trackingCode": "string",
"creatorName": "string",
"projectName": "string",
"items": [
{
"id": "id",
"productName": "string",
"uomName": "string",
"variantName": "string",
"createdAt": "2025-01-15T00:00:00Z",
"canceledQuantity": 0
}
]
}
}
}
forceUpdatePurchaseOrder(
input: ForceUpdatePurchaseOrderInput!
): PurchaseOrder!

Arguments​

forceUpdatePurchaseOrder.input ● ForceUpdatePurchaseOrderInput! non-null input​

The details of the force update purchase order request.

Type​

PurchaseOrder object​

A purchase order raised with a supplier.