Skip to main content
Log inSign up
object

Represents an error in the input of a mutation.

•

The path to the input field that caused the error.

•
String!non-null

The error message.


Was this section helpful?

•
mutation

Charges a shop for features or services one time. This type of charge is recommended for apps that aren't billed on a recurring basis. Test and demo shops aren't charged.

•
mutation

Cancels an app subscription on a store.

•
mutation

Allows an app to charge a store for features or services on a recurring basis.

•
mutation

Updates the capped amount on the usage pricing plan of an app subscription line item.

•
mutation

Enables an app to charge a store for features or services on a per-use basis. The usage charge value is counted towards the cappedAmount limit that was specified in the appUsagePricingDetails field when the app subscription was created. If you create an app usage charge that causes the total usage charges in a billing interval to exceed the capped amount, then a Total price exceeds balance remaining error is returned.

•
mutation

Starts the cancelation process of a running bulk operation.

There may be a short delay from when a cancelation starts until the operation is actually canceled.

•
mutation

Creates and runs a bulk operation query.

See the bulk operations guide for more details.

•
mutation

Adds products to a collection.

•
mutation

Creates a collection.

•
mutation

Deletes a collection.

•
mutation

Removes a set of products from a given collection. The mutation can take a long time to run. Instead of returning an updated collection the mutation returns a job, which should be polled. For use with manual collections only.

•
mutation

Asynchronously reorders a set of products within a specified collection. Instead of returning an updated collection, this mutation returns a job, which should be polled. The Collection.sortOrder must be MANUAL. Displaced products will have their position altered in a consistent manner, with no gaps.

•
mutation

Updates a collection.

•
mutation

Add tax exemptions for the customer.

•
mutation

Create a new customer. As of API version 2022-10, apps using protected customer data must meet the protected customer data requirements.

•
mutation

Delete a customer. As of API version 2022-10, apps using protected customer data must meet the protected customer data requirements.

•
mutation

Generate an account activation URL for a customer.

•
mutation

Creates a credit card payment method for a customer using a session id. These values are only obtained through card imports happening from a PCI compliant environment. Please use customerPaymentMethodRemoteCreate if you are not managing credit cards directly.

•
mutation

Updates the credit card payment method for a customer.

•
mutation

Revokes a customer's payment method.

•
mutation

Sends a link to the customer so they can update a specific payment method.

•
mutation

Remove tax exemptions from a customer.

•
mutation

Replace tax exemptions for a customer.

•
mutation

Update a customer's attributes. As of API version 2022-10, apps using protected customer data must meet the protected customer data requirements.

•
mutation

Updates a customer's default address.

•
mutation

Create a delivery profile.

•
mutation

Enqueue the removal of a delivery profile.

•
mutation

Update a delivery profile.

•
mutation

Set the delivery settings for a shop.

•
mutation

Assigns a location as the shipping origin while using legacy compatibility mode for multi-location delivery profiles.

•
mutation

Adds tags to multiple draft orders.

•
mutation

Deletes multiple draft orders.

•
mutation

Removes tags from multiple draft orders.

•
mutation

Calculates the properties of a draft order. Useful for determining information such as total taxes or price without actually creating a draft order.

•
mutation

Completes a draft order and creates an order.

•
mutation

Creates a draft order.

•
mutation

Creates a draft order from order.

•
mutation

Creates a merchant checkout for the given draft order.

•
mutation

Deletes a draft order.

•
mutation

Duplicates a draft order.

•
mutation

Previews a draft order invoice email.

•
mutation

Sends an email invoice for a draft order.

•
mutation

Updates a draft order.

If a checkout has been started for a draft order, any update to the draft will unlink the checkout. Checkouts are created but not immediately completed when opening the merchant credit card modal in the admin, and when a buyer opens the invoice URL. This is usually fine, but there is an edge case where a checkout is in progress and the draft is updated before the checkout completes. This will not interfere with the checkout and order creation, but if the link from draft to checkout is broken the draft will remain open even after the order is created.

•
mutation

Creates a new Amazon EventBridge webhook subscription.

Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your shopify.app.toml may be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read About managing webhook subscriptions.

•
mutation

Updates an Amazon EventBridge webhook subscription.

Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your shopify.app.toml may be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read About managing webhook subscriptions.

•
mutation

Triggers any workflows that begin with the trigger specified in the request body. To learn more, refer to Create Shopify Flow triggers.

•
mutation

Cancels a fulfillment.

•
mutation

Creates a fulfillment event for a specified fulfillment.

•
mutation

Accept a cancellation request sent to a fulfillment service for a fulfillment order.

•
mutation

Accepts a fulfillment request sent to a fulfillment service for a fulfillment order.

•
mutation

Marks a fulfillment order as canceled.

•
mutation

Marks an in-progress fulfillment order as incomplete, indicating the fulfillment service is unable to ship any remaining items, and closes the fulfillment request.

This mutation can only be called for fulfillment orders that meet the following criteria:

  • Assigned to a fulfillment service location,
  • The fulfillment request has been accepted,
  • The fulfillment order status is IN_PROGRESS.

This mutation can only be called by the fulfillment service app that accepted the fulfillment request. Calling this mutation returns the control of the fulfillment order to the merchant, allowing them to move the fulfillment order line items to another location and fulfill from there, remove and refund the line items, or to request fulfillment from the same fulfillment service again.

Closing a fulfillment order is explained in the fulfillment service guide.

•
mutation

Changes the location which is assigned to fulfill a number of unfulfilled fulfillment order line items.

Moving a fulfillment order will fail in the following circumstances:

  • The fulfillment order is closed.
  • The destination location has never stocked the requested inventory item.
  • The API client doesn't have the correct permissions.

Line items which have already been fulfilled can't be re-assigned and will always remain assigned to the original location.

You can't change the assigned location while a fulfillment order has a request status of SUBMITTED, ACCEPTED, CANCELLATION_REQUESTED, or CANCELLATION_REJECTED. These request statuses mean that a fulfillment order is awaiting action by a fulfillment service and can't be re-assigned without first having the fulfillment service accept a cancellation request. This behavior is intended to prevent items from being fulfilled by multiple locations or fulfillment services.

How re-assigning line items affects fulfillment orders

First scenario: Re-assign all line items belonging to a fulfillment order to a new location.

In this case, the assignedLocation of the original fulfillment order will be updated to the new location.

Second scenario: Re-assign a subset of the line items belonging to a fulfillment order to a new location. You can specify a subset of line items using the fulfillmentOrderLineItems parameter (available as of the 2023-04 API version), or specify that the original fulfillment order contains line items which have already been fulfilled.

If the new location is already assigned to another active fulfillment order, on the same order, then a new fulfillment order is created. The existing fulfillment order is closed and line items are recreated in a new fulfillment order.

•
mutation

Marks a scheduled fulfillment order as open.

•
mutation

Rejects a cancellation request sent to a fulfillment service for a fulfillment order.

•
mutation

Rejects a fulfillment request sent to a fulfillment service for a fulfillment order.

•
mutation

Sends a cancellation request to the fulfillment service of a fulfillment order.

•
mutation

Sends a fulfillment request to the fulfillment service of a fulfillment order.

•
mutation

Creates a fulfillment service.

Fulfillment service location

When creating a fulfillment service, a new location will be automatically created on the shop and will be associated with this fulfillment service. This location will be named after the fulfillment service and inherit the shop's address.

If you are using API version 2023-10 or later, and you need to specify custom attributes for the fulfillment service location (for example, to change its address to a country different from the shop's country), use the LocationEdit mutation after creating the fulfillment service.

•
mutation

Deletes a fulfillment service.

•
mutation

Updates a fulfillment service.

If you are using API version 2023-10 or later, and you need to update the location managed by the fulfillment service (for example, to change the address of a fulfillment service), use the LocationEdit mutation.

•
mutation

Update a gift card.

•
mutation

Activate an inventory item at a location.

•
mutation

Removes an inventory item's quantities from a location, and turns off inventory at the location.

•
mutation

Updates an inventory item.

•
mutation

Create new marketing activity.

•
mutation

Updates a marketing activity with the latest information.

•
mutation

Creates a new marketing engagement for a marketing activity or a marketing channel.

•
mutation

Deletes multiple metafields in bulk.

•
mutation

Cancels an order.

•
mutation

Captures payment for an authorized transaction on an order. An order can only be captured if it has a successful authorization transaction. Capturing an order will claim the money reserved by the authorization. orderCapture can be used to capture multiple times as long as the OrderTransaction is multi-capturable. To capture a partial payment, the included amount value should be less than the total order amount. Multi-capture is available only to stores on a Shopify Plus plan.

•
mutation

Closes an open order.

•
mutation

Adds a custom line item to an existing order. For example, you could add a gift wrapping service as a custom line item. To learn how to edit existing orders, refer to Edit an existing order with Admin API.

•
mutation

Adds a discount to a line item on the current order edit. For more information on how to use the GraphQL Admin API to edit an existing order, refer to Edit existing orders.

•
mutation

Adds a line item from an existing product variant. As of API version 2025-04, the orderEditAddVariant API will respect the contextual pricing of the variant.

•
mutation

Starts editing an order. Mutations are operating on OrderEdit. All order edits start with orderEditBegin, have any number of orderEdit* mutations made, and end with orderEditCommit.

•
mutation

Applies and saves staged changes to an order. Mutations are operating on OrderEdit. All order edits start with orderEditBegin, have any number of orderEdit* mutations made, and end with orderEditCommit.

•
mutation

Sets the quantity of a line item on an order that is being edited. For more information on how to use the GraphQL Admin API to edit an existing order, refer to Edit existing orders.

•
mutation

Marks an order as paid. You can only mark an order as paid if it isn't already fully paid.

•
mutation

Opens a closed order.

•
mutation

Updates the fields of an order.

•
mutation

Creates a product with attributes such as title, description, and vendor. You can use the productCreate mutation to define options and values for products with product variants, such as different sizes or colors.

To create multiple product variants for a single product and manage prices, use the productVariantsBulkCreate mutation.

To create or update a product in a single request, use the productSet mutation.

Learn more about the product model and adding product data.

•
mutation

Deletes a product, including all associated variants and media.

As of API version 2023-01, if you need to delete a large product, such as one that has many variants that are active at several locations, you may encounter timeout errors. To avoid these timeout errors, you can instead use the asynchronous ProductDeleteAsync mutation.

•
mutation

Duplicates a product.

If you need to duplicate a large product, such as one that has many variants that are active at several locations, you might encounter timeout errors.

To avoid these timeout errors, you can instead duplicate the product asynchronously.

In API version 2024-10 and higher, include synchronous: false argument in this mutation to perform the duplication asynchronously.

In API version 2024-07 and lower, use the asynchronous ProductDuplicateAsyncV2.

Metafield values are not duplicated if the unique values capability is enabled.

•
mutation

Asynchronously reorders the media attached to a product.

•
mutation

Updates a product.

For versions 2024-01 and older: If you update a product and only include some variants in the update, then any variants not included will be deleted.

To safely manage variants without the risk of deleting excluded variants, use productVariantsBulkUpdate.

If you want to update a single variant, then use productVariantUpdate.

•
mutation

Publishes a resource to a channel. If the resource is a product, then it's visible in the channel only if the product status is active. Products that are sold exclusively on subscription (requiresSellingPlan: true) can be published only on online stores.

•
mutation

Publishes a resource to current channel. If the resource is a product, then it's visible in the channel only if the product status is active. Products that are sold exclusively on subscription (requiresSellingPlan: true) can be published only on online stores.

•
mutation

Unpublishes a resource from a channel. If the resource is a product, then it's visible in the channel only if the product status is active.

•
mutation

Unpublishes a resource from the current channel. If the resource is a product, then it's visible in the channel only if the product status is active.

•
mutation

Creates a refund.

•
mutation

Creates a saved search.

•
mutation

Delete a saved search.

•
mutation

Updates a saved search.

•
mutation

Theme app extensions

Your app might not pass App Store review if it uses script tags instead of theme app extensions. All new apps, and apps that integrate with Online Store 2.0 themes, should use theme app extensions, such as app blocks or app embed blocks. Script tags are an alternative you can use with only vintage themes. Learn more.

Script tag deprecation

Script tags will be sunset for the Order status page on August 28, 2025. Upgrade to Checkout Extensibility before this date. Shopify Scripts will continue to work alongside Checkout Extensibility until August 28, 2025.

Creates a new script tag.

•
mutation

Theme app extensions

Your app might not pass App Store review if it uses script tags instead of theme app extensions. All new apps, and apps that integrate with Online Store 2.0 themes, should use theme app extensions, such as app blocks or app embed blocks. Script tags are an alternative you can use with only vintage themes. Learn more.

Script tag deprecation

Script tags will be sunset for the Order status page on August 28, 2025. Upgrade to Checkout Extensibility before this date. Shopify Scripts will continue to work alongside Checkout Extensibility until August 28, 2025.

Deletes a script tag.

•
mutation

Theme app extensions

Your app might not pass App Store review if it uses script tags instead of theme app extensions. All new apps, and apps that integrate with Online Store 2.0 themes, should use theme app extensions, such as app blocks or app embed blocks. Script tags are an alternative you can use with only vintage themes. Learn more.

Script tag deprecation

Script tags will be sunset for the Order status page on August 28, 2025. Upgrade to Checkout Extensibility before this date. Shopify Scripts will continue to work alongside Checkout Extensibility until August 28, 2025.

Updates a script tag.

•
mutation

Creates a segment.

•
mutation

Deletes a segment.

•
mutation

Updates a segment.

•
mutation

Deletes a shipping package.

•
mutation

Set a shipping package as the default. The default shipping package is the one used to calculate shipping costs on checkout.

•
mutation

Updates a shipping package.

•
mutation

Deletes a locale for a shop. This also deletes all translations of this locale.

•
mutation

Adds a locale for a shop. The newly added locale is in the unpublished state.

•
mutation

Updates a locale for a shop.

•
mutation

Creates staged upload targets for each input. This is the first step in the upload process. The returned staged upload targets' URL and parameter fields can be used to send a request to upload the file described in the corresponding input.

For more information on the upload process, refer to Upload media to Shopify.

•
mutation

Creates a storefront access token for use with the Storefront API.

An app can have a maximum of 100 active storefront access tokens for each shop.

Get started with the Storefront API.

•
mutation

Deletes a storefront access token.

•
mutation

Add tags to an order, a draft order, a customer, a product, or an online store article.

•
mutation

Remove tags from an order, a draft order, a customer, a product, or an online store article.

•
mutation

Asynchronously delete URL redirects in bulk.

•
mutation

Creates a new webhook subscription.

Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your shopify.app.toml may be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read About managing webhook subscriptions.

•
mutation

Deletes a webhook subscription.

Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your shopify.app.toml may be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read About managing webhook subscriptions.

•
mutation

Updates a webhook subscription.

Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your shopify.app.toml may be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read About managing webhook subscriptions.

Show
deprecated mutations Deprecated
•
mutationDeprecated

Publishes a collection to a channel. Use publishablePublish instead.

•
mutationDeprecated

Unpublishes a collection. Use publishableUnpublish instead.

•
mutationDeprecated

Creates a fulfillment for one or many fulfillment orders. The fulfillment orders are associated with the same order and are assigned to the same location. Use fulfillmentCreate instead.

•
mutationDeprecated

Updates tracking information for a fulfillment. Use fulfillmentTrackingInfoUpdate instead.

•
mutationDeprecated

Disable a gift card. A disabled gift card cannot be used by a customer. A disabled gift card cannot be re-enabled. Use giftCardDeactivate instead.

•
mutationDeprecated

Deletes a metafield. This mutation will be removed in a future version. Use metafieldsDelete instead.

•
mutationDeprecated

Creates a MetafieldStorefrontVisibility record to make all metafields that belong to the specified resource and have the established namespace and key combination visible in the Storefront API. This mutation will be removed in a future version. Use the metafieldDefinitionCreate or metafieldDefinitionUpdate mutations with access.storefront set instead.

•
mutationDeprecated

Deletes a MetafieldStorefrontVisibility record. All metafields that belongs to the specified record will no longer be visible in the Storefront API. This mutation will be removed in a future version. Use the metafieldDefinitionUpdate mutation with access.storefront set instead.

•
mutationDeprecated

Removes a line item discount that was applied as part of an order edit. Use orderEditRemoveDiscount instead.

•
mutationDeprecated

Activate a price rule. Use discountCodeActivate instead.

•
mutationDeprecated

Create a price rule using the input. Use discountCodeBasicCreate instead.

•
mutationDeprecated

Deactivate a price rule. Use discountCodeDeactivate instead.

•
mutationDeprecated

Delete a price rule. Use discountCodeDelete instead.

•
mutationDeprecated

Create a discount code for a price rule. Use discountRedeemCodeBulkAdd instead.

•
mutationDeprecated

Update a discount code for a price rule. Use discountCodeBasicUpdate instead.

•
mutationDeprecated

Updates a price rule using its ID and an input. Use discountCodeBasicUpdate instead.

•
mutationDeprecated

Deletes a private metafield. Private metafields are automatically deleted when the app that created them is uninstalled. Metafields created using a reserved namespace are private by default. See our guide for migrating private metafields.

•
mutationDeprecated

Creates or updates a private metafield. Use private metafields when you don't want the metafield data to be accessible by merchants or other apps. Private metafields are accessible only by the application that created them and only from the GraphQL Admin API.

An application can create a maximum of 10 private metafields per shop resource. Metafields created using a reserved namespace are private by default. See our guide for migrating private metafields.

•
mutationDeprecated

Appends images to a product. Use productUpdate or productSet instead.

•
mutationDeprecated

Creates media for a product. Use productUpdate or productSet instead.

•
mutationDeprecated

Removes product images from the product. Use productDeleteMedia instead.

•
mutationDeprecated

Deletes media for a product. Use fileUpdate instead.

•
mutationDeprecated

Updates an image of a product. Use productUpdateMedia instead.

•
mutationDeprecated

Publishes a product. Products that are sold exclusively on subscription (requiresSellingPlan: true) can only be published on online stores. Use publishablePublish instead.

•
mutationDeprecated

Asynchronously reorders a set of images for a given product. Use productReorderMedia instead.

•
mutationDeprecated

Unpublishes a product. Use publishableUnpublish instead.

•
mutationDeprecated

Updates media for a product. Use fileUpdate instead.

•
mutationDeprecated

Creates a product variant. Use productVariantsBulkCreate instead.

•
mutationDeprecated

Deletes a product variant. Use productVariantsBulkDelete instead.

•
mutationDeprecated

Updates a product variant. Use productVariantsBulkUpdate instead.

•
mutationDeprecated

Generates the URL and signed paramaters needed to upload an asset to Shopify. Use stagedUploadsCreate instead.

•
mutationDeprecated

Uploads multiple images. Use stagedUploadsCreate instead.


Was this section helpful?


Was this section helpful?