data-src=../../../../../includes/commerce-only.md

deletePurchaseOrderApprovalRule mutation

The deletePurchaseOrderApprovalRule mutation deletes one or more purchase order approval rules.

You can use the customer query to retrieve the uid value of the approval rule.

If the mutation is successful, it returns null. Otherwise, the response contains details about any errors encountered.

Syntax

mutation {
    deletePurchaseOrderApprovalRule(
        input: DeletePurchaseOrderApprovalRuleInput!
    ) {
        DeletePurchaseOrderApprovalRuleOutput
    }
}

Reference

The deletePurchaseOrderApprovalRule 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 deletes the purchase order approval rule.

Request:

mutation {
  deletePurchaseOrderApprovalRule(
    input: {
        approval_rule_uids: ["Mg=="]
    }
  ) {
    errors {
        message
        type
    }
  }
}

Response:

{
  "data": {
    "deletePurchaseOrderApprovalRule": {
      "errors": []
    }
  }
}