User Error
An error in the input of a mutation. Mutations return objects to indicate validation failures, such as invalid field values or business logic violations, that prevent the operation from completing.
Anchor to FieldsFields
- Anchor to fieldfield•[String!]
The path to the input field that caused the error.
- Anchor to messagemessage•String!non-null
The error message.
Anchor to MutationsMutations
- •mutation
Creates a one-time charge for app features or services that don't require recurring billing. This mutation is ideal for apps that sell individual features, premium content, or services on a per-use basis rather than subscription models.
For example, a design app might charge merchants once for premium templates, or a marketing app could bill for individual campaign setups without ongoing monthly fees.
Use the
mutation to:- Charge for premium features or content purchases
- Bill for professional services or setup fees
- Generate revenue from one-time digital product sales
The mutation returns a confirmation URL that merchants must visit to approve the charge. Test and development stores are not charged, allowing safe testing of billing flows.
Explore one-time billing options on the app purchases page.
- Anchor to namename•String!required
The name of the one-time purchase from the app.
- Anchor to priceprice•Money
Input! required The amount to be charged to the store for the app one-time purchase.
- Anchor to returnUrlreturn•URL!
Url required The URL where the merchant is redirected after approving the app one-time purchase.
- Anchor to testtest•BooleanDefault:false
Whether the app one-time purchase is a test transaction.
Arguments
- •mutation
Cancels an active app subscription, stopping future billing cycles. The cancellation behavior depends on the
setting - it can either disable auto-renewal (allowing the subscription to continue until the end of the current billing period) or immediately cancel with prorated refunds.When a merchant decides to discontinue using subscription features, this mutation provides a clean cancellation workflow that respects billing periods and merchant expectations.
Use the
mutation to:- Process merchant-initiated subscription cancellations
- Terminate subscriptions due to policy violations or account issues
- Handle subscription cancellations during app uninstallation workflows
The cancellation timing and merchant access depends on the
setting and the app's specific implementation of subscription management.For subscription lifecycle management and cancellation best practices, consult the subscription management guide.
- •ID!required
The ID of the app subscription to be cancelled.
- Anchor to prorateprorate•BooleanDefault:false
Whether to issue prorated credits for the unused portion of the app subscription. There will be a corresponding deduction (based on revenue share) to your Partner account. For example, if a $10.00 app subscription (with 0% revenue share) is cancelled and prorated half way through the billing cycle, then the merchant will be credited $5.00 and that amount will be deducted from your Partner account.
Arguments
- •mutation
Creates a recurring or usage-based
that charges merchants for app features and services. The subscription includes one or moreobjects that define the pricing structure, billing intervals, and optionalvalues.Returns a confirmation URL where the merchant approves or declines the charges. After approval, the subscription becomes active and billing begins after any trial period expires. You can specify
to control how this subscription interacts with existing active subscriptions.Learn more about creating app subscriptions.
- Anchor to namename•String!required
A descriptive name for the app subscription.
- Anchor to lineItemsline•[App
Items Subscription Line Item Input!]! required Attaches one or more pricing plans to an app subscription. Only one pricing plan can be defined for each available type.
- Anchor to testtest•BooleanDefault:false
Whether the app subscription is a test transaction.
- Anchor to trialDaystrial•Int
Days The number of days of the free trial period, beginning on the day that the merchant approves the app charges.
- Anchor to returnUrlreturn•URL!
Url required The URL pointing to the page where the merchant is redirected after approving the app subscription.
- Anchor to replacementBehaviorreplacement•App
Behavior Subscription Replacement Behavior Default:STANDARD The replacement behavior when creating an app subscription for a merchant with an already existing app subscription.
Arguments
- •mutation
Updates the capped amount on usage-based billing for an
. Enables you to modify the maximum charge limit that prevents merchants from exceeding a specified threshold during their billing period.The mutation returns a confirmation URL where the merchant must approve the new pricing limit before it takes effect. Use this when adjusting usage limits based on merchant needs or changing pricing models.
Learn more about updating the maximum charge for a subscription.
- •ID!required
The ID of the app subscription line item to be updated.
- Anchor to cappedAmountcapped•Money
Amount Input! required The new maximum amount of usage charges that can be incurred within a subscription billing interval.
Arguments
- •ID!
- •mutation
Creates a usage charge for an app subscription with usage-based pricing. The charge counts toward the capped amount limit set when creating the subscription.
Usage records track consumption of app features or services on a per-use basis. You provide the charge amount, a description of what you consumed, and the subscription line item ID. The optional
parameter prevents duplicate charges if you send the same request multiple times.If the new charge would cause total usage charges in the current billing interval to exceed the capped amount, then the mutation returns an error.
Learn more about creating usage-based subscriptions.
- Anchor to subscriptionLineItemIdsubscription•ID!
Line Item Id required The ID of the app subscription line item to create the usage record under. This app subscription line item must have a usage pricing plan.
- Anchor to priceprice•Money
Input! required The price of the app usage record.
- Anchor to descriptiondescription•String!required
The description of the app usage record.
- Anchor to idempotencyKeyidempotency•String
Key A unique key generated by the client to avoid duplicate charges. Maximum length of 255 characters.
Arguments
- •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.
- •ID!required
The ID of the bulk operation to cancel.
Arguments
- •ID!
- •mutation
Adds multiple products to an existing collection in a single operation. This mutation provides an efficient way to bulk-manage collection membership without individual product updates.
For example, when merchants create seasonal collections, they can add dozens of related products at once rather than updating each product individually. A clothing store might add all winter jackets to a "Winter Collection" in one operation.
Use
to:- Bulk-add products to collections for efficient catalog management
- Implement collection building tools in admin interfaces
- Organize collection membership during bulk product operations
- Reduce API calls when managing large product sets
The mutation processes multiple product additions and returns success status along with any errors encountered during the operation. Products are added to the collection while preserving existing collection settings.
This operation only works with manual collections where merchants explicitly choose which products to include. It will return an error if used with smart collections that automatically include products based on conditions.
Learn more about collection management.
- •ID!required
The ID of the collection that's being updated. This can't be a smart collection.
- Anchor to productIdsproduct•[ID!]!
Ids required The IDs of the products that are being added to the collection. If any of the products is already present in the input collection, then an error is raised and no products are added.
Arguments
- •mutation
Creates a collection to group products together in the online store and other sales channels. For example, an athletics store might create different collections for running attire, shoes, and accessories.
There are two types of collections:
- Custom (manual) collections: You specify the products to include in a collection.
- Smart (automated) collections: You define rules, and products matching those rules are automatically included in the collection.
Use the
mutation when you need to:- Create a new collection for a product launch or campaign
- Organize products by category, season, or promotion
- Automate product grouping using rules (for example, by tag, type, or price)
NoteLearn more about using metafields with smart collections.
- Anchor to inputinput•Collection
Input! required The properties to use when creating the collection.
Arguments
- •mutation
Deletes a collection and removes it permanently from the store. This operation cannot be undone and will remove the collection from all sales channels where it was published.
For example, when merchants discontinue seasonal promotions or reorganize their catalog structure, they can delete outdated collections like "Back to School 2023" to keep their store organized.
Use
to:- Remove outdated or unused collections from stores
- Clean up collection structures during catalog reorganization
- Implement collection management tools with deletion capabilities
Products within the deleted collection remain in the store but are no longer grouped under that collection.
Learn more about collection management.
- Anchor to inputinput•Collection
Delete Input! required The collection to delete.
Arguments
- •mutation
Removes multiple products from a collection in a single operation. This mutation can process large product sets (up to 250 products) and may take significant time to complete for collections with many products.
For example, when ending a seasonal promotion, merchants can remove all sale items from a "Summer Clearance" collection at once rather than editing each product individually.
Use
to:- Bulk-remove products from collections efficiently
- Clean up collection membership during catalog updates
- Implement automated collection management workflows
The operation processes asynchronously to avoid timeouts and performance issues, especially for large product sets.
Learn more about collection management.
- •ID!required
The ID of the collection to remove products from. The ID must reference an existing manual collection.
- Anchor to productIdsproduct•[ID!]!
Ids 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
- •mutation
Updates a collection, modifying its properties, products, or publication settings. Collections help organize products together in the online store and other sales channels.
Use the
mutation to programmatically modify collections in scenarios such as:- Updating collection details, like title, description, or image
- Modifying SEO metadata for better search visibility
- Changing which products are included (using rule updates for smart collections)
- Publishing or unpublishing collections across different sales channels
- Updating custom data using metafields
There are two types of collections with different update capabilities:
- Custom (manual) collections: You can update collection properties, but rule sets can't be modified since products are manually selected.
- Smart (automated) collections: You can update both collection properties and the rules that automatically determine which products are included.
When updating rule sets for smart collections, the operation might be processed asynchronously. In these cases, the mutation returns a
jobobject that you can use to track the progress of the update.
To publish or unpublish collections to specific sales channels, use the dedicated
andmutations.Learn more about using metafields with smart collections.
- Anchor to inputinput•Collection
Input! required The updated properties for the collection.
Arguments
- •mutation
Creates a new
for aCustomer. You can optionally set the address as the customer's default address.You can only add addresses to existing customers. Each customer can have multiple addresses.
- Anchor to customerIdcustomer•ID!
Id required The ID of the customer.
- Anchor to addressaddress•Mailing
Address Input! required Specifies the fields to use when creating the address.
- Anchor to setAsDefaultset•Boolean
As Default Whether to set the address as the customer's default address.
Arguments
- •mutation
Deletes a customer's address.
- Anchor to customerIdcustomer•ID!
Id required The ID of the customer whose address is being deleted.
- Anchor to addressIdaddress•ID!
Id required The ID of the address to be deleted from the customer.
Arguments
- •mutation
Updates a
Customer's. You can modify any field of the address and optionally set it as the customer's default address.- Anchor to customerIdcustomer•ID!
Id required The ID of the customer whose address is being updated.
- Anchor to addressIdaddress•ID!
Id required The ID of the address to update.
- Anchor to addressaddress•Mailing
Address Input! required Specifies the fields to use when updating the address.
- Anchor to setAsDefaultset•Boolean
As Default Whether to set the address as the customer's default address.
Arguments
- •mutation
Add tax exemptions for the customer.
- Anchor to customerIdcustomer•ID!
Id required The ID of the customer to update.
- Anchor to taxExemptionstax•[Tax
Exemptions Exemption!]! required The list of tax exemptions to add for the customer, in the format of an array or a comma-separated list. Example values:
,.
Arguments
- •mutation
Creates a new
Customerin the store.Accepts customer details including contact information, marketing consent preferences, and tax exemptions through the
input object. You can also associatemetafieldsand tags to organize and extend customer data.Apps using protected customer data must meet Shopify's protected customer data requirements.
- Anchor to inputinput•Customer
Input! required The input fields to create a customer.
Arguments
- •mutation
Deletes a
Customerfrom the store. You can only delete customers who haven't placed any orders.Apps using protected customer data must meet Shopify's protected customer data requirements.
- Anchor to inputinput•Customer
Delete Input! required Specifies the customer to delete.
Arguments
- •mutation
Generates a one-time activation URL for a
Customerwhose legacy customer account isn't yet enabled. Use this after importing customers or creating accounts that need activation.The generated URL expires after 30 days and becomes invalid if you generate a new one.
NoteThe generated URL only works when legacy customer accounts are enabled on the shop. It only works for customers with disabled or invited
account states. Attempting to generate a URL for an already-enabled customer returns an error.- Anchor to customerIdcustomer•ID!
Id required The ID of the customer that the URL is generated for.
Arguments
- •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.
- Anchor to customerIdcustomer•ID!
Id required The ID of the customer.
- Anchor to billingAddressbilling•Mailing
Address Address Input! required The billing address.
- Anchor to sessionIdsession•String!
Id required The Cardserver session ID. Obtained by storing card data with Shopify's Cardsink. Exchanging raw card data for a session ID must be done in a PCI complaint environment.
Arguments
- •mutation
Updates the credit card payment method for a customer.
- •ID!required
The ID of the customer payment method.
- Anchor to billingAddressbilling•Mailing
Address Address Input! required The billing address.
- Anchor to sessionIdsession•String!
Id required The Cardserver session ID.
Arguments
- •ID!
- •mutation
Revokes a customer's payment method.
- Anchor to customerPaymentMethodIdcustomer•ID!
Payment Method Id required The ID of the customer payment method to be revoked.
Arguments
- •mutation
Sends a link to the customer so they can update a specific payment method.
- Anchor to customerPaymentMethodIdcustomer•ID!
Payment Method Id required The payment method to be updated.
- Anchor to emailemail•Email
Input Specifies the payment method update email fields. Only the 'from' and 'bcc' fields are accepted for input.
Arguments
- •mutation
Remove tax exemptions from a customer.
- Anchor to customerIdcustomer•ID!
Id required The ID of the customer to update.
- Anchor to taxExemptionstax•[Tax
Exemptions Exemption!]! required The list of tax exemptions to remove for the customer, in the format of an array or a comma-separated list. Example values:
,.
Arguments
- •mutation
Replace tax exemptions for a customer.
- Anchor to customerIdcustomer•ID!
Id required The ID of the customer to update.
- Anchor to taxExemptionstax•[Tax
Exemptions Exemption!]! required The list of tax exemptions that will replace the current exemptions for a customer. Can be an array or a comma-separated list. Example values:
,.
Arguments
- •mutation
Updates a
Customer's attributes including personal information andtax exemptions.Apps using protected customer data must meet Shopify's protected customer data requirements.
- Anchor to inputinput•Customer
Input! required Provides updated fields for the customer. To set marketing consent, use the
ormutations instead.
Arguments
- •mutation
Updates a customer's default address.
- Anchor to customerIdcustomer•ID!
Id required The ID of the customer whose default address is being updated.
- Anchor to addressIdaddress•ID!
Id required The ID of the customer's new default address.
Arguments
- •mutation
Creates a
that defines shipping rates for specific products and locations.A delivery profile groups products with their shipping zones and rates. You can associate profiles with
objects to customize shipping for subscriptions and pre-orders. Each profile containsobjects that specify whichLocationobjects ship to whichobjects with specificobjects and rates.Learn more about building delivery profiles.
- Anchor to profileprofile•Delivery
Profile Input! required Specifies the input fields for a delivery profile.
Arguments
- •mutation
Enqueue the removal of a delivery profile.
- •ID!required
The ID of the delivery profile to remove.
Arguments
- •ID!
- •mutation
Updates a
's configuration, including its shipping zones, rates, and associated products.Modify location groups to control which fulfillment
Locationobjects serve specific geographic areas. Add or remove shipping zones with custom countries and provinces. Create or update shipping methods with rate definitions and delivery conditions. Associate or dissociateobjects andobjects to determine which products use this profile's shipping rules.The mutation supports partial updates through dedicated input fields for creating, updating, and deleting specific components without affecting the entire profile structure.
Learn more about building delivery profiles.
- •ID!required
The ID of the delivery profile to update.
- Anchor to profileprofile•Delivery
Profile Input! required Specifies the input fields for a delivery profile.
- Anchor to leaveLegacyModeProfilesleave•Boolean
Legacy Mode Profiles Deprecated
Arguments
- •ID!
- •mutation
Updates the delivery promise participants by adding or removing owners based on a branded promise handle.
- Anchor to brandedPromiseHandlebranded•String!
Promise Handle required The branded promise handle to update the delivery promise participants for.
- Anchor to ownersToAddowners•[ID!]
To Add Default:[] The owners to add to the delivery promise participants.
- Anchor to ownersToRemoveowners•[ID!]
To Remove Default:[] The owners to remove from the delivery promise participants.
Arguments
- •mutation
Set the delivery settings for a shop.
- Anchor to settingsetting•Delivery
Setting Input! required Specifies the input fields for the delivery shop level settings.
Arguments
- •mutation
Assigns a location as the shipping origin while using legacy compatibility mode for multi-location delivery profiles.
- Anchor to locationIdlocation•ID!
Id required The ID of the location to assign as the shipping origin.
Arguments
- •mutation
Adds tags to multiple draft orders.
- Anchor to searchsearch•String
The conditions for filtering draft orders on. See the detailed search syntax.
- Anchor to savedSearchIdsaved•ID
Search Id The ID of the draft order saved search for filtering draft orders on.
- •[ID!]
The IDs of the draft orders to add tags to.
- •[String!]!required
List of tags to be added.
Arguments
- •mutation
Deletes multiple draft orders.
- Anchor to searchsearch•String
The conditions for filtering draft orders on. See the detailed search syntax.
- Anchor to savedSearchIdsaved•ID
Search Id The ID of the draft order saved search for filtering draft orders on.
- •[ID!]
The IDs of the draft orders to delete.
Arguments
- •mutation
Removes tags from multiple draft orders.
- Anchor to searchsearch•String
The conditions for filtering draft orders on. See the detailed search syntax.
- Anchor to savedSearchIdsaved•ID
Search Id The ID of the draft order saved search for filtering draft orders on.
- •[ID!]
The IDs of the draft orders to remove tags from.
- •[String!]!required
List of tags to be removed.
Arguments
- •mutation
Calculates the properties of a
without creating it. Returns pricing information includingtotals, shipping charges, applicable discounts, and tax calculations based on the providedCustomerandinformation.Use this mutation to preview total taxes and prices before creating a draft order. It's particularly useful when working with B2B
or when you need to determine costs without committing to a draft order. Learn more about calculating draft orders for B2B purchasing entities.- Anchor to inputinput•Draft
Order Input! required The fields for the draft order.
Arguments
- •mutation
Completes a draft order and converts it into a regular order. The order appears in the merchant's orders list, and the customer can be notified about their order.
Use the
mutation when a merchant is ready to finalize a draft order and create a real order in their store. Themutation also supports sales channel attribution for tracking order sources using theargument, cart validation controls for app integrations, and detailed error reporting for failed completions.You can complete a draft order with different payment scenarios:
- Mark the order as paid immediately.
- Set the order as payment pending using payment terms.
- Specify a custom payment amount.
- Select a specific payment gateway.
NoteWhen completing a draft order, inventory is reserved for the items in the order. This means the items will no longer be available for other customers to purchase. Make sure to verify inventory availability before completing the draft order.
- •ID!required
The draft order to complete.
- Anchor to paymentPendingpayment•Boolean
Pending DeprecatedDefault:false - Anchor to paymentGatewayIdpayment•ID
Gateway Id The gateway for the completed draft order.
- Anchor to sourceNamesource•String
Name A channel definition handle used for sales channel attribution.
Arguments
- •mutation
Creates a draft order with attributes such as customer information, line items, shipping and billing addresses, and payment terms. Draft orders are useful for merchants that need to:
- Create new orders for sales made by phone, in person, by chat, or elsewhere. When a merchant accepts payment for a draft order, an order is created.
- Send invoices to customers with a secure checkout link.
- Use custom items to represent additional costs or products not in inventory.
- Re-create orders manually from active sales channels.
- Sell products at discount or wholesale rates.
- Take pre-orders.
After creating a draft order, you can:
- Send an invoice to the customer using the
mutation. - Complete the draft order using the
mutation. - Update the draft order using the
mutation. - Duplicate a draft order using the
mutation. - Delete the draft order using the
mutation.
NoteWhen you create a draft order, you can't reserve or hold inventory for the items in the order by default. However, you can reserve inventory using the
input.- Anchor to inputinput•Draft
Order Input! required The fields used to create the draft order.
Arguments
- •mutation
Creates a draft order from order.
- Anchor to orderIdorder•ID!
Id required Specifies the order's id that we create the draft order from.
Arguments
- •mutation
Deletes a draft order.
- Anchor to inputinput•Draft
Order Delete Input! required Specify the draft order to delete by its ID.
Arguments
- •mutation
Duplicates a draft order.
- Anchor to draftOrderIddraft•ID
Order Id Deprecated - •ID
The ID of the draft order to duplicate.
Arguments
- •mutation
Previews a draft order invoice email.
- •ID!required
Specifies the draft order invoice email to preview.
- Anchor to emailemail•Email
Input Specifies the draft order invoice email fields.
Arguments
- •ID!
- •mutation
Sends an invoice email for a
. The invoice includes a secure checkout link for reviewing and paying for the order. Use theemailargument to customize the email, such as the subject and message.- •ID!required
Specifies the draft order to send the invoice for.
- Anchor to emailemail•Email
Input Specifies the draft order invoice email fields.
Arguments
- •ID!
- •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.
- •ID!required
Specifies the draft order to update.
- Anchor to inputinput•Draft
Order Input! required The draft order properties to update.
Arguments
- •ID!
- •mutation
Triggers any workflows that begin with the trigger specified in the request body. To learn more, refer to Create Shopify Flow triggers.
- Anchor to bodybody•StringDeprecated
- Anchor to handlehandle•String
The handle of the trigger.
- Anchor to payloadpayload•JSON
The payload needed to run the Trigger.
Arguments
- •mutation
Cancels an existing
Fulfillmentand reverses its effects on associatedobjects. When you cancel a fulfillment, the system creates new fulfillment orders for the cancelled items so they can be fulfilled again.The cancellation affects fulfillment orders differently based on their fulfillment status. If a fulfillment order was entirely fulfilled, then it automatically closes. If a fulfillment order is partially fulfilled, then the remaining quantities adjust to include the cancelled items. The system creates new fulfillment orders at the original
Locationwhen items are still stocked there, or at alternative locations based on the store's fulfillment priority settings.Learn more about canceling fulfillments.
- •ID!required
The ID of the fulfillment to be canceled.
Arguments
- •ID!
- •mutation
Creates a fulfillment for one or more
objects. The fulfillment orders are associated with the sameOrderand are assigned to the sameLocation.Use this mutation to mark items as fulfilled when they're ready to ship. You can specify tracking information, customer notification preferences, and which
objects to fulfill from each fulfillment order. If you don't specify line items, then the mutation fulfills all items in the fulfillment order.Learn more about building fulfillment solutions.
- Anchor to fulfillmentfulfillment•Fulfillment
Input! required The input fields used to create a fulfillment from fulfillment orders.
- Anchor to messagemessage•String
An optional message for the fulfillment request.
Arguments
- •mutation
Creates a
to track the shipment status and location of items that have shipped. Events capture status updates like carrier pickup, in transit, out for delivery, or delivered.Each event records the timestamp and current status of the
Fulfillment. You can include optional details such as the location where the event occurred, estimated arrival time, and messages for tracking purposes.- Anchor to fulfillmentEventfulfillment•Fulfillment
Event Event Input! required The input fields used to create a fulfillment event for a fulfillment.
Arguments
- •mutation
Accept a cancellation request sent to a fulfillment service for a fulfillment order.
- •ID!required
The ID of the fulfillment order associated with the cancellation request.
- Anchor to messagemessage•String
An optional reason for accepting the cancellation request.
Arguments
- •ID!
- •mutation
Accepts a fulfillment request that the fulfillment service has received for a
which signals that the fulfillment service will process and fulfill the order. The fulfillment service can optionally provide a message to the merchant and an estimated shipped date when accepting the request.Learn more about accepting fulfillment requests.
- •ID!required
The ID of the fulfillment order associated with the fulfillment request.
- Anchor to messagemessage•String
An optional reason for accepting the fulfillment request.
- Anchor to estimatedShippedAtestimated•Date
Shipped At Time The estimated date and time when the fulfillment order will be shipped.
Arguments
- •ID!
- •mutation
Cancels a
and creates a replacement fulfillment order to represent the work left to be done. The original fulfillment order will be marked as closed.This mutation works when the fulfillment order has a
orstatus. Fororders, cancellation happens immediately because the fulfillment service hasn't accepted the request.NoteOrders that have had cancellation requested but the cancellation has yet to be accepted by the fulfillment service might still have work completed despite cancellation.
- •ID!required
The ID of the fulfillment order to mark as canceled.
Arguments
- •ID!
- •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
.
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.
- •ID!required
The ID of the fulfillment order to mark as incomplete.
- Anchor to messagemessage•String
An optional reason for marking the fulfillment order as incomplete.
Arguments
- •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 fulfillment order has had progress manually reported. To move a fulfillment order that has had progress manually reported, the fulfillment order must first be marked as open resolving the ongoing progress state.
- The destination location doesn't stock 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
,,, or. 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
parameter (available as of the2023-04API 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.
- •ID!required
The ID of the fulfillment order to be moved.
- Anchor to newLocationIdnew•ID!
Location Id required The ID of the location where the fulfillment order will be moved.
- Anchor to fulfillmentOrderLineItemsfulfillment•[Fulfillment
Order Line Items Order Line Item Input!] The fulfillment order line items to be moved. If left blank, all unfulfilled line items belonging to the fulfillment order are moved.
Arguments
- •mutation
Marks a scheduled fulfillment order as open.
From API version 2026-01, this will also mark a fulfillment order as open when it is assigned to a merchant managed location and has had progress reported.
- •ID!required
The ID of the fulfillment order to mark as open.
Arguments
- •ID!
- •mutation
Rejects a cancellation request sent to a fulfillment service for a fulfillment order.
- •ID!required
The ID of the fulfillment order associated with the cancellation request.
- Anchor to messagemessage•String
An optional reason for rejecting the cancellation request.
Arguments
- •ID!
- •mutation
Rejects a fulfillment request sent to a fulfillment service for a fulfillment order.
- •ID!required
The ID of the fulfillment order associated with the fulfillment request.
- Anchor to reasonreason•Fulfillment
Order Rejection Reason The reason for the fulfillment order rejection.
- Anchor to messagemessage•String
An optional reason for rejecting the fulfillment request.
- Anchor to lineItemsline•[Incoming
Items Request Line Item Input!] An optional array of line item rejection details. If none are provided, all line items will be assumed to be unfulfillable.
Note: After the fulfillment request has been rejected, none of the line items will be able to be fulfilled. This field documents which line items specifically were unable to be fulfilled and why.
Arguments
- •ID!
- •mutation
Sends a cancellation request to the fulfillment service of a fulfillment order.
- •ID!required
The ID of the fulfillment order associated with the cancellation request.
- Anchor to messagemessage•String
An optional reason for the cancellation request.
Arguments
- •ID!
- •mutation
Sends a fulfillment request to the fulfillment service assigned to a
. The fulfillment service must then accept or reject the request before processing can begin.You can either request fulfillment for all line items or specify individual items with quantities for partial fulfillment. When requesting partial fulfillment, Shopify splits the original fulfillment order into two: one with the submitted items and another with the remaining unsubmitted items. Include an optional message to communicate special instructions to the fulfillment service, such as gift wrapping or handling requirements.
Learn more about managing fulfillment requests as a fulfillment service.
- •ID!required
The ID of the fulfillment order associated with fulfillment request.
- Anchor to messagemessage•String
An optional message for the fulfillment request.
- Anchor to notifyCustomernotify•Boolean
Customer Whether the customer should be notified when fulfillments are created for this fulfillment order.
- Anchor to fulfillmentOrderLineItemsfulfillment•[Fulfillment
Order Line Items Order Line Item Input!] The fulfillment order line items to be requested for fulfillment. If left blank, all line items of the fulfillment order are requested for fulfillment.
Arguments
- •ID!
- •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-10or 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.- Anchor to namename•String!required
The name of the fulfillment service.
- Anchor to callbackUrlcallback•URL
Url The URL to send requests for the fulfillment service.
If
is provided:- Shopify queries the
callback_url/fetch_tracking_numbersendpoint to retrieve tracking numbers for orders, ifis set totrue. - Shopify queries the
callback_url/fetch_stockendpoint to retrieve inventory levels, ifis set totrue. - Shopify uses the
callback_url/fulfillment_order_notificationendpoint to send fulfillment and cancellation requests.
Otherwise, if no
is provided you need to submit this information via the api:- For submitting tracking info and handling fulfillment requests, see our docs on building for fulfillment services.
- For managing inventory quantities, see our docs on managing inventory quantities and states.
- Shopify queries the
- Anchor to trackingSupporttracking•Boolean
Support Default:false Whether the fulfillment service provides tracking numbers for packages.
If
is provided (optional as of API version "2026-01"), Shopify will periodically fetch tracking numbers via the callback endpoint.If no
is provided you need to submit this information via the api, see our docs on building for fulfillment services.- Anchor to fulfillmentOrdersOptInfulfillment•Boolean
Orders Opt In DeprecatedDefault:true - Anchor to permitsSkuSharingpermits•Boolean
Sku Sharing Deprecated (removal date set)Default:true - Anchor to inventoryManagementinventory•Boolean
Management Default:false Whether the fulfillment service manages product inventory and provides updates to Shopify.
If
is provided (optional as of API version "2026-01"), Shopify will periodically fetch inventory levels via the callback endpoint.If no
is provided you need to submit this information via the api, see our docs on managing inventory quantities and states.- Anchor to requiresShippingMethodrequires•Boolean
Shipping Method Default:true Whether the fulfillment service requires products to be physically shipped.
Arguments
- •mutation
Deletes a fulfillment service.
- •ID!required
The ID of the fulfillment service to delete.
- Anchor to destinationLocationIddestination•ID
Location Id - Anchor to inventoryActioninventory•Fulfillment
Action Service Delete Inventory Action Default:TRANSFER The action to take with the location after the fulfillment service is deleted.
Arguments
- •ID!
- •mutation
Updates the
configuration, including its name, callback URL, and operational settings.The mutation modifies how the fulfillment service handles inventory tracking, shipping requirements, and package tracking support.
NoteLearn more about editing fulfillment service locations.
- •ID!required
The id of the fulfillment service.
- Anchor to namename•String
The name of the fulfillment service.
- Anchor to callbackUrlcallback•URL
Url The URL to send requests for the fulfillment service.
If
is provided:- Shopify queries the
callback_url/fetch_tracking_numbersendpoint to retrieve tracking numbers for orders, ifis set totrue. - Shopify queries the
callback_url/fetch_stockendpoint to retrieve inventory levels, ifis set totrue. - Shopify uses the
callback_url/fulfillment_order_notificationendpoint to send fulfillment and cancellation requests.
Otherwise, if no
is provided you need to submit this information via the api:- For submitting tracking info and handling fulfillment requests, see our docs on building for fulfillment services.
- For managing inventory quantities, see our docs on managing inventory quantities and states.
- Shopify queries the
- Anchor to trackingSupporttracking•Boolean
Support Whether the fulfillment service provides tracking numbers for packages.
If
is provided, Shopify will periodically fetch tracking numbers via the callback endpoint.If no
is provided you need to submit this information via the api, see our docs on building for fulfillment services.- Anchor to fulfillmentOrdersOptInfulfillment•Boolean
Orders Opt In Deprecated - Anchor to permitsSkuSharingpermits•Boolean
Sku Sharing Deprecated (removal date set) - Anchor to inventoryManagementinventory•Boolean
Management Whether the fulfillment service manages product inventory and provides updates to Shopify.
If
is provided, Shopify will periodically fetch inventory levels via the callback endpoint.If no
is provided you need to submit this information via the api, see our docs on managing inventory quantities and states.- Anchor to requiresShippingMethodrequires•Boolean
Shipping Method Default:true Whether the fulfillment service requires products to be physically shipped.
Arguments
- •ID!
- •mutation
Updates tracking information for a fulfillment, including the carrier name, tracking numbers, and tracking URLs. You can provide either single or multiple tracking numbers for shipments with multiple packages.
The mutation accepts a
that supports both single tracking (usingnumberandurlfields) and multi-package tracking (usingnumbersandurlsfields). When you specify a supported carrier name, Shopify automatically generates tracking URLs for the provided tracking numbers.You can optionally notify customers about tracking updates with the
argument. When enabled, customers receive shipping update emails with tracking details and receive notifications about future updates to the fulfillment.Learn more about enabling tracking support for fulfillment services.
- Anchor to fulfillmentIdfulfillment•ID!
Id required The ID of the fulfillment.
- Anchor to trackingInfoInputtracking•Fulfillment
Info Input Tracking Input! required The tracking input for the mutation, including tracking URL, number, and company.
- Anchor to notifyCustomernotify•Boolean
Customer Whether the customer will be notified of this update and future updates for the fulfillment. If this field is left blank, then notifications won't be sent to the customer when the fulfillment is updated.
Arguments
- •mutation
Update a gift card.
- •ID!required
The ID of the gift card to be updated.
- Anchor to inputinput•Gift
Card Update Input! required The input fields to update the gift card.
Arguments
- •ID!
- •mutation
Activates an inventory item at a
Locationby creating anthat tracks stock quantities. This enables you to manage inventory for aat the specified location.When you activate an inventory item, you can set its initial quantities. The
availableargument sets the quantity that's available for sale.argument sets the total physical quantity at the location. If you don't specify quantities, thenavailableanddefault to zero.CautionAs of version
2026-01, this mutation supports an optional idempotency key using the@idempotentdirective. As of version2026-04, the idempotency key is required and must be provided using the@idempotentdirective. For more information, see the idempotency documentation.Learn more about managing inventory quantities and states.
- Anchor to inventoryItemIdinventory•ID!
Item Id required The ID of the inventory item to activate.
- Anchor to locationIdlocation•ID!
Id required The ID of the location of the inventory item being activated.
- Anchor to availableavailable•Int
The initial available quantity of the inventory item being activated at the location.
- Anchor to onHandon•Int
Hand The initial on_hand quantity of the inventory item being activated at the location.
- Anchor to stockAtLegacyLocationstock•Boolean
At Legacy Location Default:false Allow activation at or away from fulfillment service location with sku sharing off. This will deactivate inventory at all other locations.
Arguments
- •mutation
Removes an inventory item's quantities from a location, and turns off inventory at the location.
- Anchor to inventoryLevelIdinventory•ID!
Level Id required The ID of the inventory level to deactivate.
Arguments
- •mutation
Updates an
's properties including whether inventory is tracked, cost, SKU, and whether shipping is required. Inventory items represent the goods available to be shipped to customers.- •ID!required
The ID of the inventory item to update.
- Anchor to inputinput•Inventory
Item Input! required
Arguments
- •ID!
- •mutation
Create new marketing activity. Marketing activity app extensions are deprecated and will be removed in the near future.
- Anchor to inputinput•Marketing
Activity Create Input! required The Input of marketing activity create.
Arguments
- •mutation
Updates a marketing activity with the latest information. Marketing activity app extensions are deprecated and will be removed in the near future.
- Anchor to inputinput•Marketing
Activity Update Input! required The Input of the marketing activity.
Arguments
- •mutation
Deletes
Metafieldobjects in bulk by specifying combinations of owner ID, namespace, and key.Returns the identifiers of successfully deleted metafields. If a specified metafield doesn't exist, then the mutation still succeeds but returns
nullfor that identifier in the response.- Anchor to metafieldsmetafields•[Metafield
Identifier Input!]! required A list of identifiers specifying metafields to delete. At least one identifier must be specified.
Arguments
- •mutation
Cancels an order, with options for refunding, restocking inventory, and customer notification.
CautionOrder cancellation is irreversible. An order that has been cancelled can't be restored to its original state.
Use the
mutation to programmatically cancel orders in scenarios such as:- Customer-requested cancellations due to size, color, or other preference changes
- Payment processing failures or declined transactions
- Fraud detection and prevention
- Insufficient inventory availability
- Staff errors in order processing
- Wholesale or B2B order management workflows
The
mutation provides flexible refund options including refunding to original payment methods or issuing store credit. If a payment was only authorized (temporarily held) but not yet charged, that hold will be automatically released when the order is cancelled, even if you choose not to refund other payments.The mutation supports different cancellation reasons: customer requests, payment declines, fraud, inventory issues, staff errors, or other unspecified reasons. Each cancellation can include optional staff notes for internal documentation (notes aren't visible to customers).
An order can only be cancelled if it meets the following criteria:
- The order hasn't already been cancelled.
- The order has no pending payment authorizations.
- The order has no active returns in progress.
- The order has no outstanding fulfillments that can't be cancelled.
Orders might be assigned to locations that become deactivated after the order was created. When cancelling such orders, inventory behavior depends on payment status:
- Paid orders: Cancellation will fail with an error if restocking is enabled, since inventory can't be returned to deactivated locations.
- Unpaid orders: Cancellation succeeds but inventory is not restocked anywhere, even when the restock option is enabled. The committed inventory effectively becomes unavailable rather than being returned to stock at the deactivated location.
After you cancel an order, you can still make limited updates to certain fields (like notes and tags) using the
.For partial refunds or more complex refund scenarios on active orders, such as refunding only specific line items while keeping the rest of the order fulfilled, consider using the
mutation instead of full order cancellation.Learn how to build apps that integrate with order management and fulfillment processes.
- Anchor to orderIdorder•ID!
Id required The ID of the order to be canceled.
- Anchor to refundrefund•BooleanDeprecated
- Anchor to refundMethodrefund•Order
Method Cancel Refund Method Input Indicates how 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 reasonreason•Order
Cancel Reason! required The reason for canceling the order.
- Anchor to notifyCustomernotify•Boolean
Customer Default:false Whether to send a notification to the customer about the order cancellation.
- Anchor to staffNotestaff•String
Note Default:null A staff-facing note about the order cancellation. This is not visible to the customer. Maximum length of 255 characters.
Arguments
- •mutation
Captures payment for an authorized transaction on an order. Use this mutation to claim the money that was previously reserved by an authorization transaction.
The
mutation can be used in the following scenarios:- To capture the full amount of an authorized transaction
- To capture a partial payment by specifying an amount less than the total order amount
- To perform multiple captures on the same order, as long as the order transaction is multi-capturable
NoteMulti-capture functionality is only available to stores on a Shopify Plus plan. For multi-currency orders, the
currencyfield is required and should match the presentment currency from the order.After capturing a payment, you can:
- View the transaction details including status, amount, and processing information.
- Track the captured amount in both shop and presentment currencies.
- Monitor the transaction's settlement status.
Learn more about order transactions.
- Anchor to inputinput•Order
Capture Input! required The input for the mutation.
Arguments
- •mutation
Marks an open
Orderas closed. A closed order is one where merchants fulfill or cancel allobjects and complete all financial transactions.Once closed, the order indicates that no further work is required. The order's
timestamp is set when this mutation completes successfully.- Anchor to inputinput•Order
Close Input! required The input for the mutation.
Arguments
- •mutation
Adds a custom line item to an existing
Order. Custom line items represent products or services not in your catalog, such as gift wrapping, installation fees, or one-off charges.Creates a
with the specified title, price, and quantity. Changes remain in the edit session until you commit them with themutation.Learn more about adding custom line items.
- •ID!required
The ID of the calculated order or the order edit session to edit. This is the edit to which the custom item is added.
- Anchor to titletitle•String!required
The name of the custom item to add.
- Anchor to locationIdlocation•ID
Id The ID of the retail location (if applicable) from which the custom item is sold. Used for tax calculations. A default location will be chosen automatically if none is provided.
- Anchor to priceprice•Money
Input! required The unit price of the custom item. This value can't be negative.
- Anchor to quantityquantity•Int!required
The quantity of the custom item. This value must be greater than zero.
- Anchor to taxabletaxable•Boolean
Whether the custom item is taxable. Defaults to
true.- Anchor to requiresShippingrequires•Boolean
Shipping Whether the custom item requires shipping. Defaults to
false.
Arguments
- •ID!
- •mutation
Applies a discount to a
during an order edit session. The discount can be either a fixed amount or percentage value.To modify pricing on specific line items, use this mutation after starting an order edit with the
mutation. The changes remain staged until you commit them with themutation.Learn more about editing existing orders.
- •ID!required
The ID of the calculated order or the order edit session to edit.
- Anchor to lineItemIdline•ID!
Item Id required The ID of the calculated line item to add the discount to.
- Anchor to discountdiscount•Order
Edit Applied Discount Input! required The discount to add to the line item.
Arguments
- •ID!
- •mutation
Adds a
as a line item to anOrderthat's being edited. The mutation respects the variant's contextual pricing.You can specify a
Locationto check for inventory availability and control whether duplicate variants are allowed. Thequantitymust be a positive value.Learn more about editing existing orders.
- •ID!required
The ID of the calculated order or the order edit session to edit.
- Anchor to variantIdvariant•ID!
Id required The ID of the variant to add.
- Anchor to locationIdlocation•ID
Id The ID of the location to check for inventory availability. A default location ID is chosen automatically if none is provided.
- Anchor to quantityquantity•Int!required
The quantity of the item to add to the order. Must be a positive value.
- Anchor to allowDuplicatesallow•Boolean
Duplicates Default:false Whether the mutation can create a line item for a variant that's already on the calculated order.
Arguments
- •ID!
- •mutation
Starts an order editing session that enables you to modify an existing
Order. This mutation creates anand returns ashowing how the order looks with your changes applied.Order editing follows a three-step workflow: Begin the edit with
, apply changes using mutations likeor, and then save the changes with themutation. The session tracks all staged changes until you commit or abandon them.Learn more about editing existing orders.
- •ID!required
The ID of the order to begin editing.
Arguments
- •ID!
- •mutation
Applies staged changes from an order editing session to the original order. This finalizes all modifications made during the edit session, including changes to line items, quantities, discounts, and shipping lines.
Order editing follows a three-step workflow: start with
to create an editing session, apply changes using various orderEdit mutations, and then save the changes with themutation. The mutation can optionally notify the customer of changes and add staff notes for internal tracking.You can only edit unfulfilled line items. If an edit changes the total order value, then the customer might need to pay a balance or receive a refund.
Learn more about editing existing orders.
- •ID!required
The ID of the calculated order or the order edit session that will have its changes applied to the order.
- Anchor to notifyCustomernotify•Boolean
Customer Whether to notify the customer or not.
- Anchor to staffNotestaff•String
Note Note for staff members.
Arguments
- •ID!
- •mutation
Sets the quantity of a line item on an order that's being edited. Use this mutation to increase, decrease, or remove items by adjusting their quantities.
Setting the quantity to zero effectively removes the line item from the order. The item still exists as a data structure with zero quantity. When decreasing quantities, you can optionally restock the removed items to inventory by setting the
restockparameter totrue.Learn more about editing workflows for existing orders.
- •ID!required
The ID of the calculated order or the order edit session to edit. The edit changes the quantity on the line item.
- Anchor to lineItemIdline•ID!
Item Id required The ID of the calculated line item to edit.
- Anchor to quantityquantity•Int!required
The new quantity to set for the line item. This value cannot be negative.
- Anchor to restockrestock•Boolean
Whether or not to restock the line item when the updated quantity is less than the original quantity.
- Anchor to locationIdlocation•ID
Id Deprecated
Arguments
- •ID!
- •mutation
Marks an order as paid by recording a payment transaction for the outstanding amount.
Use the
mutation to record payments received outside the standard checkout process. Themutation is particularly useful in scenarios where:- Orders were created with manual payment methods (cash on delivery, bank deposit, money order)
- Payments were received offline and need to be recorded in the system
- Previously authorized payments need to be captured manually
- Orders require manual payment reconciliation due to external payment processing
The mutation validates that the order can be marked as paid before processing. An order can be marked as paid only if it has a positive outstanding balance and its financial status isn't already
. The mutation will either create a new sale transaction for the full outstanding amount or capture an existing authorized transaction, depending on the order's current payment state.After successfully marking an order as paid, the order's financial status is updated to reflect the payment, and payment events are logged for tracking and analytics purposes.
Learn more about managing orders in apps.
- Anchor to inputinput•Order
Mark As Paid Input! required The input for the mutation.
Arguments
- •mutation
Opens a closed order.
- Anchor to inputinput•Order
Open Input! required The input for the mutation.
Arguments
- •mutation
Updates the attributes of an order, such as the customer's email, the shipping address for the order, tags, and metafields associated with the order.
If you need to make significant updates to an order, such as adding or removing line items, changing quantities, or modifying discounts, then use the
mutation instead. Themutation initiates an order editing session, allowing you to make multiple changes before finalizing them. Learn more about using themutation to edit existing orders.If you need to remove a customer from an order, then use the
mutation instead.Learn how to build apps that integrate with order management and fulfillment processes.
- Anchor to inputinput•Order
Input! required The attributes of the updated order.
Arguments
- •mutation
Creates a product bundle that groups multiple
Productobjects together as components. The bundle appears as a single product in the store, with its price determined by the parent product and inventory calculated from the component products.The mutation runs asynchronously and returns a
object to track the creation status. Poll the operation using thequery to determine when the bundle is ready.Learn more about creating product fixed bundles.
- Anchor to inputinput•Product
Bundle Create Input! required Input for creating a product bundle or componentized product.
Arguments
- •mutation
Updates a product bundle or componentized product.
- Anchor to inputinput•Product
Bundle Update Input! required Input for updating a product bundle or componentized product.
Arguments
- •mutation
Creates a product with attributes such as title, description, vendor, and media.
The
mutation helps you create many products at once, avoiding the tedious or time-consuming process of adding them one by one in the Shopify admin. Common examples include creating products for a new collection, launching a new product line, or adding seasonal products.You can define product options and values, allowing you to create products with different variations like sizes or colors. You can also associate media files to your products, including images and videos.
The
mutation only supports creating a product with its initial product variant. To create multiple product variants for a single product and manage prices, use themutation.NoteThe
mutation has a throttle that takes effect when a store has 50,000 product variants. After this threshold is reached, no more than 1,000 new product variants can be created per day.After you create a product, you can make subsequent edits to the product using one of the following mutations:
: Used to publish the product and make it available to customers. Themutation creates products in an unpublished state by default, so you must perform a separate operation to publish the product.: Used to update a single product, such as changing the product's title, description, vendor, or associated media.: Used to perform multiple operations on products, such as creating or modifying product options and variants.
Learn more about the product model and adding product data.
- Anchor to inputinput•Product
Input Deprecated - Anchor to productproduct•Product
Create Input The attributes of the new product.
- Anchor to mediamedia•[Create
Media Input!] The media to add to the product.
Arguments
- •mutation
Permanently deletes a product and all its associated data, including variants, media, publications, and inventory items.
Use the
mutation to programmatically remove products from your store when they need to be permanently deleted from your catalog, such as when removing discontinued items, cleaning up test data, or synchronizing with external inventory management systems.The
mutation removes the product from all associated collections, and removes all associated data for the product, including:- All product variants and their inventory items
- Product media (images, videos) that are not referenced by other products
- Product options and option values
- Product publications across all sales channels
- Product tags and metadata associations
The
mutation also has the following effects on existing orders and transactions:- Draft orders: Existing draft orders that reference this product will retain the product information as stored data, but the product reference will be removed. Draft orders can still be completed with the stored product details.
- Completed orders and refunds: Previously completed orders that included this product aren't affected. The product information in completed orders is preserved for record-keeping, and existing refunds for this product remain valid and processable.
CautionProduct deletion is irreversible. After a product is deleted, it can't be recovered. Consider archiving or unpublishing products instead if you might need to restore them later.
If you need to delete 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 set the
synchronousparameter tofalseto run the deletion asynchronously, which returns athat you can monitor for completion status.If you need more granular control over product cleanup, consider using these alternative mutations:
: Update the product status to archived or unpublished instead of deleting.: Delete specific variants while keeping the product.: Delete the choices available for a product, such as size, color, or material.
Learn more about the product model.
- Anchor to inputinput•Product
Delete Input! required Specifies the product to delete by its ID.
- Anchor to synchronoussynchronous•BooleanDefault:true
Specifies whether or not to run the mutation synchronously.
Arguments
- •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: falseargument 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 productIdproduct•ID!
Id required The ID of the product to be duplicated.
- Anchor to newTitlenew•String!
Title required The new title of the product.
- 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 includeImagesinclude•Boolean
Images Default:false Specifies whether or not to duplicate images.
- Anchor to includeTranslationsinclude•Boolean
Translations Default:false Specifies whether or not to duplicate translations.
- Anchor to synchronoussynchronous•BooleanDefault:true
Specifies whether or not to run the mutation synchronously.
Arguments
- •mutation
Reorders media attached to a product, changing their sequence in product displays. The operation processes asynchronously to handle products with large media collections.
Specify the product ID and an array of moves, where each move contains a media ID and its new zero-based position.
NoteOnly include media items that need repositioning. Unchanged items maintain their relative order automatically.
The mutation returns a
Jobto track the reordering progress. Poll the job status to determine when the operation completes and media positions update across all sales channels.Learn more about reordering product media.
- •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
- •ID!
- •mutation
Updates a product with attributes such as title, description, vendor, and media.
The
mutation helps you modify many products at once, avoiding the tedious or time-consuming process of updating them one by one in the Shopify admin. Common examples including updating product details like status or tags.The
mutation doesn't support updating product variants. To update multiple product variants for a single product and manage prices, use themutation.NoteThe
mutation has a throttle that takes effect when a store has 50,000 product variants. After this threshold is reached, no more than 1,000 new product variants can be updated per day.After updating a product, you can make additional changes using one of the following mutations:
: Used to perform multiple operations on products, such as creating or modifying product options and variants.: Used to publish the product and make it available to customers, if the product is currently unpublished.
Learn more about the product model and adding product data.
- Anchor to inputinput•Product
Input Deprecated - Anchor to productproduct•Product
Update Input The updated properties for a product.
- Anchor to mediamedia•[Create
Media Input!] List of new media to be added to the product.
Arguments
- •mutation
Publishes a resource, such as a
ProductorCollection, to one or more publications.For products to be visible in a channel, they must have an active
. Products sold exclusively on subscription () can only be published to online stores.You can schedule future publication by providing a publish date. Only online store channels support scheduled publishing.
- •ID!required
The resource to create or update publications for.
- Anchor to inputinput•[Publication
Input!]! required Specifies the input fields required to publish a resource.
Arguments
- •ID!
- •mutation
Publishes a resource to the current
Channelassociated with the requesting app. The system determines the current channel by the app's API client ID. Resources includeProductandCollectionobjects that implement thePublishableinterface.For products to be visible in the channel, they must have an active
. Products sold exclusively on subscription (:true) can only be published to online stores.- •ID!required
The resource to create or update publications for.
Arguments
- •ID!
- •mutation
Unpublishes a resource, such as a
ProductorCollection, from one or more publications. The resource remains in your store but becomes unavailable to customers.For products to be visible in a channel, they must have an active
.- •ID!required
The resource to delete or update publications for.
- Anchor to inputinput•[Publication
Input!]! required Specifies the input fields required to unpublish a resource.
Arguments
- •ID!
- •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.- •ID!required
The resource to delete or update publications for.
Arguments
- •ID!
- •mutation
Creates a refund for an order, allowing you to process returns and issue payments back to customers.
Use the
mutation to programmatically process refunds in scenarios where you need to return money to customers, such as when handling returns, processing chargebacks, or correcting order errors.The
mutation supports various refund scenarios:- Refunding line items with optional restocking
- Refunding shipping costs
- Refunding duties and import taxes
- Refunding additional fees
- Processing refunds through different payment methods
- Issuing store credit refunds (when enabled)
You can create both full and partial refunds, and optionally allow over-refunding in specific cases.
After creating a refund, you can track its status and details through the order's
refundsfield. The refund is associated with the order and can be used for reporting and reconciliation purposes.Learn more about managing returns and refunding duties.
NoteCautionAs of 2026-01, this mutation supports an optional idempotency key using the
@idempotentdirective. As of 2026-04, the idempotency key is required and must be provided using the@idempotentdirective. For more information, see the idempotency documentation.- Anchor to inputinput•Refund
Input! required The input fields that are used in the mutation for creating a refund.
Arguments
- •mutation
Creates a saved search.
- Anchor to inputinput•Saved
Search Create Input! required Specifies the input fields for a saved search.
Arguments
- •mutation
Delete a saved search.
- Anchor to inputinput•Saved
Search Delete Input! required The input fields to delete a saved search.
Arguments
- •mutation
Updates a saved search.
- Anchor to inputinput•Saved
Search Update Input! required The input fields to update a saved search.
Arguments
- •mutation
- Theme app extensions
If your app integrates with a Shopify theme and you plan to submit it to the Shopify App Store, you must use theme app extensions instead of Script tags. Script tags can only be used with vintage themes. Learn more.
Script tag deprecationScript 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.
- Anchor to inputinput•Script
Tag Input! required The input fields for a script tag.
Arguments
- •mutation
- Theme app extensions
If your app integrates with a Shopify theme and you plan to submit it to the Shopify App Store, you must use theme app extensions instead of Script tags. Script tags can only be used with vintage themes. Learn more.
Script tag deprecationScript 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.
- •ID!required
The ID of the script tag to delete.
Arguments
- •ID!
- •mutation
- Theme app extensions
If your app integrates with a Shopify theme and you plan to submit it to the Shopify App Store, you must use theme app extensions instead of Script tags. Script tags can only be used with vintage themes. Learn more.
Script tag deprecationScript 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.
- •ID!required
The ID of the script tag to update.
- Anchor to inputinput•Script
Tag Input! required Specifies the input fields for a script tag.
Arguments
- •ID!
- •mutation
Creates a segment.
- Anchor to namename•String!required
The name of the segment to be created. Segment names must be unique.
- Anchor to queryquery•String!required
A precise definition of the segment. The definition is composed of a combination of conditions on facts about customers such as
with this syntax.
Arguments
- •mutation
Deletes a segment.
- •ID!required
Specifies the segment to delete.
Arguments
- •ID!
- •mutation
Updates a segment.
- •ID!required
Specifies the segment to be updated.
- Anchor to namename•String
The new name for the segment.
- Anchor to queryquery•String
A precise definition of the segment. The definition is composed of a combination of conditions on facts about customers such as
with this syntax.
Arguments
- •ID!
- •mutation
Deletes a shipping package.
- •ID!required
The ID of the shipping package to remove.
Arguments
- •ID!
- •mutation
Set a shipping package as the default. The default shipping package is the one used to calculate shipping costs on checkout.
- •ID!required
The ID of the shipping package to set as the default.
Arguments
- •ID!
- •mutation
Updates a shipping package.
- •ID!required
The ID of the shipping package to update.
- Anchor to shippingPackageshipping•Custom
Package Shipping Package Input! required Specifies the input fields for a shipping package.
Arguments
- •ID!
- •mutation
Deletes a locale for a shop. This also deletes all translations of this locale.
- Anchor to localelocale•String!required
ISO code of the locale to delete.
Arguments
- •mutation
Adds a locale for a shop. The newly added locale is in the unpublished state.
- Anchor to localelocale•String!required
ISO code of the locale to enable.
- Anchor to marketWebPresenceIdsmarket•[ID!]
Web Presence Ids The list of markets web presences to add the locale to.
Arguments
- •mutation
Updates a locale for a shop.
- Anchor to localelocale•String!required
ISO code of the locale to update.
- Anchor to shopLocaleshop•Shop
Locale Locale Input! required Specifies the input fields for a shop locale.
Arguments
- •mutation
Creates staged upload targets for file uploads such as images, videos, and 3D models.
Use the
mutation instead of direct file creation mutations when:- Uploading large files: Files over a few MB benefit from staged uploads for better reliability
- Uploading media files: Videos, 3D models, and high-resolution images
- Bulk importing: CSV files, product catalogs, or other bulk data
- Using external file sources: When files are stored remotely and need to be transferred to Shopify
The
mutation is the first step in Shopify's secure two-step upload process:Step 1: Create staged upload targets (this mutation)
- Generate secure, temporary upload URLs for your files.
- Receive authentication parameters for the upload.
Step 2: Upload files and create assets
- Upload your files directly to the provided URLs using the authentication parameters.
- Use the returned
as thein subsequent mutations like.
This approach provides better performance for large files, handles network interruptions gracefully, and ensures secure file transfers to Shopify's storage infrastructure.
After creating staged upload targets, complete the process by:
- Uploading files: Send your files to the returned
urlusing the providedparametersfor authentication - Creating file assets: Use the
as thein mutations such as:
Learn more about uploading media to Shopify.
- Anchor to inputinput•[Staged
Upload Input!]! required The information required to generate staged upload targets.
Arguments
- •mutation
Creates a storefront access token that delegates unauthenticated access scopes to clients using the Storefront API. The token provides public access to storefront resources without requiring customer authentication.
Each shop can have up to 100 active
objects. Headless storefronts, mobile apps, and other client applications typically use these tokens to access public storefront data.Learn more about building with the Storefront API.
- Anchor to inputinput•Storefront
Access Token Input! required Provides the input fields for creating a storefront access token.
Arguments
- •mutation
Deletes a storefront access token.
- Anchor to inputinput•Storefront
Access Token Delete Input! required Provides the input fields required to delete a storefront access token.
Arguments
- •mutation
Adds tags to a resource in the store. Supported resources include
Order,,Customer,Product, andArticle.Tags help merchants organize and filter resources. See the
tagsargument for supported input formats.Learn more about using tags to organize subscription orders.
- •ID!required
The ID of a resource to add tags to.
- •[String!]!required
A list of tags to add to the resource. Can be an array of strings or a single string composed of a comma-separated list of values. Example values:
["tag1", "tag2", "tag3"],"tag1, tag2, tag3".
Arguments
- •ID!
- •mutation
Removes tags from an
Order,,Customer,Product, orArticle.Tags are searchable keywords that help organize and filter these resources.
- •ID!required
The ID of the resource to remove tags from.
- •[String!]!required
A list of tags to remove from the resource in the form of an array of strings. Example value:
["tag1", "tag2", "tag3"].
Arguments
- •ID!
- •mutation
Asynchronously delete URL redirects in bulk.
- •mutation
Creates a webhook subscription that notifies your
Appwhen specific events occur in a shop. Webhooks push event data to your endpoint immediately when changes happen, eliminating the need for polling.The subscription configuration supports multiple endpoint types including HTTPS URLs, Google Pub/Sub topics, and AWS EventBridge event sources. You can filter events using Shopify API search syntax to receive only relevant webhooks, control which data fields are included in webhook payloads, and specify metafield namespaces to include.
NoteThe Webhooks API version configured in your app determines the API version for webhook events. You can't specify it per 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.tomlmay be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read About managing webhook subscriptions.- Anchor to topictopic•Webhook
Subscription Topic! required The type of event that triggers the webhook.
- Anchor to webhookSubscriptionwebhook•Webhook
Subscription Subscription Input! required Specifies the input fields for a webhook subscription.
Arguments
- •mutation
Deletes a
and stops all future webhooks to its endpoint. Returns the deleted subscription's ID for confirmation.Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your
shopify.app.tomlmay be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read About managing webhook subscriptions.- •ID!required
The ID of the webhook subscription to delete.
Arguments
- •ID!
- •mutation
Updates a webhook subscription's configuration. Modify the endpoint URL, event filters, included fields, or metafield namespaces without recreating the subscription.
The mutation accepts a
that specifies the new configuration. You can switch between endpoint types (HTTP, Pub/Sub, EventBridge) by providing a different URI format. Updates apply atomically without interrupting webhook delivery.Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your
shopify.app.tomlmay be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read About managing webhook subscriptions.- •ID!required
The ID of the webhook subscription to update.
- Anchor to webhookSubscriptionwebhook•Webhook
Subscription Subscription Input! required Specifies the input fields for a webhook subscription.
Arguments
- •ID!
Deprecated mutations
- •mutationDeprecated
- Anchor to inputinput•Collection
Publish Input! required Specify a collection to publish and the sales channels to publish it to.
Arguments
- •mutationDeprecated
- Anchor to inputinput•Collection
Unpublish Input! required Specify a collection to unpublish and the sales channels to remove it from.
Arguments
- •mutationDeprecated
- Anchor to topictopic•Webhook
Subscription Topic! required The type of event that triggers the webhook.
- Anchor to webhookSubscriptionwebhook•Event
Subscription Bridge Webhook Subscription Input! required Specifies the input fields for an EventBridge webhook subscription.
Arguments
- •mutationDeprecated
- •ID!required
The ID of the webhook subscription to update.
- Anchor to webhookSubscriptionwebhook•Event
Subscription Bridge Webhook Subscription Input! required Specifies the input fields for an EventBridge webhook subscription.
Arguments
- •ID!
- •mutationDeprecated
- Anchor to fulfillmentfulfillment•Fulfillment
V2Input! required The input fields used to create a fulfillment from fulfillment orders.
- Anchor to messagemessage•String
An optional message for the fulfillment request.
Arguments
- •mutationDeprecated
- Anchor to fulfillmentIdfulfillment•ID!
Id required The ID of the fulfillment.
- Anchor to trackingInfoInputtracking•Fulfillment
Info Input Tracking Input! required The tracking input for the mutation, including tracking URL, number, and company.
- Anchor to notifyCustomernotify•Boolean
Customer Whether the customer will be notified of this update and future updates for the fulfillment. If this field is left blank, then notifications won't be sent to the customer when the fulfillment is updated.
Arguments
- •mutationDeprecated
- •ID!required
The ID of the calculated order or the order edit session to edit. This is the edit from which the line item discount is removed.
- Anchor to discountApplicationIddiscount•ID!
Application Id required The ID of the calculated discount application to remove.
Arguments
- •ID!
- •mutationDeprecated
- Anchor to productIdproduct•ID!
Id required Specifies the product associated with the media.
- Anchor to mediamedia•[Create
Media Input!]! required List of new media to be added to a product.
Arguments
- •mutationDeprecated
- Anchor to productIdproduct•ID!
Id required Specifies the product ID from which the media will be deleted.
- Anchor to mediaIdsmedia•[ID!]!
Ids required The media IDs to be deleted.
Arguments
- •mutationDeprecated
- Anchor to inputinput•Product
Publish Input! required Specifies the product to publish and the channels to publish it to.
Arguments
- •mutationDeprecated
- Anchor to inputinput•Product
Unpublish Input! required Specifies the product to unpublish and the channel to unpublish it from.
Arguments
- •mutationDeprecated
- Anchor to productIdproduct•ID!
Id required Specifies the product on which media will be updated.
- Anchor to mediamedia•[Update
Media Input!]! required A list of media updates.
Arguments
- •mutationDeprecated
- Anchor to inputinput•Staged
Upload Target Generate Input! required The input fields for generating a staged upload.
Arguments
- •mutationDeprecated
- Anchor to inputinput•[Stage
Image Input!]! required The input fields for generating staged uploads.
Arguments