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•
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•
Ids [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.
Arguments
- •
The asynchronous job adding the products.
- Anchor to userErrorsuser•
Errors 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•
Ids [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.
Arguments
- •
The asynchronous job removing the products.
- Anchor to userErrorsuser•
Errors [UserError!]!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
- •
The asynchronous job reordering the products.
- Anchor to userErrorsuser•
Errors [UserError!]!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•
The updated collection.
- •
The asynchronous job updating the products based on the new rule set.
- Anchor to userErrorsuser•
Errors [UserError!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Merges two customers.
- Anchor to customerOneIdcustomer•
One Id ID!required The ID of the first customer that will be merged.
- Anchor to customerTwoIdcustomer•
Two Id ID!required The ID of the second customer that will be merged.
- Anchor to overrideFieldsoverride•
Fields The fields to override the default customer merge rules.
Arguments
- •
The asynchronous job for merging the customers.
- Anchor to resultingCustomerIdresulting•
Customer Id The ID of the customer resulting from the merge.
- Anchor to userErrorsuser•
Errors [CustomerMerge 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
- •
The delivery profile deletion job triggered by the mutation.
- Anchor to userErrorsuser•
Errors [UserError!]!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.- •
The IDs of the automatic discounts to delete.
- Anchor to savedSearchIdsaved•
Search Id The ID of the saved search to use for filtering automatic discounts to delete.
- Anchor to searchsearch•
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
- •
The asynchronous job removing the automatic discounts.
- Anchor to userErrorsuser•
Errors [DiscountUser 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.
- •
The IDs of the discounts to activate.
- Anchor to savedSearchIdsaved•
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•
Arguments
- •
The asynchronous job that activates the discounts.
- Anchor to userErrorsuser•
Errors [DiscountUser 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.
- •
The IDs of the discounts to deactivate.
- Anchor to savedSearchIdsaved•
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•
Arguments
- •
The asynchronous job that deactivates the discounts.
- Anchor to userErrorsuser•
Errors [DiscountUser 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.
- •
The IDs of the discounts to delete.
- Anchor to savedSearchIdsaved•
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•
Arguments
- •
The asynchronous job that deletes the discounts.
- Anchor to userErrorsuser•
Errors [DiscountUser 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 ID!required The ID of the
object that the codes will be removed from. For example,
. You can use the
query to retrieve the ID.
- •
The IDs of the
objects to delete. For example,
. You can use the
query to retrieve the ID.
- Anchor to savedSearchIdsaved•
Search Id The ID of a saved search.
- Anchor to searchsearch•
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
- •
The asynchronous job that deletes the discount codes.
- Anchor to userErrorsuser
Errors
Fields