Skip to main content
Log inSign up
object

An error that occurs during the execution of a discount mutation.

•

The error code.

•

Extra information about this error.

•

The path to the input field that caused the error.

•
String!non-null

The error message.


Was this section helpful?

•
mutation

Activates an automatic discount.

•
mutation

Creates an automatic discount that's managed by an app. Use this mutation with Shopify Functions when you need advanced, custom, or dynamic discount capabilities that aren't supported by Shopify's native discount types.

For example, use this mutation to create an automatic discount using an app's "Volume" discount type that applies a percentage off when customers purchase more than the minimum quantity of a product. For an example implementation, refer to our tutorial.


Note

To create code discounts with custom logic, use the discountCodeAppCreate mutation.


•
mutation

Updates an existing automatic discount that's managed by an app using Shopify Functions. Use this mutation when you need advanced, custom, or dynamic discount capabilities that aren't supported by Shopify's native discount types.

For example, use this mutation to update a new "Volume" discount type that applies a percentage off when customers purchase more than the minimum quantity of a product. For an example implementation, refer to our tutorial.


Note

To update code discounts with custom logic, use the discountCodeAppUpdate mutation instead.


•
mutation

Creates an amount off discount that's automatically applied on a cart and at checkout.


Note

To create code discounts, use the discountCodeBasicCreate mutation.


•
mutation

Updates an existing amount off discount that's automatically applied on a cart and at checkout.


Note

To update code discounts, use the discountCodeBasicUpdate mutation instead.


•
mutation

Asynchronously delete automatic discounts in bulk if a search or saved_search_id argument is provided or if a maximum discount threshold is reached (1,000). Otherwise, deletions will occur inline. Warning: All automatic discounts will be deleted if a blank search argument is provided.

•
mutation

Creates a buy X get Y discount (BXGY) that's automatically applied on a cart and at checkout.


Note

To create code discounts, use the discountCodeBxgyCreate mutation.


•
mutation

Updates an existing buy X get Y discount (BXGY) that's automatically applied on a cart and at checkout.


Note

To update code discounts, use the discountCodeBxgyUpdate mutation instead.


•
mutation

Deactivates an automatic discount.

•
mutation

Creates a free shipping discount that's automatically applied on a cart and at checkout.


Note

To create code discounts, use the discountCodeFreeShippingCreate mutation.


•
mutation

Updates an existing free shipping discount that's automatically applied on a cart and at checkout.


Note

To update code discounts, use the discountCodeFreeShippingUpdate mutation instead.


•
mutation

Activates a code discount.

•
mutation

Creates a code discount. The discount type must be provided by an app extension that uses Shopify Functions. Functions can implement order, product, or shipping discount functions. Use this mutation with Shopify Functions when you need custom logic beyond Shopify's native discount types.

For example, use this mutation to create a code discount using an app's "Volume" discount type that applies a percentage off when customers purchase more than the minimum quantity of a product. For an example implementation, refer to our tutorial.


Note

To create automatic discounts with custom logic, use discountAutomaticAppCreate.


•
mutation

Updates a code discount, where the discount type is provided by an app extension that uses Shopify Functions. Use this mutation when you need advanced, custom, or dynamic discount capabilities that aren't supported by Shopify's native discount types.


Note

To update automatic discounts, use discountAutomaticAppUpdate.


•
mutation

Creates an amount off discount that's applied on a cart and at checkout when a customer enters a code. Amount off discounts can be a percentage off or a fixed amount off.


Note

To create discounts that are automatically applied on a cart and at checkout, use the discountAutomaticBasicCreate mutation.


•
mutation

Updates an amount off discount that's applied on a cart and at checkout when a customer enters a code. Amount off discounts can be a percentage off or a fixed amount off.


Note

To update discounts that are automatically applied on a cart and at checkout, use the discountAutomaticBasicUpdate mutation.


•
mutation

Activates multiple code discounts asynchronously using one of the following:

  • A search query
  • A saved search ID
  • A list of discount code IDs

For example, you can activate discounts for all codes that match a search criteria, or activate a predefined set of discount codes.

•
mutation

Deactivates multiple code-based discounts asynchronously using one of the following:

  • A search query
  • A saved search ID
  • A list of discount code IDs

For example, you can deactivate discounts for all codes that match a search criteria, or deactivate a predefined set of discount codes.

•
mutation

Deletes multiple code-based discounts asynchronously using one of the following:

  • A search query
  • A saved search ID
  • A list of discount code IDs

For example, you can delete discounts for all codes that match a search criteria, or delete a predefined set of discount codes.

•
mutation

Creates a buy X get Y discount (BXGY) that's applied on a cart and at checkout when a customer enters a code.


Note

To create discounts that are automatically applied on a cart and at checkout, use the discountAutomaticBxgyCreate mutation.


•
mutation

Updates a buy X get Y discount (BXGY) that's applied on a cart and at checkout when a customer enters a code.


Note

To update discounts that are automatically applied on a cart and at checkout, use the discountAutomaticBxgyUpdate mutation.


•
mutation

Deactivates a code discount.

•
mutation

Creates an free shipping discount that's applied on a cart and at checkout when a customer enters a code.


Note

To create discounts that are automatically applied on a cart and at checkout, use the discountAutomaticFreeShippingCreate mutation.


•
mutation

Updates a free shipping discount that's applied on a cart and at checkout when a customer enters a code.


Note

To update a free shipping discount that's automatically applied on a cart and at checkout, use the discountAutomaticFreeShippingUpdate mutation.


•
mutation

Asynchronously delete discount codes in bulk that customers can use to redeem a discount.

•
mutation

Asynchronously add discount codes in bulk that customers can use to redeem a discount. You can use the discountRedeemCodeBulkAdd mutation to automate the distribution of discount codes through emails or other marketing channels.


Was this section helpful?


Was this section helpful?