Skip to content

orderApprovalRuleStatusUpdate

Mutationin Order approval

Turn an order approval rule on or off

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.
statusOrderApprovalRuleStatusType!

Returns

OrderApprovalRuleResponse!

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

Example

mutation OrderApprovalRuleStatusUpdate(
$businessUnitId: ID!
$id: ID!
$version: String
$status: OrderApprovalRuleStatusType!
) {
orderApprovalRuleStatusUpdate(
businessUnitId: $businessUnitId
id: $id
version: $version
status: $status
) {
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: