Skip to main content

appUpdatePurchaseOrder

Requires permission purchase:purchase_order:update.

Change a DRAFT purchase order from an installed app: its lines, notes, payment term or warehouse. A purchase order past DRAFT is refused. Needs write_purchasing.

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 AppUpdatePurchaseOrder($input: AppUpdatePurchaseOrderInput!) {
appUpdatePurchaseOrder(input: $input) {
id
orderNumber
supplierCode
trackingCode
creatorName
projectName
creditLimitOverride {
baseCurrency
limit
projected
}
}
}

Variables:

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

Response:

{
"data": {
"appUpdatePurchaseOrder": {
"id": "id",
"orderNumber": "string",
"supplierCode": "string",
"trackingCode": "string",
"creatorName": "string",
"projectName": "string",
"creditLimitOverride": {
"baseCurrency": "string",
"limit": 0,
"projected": 0
}
}
}
}
appUpdatePurchaseOrder(
input: AppUpdatePurchaseOrderInput!
): PurchaseOrder!

Arguments​

appUpdatePurchaseOrder.input ● AppUpdatePurchaseOrderInput! non-null input​

The purchase order and its changes.

Type​

PurchaseOrder object​

A purchase order raised with a supplier.