Edit in GitHubLog an issue
B2B feature. Learn more

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 clipboard
mutation {
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 clipboard
mutation {
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
}
}
}
) {
uid
name
}
}

Response:

Copied to your clipboard
{
"data": {
"updatePurchaseOrderApprovalRule": {
"uid": "Mg==",
"name": "Rule name updated"
}
}
}
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.