orderApprovalRuleUpdate
Change the fields of an order approval rule that are given, and leave the rest as they are. Errors as for orderApprovalRuleCreate.
Arguments
| Argument | Type | Description |
|---|---|---|
businessUnitId | ID! | |
id | ID! | |
version | String | Expected optimistic-concurrency token, to fail the write if the rule changed meanwhile. Omit to update the current version; engines without versioning ignore it. |
input | OrderApprovalRuleUpdateInput! |
Returns
| Field | Type | Description |
|---|---|---|
orderApprovalRule | OrderApprovalRule | The 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 } } }}{ "businessUnitId": "id-1", "id": "id-1", "version": "Example", "input": {}}{ "data": { "orderApprovalRuleUpdate": { "orderApprovalRule": { "id": "id-1", "version": "Example", "key": "Example", "name": "Example", "description": "Example", "status": "ACTIVE", "conditionEditable": true, "predicate": "Example", "requesterRoleKeys": [ "Example" ] }, "orderApprovalRuleErrors": [ { "__typename": "ValidationError", "message": "Example" } ] } }}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/commercetools | Resolved |
| @evolve-framework/medusa | Resolved |
| @evolve-framework/sfcc | Resolved |
Used by
The storefront packages that send it, in these GraphQL documents:
- @evolve-storefront/feature-organization:
OrderApprovalRuleUpdate

