priceRuleDelete mutation
Delete a price rule.
Required access
write_price_rules access scope.
On this page
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
mutation priceRuleDelete($id: ID!) { priceRuleDelete(id: $id) {} } { “id”: “Z2lkOi8vU2hvcGlmeS9FeGFtcGxlLzE=” }
<font style="color:#1F61A0;">deletedPriceRuleId</font><font style="color:#1F61A0;">priceRuleUserErrors</font> <font style="color:#555555;">{</font><font style="color:#1F61A0;">code</font><font style="color:#1F61A0;">field</font><font style="color:#1F61A0;">message</font><font style="color:#555555;">}</font><font style="color:#1F61A0;">shop</font> <font style="color:#555555;">{</font><font style="color:#1F61A0;">id</font><font style="color:#555555;">}</font>
Arguments
| Argument | Description | 
|---|---|
id( [ID!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01)) REQUIRED  | 
The id of the price rule object. | 
Return fields
- deletedPriceRuleId (
[ID](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01))
The id price of the deleted price rule. - priceRuleUserErrors (
[[PriceRuleUserError!]!](https://shopify.dev/docs/admin-api/graphql/reference/discounts-and-marketing/priceruleusererror))
List of errors that occurred executing the mutation. - shop (
[Shop!](https://shopify.dev/docs/admin-api/graphql/reference/store-properties/shop))
The shop of the deleted price rule. 
Deprecated return fields
- userErrors (
[[UserError!]!](https://shopify.dev/docs/admin-api/graphql/reference/usererror)) DEPRECATED
List of errors that occurred executing the mutation.
Deprecation warning
UsepriceRuleUserErrorsinstead 
