updatePurchaseOrderApprovalRule mutation
The updatePurchaseOrderApprovalRule mutation updates the specified purchase order approval rule.
You can use the customer query to retrieve the uid value of the approval rule.
The createPurchaseOrderApprovalRule mutation describes the requirements of the condition and approvers fields.
Syntax
Copied to your clipboardmutation {updatePurchaseOrderApprovalRule(input: UpdatePurchaseOrderApprovalRuleInput!) {PurchaseOrderApprovalRule}}
Reference
The updatePurchaseOrderApprovalRule reference provides detailed information about the types and fields defined in this mutation.
Headers
A valid customer authentication token is required.
Example usage
The following example updates the purchase order approval rule.
Request:
Copied to your clipboardmutation {updatePurchaseOrderApprovalRule(input: {uid: "Mg==",name: "Rule name updated",description: "Rule description",applies_to: [],status: ENABLED,condition: {attribute: GRAND_TOTAL,operator: MORE_THAN,amount: {value: 100.00,currency: EUR}}}) {uidname}}
Response:
Copied to your clipboard{"data": {"updatePurchaseOrderApprovalRule": {"uid": "Mg==","name": "Rule name updated"}}}


