Skip to content

orderApprovalRuleUpdate

Mutationin Order approval

Change the fields of an order approval rule that are given, and leave the rest as they are. Errors as for orderApprovalRuleCreate.

Arguments

ArgumentTypeDescription
businessUnitIdID!
idID!
versionStringExpected optimistic-concurrency token, to fail the write if the rule changed meanwhile. Omit to update the current version; engines without versioning ignore it.
inputOrderApprovalRuleUpdateInput!

Returns

OrderApprovalRuleResponse!

FieldTypeDescription
orderApprovalRuleOrderApprovalRuleThe created or updated rule
orderApprovalRuleErrors[OrderApprovalRuleError!]Error details if the operation failed

Example

mutation OrderApprovalRuleUpdate(
$businessUnitId: ID!
$id: ID!
$version: String
$input: OrderApprovalRuleUpdateInput!
) {
orderApprovalRuleUpdate(
businessUnitId: $businessUnitId
id: $id
version: $version
input: $input
) {
orderApprovalRule {
id
version
key
name
description
status
conditionEditable
predicate
requesterRoleKeys
}
orderApprovalRuleErrors {
__typename
... on ValidationError {
message
}
}
}
}

The query selects the return type's fields two levels deep; pick the ones you need. The response shows its shape with placeholder values.

Served by

@evolve-framework/commercetoolsResolved
@evolve-framework/medusaResolved
@evolve-framework/sfccResolved

Used by

The storefront packages that send it, in these GraphQL documents: