Skip to main content
object

A job corresponds to some long running task that the client should poll for status.

•Boolean!non-null

This indicates if the job is still queued or has been run.

•ID!non-null

A globally-unique ID that's returned when running an asynchronous mutation.

•QueryRoot

This field will only resolve once the job is done. Can be used to ask for object(s) that have been changed by the job.


Was this section helpful?

•query

Returns a Job resource by ID. Used to check the status of internal jobs and any applicable changes.


Was this section helpful?

•mutation

Asynchronously adds a set of products to a given collection. It can take a long time to run. Instead of returning a collection, it returns a job which should be polled.

Arguments

•ID!required

The ID of the collection that's being updated.

•[ID!]!required

The IDs of the products that are being added to the collection. If the collection's sort order is manual, the products will be added in the order in which they are provided.


Fields

•Job

The asynchronous job adding the products.

•[CollectionAddProductsV2UserError!]!non-null

The list of errors that occurred from executing the mutation.

•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.

Arguments

•ID!required

The ID of the collection to remove products from. The ID must reference an existing manual collection.

•[ID!]!required

The IDs of products to remove from the collection. The mutation doesn't validate that the products belong to the collection or whether the products exist.


Fields

•Job

The asynchronous job removing the products.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•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.

Arguments

•ID!required

The ID of the collection on which to reorder products.

•[MoveInput!]!required

A list of moves to perform, which will be evaluated in order. Up to 250 moves are supported, the newPosition does not have to be unique.


Fields

•Job

The asynchronous job reordering the products.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Updates a collection.

Arguments

•CollectionInput!required

The updated properties for the collection.


Fields

•Collection

The updated collection.

•Job

The asynchronous job updating the products based on the new rule set.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Merges two customers.

Arguments

•ID!required

The ID of the first customer that will be merged.

•ID!required

The ID of the second customer that will be merged.

•CustomerMergeOverrideFields

The fields to override the default customer merge rules.


Fields

•Job

The asynchronous job for merging the customers.

•ID

The ID of the customer resulting from the merge.

•[CustomerMergeUserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Enqueue the removal of a delivery profile.

Arguments

•ID!required

The ID of the delivery profile to remove.


Fields

•Job

The delivery profile deletion job triggered by the mutation.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•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.

Arguments

•[ID!]

The IDs of the automatic discounts to delete.

•ID

The ID of the saved search to use for filtering automatic discounts to delete.

•String

The search query for filtering automatic discounts to delete.

For more information on the list of supported fields and search syntax, refer to the AutomaticDiscountNodes query section.


Fields

•Job

The asynchronous job removing the automatic discounts.

•[DiscountUserError!]!non-null

The list of errors that occurred from executing the 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.

Arguments

•[ID!]

The IDs of the discounts to activate.

•ID

The ID of the saved search for filtering discounts to activate. Saved searches represent customer segments that merchants have built in the Shopify admin.

•String

The search query for filtering discounts.

For more information on the list of supported fields and search syntax, refer to the codeDiscountNodes query.


Fields

•Job

The asynchronous job that activates the discounts.

•[DiscountUserError!]!non-null

The list of errors that occurred from executing the mutation.

•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.

Arguments

•[ID!]

The IDs of the discounts to deactivate.

•ID

The ID of the saved search for filtering discounts to deactivate. Saved searches represent customer segments that merchants have built in the Shopify admin.

•String

The search query for filtering discounts.

For more information on the list of supported fields and search syntax, refer to the codeDiscountNodes query.


Fields

•Job

The asynchronous job that deactivates the discounts.

•[DiscountUserError!]!non-null

The list of errors that occurred from executing the mutation.

•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.

Arguments

•[ID!]

The IDs of the discounts to delete.

•ID

The ID of the saved search for filtering discounts to delete. Saved searches represent customer segments that merchants have built in the Shopify admin.

•String

The search query for filtering discounts.

For more information on the list of supported fields and search syntax, refer to the codeDiscountNodes query.


Fields

•Job

The asynchronous job that deletes the discounts.

•[DiscountUserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

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

Arguments

•ID!required

The ID of the DiscountCodeNode object that the codes will be removed from. For example, gid://shopify/DiscountCodeNode/123. You can use the codeDiscountNodes query to retrieve the ID.

•[ID!]

The IDs of the DiscountRedeemCode objects to delete. For example, gid://shopify/DiscountRedeemCode/123. You can use the codeDiscountNodes query to retrieve the ID.

•ID

The ID of a saved search.

•String

A filter made up of terms, connectives, modifiers, and comparators that you can use to search for code discounts. You can apply one or more filters to a query. Learn more about Shopify API search syntax.

For a list of accepted values for the search field, refer to the query argument on the codeDiscountNodes query.


Fields

•Job

The asynchronous job that deletes the discount codes.

•[DiscountUserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Adds tags to multiple draft orders.

Arguments

•[ID!]

The IDs of the draft orders to add tags to.

•ID

The ID of the draft order saved search for filtering draft orders on.

•String

The conditions for filtering draft orders on. See the detailed search syntax.

•[String!]!required

List of tags to be added.


Fields

•Job

The asynchronous job for adding tags to the draft orders.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Deletes multiple draft orders.

Arguments

•[ID!]

The IDs of the draft orders to delete.

•ID

The ID of the draft order saved search for filtering draft orders on.

•String

The conditions for filtering draft orders on. See the detailed search syntax.


Fields

•Job

The asynchronous job for deleting the draft orders.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Removes tags from multiple draft orders.

Arguments

•[ID!]

The IDs of the draft orders to remove tags from.

•ID

The ID of the draft order saved search for filtering draft orders on.

•String

The conditions for filtering draft orders on. See the detailed search syntax.

•[String!]!required

List of tags to be removed.


Fields

•Job

The asynchronous job for removing tags from the draft orders.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Deletes all external marketing activities. Deletion is performed by a background job, as it may take a bit of time to complete if a large number of activities are to be deleted. Attempting to create or modify external activities before the job has completed will result in the create/update/upsert mutation returning an error.

•Job

The asynchronous job that performs the deletion. The status of the job may be used to determine when it's safe again to create new activities.

•[MarketingActivityUserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Updates a metafield definition.

Arguments

•MetafieldDefinitionUpdateInput!required

The input fields for the metafield definition update.


Fields

•MetafieldDefinition

The metafield definition that was updated.

•[MetafieldDefinitionUpdateUserError!]!non-null

The list of errors that occurred from executing the mutation.

•Job

The asynchronous job updating the metafield definition's validation_status.

•mutation

Asynchronously delete metaobjects and their associated metafields in bulk.

Arguments

•MetaobjectBulkDeleteWhereCondition!required

Specifies the condition by which metaobjects are deleted. Exactly one field of input is required.


Fields

•Job

The asynchronous job that deletes the metaobjects.

•[MetaobjectUserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Cancels an order.

Arguments

•BooleanDefault:false

Whether to send a notification to the customer about the order cancellation.

•ID!required

The ID of the order to be canceled.

•OrderCancelReason!required

The reason for canceling the order.

•Boolean!required

Indicates whether to refund the amount paid by the customer. Authorized payments will be voided regardless of this setting.

•Boolean!required

Whether to restock the inventory committed to the order. For unpaid orders fulfilled from locations that have been deactivated, inventory will not be restocked to the deactivated locations even if this argument is set to true.

•StringDefault:null

A staff-facing note about the order cancellation. This is not visible to the customer.


Fields

•Job

The job that asynchronously cancels the order.

Anchor to orderCancelUserErrorsorderCancelUserErrors
•[OrderCancelUserError!]!non-null

The list of errors that occurred from executing the mutation.

•[UserError!]!non-nullDeprecated
•mutation

Creates a payment for an order by mandate.

Arguments

•MoneyInput

The payment amount to collect.

•BooleanDefault:true

Whether the payment should be authorized or captured. If false, then the authorization of the payment is triggered.

•ID!required

The ID of the order to collect the balance for.

•String!required

A unique key to identify the payment request.

•ID!required

The mandate ID used for payment.

•ID

The ID of the payment schedule to collect the balance for.


Fields

•Job

The async job used for charging the payment.

•String

The Unique ID for the created payment.

•[OrderCreateMandatePaymentUserError!]!non-null

The list of errors that occurred from executing the 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.

Arguments

•BooleanDefault:false

Specifies whether or not to duplicate images.

•BooleanDefault:false

Specifies whether or not to duplicate translations.

•ProductStatus

The new status of the product. If no value is provided the status will be inherited from the original product.

•String!required

The new title of the product.

•ID!required

The ID of the product to be duplicated.

•BooleanDefault:true

Specifies whether or not to run the mutation synchronously.


Fields

•Job

The asynchronous job that duplicates the product images.

•Product

The duplicated product.

Anchor to productDuplicateOperationproductDuplicateOperation
•ProductDuplicateOperation

The product duplicate operation, returned when run in asynchronous mode.

•Shop!non-null

The user's shop.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Asynchronously reorders the media attached to a product.

Arguments

•ID!required

The ID of the product on which to reorder medias.

•[MoveInput!]!required

A list of moves to perform which will be evaluated in order.


Fields

•Job

The asynchronous job which reorders the media.

•[MediaUserError!]!non-null

The list of errors that occurred from executing the mutation.

•[UserError!]!non-nullDeprecated
•mutation

Asynchronously queries and charges all subscription billing cycles whose billingAttemptExpectedDate values fall within a specified date range and meet additional filtering criteria. The results of this action can be retrieved using the subscriptionBillingCycleBulkResults query.

Arguments

Anchor to billingAttemptExpectedDateRangebillingAttemptExpectedDateRange
•SubscriptionBillingCyclesDateRangeSelector!required

Specifies the date range within which the billingAttemptExpectedDate values of the billing cycles should fall.

•SubscriptionBillingCycleBulkFilters

Criteria to filter the billing cycles on which the action is executed.

•SubscriptionBillingAttemptInventoryPolicyDefault:PRODUCT_VARIANT_INVENTORY_POLICY

The behaviour to use when updating inventory.


Fields

•Job

The asynchronous job that performs the action on the targeted billing cycles.

•[SubscriptionBillingCycleBulkUserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Asynchronously queries all subscription billing cycles whose billingAttemptExpectedDate values fall within a specified date range and meet additional filtering criteria. The results of this action can be retrieved using the subscriptionBillingCycleBulkResults query.

Arguments

Anchor to billingAttemptExpectedDateRangebillingAttemptExpectedDateRange
•SubscriptionBillingCyclesDateRangeSelector!required

Specifies the date range within which the billingAttemptExpectedDate values of the billing cycles should fall.

•SubscriptionBillingCycleBulkFilters

Criteria to filter the billing cycles on which the action is executed.


Fields

•Job

The asynchronous job that performs the action on the targeted billing cycles.

•[SubscriptionBillingCycleBulkUserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Create or update theme files.

Arguments

•[OnlineStoreThemeFilesUpsertFileInput!]!required

The files to update.

•ID!required

The theme to update.


Fields

•Job

The theme files write job triggered by the mutation.

•[OnlineStoreThemeFileOperationResult!]

The resulting theme files.

•[OnlineStoreThemeFilesUserErrors!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Asynchronously delete URL redirects in bulk.

•Job

The asynchronous job removing the redirects.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Asynchronously delete URLRedirect objects in bulk by IDs. Learn more about URLRedirect objects.

Arguments

•[ID!]!required

A list of URLRedirect object IDs to delete.


Fields

•Job

The asynchronous job removing the redirects.

•[UrlRedirectBulkDeleteByIdsUserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Asynchronously delete redirects in bulk.

Arguments

•ID!required

The ID of the URL redirect saved search for filtering.


Fields

•Job

The asynchronous job removing the redirects.

•[UrlRedirectBulkDeleteBySavedSearchUserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Asynchronously delete redirects in bulk.

Arguments

•String!required

Search query for filtering redirects on (both Redirect from and Redirect to fields).


Fields

•Job

The asynchronous job removing the redirects.

•[UrlRedirectBulkDeleteBySearchUserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Submits a UrlRedirectImport request to be processed.

The UrlRedirectImport request is first created with the urlRedirectImportCreate mutation.

Arguments

•ID!required

The ID of the UrlRedirectImport object.


Fields

•Job

The asynchronous job importing the redirects.

•[UrlRedirectImportUserError!]!non-null

The list of errors that occurred from executing the mutation.


Was this section helpful?
OSZAR »