User Error
Represents an error in the input of a mutation.
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
Charges a shop for features or services one time. This type of charge is recommended for apps that aren't billed on a recurring basis. Test and demo shops aren't charged.
- 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!required
Url 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
- Anchor to appPurchaseOneTimeapp•App
Purchase One Time Purchase One Time The newly created app one-time purchase.
- Anchor to confirmationUrlconfirmation•URL
Url The URL that the merchant can access to approve or decline the newly created app one-time purchase.
If the merchant declines, then the merchant is redirected to the app and receives a notification message stating that the charge was declined. If the merchant approves and they're successfully invoiced, then the state of the charge changes from
pending
toactive
.You get paid after the charge is activated.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Cancels an app subscription on a store.
- •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
- Anchor to appSubscriptionapp•App
Subscription Subscription The cancelled app subscription.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Allows an app to charge a store for features or services on a recurring basis.
- 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 namename•String!required
A descriptive name for the app subscription.
- Anchor to replacementBehaviorreplacement•App
Behavior Subscription Replacement BehaviorDefault:STANDARD The replacement behavior when creating an app subscription for a merchant with an already existing app subscription.
- Anchor to returnUrlreturn•URL!required
Url The URL pointing to the page where the merchant is redirected after approving the app subscription.
- 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.
Arguments
- Anchor to appSubscriptionapp•App
Subscription Subscription The newly-created app subscription.
- Anchor to confirmationUrlconfirmation•URL
Url The URL pointing to the page where the merchant approves or declines the charges for an app subscription.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Updates the capped amount on the usage pricing plan of an app subscription line item.
- Anchor to cappedAmountcapped•Money
Amount Input!required The new maximum amount of usage charges that can be incurred within a subscription billing interval.
- •ID!required
The ID of the app subscription line item to be updated.
Arguments
- Anchor to appSubscriptionapp•App
Subscription Subscription The updated app subscription.
- Anchor to confirmationUrlconfirmation•URL
Url The URL where the merchant approves or declines the updated app subscription line item.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Enables an app to charge a store for features or services on a per-use basis. The usage charge value is counted towards the
limit that was specified in the
field when the app subscription was created. If you create an app usage charge that causes the total usage charges in a billing interval to exceed the capped amount, then a
Total price exceeds balance remaining
error is returned.- 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.
- Anchor to priceprice•Money
Input!required The price of the app usage record.
- Anchor to subscriptionLineItemIdsubscription•ID!required
Line Item Id 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.
Arguments
- Anchor to appUsageRecordapp•App
Usage Record Usage Record The newly created app usage record.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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
- Anchor to bulkOperationbulk•Bulk
Operation Operation The bulk operation to be canceled.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Creates and runs a bulk operation query.
See the bulk operations guide for more details.
- Anchor to queryquery•String!required
The query to be executed in bulk.
Arguments
- Anchor to bulkOperationbulk•Bulk
Operation Operation The newly created bulk operation.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Adds products to a collection.
- •ID!required
The ID of the collection that's being updated. This can't be a smart collection.
- Anchor to productIdsproduct•[ID!]!required
Ids 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
- Anchor to collectioncollection•Collection
The updated collection. Returns
null
if an error is raised.- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Creates a collection.
- Anchor to inputinput•Collection
Input!required The properties to use when creating the collection.
Arguments
- Anchor to collectioncollection•Collection
The collection that has been created.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Deletes a collection.
- Anchor to inputinput•Collection
Delete Input!required The collection to delete.
Arguments
- Anchor to deletedCollectionIddeleted•ID
Collection Id The ID of the collection that was deleted. Returns
null
if the collection doesn't exist.- Anchor to shopshop•Shop!non-null
The shop associated with the collection.
- Anchor to userErrorsuser•[User
Errors 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
Add tax exemptions for the customer.
- Anchor to customerIdcustomer•ID!required
Id 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
- Anchor to customercustomer•Customer
The updated customer.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Create a new customer. As of API version 2022-10, apps using protected customer data must meet the protected customer data requirements.
- Anchor to inputinput•Customer
Input!required The input fields to create a customer.
Arguments
- Anchor to customercustomer•Customer
The created customer.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Delete a customer. As of API version 2022-10, apps using protected customer data must meet the protected customer data requirements.
- Anchor to inputinput•Customer
Delete Input!required Specifies the customer to delete.
Arguments
- Anchor to deletedCustomerIddeleted•ID
Customer Id The ID of the deleted customer.
- Anchor to shopshop•Shop!non-null
The shop of the deleted customer.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Generate an account activation URL for a customer.
- Anchor to customerIdcustomer•ID!required
Id The ID of the customer that the URL is generated for.
Arguments
- Anchor to accountActivationUrlaccount•URL
Activation Url The generated account activation URL.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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 billingAddressbilling•Mailing
Address Address Input!required The billing address.
- Anchor to customerIdcustomer•ID!required
Id The ID of the customer.
- Anchor to sessionIdsession•String!required
Id 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
- Anchor to customerPaymentMethodcustomer•Customer
Payment Method Payment Method The customer payment method.
- Anchor to processingprocessing•Boolean
If the card verification result is processing. When this is true, customer_payment_method will be null.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Updates the credit card payment method for a customer.
- Anchor to billingAddressbilling•Mailing
Address Address Input!required The billing address.
- •ID!required
The ID of the customer payment method.
- Anchor to sessionIdsession•String!required
Id The Cardserver session ID.
Arguments
- Anchor to customerPaymentMethodcustomer•Customer
Payment Method Payment Method The customer payment method.
- Anchor to processingprocessing•Boolean
If the card verification result is processing. When this is true, customer_payment_method will be null.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Revokes a customer's payment method.
- Anchor to customerPaymentMethodIdcustomer•ID!required
Payment Method Id The ID of the customer payment method to be revoked.
Arguments
- Anchor to revokedCustomerPaymentMethodIdrevoked•ID
Customer Payment Method Id The ID of the revoked customer payment method.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Sends a link to the customer so they can update a specific payment method.
- Anchor to customerPaymentMethodIdcustomer•ID!required
Payment Method Id 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
- Anchor to customercustomer•Customer
The customer to whom an update payment method email was sent.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Remove tax exemptions from a customer.
- Anchor to customerIdcustomer•ID!required
Id 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
- Anchor to customercustomer•Customer
The updated customer.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Replace tax exemptions for a customer.
- Anchor to customerIdcustomer•ID!required
Id 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
- Anchor to customercustomer•Customer
The updated customer.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Update a customer's attributes. As of API version 2022-10, apps using protected customer data must meet the protected customer data requirements.
- Anchor to inputinput•Customer
Input!required Provides updated fields for the customer. To set marketing consent, use the
or
mutations instead.
Arguments
- Anchor to customercustomer•Customer
The updated customer.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Updates a customer's default address.
- Anchor to addressIdaddress•ID!required
Id The ID of the customer's new default address.
- Anchor to customerIdcustomer•ID!required
Id The ID of the customer whose default address is being updated.
Arguments
- Anchor to customercustomer•Customer
The customer whose address was updated.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Create a delivery profile.
- Anchor to profileprofile•Delivery
Profile Input!required Specifies the input fields for a delivery profile.
Arguments
- Anchor to profileprofile•Delivery
Profile The delivery profile that was created.
- Anchor to userErrorsuser•[User
Errors 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
Update a delivery profile.
- •ID!required
The ID of the delivery profile to update.
- Anchor to leaveLegacyModeProfilesleave•Boolean
Legacy Mode Profiles Whether this delivery profile should leave legacy mode.
- Anchor to profileprofile•Delivery
Profile Input!required Specifies the input fields for a delivery profile.
Arguments
- Anchor to profileprofile•Delivery
Profile The delivery profile that was updated.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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
- Anchor to settingsetting•Delivery
Setting The updated delivery shop level settings.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Assigns a location as the shipping origin while using legacy compatibility mode for multi-location delivery profiles.
- Anchor to locationIdlocation•ID!required
Id The ID of the location to assign as the shipping origin.
Arguments
- Anchor to userErrorsuser•[User
Errors 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
Calculates the properties of a draft order. Useful for determining information such as total taxes or price without actually creating a draft order.
- Anchor to inputinput•Draft
Order Input!required The fields for the draft order.
Arguments
- Anchor to calculatedDraftOrdercalculated•Calculated
Draft Order Draft Order The calculated properties for a draft order.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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. The
mutation also supports sales channel attribution for tracking order sources using the
argument, 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 paymentGatewayIdpayment•ID
Gateway Id The gateway for the completed draft order.
- Anchor to paymentPendingpayment•BooleanDeprecatedDefault:false
Pending - Anchor to sourceNamesource•String
Name A channel definition handle used for sales channel attribution.
Arguments
- Anchor to draftOrderdraft•Draft
Order Order The completed draft order.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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
- Anchor to draftOrderdraft•Draft
Order Order The created draft order.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Creates a draft order from order.
- Anchor to orderIdorder•ID!required
Id Specifies the order's id that we create the draft order from.
Arguments
- Anchor to draftOrderdraft•Draft
Order Order The created draft order.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Deletes a draft order.
- Anchor to inputinput•Draft
Order Delete Input!required Specify the draft order to delete by its ID.
Arguments
- Anchor to deletedIddeleted•ID
Id The ID of the deleted draft order.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Duplicates a draft order.
- Anchor to draftOrderIddraft•IDDeprecated
Order Id - •ID
The ID of the draft order to duplicate.
Arguments
- Anchor to draftOrderdraft•Draft
Order Order The newly duplicated draft order.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Previews a draft order invoice email.
- Anchor to emailemail•Email
Input Specifies the draft order invoice email fields.
- •ID!required
Specifies the draft order invoice email to preview.
Arguments
- Anchor to previewHtmlpreview•HTML
Html The draft order invoice email rendered as HTML to allow previewing.
- Anchor to previewSubjectpreview•HTML
Subject The subject preview for the draft order invoice email.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Sends an email invoice for a draft order.
- Anchor to emailemail•Email
Input Specifies the draft order invoice email fields.
- •ID!required
Specifies the draft order to send the invoice for.
Arguments
- Anchor to draftOrderdraft•Draft
Order Order The draft order an invoice email is sent for.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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
- Anchor to draftOrderdraft•Draft
Order Order The updated draft order.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Creates a new Amazon EventBridge webhook subscription.
Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your
shopify.app.toml
may be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read About managing webhook subscriptions.- 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
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
- Anchor to webhookSubscriptionwebhook•Webhook
Subscription Subscription The webhook subscription that was created.
Fields
- •mutation
Updates an Amazon EventBridge webhook subscription.
Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your
shopify.app.toml
may be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read About managing webhook subscriptions.- •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
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
- Anchor to webhookSubscriptionwebhook•Webhook
Subscription Subscription The webhook subscription that was updated.
Fields
- •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
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Cancels a fulfillment.
- •ID!required
The ID of the fulfillment to be canceled.
Arguments
- Anchor to fulfillmentfulfillment•Fulfillment
The canceled fulfillment.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Creates a fulfillment for one or many fulfillment orders. The fulfillment orders are associated with the same order and are assigned to the same location.
- 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
- Anchor to fulfillmentfulfillment•Fulfillment
The created fulfillment.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Creates a fulfillment event for a specified fulfillment.
- Anchor to fulfillmentEventfulfillment•Fulfillment
Event Event Input!required The input fields used to create a fulfillment event for a fulfillment.
Arguments
- Anchor to fulfillmentEventfulfillment•Fulfillment
Event Event The created fulfillment event.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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
- Anchor to fulfillmentOrderfulfillment•Fulfillment
Order Order The fulfillment order whose cancellation request was accepted.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Accepts 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 messagemessage•String
An optional reason for accepting the fulfillment request.
Arguments
- Anchor to fulfillmentOrderfulfillment•Fulfillment
Order Order The fulfillment order whose fulfillment request was accepted.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Marks a fulfillment order as canceled.
- •ID!required
The ID of the fulfillment order to mark as canceled.
Arguments
- Anchor to fulfillmentOrderfulfillment•Fulfillment
Order Order The fulfillment order that was marked as canceled.
- Anchor to replacementFulfillmentOrderreplacement•Fulfillment
Fulfillment Order Order The fulfillment order that was created to replace the canceled fulfillment order.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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
- Anchor to fulfillmentOrderfulfillment•Fulfillment
Order Order The fulfillment order that was marked as incomplete.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Changes the location which is assigned to fulfill a number of unfulfilled fulfillment order line items.
Moving a fulfillment order will fail in the following circumstances:
- The fulfillment order is closed.
- The destination location has never stocked the requested inventory item.
- The API client doesn't have the correct permissions.
Line items which have already been fulfilled can't be re-assigned and will always remain assigned to the original location.
You can't change the assigned location while a fulfillment order has a request status of
,
,
, 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 the
2023-04
API version), or specify that the original fulfillment order contains line items which have already been fulfilled.If the new location is already assigned to another active fulfillment order, on the same order, then a new fulfillment order is created. The existing fulfillment order is closed and line items are recreated in a new fulfillment order.
- 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.
- •ID!required
The ID of the fulfillment order to be moved.
- Anchor to newLocationIdnew•ID!required
Location Id The ID of the location where the fulfillment order will be moved.
Arguments
- Anchor to movedFulfillmentOrdermoved•Fulfillment
Fulfillment Order Order The fulfillment order which now contains the moved line items and is assigned to the destination location.
If the original fulfillment order doesn't have any line items which are fully or partially fulfilled, the original fulfillment order will be moved to the new location. However if this isn't the case, the moved fulfillment order will differ from the original one.
- Anchor to originalFulfillmentOrderoriginal•Fulfillment
Fulfillment Order Order The final state of the original fulfillment order.
As a result of the move operation, the original fulfillment order might be moved to the new location or remain in the original location. The original fulfillment order might have the same status or be closed.
- Anchor to remainingFulfillmentOrderremaining•Fulfillment
Fulfillment Order Order This field is deprecated.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Marks a scheduled fulfillment order as open.
- •ID!required
The ID of the fulfillment order to mark as open.
Arguments
- Anchor to fulfillmentOrderfulfillment•Fulfillment
Order Order The fulfillment order that was transitioned to open and is fulfillable.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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
- Anchor to fulfillmentOrderfulfillment•Fulfillment
Order Order The fulfillment order whose cancellation request was rejected.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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 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.
- Anchor to messagemessage•String
An optional reason for rejecting the fulfillment request.
- Anchor to reasonreason•Fulfillment
Order Rejection Reason The reason for the fulfillment order rejection.
Arguments
- Anchor to fulfillmentOrderfulfillment•Fulfillment
Order Order The fulfillment order whose fulfillment request was rejected.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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
- Anchor to fulfillmentOrderfulfillment•Fulfillment
Order Order The fulfillment order specified in the cancelation request.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Sends a fulfillment request to the fulfillment service of a 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.
- •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.
Arguments
- Anchor to originalFulfillmentOrderoriginal•Fulfillment
Fulfillment Order Order The original fulfillment order intended to request fulfillment for.
- Anchor to submittedFulfillmentOrdersubmitted•Fulfillment
Fulfillment Order Order The fulfillment order that was submitted to the fulfillment service. This will be the same as the original fulfillment order field. The exception to this is partial fulfillment requests or fulfillment request for cancelled or incomplete fulfillment orders.
- Anchor to unsubmittedFulfillmentOrderunsubmitted•Fulfillment
Fulfillment Order Order This field will only be present for partial fulfillment requests. This will represent the new fulfillment order with the remaining line items not submitted to the fulfillment service.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Creates a fulfillment service.
Fulfillment service location
When creating a fulfillment service, a new location will be automatically created on the shop and will be associated with this fulfillment service. This location will be named after the fulfillment service and inherit the shop's address.
If you are using API version
2023-10
or later, and you need to specify custom attributes for the fulfillment service location (for example, to change its address to a country different from the shop's country), use the LocationEdit mutation after creating the fulfillment service.- Anchor to callbackUrlcallback•URL!required
Url The URL to send requests for the fulfillment service. The following considerations apply:
- Shopify queries the
callback_url/fetch_tracking_numbers
endpoint to retrieve tracking numbers for orders, ifis set to
true
. - Shopify queries the
callback_url/fetch_stock
endpoint to retrieve inventory levels, ifis set to
true
. - Shopify uses the
callback_url/fulfillment_order_notification
endpoint to send fulfillment and cancellation requests.
- Shopify queries the
- Anchor to fulfillmentOrdersOptInfulfillment•BooleanDeprecatedDefault:true
Orders Opt In - Anchor to inventoryManagementinventory•BooleanDefault:false
Management Whether the fulfillment service manages product inventory and provides updates to Shopify.
- Anchor to namename•String!required
The name of the fulfillment service.
- Anchor to permitsSkuSharingpermits•BooleanDeprecatedDefault:false
Sku Sharing - Anchor to trackingSupporttracking•BooleanDefault:false
Support Whether the fulfillment service provides tracking numbers for packages.
Arguments
- Anchor to fulfillmentServicefulfillment•Fulfillment
Service Service The created fulfillment service.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Deletes a fulfillment service.
- Anchor to destinationLocationIddestination•ID
Location Id - •ID!required
The ID of the fulfillment service to delete.
- Anchor to inventoryActioninventory•Fulfillment
Action Service Delete Inventory ActionDefault:TRANSFER The action to take with the location after the fulfillment service is deleted.
Arguments
- Anchor to deletedIddeleted•ID
Id The ID of the deleted fulfillment service.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Updates a fulfillment service.
If you are using API version
2023-10
or later, and you need to update the location managed by the fulfillment service (for example, to change the address of a fulfillment service), use the LocationEdit mutation.- Anchor to callbackUrlcallback•URL
Url The URL to send requests for the fulfillment service. The following considerations apply:
- Shopify queries the
callback_url/fetch_tracking_numbers
endpoint to retrieve tracking numbers for orders, ifis set to
true
. - Shopify queries the
callback_url/fetch_stock
endpoint to retrieve inventory levels, ifis set to
true
. - Shopify uses the
callback_url/fulfillment_order_notification
endpoint to send fulfillment and cancellation requests.
- Shopify queries the
- Anchor to fulfillmentOrdersOptInfulfillment•BooleanDeprecated
Orders Opt In - •ID!required
The id of the fulfillment service.
- Anchor to inventoryManagementinventory•Boolean
Management Whether the fulfillment service tracks product inventory and provides updates to Shopify.
- Anchor to namename•String
The name of the fulfillment service.
- Anchor to permitsSkuSharingpermits•BooleanDeprecated
Sku Sharing - Anchor to trackingSupporttracking•Boolean
Support Whether the fulfillment service provides tracking numbers for packages.
Arguments
- Anchor to fulfillmentServicefulfillment•Fulfillment
Service Service The updated fulfillment service.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Updates tracking information for a fulfillment.
- Anchor to fulfillmentIdfulfillment•ID!required
Id The ID of the fulfillment.
- 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.
- Anchor to trackingInfoInputtracking•Fulfillment
Info Input Tracking Input!required The tracking input for the mutation, including tracking URL, number, and company.
Arguments
- Anchor to fulfillmentfulfillment•Fulfillment
The updated fulfillment with tracking information.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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
- Anchor to giftCardgift•Gift
Card Card The updated gift card.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Activate an inventory item at a location.
- Anchor to availableavailable•Int
The initial available quantity of the inventory item being activated at the location.
- Anchor to inventoryItemIdinventory•ID!required
Item Id The ID of the inventory item to activate.
- Anchor to locationIdlocation•ID!required
Id The ID of the location of the inventory item being activated.
- Anchor to onHandon•Int
Hand The initial on_hand quantity of the inventory item being activated at the location.
- Anchor to stockAtLegacyLocationstock•BooleanDefault:false
At Legacy Location Allow activation at or away from fulfillment service location with sku sharing off. This will deactivate inventory at all other locations.
Arguments
- Anchor to inventoryLevelinventory•Inventory
Level Level The inventory level that was activated.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Removes an inventory item's quantities from a location, and turns off inventory at the location.
- Anchor to inventoryLevelIdinventory•ID!required
Level Id The ID of the inventory level to deactivate.
Arguments
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Updates an inventory item.
- •ID!required
The ID of the inventory item to update.
- Anchor to inputinput•Inventory
Item Input!required
Arguments
- Anchor to inventoryIteminventory•Inventory
Item Item The inventory item that was updated.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Create new marketing activity.
- Anchor to inputinput•Marketing
Activity Create Input!required The Input of marketing activity create.
Arguments
- Anchor to marketingActivitymarketing•Marketing
Activity Activity The created marketing activity.
- Anchor to redirectPathredirect•String
Path The path to return back to shopify admin from embedded editor.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Updates a marketing activity with the latest information.
- Anchor to inputinput•Marketing
Activity Update Input!required The Input of the marketing activity.
Arguments
- Anchor to marketingActivitymarketing•Marketing
Activity Activity The updated marketing activity.
- Anchor to redirectPathredirect•String
Path The redirect path from the embedded editor to the Shopify admin.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Deletes multiple metafields in bulk.
- Anchor to metafieldsmetafields•[Metafield
Identifier Input!]!required A list of identifiers specifying metafields to delete. At least one identifier must be specified.
Arguments
- Anchor to deletedMetafieldsdeleted•[Metafield
Metafields Identifier] List of metafield identifiers that were deleted, null if the corresponding metafield isn't found.
- Anchor to userErrorsuser•[User
Errors 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
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
currency
field 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
- Anchor to transactiontransaction•Order
Transaction The created capture transaction.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Closes an open order.
- Anchor to inputinput•Order
Close Input!required The input for the mutation.
Arguments
- Anchor to orderorder•Order
The closed order.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Adds a custom line item to an existing order. For example, you could add a gift wrapping service as a custom line item. To learn how to edit existing orders, refer to Edit an existing order with Admin API.
- •ID!required
The ID of the calculated order to which the custom item is added.
- 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 requiresShippingrequires•Boolean
Shipping Whether the custom item requires shipping. Defaults to
false
.- Anchor to taxabletaxable•Boolean
Whether the custom item is taxable. Defaults to
true
.- Anchor to titletitle•String!required
The name of the custom item to add.
Arguments
- Anchor to calculatedLineItemcalculated•Calculated
Line Item Line Item The custom line item that will be added to the order based on the current edits.
- Anchor to calculatedOrdercalculated•Calculated
Order Order An order with the edits applied but not saved.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Adds a discount to a line item on the current order edit. For more information on how to use the GraphQL Admin API to edit an existing order, refer to Edit existing orders.
- Anchor to discountdiscount•Order
Edit Applied Discount Input!required The discount to add to the line item.
- •ID!required
The ID of the calculated order to update.
- Anchor to lineItemIdline•ID!required
Item Id The ID of the calculated line item to add the discount to.
Arguments
- Anchor to addedDiscountStagedChangeadded•Order
Discount Staged Change Staged Change Add Line Item Discount The discount applied to a line item during this order edit.
- Anchor to calculatedLineItemcalculated•Calculated
Line Item Line Item The line item with the edits applied but not saved.
- Anchor to calculatedOrdercalculated•Calculated
Order Order An order with the edits applied but not saved.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Adds a line item from an existing product variant. As of API version 2025-04, the orderEditAddVariant API will respect the contextual pricing of the variant.
- Anchor to allowDuplicatesallow•BooleanDefault:false
Duplicates Whether the mutation can create a line item for a variant that's already on the calculated order.
- •ID!required
The ID of the calculated order to edit.
- 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 variantIdvariant•ID!required
Id The ID of the variant to add.
Arguments
- Anchor to calculatedLineItemcalculated•Calculated
Line Item Line Item The calculated line item that's added during this order edit.
- Anchor to calculatedOrdercalculated•Calculated
Order Order The calculated order with the edits applied but not saved.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Starts editing an order. Mutations are operating on
. All order edits start with
, have any number of
* mutations made, and end with
.
- •ID!required
The ID of the order to begin editing.
Arguments
- Anchor to calculatedOrdercalculated•Calculated
Order Order The order that will be edited.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Applies and saves staged changes to an order. Mutations are operating on
. All order edits start with
, have any number of
* mutations made, and end with
.
- •ID!required
The ID of the calculated order 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
- Anchor to orderorder•Order
The order with changes applied.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Sets the quantity of a line item on an order that is being edited. For more information on how to use the GraphQL Admin API to edit an existing order, refer to Edit existing orders.
- •ID!required
The ID of the calculated order to edit. The edit changes the quantity on the line item.
- Anchor to lineItemIdline•ID!required
Item Id The ID of the calculated line item to edit.
- Anchor to locationIdlocation•IDDeprecated
Id - 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.
Arguments
- Anchor to calculatedLineItemcalculated•Calculated
Line Item Line Item The calculated line item with the edits applied but not saved.
- Anchor to calculatedOrdercalculated•Calculated
Order Order The calculated order with the edits applied but not saved.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Marks an order as paid. You can only mark an order as paid if it isn't already fully paid.
- Anchor to inputinput•Order
Mark As Paid Input!required The input for the mutation.
Arguments
- Anchor to orderorder•Order
The order marked as paid.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Opens a closed order.
- Anchor to inputinput•Order
Open Input!required The input for the mutation.
Arguments
- Anchor to orderorder•Order
The opened order.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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. The
mutation initiates an order editing session, allowing you to make multiple changes before finalizing them. Learn more about using the
mutation to edit existing orders.
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
- Anchor to orderorder•Order
The updated order.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Creates a new componentized product.
- Anchor to inputinput•Product
Bundle Create Input!required Input for creating a componentized product.
Arguments
- Anchor to productBundleOperationproduct•Product
Bundle Operation Bundle Operation The asynchronous ProductBundleOperation creating the componentized product.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Updates a componentized product.
- Anchor to inputinput•Product
Bundle Update Input!required Input for updating a componentized product.
Arguments
- Anchor to productBundleOperationproduct•Product
Bundle Operation Bundle Operation The asynchronous ProductBundleOperation updating the componentized product.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Creates a product with attributes such as title, description, and vendor. You can use the
mutation to define options and values for products with product variants, such as different sizes or colors.
To create multiple product variants for a single product and manage prices, use the
mutation.
To create or update a product in a single request, use the
mutation.
Learn more about the product model and adding product data.
- Anchor to inputinput•Product
InputDeprecated - Anchor to mediamedia•[Create
Media Input!] The media to add to the product.
- Anchor to productproduct•Product
Create Input The attributes of the new product.
Arguments
- Anchor to productproduct•Product
The product object.
- Anchor to shopshop•Shop!non-null
The shop associated with the product.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Deletes a product, including all associated variants and media.
As of API version
2023-01
, if you need to delete a large product, such as one that has many variants that are active at several locations, you may encounter timeout errors. To avoid these timeout errors, you can instead use the asynchronous ProductDeleteAsync mutation.- 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
- Anchor to deletedProductIddeleted•ID
Product Id The ID of the deleted product.
- Anchor to productDeleteOperationproduct•Product
Delete Operation Delete Operation The product delete operation, returned when run in asynchronous mode.
- Anchor to shopshop•Shop!non-null
The shop associated with the product.
- Anchor to userErrorsuser•[User
Errors 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
Updates a product.
For versions
2024-01
and older: If you update a product and only include some variants in the update, then any variants not included will be deleted.To safely manage variants without the risk of deleting excluded variants, use productVariantsBulkUpdate.
If you want to update a single variant, then use productVariantUpdate.
- Anchor to inputinput•Product
InputDeprecated - Anchor to mediamedia•[Create
Media Input!] List of new media to be added to the product.
- Anchor to productproduct•Product
Update Input The updated properties for a product.
Arguments
- Anchor to productproduct•Product
The updated product object.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Publishes a resource to a channel. If the resource is a product, then it's visible in the channel only if the product status is
active
. Products that are sold exclusively on subscription () can be published only on online stores.
- •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
- Anchor to publishablepublishable•Publishable
Resource that has been published.
- 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
Publishes a resource to current channel. If the resource is a product, then it's visible in the channel only if the product status is
active
. Products that are sold exclusively on subscription () can be published only on online stores.
- •ID!required
The resource to create or update publications for.
Arguments
- Anchor to publishablepublishable•Publishable
Resource that has been published.
- 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
Unpublishes a resource from a channel. If the resource is a product, then it's visible in the channel only if the product status is
active
.- •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
- Anchor to publishablepublishable•Publishable
Resource that has been unpublished.
- 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
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
- Anchor to publishablepublishable•Publishable
Resource that has been unpublished.
- 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
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. The mutation also supports idempotent requests to safely retry failed refund attempts.
After creating a refund, you can track its status and details through the order's
refunds
field. The refund is associated with the order and can be used for reporting and reconciliation purposes.Learn more about managing returns and refunding duties.
Note- Anchor to inputinput•Refund
Input!required The input fields that are used in the mutation for creating a refund.
Arguments
- Anchor to orderorder•Order
The order associated with the created refund.
- Anchor to refundrefund•Refund
The created refund.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Creates a saved search.
- Anchor to inputinput•Saved
Search Create Input!required Specifies the input fields for a saved search.
Arguments
- Anchor to savedSearchsaved•Saved
Search Search The saved search that was created.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Delete a saved search.
- Anchor to inputinput•Saved
Search Delete Input!required The input fields to delete a saved search.
Arguments
- Anchor to deletedSavedSearchIddeleted•ID
Saved Search Id The ID of the saved search that was deleted.
- Anchor to shopshop•Shop!non-null
The shop of the saved search that was deleted.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Updates a saved search.
- Anchor to inputinput•Saved
Search Update Input!required The input fields to update a saved search.
Arguments
- Anchor to savedSearchsaved•Saved
Search Search The saved search that was updated.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Theme app extensions
Your app might not pass App Store review if it uses script tags instead of theme app extensions. All new apps, and apps that integrate with Online Store 2.0 themes, should use theme app extensions, such as app blocks or app embed blocks. Script tags are an alternative you can use with only vintage themes. Learn more.
Script tag deprecation
Script tags will be sunset for the Order status page on August 28, 2025. Upgrade to Checkout Extensibility before this date. Shopify Scripts will continue to work alongside Checkout Extensibility until August 28, 2025.
Creates a new script tag.
- Anchor to inputinput•Script
Tag Input!required The input fields for a script tag.
Arguments
- Anchor to scriptTagscript•Script
Tag Tag The script tag that was created.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Theme app extensions
Your app might not pass App Store review if it uses script tags instead of theme app extensions. All new apps, and apps that integrate with Online Store 2.0 themes, should use theme app extensions, such as app blocks or app embed blocks. Script tags are an alternative you can use with only vintage themes. Learn more.
Script tag deprecation
Script tags will be sunset for the Order status page on August 28, 2025. Upgrade to Checkout Extensibility before this date. Shopify Scripts will continue to work alongside Checkout Extensibility until August 28, 2025.
Deletes a script tag.
- •ID!required
The ID of the script tag to delete.
Arguments
- Anchor to deletedScriptTagIddeleted•ID
Script Tag Id The ID of the deleted script tag.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Theme app extensions
Your app might not pass App Store review if it uses script tags instead of theme app extensions. All new apps, and apps that integrate with Online Store 2.0 themes, should use theme app extensions, such as app blocks or app embed blocks. Script tags are an alternative you can use with only vintage themes. Learn more.
Script tag deprecation
Script tags will be sunset for the Order status page on August 28, 2025. Upgrade to Checkout Extensibility before this date. Shopify Scripts will continue to work alongside Checkout Extensibility until August 28, 2025.
Updates a script tag.
- •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
- Anchor to scriptTagscript•Script
Tag Tag The script tag that was updated.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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
- Anchor to segmentsegment•Segment
The newly created segment.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Deletes a segment.
- •ID!required
Specifies the segment to delete.
Arguments
- Anchor to deletedSegmentIddeleted•ID
Segment Id ID of the deleted segment.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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
- Anchor to segmentsegment•Segment
The updated segment.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Deletes a shipping package.
- •ID!required
The ID of the shipping package to remove.
Arguments
- Anchor to deletedIddeleted•ID
Id The ID of the deleted shipping package.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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
- Anchor to localelocale•String
ISO code of the locale that was deleted.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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
- Anchor to shopLocaleshop•Shop
Locale Locale ISO code of the locale that was enabled.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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
- Anchor to shopLocaleshop•Shop
Locale Locale The locale that was updated.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Creates staged upload targets for each input. This is the first step in the upload process. The returned staged upload targets' URL and parameter fields can be used to send a request to upload the file described in the corresponding input.
For more information on the upload process, refer to Upload media to Shopify.
- Anchor to inputinput•[Staged
Upload Input!]!required The information required to generate staged upload targets.
Arguments
- Anchor to stagedTargetsstaged•[Staged
Targets Media Upload Target!] The staged upload targets that were generated.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Creates a storefront access token for use with the Storefront API.
An app can have a maximum of 100 active storefront access tokens for each shop.
- Anchor to inputinput•Storefront
Access Token Input!required Provides the input fields for creating a storefront access token.
Arguments
- Anchor to shopshop•Shop!non-null
The user's shop.
- Anchor to storefrontAccessTokenstorefront•Storefront
Access Token Access Token The storefront access token.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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
- Anchor to deletedStorefrontAccessTokenIddeleted•ID
Storefront Access Token Id The ID of the deleted storefront access token.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Add tags to an order, a draft order, a customer, a product, or an online store article.
- •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
- •Node
The object that was updated.
- •[User
Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Remove tags from an order, a draft order, a customer, a product, or an online store article.
- •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
- •Node
The object that was updated.
- •[User
Error!]!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
Creates a new webhook subscription.
Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your
shopify.app.toml
may be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read About managing webhook subscriptions.- 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
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
- Anchor to webhookSubscriptionwebhook•Webhook
Subscription Subscription The webhook subscription that was created.
Fields
- •mutation
Deletes a webhook subscription.
Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your
shopify.app.toml
may be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read About managing webhook subscriptions.- •ID!required
The ID of the webhook subscription to delete.
Arguments
- Anchor to deletedWebhookSubscriptionIddeleted•ID
Webhook Subscription Id The ID of the deleted webhook subscription.
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Updates a webhook subscription.
Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your
shopify.app.toml
may be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read About managing webhook subscriptions.- •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
- Anchor to userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
- Anchor to webhookSubscriptionwebhook•Webhook
Subscription Subscription The webhook subscription that was updated.
Fields
Deprecated mutations
- •mutationDeprecated
- •mutationDeprecated
- •mutationDeprecated
- •mutationDeprecated
- •mutationDeprecated
- •mutationDeprecated
- •mutationDeprecated
- •mutationDeprecated
- •mutationDeprecated
- •mutationDeprecated
- •mutationDeprecated
- •mutationDeprecated
- •mutationDeprecated
- •mutationDeprecated
- •mutationDeprecated
- •mutationDeprecated
- •mutationDeprecated
- •mutationDeprecated