A job corresponds to some long running task that the client should poll for status.
Anchor to FieldsFields
- Anchor to donedone•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.
- Anchor to queryquery•Query
Root 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.
Anchor to QueriesQueries
- •query
Returns a Job resource by ID. Used to check the status of internal jobs and any applicable changes.
Anchor to MutationsMutations
- •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.
- •ID!required
The ID of the collection that's being updated.
- Anchor to productIdsproduct•[ID!]!required
Ids 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.
Arguments
- •Job
The asynchronous job adding the products.
- Anchor to userErrorsuser•[Collection
Errors Add Products V2User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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.
- •ID!required
The ID of the collection to remove products from. The ID must reference an existing manual collection.
- Anchor to productIdsproduct•[ID!]!required
Ids 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.
Arguments
- •Job
The asynchronous job removing the products.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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
must be
. Displaced products will have their position altered in a consistent manner, with no gaps.
- •ID!required
The ID of the collection on which to reorder products.
- Anchor to movesmoves•[Move
Input!]!required A list of moves to perform, which will be evaluated in order. Up to 250 moves are supported, the
does not have to be unique.
Arguments
- •Job
The asynchronous job reordering the products.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Updates a collection.
- Anchor to inputinput•Collection
Input!required The updated properties for the collection.
Arguments
- Anchor to collectioncollection•Collection
The updated collection.
- •Job
The asynchronous job updating the products based on the new rule set.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Merges two customers.
- Anchor to customerOneIdcustomer•ID!required
One Id The ID of the first customer that will be merged.
- Anchor to customerTwoIdcustomer•ID!required
Two Id The ID of the second customer that will be merged.
- Anchor to overrideFieldsoverride•Customer
Fields Merge Override Fields The fields to override the default customer merge rules.
Arguments
- •Job
The asynchronous job for merging the customers.
- Anchor to resultingCustomerIdresulting•ID
Customer Id The ID of the customer resulting from the merge.
- Anchor to userErrorsuser•[Customer
Errors Merge User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Enqueue the removal of a delivery profile.
- •ID!required
The ID of the delivery profile to remove.
Arguments
- •Job
The delivery profile deletion job triggered by the mutation.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Asynchronously delete automatic discounts in bulk if a
search
orargument 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.- •[ID!]
The IDs of the automatic discounts to delete.
- Anchor to savedSearchIdsaved•ID
Search Id The ID of the saved search to use for filtering automatic discounts to delete.
- Anchor to searchsearch•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.
Arguments
- •Job
The asynchronous job removing the automatic discounts.
- Anchor to userErrorsuser•[Discount
Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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.
- •[ID!]
The IDs of the discounts to activate.
- Anchor to savedSearchIdsaved•ID
Search 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.
- Anchor to searchsearch•String
Arguments
- •Job
The asynchronous job that activates the discounts.
- Anchor to userErrorsuser•[Discount
Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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.
- •[ID!]
The IDs of the discounts to deactivate.
- Anchor to savedSearchIdsaved•ID
Search 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.
- Anchor to searchsearch•String
Arguments
- •Job
The asynchronous job that deactivates the discounts.
- Anchor to userErrorsuser•[Discount
Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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.
- •[ID!]
The IDs of the discounts to delete.
- Anchor to savedSearchIdsaved•ID
Search 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.
- Anchor to searchsearch•String
Arguments
- •Job
The asynchronous job that deletes the discounts.
- Anchor to userErrorsuser•[Discount
Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Asynchronously delete discount codes in bulk that customers can use to redeem a discount.
- Anchor to discountIddiscount•ID!required
Id The ID of the
object that the codes will be removed from. For example,
. You can use the
query to retrieve the ID.
- Anchor to savedSearchIdsaved•ID
Search Id The ID of a saved search.
- Anchor to searchsearch•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 thequery
argument on thequery.
Arguments
- •Job
The asynchronous job that deletes the discount codes.
- Anchor to userErrorsuser•[Discount
Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Adds tags to multiple draft orders.
- •[ID!]
The IDs of the draft orders to add tags to.
- Anchor to savedSearchIdsaved•ID
Search Id The ID of the draft order saved search for filtering draft orders on.
- Anchor to searchsearch•String
The conditions for filtering draft orders on. See the detailed search syntax.
- •[String!]!required
List of tags to be added.
Arguments
- •Job
The asynchronous job for adding tags to the draft orders.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Deletes multiple draft orders.
- •[ID!]
The IDs of the draft orders to delete.
- Anchor to savedSearchIdsaved•ID
Search Id The ID of the draft order saved search for filtering draft orders on.
- Anchor to searchsearch•String
The conditions for filtering draft orders on. See the detailed search syntax.
Arguments
- •Job
The asynchronous job for deleting the draft orders.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Removes tags from multiple draft orders.
- •[ID!]
The IDs of the draft orders to remove tags from.
- Anchor to savedSearchIdsaved•ID
Search Id The ID of the draft order saved search for filtering draft orders on.
- Anchor to searchsearch•String
The conditions for filtering draft orders on. See the detailed search syntax.
- •[String!]!required
List of tags to be removed.
Arguments
- •Job
The asynchronous job for removing tags from the draft orders.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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.
- Anchor to userErrorsuser•[Marketing
Errors Activity User Error!]!non-null The list of errors that occurred from executing the mutation.
- •mutation
Updates a metafield definition.
- Anchor to definitiondefinition•Metafield
Definition Update Input!required The input fields for the metafield definition update.
Arguments
- Anchor to updatedDefinitionupdated•Metafield
Definition Definition The metafield definition that was updated.
- Anchor to userErrorsuser•[Metafield
Errors Definition Update User Error!]!non-null The list of errors that occurred from executing the mutation.
- Anchor to validationJobvalidation•Job
Job The asynchronous job updating the metafield definition's validation_status.
Fields
- •mutation
Asynchronously delete metaobjects and their associated metafields in bulk.
- Anchor to wherewhere•Metaobject
Bulk Delete Where Condition!required Specifies the condition by which metaobjects are deleted. Exactly one field of input is required.
Arguments
- •Job
The asynchronous job that deletes the metaobjects.
- Anchor to userErrorsuser•[Metaobject
Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Cancels an order.
- Anchor to notifyCustomernotify•BooleanDefault:false
Customer Whether to send a notification to the customer about the order cancellation.
- Anchor to orderIdorder•ID!required
Id The ID of the order to be canceled.
- Anchor to reasonreason•Order
Cancel Reason!required The reason for canceling the order.
- Anchor to refundrefund•Boolean!required
Indicates whether to refund the amount paid by the customer. Authorized payments will be voided regardless of this setting.
- Anchor to restockrestock•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.
- Anchor to staffNotestaff•StringDefault:null
Note A staff-facing note about the order cancellation. This is not visible to the customer.
Arguments
- •Job
The job that asynchronously cancels the order.
- Anchor to orderCancelUserErrorsorder•[Order
Cancel User Errors Cancel User Error!]!non-null The list of errors that occurred from executing the mutation.
- Anchor to userErrorsuser•[User
Errors Error!]!non-nullDeprecated
Fields
- •mutation
Creates a payment for an order by mandate.
- Anchor to amountamount•Money
Input The payment amount to collect.
- Anchor to autoCaptureauto•BooleanDefault:true
Capture 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.
- Anchor to idempotencyKeyidempotency•String!required
Key A unique key to identify the payment request.
- Anchor to mandateIdmandate•ID!required
Id The mandate ID used for payment.
- Anchor to paymentScheduleIdpayment•ID
Schedule Id The ID of the payment schedule to collect the balance for.
Arguments
- •Job
The async job used for charging the payment.
- Anchor to paymentReferenceIdpayment•String
Reference Id The Unique ID for the created payment.
- Anchor to userErrorsuser•[Order
Errors Create Mandate Payment User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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
.
Metafield values are not duplicated if the unique values capability is enabled.
- Anchor to includeImagesinclude•BooleanDefault:false
Images Specifies whether or not to duplicate images.
- Anchor to includeTranslationsinclude•BooleanDefault:false
Translations Specifies whether or not to duplicate translations.
- Anchor to newStatusnew•Product
Status Status The new status of the product. If no value is provided the status will be inherited from the original product.
- Anchor to newTitlenew•String!required
Title The new title of the product.
- Anchor to productIdproduct•ID!required
Id The ID of the product to be duplicated.
- Anchor to synchronoussynchronous•BooleanDefault:true
Specifies whether or not to run the mutation synchronously.
Arguments
- Anchor to imageJobimage•Job
Job The asynchronous job that duplicates the product images.
- Anchor to newProductnew•Product
Product The duplicated product.
- Anchor to productDuplicateOperationproduct•Product
Duplicate Operation Duplicate Operation The product duplicate operation, returned when run in asynchronous mode.
- Anchor to shopshop•Shop!non-null
The user's shop.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Asynchronously reorders the media attached to a product.
- •ID!required
The ID of the product on which to reorder medias.
- Anchor to movesmoves•[Move
Input!]!required A list of moves to perform which will be evaluated in order.
Arguments
- •Job
The asynchronous job which reorders the media.
- Anchor to mediaUserErrorsmedia•[Media
User Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
- Anchor to userErrorsuser•[User
Errors Error!]!non-nullDeprecated
Fields
- •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.
- Anchor to billingAttemptExpectedDateRangebilling•Subscription
Attempt Expected Date Range Billing Cycles Date Range Selector!required Specifies the date range within which the
values of the billing cycles should fall.
- Anchor to filtersfilters•Subscription
Billing Cycle Bulk Filters Criteria to filter the billing cycles on which the action is executed.
- Anchor to inventoryPolicyinventory•Subscription
Policy Billing Attempt Inventory PolicyDefault:PRODUCT_VARIANT_INVENTORY_POLICY The behaviour to use when updating inventory.
Arguments
- •Job
The asynchronous job that performs the action on the targeted billing cycles.
- Anchor to userErrorsuser•[Subscription
Errors Billing Cycle Bulk User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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.
- Anchor to billingAttemptExpectedDateRangebilling•Subscription
Attempt Expected Date Range Billing Cycles Date Range Selector!required Specifies the date range within which the
values of the billing cycles should fall.
- Anchor to filtersfilters•Subscription
Billing Cycle Bulk Filters Criteria to filter the billing cycles on which the action is executed.
Arguments
- •Job
The asynchronous job that performs the action on the targeted billing cycles.
- Anchor to userErrorsuser•[Subscription
Errors Billing Cycle Bulk User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Create or update theme files.
- Anchor to filesfiles•[Online
Store Theme Files Upsert File Input!]!required The files to update.
- Anchor to themeIdtheme•ID!required
Id The theme to update.
Arguments
- •Job
The theme files write job triggered by the mutation.
- Anchor to upsertedThemeFilesupserted•[Online
Theme Files Store Theme File Operation Result!] The resulting theme files.
- Anchor to userErrorsuser•[Online
Errors Store Theme Files User Errors!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Asynchronously delete URL redirects in bulk.
- •Job
The asynchronous job removing the redirects.
- Anchor to userErrorsuser•[User
Errors Error!]!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.
- •[ID!]!required
Arguments
- •Job
The asynchronous job removing the redirects.
- Anchor to userErrorsuser•[Url
Errors Redirect Bulk Delete By Ids User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Asynchronously delete redirects in bulk.
- Anchor to savedSearchIdsaved•ID!required
Search Id The ID of the URL redirect saved search for filtering.
Arguments
- •Job
The asynchronous job removing the redirects.
- Anchor to userErrorsuser•[Url
Errors Redirect Bulk Delete By Saved Search User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Asynchronously delete redirects in bulk.
- Anchor to searchsearch•String!required
Search query for filtering redirects on (both Redirect from and Redirect to fields).
Arguments
- •Job
The asynchronous job removing the redirects.
- Anchor to userErrorsuser•[Url
Errors Redirect Bulk Delete By Search User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
- •ID!required
Arguments
- •Job
The asynchronous job importing the redirects.
- Anchor to userErrorsuser•[Url
Errors Redirect Import User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields