Skip to main content
object

Represents an error in the input of a mutation.

•[String!]

The path to the input field that caused the error.

•String!non-null

The error message.


Was this section helpful?

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

Arguments

•String!required

The name of the one-time purchase from the app.

•MoneyInput!required

The amount to be charged to the store for the app one-time purchase.

•URL!required

The URL where the merchant is redirected after approving the app one-time purchase.

•BooleanDefault:false

Whether the app one-time purchase is a test transaction.


Fields

•AppPurchaseOneTime

The newly created app one-time purchase.

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

You get paid after the charge is activated.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Cancels an app subscription on a store.

Arguments

•ID!required

The ID of the app subscription to be cancelled.

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


Fields

•AppSubscription

The cancelled app subscription.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Allows an app to charge a store for features or services on a recurring basis.

Arguments

•[AppSubscriptionLineItemInput!]!required

Attaches one or more pricing plans to an app subscription. Only one pricing plan can be defined for each available type.

•String!required

A descriptive name for the app subscription.

•AppSubscriptionReplacementBehaviorDefault:STANDARD

The replacement behavior when creating an app subscription for a merchant with an already existing app subscription.

•URL!required

The URL pointing to the page where the merchant is redirected after approving the app subscription.

•BooleanDefault:false

Whether the app subscription is a test transaction.

•Int

The number of days of the free trial period, beginning on the day that the merchant approves the app charges.


Fields

•AppSubscription

The newly-created app subscription.

•URL

The URL pointing to the page where the merchant approves or declines the charges for an app subscription.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Updates the capped amount on the usage pricing plan of an app subscription line item.

Arguments

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


Fields

•AppSubscription

The updated app subscription.

•URL

The URL where the merchant approves or declines the updated app subscription line item.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•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 cappedAmount limit that was specified in the appUsagePricingDetails 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.

Arguments

•String!required

The description of the app usage record.

•String

A unique key generated by the client to avoid duplicate charges. Maximum length of 255 characters.

•MoneyInput!required

The price of the app usage record.

Anchor to subscriptionLineItemIdsubscriptionLineItemId
•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.


Fields

•AppUsageRecord

The newly created app usage record.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

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

Arguments

•ID!required

The ID of the bulk operation to cancel.


Fields

•BulkOperation

The bulk operation to be canceled.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Creates and runs a bulk operation query.

See the bulk operations guide for more details.

Arguments

•String!required

The query to be executed in bulk.


Fields

•BulkOperation

The newly created bulk operation.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Adds products to a collection.

Arguments

•ID!required

The ID of the collection that's being updated. This can't be a smart collection.

•[ID!]!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.


Fields

•Collection

The updated collection. Returns null if an error is raised.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Creates a collection.

Arguments

•CollectionInput!required

The properties to use when creating the collection.


Fields

•Collection

The collection that has been created.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Deletes a collection.

Arguments

•CollectionDeleteInput!required

The collection to delete.


Fields

•ID

The ID of the collection that was deleted. Returns null if the collection doesn't exist.

•Shop!non-null

The shop associated with the collection.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Removes a set of products from a given collection. The mutation can take a long time to run. Instead of returning an updated collection the mutation returns a job, which should be polled. For use with manual collections only.

Arguments

•ID!required

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

•[ID!]!required

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


Fields

•Job

The asynchronous job removing the products.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Asynchronously reorders a set of products within a specified collection. Instead of returning an updated collection, this mutation returns a job, which should be polled. The Collection.sortOrder must be MANUAL. Displaced products will have their position altered in a consistent manner, with no gaps.

Arguments

•ID!required

The ID of the collection on which to reorder products.

•[MoveInput!]!required

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


Fields

•Job

The asynchronous job reordering the products.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Updates a collection.

Arguments

•CollectionInput!required

The updated properties for the collection.


Fields

•Collection

The updated collection.

•Job

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

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Add tax exemptions for the customer.

Arguments

•ID!required

The ID of the customer to update.

•[TaxExemption!]!required

The list of tax exemptions to add for the customer, in the format of an array or a comma-separated list. Example values: ["CA_BC_RESELLER_EXEMPTION", "CA_STATUS_CARD_EXEMPTION"], "CA_BC_RESELLER_EXEMPTION, CA_STATUS_CARD_EXEMPTION".


Fields

•Customer

The updated customer.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Create a new customer. As of API version 2022-10, apps using protected customer data must meet the protected customer data requirements.

Arguments

•CustomerInput!required

The input fields to create a customer.


Fields

•Customer

The created customer.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Delete a customer. As of API version 2022-10, apps using protected customer data must meet the protected customer data requirements.

Arguments

•CustomerDeleteInput!required

Specifies the customer to delete.


Fields

•ID

The ID of the deleted customer.

•Shop!non-null

The shop of the deleted customer.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Generate an account activation URL for a customer.

Arguments

•ID!required

The ID of the customer that the URL is generated for.


Fields

Anchor to accountActivationUrlaccountActivationUrl
•URL

The generated account activation URL.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

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

Arguments

•MailingAddressInput!required

The billing address.

•ID!required

The ID of the customer.

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


Fields

Anchor to customerPaymentMethodcustomerPaymentMethod
•CustomerPaymentMethod

The customer payment method.

•Boolean

If the card verification result is processing. When this is true, customer_payment_method will be null.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Updates the credit card payment method for a customer.

Arguments

•MailingAddressInput!required

The billing address.

•ID!required

The ID of the customer payment method.

•String!required

The Cardserver session ID.


Fields

Anchor to customerPaymentMethodcustomerPaymentMethod
•CustomerPaymentMethod

The customer payment method.

•Boolean

If the card verification result is processing. When this is true, customer_payment_method will be null.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Revokes a customer's payment method.

Arguments

Anchor to customerPaymentMethodIdcustomerPaymentMethodId
•ID!required

The ID of the customer payment method to be revoked.


Fields

Anchor to revokedCustomerPaymentMethodIdrevokedCustomerPaymentMethodId
•ID

The ID of the revoked customer payment method.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Sends a link to the customer so they can update a specific payment method.

Arguments

Anchor to customerPaymentMethodIdcustomerPaymentMethodId
•ID!required

The payment method to be updated.

•EmailInput

Specifies the payment method update email fields. Only the 'from' and 'bcc' fields are accepted for input.


Fields

•Customer

The customer to whom an update payment method email was sent.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Remove tax exemptions from a customer.

Arguments

•ID!required

The ID of the customer to update.

•[TaxExemption!]!required

The list of tax exemptions to remove for the customer, in the format of an array or a comma-separated list. Example values: ["CA_BC_RESELLER_EXEMPTION", "A_STATUS_CARD_EXEMPTION"], "CA_BC_RESELLER_EXEMPTION, CA_STATUS_CARD_EXEMPTION".


Fields

•Customer

The updated customer.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Replace tax exemptions for a customer.

Arguments

•ID!required

The ID of the customer to update.

•[TaxExemption!]!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: ["CA_BC_RESELLER_EXEMPTION", "A_STATUS_CARD_EXEMPTION"], "CA_BC_RESELLER_EXEMPTION, CA_STATUS_CARD_EXEMPTION".


Fields

•Customer

The updated customer.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Update a customer's attributes. As of API version 2022-10, apps using protected customer data must meet the protected customer data requirements.

Arguments

•CustomerInput!required

Provides updated fields for the customer. To set marketing consent, use the customerEmailMarketingConsentUpdate or customerSmsMarketingConsentUpdate mutations instead.


Fields

•Customer

The updated customer.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Updates a customer's default address.

Arguments

•ID!required

The ID of the customer's new default address.

•ID!required

The ID of the customer whose default address is being updated.


Fields

•Customer

The customer whose address was updated.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Create a delivery profile.

Arguments

•DeliveryProfileInput!required

Specifies the input fields for a delivery profile.


Fields

•DeliveryProfile

The delivery profile that was created.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Enqueue the removal of a delivery profile.

Arguments

•ID!required

The ID of the delivery profile to remove.


Fields

•Job

The delivery profile deletion job triggered by the mutation.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Update a delivery profile.

Arguments

•ID!required

The ID of the delivery profile to update.

Anchor to leaveLegacyModeProfilesleaveLegacyModeProfiles
•Boolean

Whether this delivery profile should leave legacy mode.

•DeliveryProfileInput!required

Specifies the input fields for a delivery profile.


Fields

•DeliveryProfile

The delivery profile that was updated.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Set the delivery settings for a shop.

Arguments

•DeliverySettingInput!required

Specifies the input fields for the delivery shop level settings.


Fields

•DeliverySetting

The updated delivery shop level settings.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Assigns a location as the shipping origin while using legacy compatibility mode for multi-location delivery profiles.

Arguments

•ID!required

The ID of the location to assign as the shipping origin.


Fields

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Adds tags to multiple draft orders.

Arguments

•[ID!]

The IDs of the draft orders to add tags to.

•ID

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

•String

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

•[String!]!required

List of tags to be added.


Fields

•Job

The asynchronous job for adding tags to the draft orders.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Deletes multiple draft orders.

Arguments

•[ID!]

The IDs of the draft orders to delete.

•ID

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

•String

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


Fields

•Job

The asynchronous job for deleting the draft orders.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Removes tags from multiple draft orders.

Arguments

•[ID!]

The IDs of the draft orders to remove tags from.

•ID

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

•String

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

•[String!]!required

List of tags to be removed.


Fields

•Job

The asynchronous job for removing tags from the draft orders.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Calculates the properties of a draft order. Useful for determining information such as total taxes or price without actually creating a draft order.

Arguments

•DraftOrderInput!required

The fields for the draft order.


Fields

Anchor to calculatedDraftOrdercalculatedDraftOrder
•CalculatedDraftOrder

The calculated properties for a draft order.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•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 draftOrderComplete mutation when a merchant is ready to finalize a draft order and create a real order in their store. The draftOrderComplete mutation also supports sales channel attribution for tracking order sources using the sourceName 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.

Note

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


Arguments

•ID!required

The draft order to complete.

•ID

The gateway for the completed draft order.

•BooleanDeprecatedDefault:false
•String

A channel definition handle used for sales channel attribution.


Fields

•DraftOrder

The completed draft order.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

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


Note

When 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 reserveInventoryUntil input.


Arguments

•DraftOrderInput!required

The fields used to create the draft order.


Fields

•DraftOrder

The created draft order.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Creates a draft order from order.

Arguments

•ID!required

Specifies the order's id that we create the draft order from.


Fields

•DraftOrder

The created draft order.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Deletes a draft order.

Arguments

•DraftOrderDeleteInput!required

Specify the draft order to delete by its ID.


Fields

•ID

The ID of the deleted draft order.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Duplicates a draft order.

Arguments

•IDDeprecated
•ID

The ID of the draft order to duplicate.


Fields

•DraftOrder

The newly duplicated draft order.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Previews a draft order invoice email.

Arguments

•EmailInput

Specifies the draft order invoice email fields.

•ID!required

Specifies the draft order invoice email to preview.


Fields

•HTML

The draft order invoice email rendered as HTML to allow previewing.

•HTML

The subject preview for the draft order invoice email.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Sends an email invoice for a draft order.

Arguments

•EmailInput

Specifies the draft order invoice email fields.

•ID!required

Specifies the draft order to send the invoice for.


Fields

•DraftOrder

The draft order an invoice email is sent for.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

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

Arguments

•ID!required

Specifies the draft order to update.

•DraftOrderInput!required

The draft order properties to update.


Fields

•DraftOrder

The updated draft order.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

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

Arguments

•WebhookSubscriptionTopic!required

The type of event that triggers the webhook.

•EventBridgeWebhookSubscriptionInput!required

Specifies the input fields for an EventBridge webhook subscription.


Fields

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•WebhookSubscription

The webhook subscription that was created.

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

Arguments

•ID!required

The ID of the webhook subscription to update.

•EventBridgeWebhookSubscriptionInput!required

Specifies the input fields for an EventBridge webhook subscription.


Fields

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•WebhookSubscription

The webhook subscription that was updated.

•mutation

Triggers any workflows that begin with the trigger specified in the request body. To learn more, refer to Create Shopify Flow triggers.

Arguments

•StringDeprecated
•String

The handle of the trigger.

•JSON

The payload needed to run the Trigger.


Fields

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Cancels a fulfillment.

Arguments

•ID!required

The ID of the fulfillment to be canceled.


Fields

•Fulfillment

The canceled fulfillment.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

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

Arguments

•FulfillmentInput!required

The input fields used to create a fulfillment from fulfillment orders.

•String

An optional message for the fulfillment request.


Fields

•Fulfillment

The created fulfillment.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Creates a fulfillment event for a specified fulfillment.

Arguments

•FulfillmentEventInput!required

The input fields used to create a fulfillment event for a fulfillment.


Fields

•FulfillmentEvent

The created fulfillment event.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Accept a cancellation request sent to a fulfillment service for a fulfillment order.

Arguments

•ID!required

The ID of the fulfillment order associated with the cancellation request.

•String

An optional reason for accepting the cancellation request.


Fields

•FulfillmentOrder

The fulfillment order whose cancellation request was accepted.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Accepts a fulfillment request sent to a fulfillment service for a fulfillment order.

Arguments

•ID!required

The ID of the fulfillment order associated with the fulfillment request.

•String

An optional reason for accepting the fulfillment request.


Fields

•FulfillmentOrder

The fulfillment order whose fulfillment request was accepted.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Marks a fulfillment order as canceled.

Arguments

•ID!required

The ID of the fulfillment order to mark as canceled.


Fields

•FulfillmentOrder

The fulfillment order that was marked as canceled.

Anchor to replacementFulfillmentOrderreplacementFulfillmentOrder
•FulfillmentOrder

The fulfillment order that was created to replace the canceled fulfillment order.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

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

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.

Arguments

•ID!required

The ID of the fulfillment order to mark as incomplete.

•String

An optional reason for marking the fulfillment order as incomplete.


Fields

•FulfillmentOrder

The fulfillment order that was marked as incomplete.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•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 SUBMITTED, ACCEPTED, CANCELLATION_REQUESTED, or CANCELLATION_REJECTED. 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 fulfillmentOrderLineItems 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.

Arguments

Anchor to fulfillmentOrderLineItemsfulfillmentOrderLineItems
•[FulfillmentOrderLineItemInput!]

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.

•ID!required

The ID of the location where the fulfillment order will be moved.


Fields

Anchor to movedFulfillmentOrdermovedFulfillmentOrder
•FulfillmentOrder

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 originalFulfillmentOrderoriginalFulfillmentOrder
•FulfillmentOrder

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 remainingFulfillmentOrderremainingFulfillmentOrder
•FulfillmentOrder

This field is deprecated.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Marks a scheduled fulfillment order as open.

Arguments

•ID!required

The ID of the fulfillment order to mark as open.


Fields

•FulfillmentOrder

The fulfillment order that was transitioned to open and is fulfillable.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Rejects a cancellation request sent to a fulfillment service for a fulfillment order.

Arguments

•ID!required

The ID of the fulfillment order associated with the cancellation request.

•String

An optional reason for rejecting the cancellation request.


Fields

•FulfillmentOrder

The fulfillment order whose cancellation request was rejected.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Rejects a fulfillment request sent to a fulfillment service for a fulfillment order.

Arguments

•ID!required

The ID of the fulfillment order associated with the fulfillment request.

•[IncomingRequestLineItemInput!]

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.

•String

An optional reason for rejecting the fulfillment request.

•FulfillmentOrderRejectionReason

The reason for the fulfillment order rejection.


Fields

•FulfillmentOrder

The fulfillment order whose fulfillment request was rejected.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Sends a cancellation request to the fulfillment service of a fulfillment order.

Arguments

•ID!required

The ID of the fulfillment order associated with the cancellation request.

•String

An optional reason for the cancellation request.


Fields

•FulfillmentOrder

The fulfillment order specified in the cancelation request.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Sends a fulfillment request to the fulfillment service of a fulfillment order.

Arguments

Anchor to fulfillmentOrderLineItemsfulfillmentOrderLineItems
•[FulfillmentOrderLineItemInput!]

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.

•String

An optional message for the fulfillment request.

•Boolean

Whether the customer should be notified when fulfillments are created for this fulfillment order.


Fields

Anchor to originalFulfillmentOrderoriginalFulfillmentOrder
•FulfillmentOrder

The original fulfillment order intended to request fulfillment for.

Anchor to submittedFulfillmentOrdersubmittedFulfillmentOrder
•FulfillmentOrder

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 unsubmittedFulfillmentOrderunsubmittedFulfillmentOrder
•FulfillmentOrder

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.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

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

Arguments

•URL!required

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, if trackingSupport is set to true.
  • Shopify queries the callback_url/fetch_stock endpoint to retrieve inventory levels, if inventoryManagement is set to true.
  • Shopify uses the callback_url/fulfillment_order_notification endpoint to send fulfillment and cancellation requests.
Anchor to fulfillmentOrdersOptInfulfillmentOrdersOptIn
•BooleanDeprecatedDefault:true
•BooleanDefault:false

Whether the fulfillment service manages product inventory and provides updates to Shopify.

•String!required

The name of the fulfillment service.

•BooleanDeprecatedDefault:false
•BooleanDefault:false

Whether the fulfillment service provides tracking numbers for packages.


Fields

•FulfillmentService

The created fulfillment service.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Deletes a fulfillment service.

Arguments

Anchor to destinationLocationIddestinationLocationId
•ID

The ID of an active merchant managed location where inventory and commitments will be relocated after the fulfillment service is deleted.

Inventory will only be transferred if the TRANSFER inventory action has been chosen.

•ID!required

The ID of the fulfillment service to delete.

•FulfillmentServiceDeleteInventoryActionDefault:TRANSFER

The action to take with the location after the fulfillment service is deleted.


Fields

•ID

The ID of the deleted fulfillment service.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

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

Arguments

•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, if trackingSupport is set to true.
  • Shopify queries the callback_url/fetch_stock endpoint to retrieve inventory levels, if inventoryManagement is set to true.
  • Shopify uses the callback_url/fulfillment_order_notification endpoint to send fulfillment and cancellation requests.
Anchor to fulfillmentOrdersOptInfulfillmentOrdersOptIn
•BooleanDeprecated
•ID!required

The id of the fulfillment service.

•Boolean

Whether the fulfillment service tracks product inventory and provides updates to Shopify.

•String

The name of the fulfillment service.

•BooleanDeprecated
•Boolean

Whether the fulfillment service provides tracking numbers for packages.


Fields

•FulfillmentService

The updated fulfillment service.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Updates tracking information for a fulfillment.

Arguments

•ID!required

The ID of the fulfillment.

•Boolean

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.

•FulfillmentTrackingInput!required

The tracking input for the mutation, including tracking URL, number, and company.


Fields

•Fulfillment

The updated fulfillment with tracking information.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Update a gift card.

Arguments

•ID!required

The ID of the gift card to be updated.

•GiftCardUpdateInput!required

The input fields to update the gift card.


Fields

•GiftCard

The updated gift card.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Activate an inventory item at a location.

Arguments

•Int

The initial available quantity of the inventory item being activated at the location.

•ID!required

The ID of the inventory item to activate.

•ID!required

The ID of the location of the inventory item being activated.

•Int

The initial on_hand quantity of the inventory item being activated at the location.

Anchor to stockAtLegacyLocationstockAtLegacyLocation
•BooleanDefault:false

Allow activation at or away from fulfillment service location with sku sharing off. This will deactivate inventory at all other locations.


Fields

•InventoryLevel

The inventory level that was activated.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Removes an inventory item's quantities from a location, and turns off inventory at the location.

Arguments

•ID!required

The ID of the inventory level to deactivate.


Fields

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Updates an inventory item.

Arguments

•ID!required

The ID of the inventory item to update.

•InventoryItemInput!required

The input fields that update an inventoryItem.


Fields

•InventoryItem

The inventory item that was updated.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Create new marketing activity.

Arguments

•MarketingActivityCreateInput!required

The Input of marketing activity create.


Fields

•MarketingActivity

The created marketing activity.

•String

The path to return back to shopify admin from embedded editor.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Updates a marketing activity with the latest information.

Arguments

•MarketingActivityUpdateInput!required

The Input of the marketing activity.


Fields

•MarketingActivity

The updated marketing activity.

•String

The redirect path from the embedded editor to the Shopify admin.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Deletes multiple metafields in bulk.

Arguments

•[MetafieldIdentifierInput!]!required

A list of identifiers specifying metafields to delete. At least one identifier must be specified.


Fields

•[MetafieldIdentifier]

List of metafield identifiers that were deleted, null if the corresponding metafield isn't found.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Cancels an order.

Arguments

•BooleanDefault:false

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

•ID!required

The ID of the order to be canceled.

•OrderCancelReason!required

The reason for canceling the order.

•Boolean!required

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

•Boolean!required

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

•StringDefault:null

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


Fields

•Job

The job that asynchronously cancels the order.

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

The list of errors that occurred from executing the mutation.

•[UserError!]!non-nullDeprecated
•mutation

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 orderCapture 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

Note

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

Arguments

•OrderCaptureInput!required

The input for the mutation.


Fields

•OrderTransaction

The created capture transaction.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Closes an open order.

Arguments

•OrderCloseInput!required

The input for the mutation.


Fields

•Order

The closed order.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

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

Arguments

•ID!required

The ID of the calculated order to which the custom item is added.

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

•MoneyInput!required

The unit price of the custom item. This value can't be negative.

•Int!required

The quantity of the custom item. This value must be greater than zero.

•Boolean

Whether the custom item requires shipping. Defaults to false.

•Boolean

Whether the custom item is taxable. Defaults to true.

•String!required

The name of the custom item to add.


Fields

•CalculatedLineItem

The custom line item that will be added to the order based on the current edits.

•CalculatedOrder

An order with the edits applied but not saved.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

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

Arguments

•OrderEditAppliedDiscountInput!required

The discount to add to the line item.

•ID!required

The ID of the calculated order to update.

•ID!required

The ID of the calculated line item to add the discount to.


Fields

Anchor to addedDiscountStagedChangeaddedDiscountStagedChange
•OrderStagedChangeAddLineItemDiscount

The discount applied to a line item during this order edit.

•CalculatedLineItem

The line item with the edits applied but not saved.

•CalculatedOrder

An order with the edits applied but not saved.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

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

Arguments

•BooleanDefault:false

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.

•ID

The ID of the location to check for inventory availability. A default location ID is chosen automatically if none is provided.

•Int!required

The quantity of the item to add to the order. Must be a positive value.

•ID!required

The ID of the variant to add.


Fields

•CalculatedLineItem

The calculated line item that's added during this order edit.

•CalculatedOrder

The calculated order with the edits applied but not saved.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Starts editing an order. Mutations are operating on OrderEdit. All order edits start with orderEditBegin, have any number of orderEdit* mutations made, and end with orderEditCommit.

Arguments

•ID!required

The ID of the order to begin editing.


Fields

•CalculatedOrder

The order that will be edited.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Applies and saves staged changes to an order. Mutations are operating on OrderEdit. All order edits start with orderEditBegin, have any number of orderEdit* mutations made, and end with orderEditCommit.

Arguments

•ID!required

The ID of the calculated order that will have its changes applied to the order.

•Boolean

Whether to notify the customer or not.

•String

Note for staff members.


Fields

•Order

The order with changes applied.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

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

Arguments

•ID!required

The ID of the calculated order to edit. The edit changes the quantity on the line item.

•ID!required

The ID of the calculated line item to edit.

•IDDeprecated
•Int!required

The new quantity to set for the line item. This value cannot be negative.

•Boolean

Whether or not to restock the line item when the updated quantity is less than the original quantity.


Fields

•CalculatedLineItem

The calculated line item with the edits applied but not saved.

•CalculatedOrder

The calculated order with the edits applied but not saved.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Marks an order as paid. You can only mark an order as paid if it isn't already fully paid.

Arguments

•OrderMarkAsPaidInput!required

The input for the mutation.


Fields

•Order

The order marked as paid.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Opens a closed order.

Arguments

•OrderOpenInput!required

The input for the mutation.


Fields

•Order

The opened order.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•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 orderEditBegin mutation instead. The orderEditBegin mutation initiates an order editing session, allowing you to make multiple changes before finalizing them. Learn more about using the orderEditBegin mutation to edit existing orders.

Learn how to build apps that integrate with order management and fulfillment processes.

Arguments

•OrderInput!required

The attributes of the updated order.


Fields

•Order

The updated order.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Creates a new componentized product.

Arguments

•ProductBundleCreateInput!required

Input for creating a componentized product.


Fields

Anchor to productBundleOperationproductBundleOperation
•ProductBundleOperation

The asynchronous ProductBundleOperation creating the componentized product.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Updates a componentized product.

Arguments

•ProductBundleUpdateInput!required

Input for updating a componentized product.


Fields

Anchor to productBundleOperationproductBundleOperation
•ProductBundleOperation

The asynchronous ProductBundleOperation updating the componentized product.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Creates a product with attributes such as title, description, and vendor. You can use the productCreate 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 productVariantsBulkCreate mutation.

To create or update a product in a single request, use the productSet mutation.

Learn more about the product model and adding product data.

Arguments

•ProductInputDeprecated
•[CreateMediaInput!]

The media to add to the product.

•ProductCreateInput

The attributes of the new product.


Fields

•Product

The product object.

•Shop!non-null

The shop associated with the product.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

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

Arguments

•ProductDeleteInput!required

Specifies the product to delete by its ID.

•BooleanDefault:true

Specifies whether or not to run the mutation synchronously.


Fields

•ID

The ID of the deleted product.

Anchor to productDeleteOperationproductDeleteOperation
•ProductDeleteOperation

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

•Shop!non-null

The shop associated with the product.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Duplicates a product.

If you need to duplicate a large product, such as one that has many variants that are active at several locations, you might encounter timeout errors.

To avoid these timeout errors, you can instead duplicate the product asynchronously.

In API version 2024-10 and higher, include synchronous: false argument in this mutation to perform the duplication asynchronously.

In API version 2024-07 and lower, use the asynchronous ProductDuplicateAsyncV2.

Metafield values are not duplicated if the unique values capability is enabled.

Arguments

•BooleanDefault:false

Specifies whether or not to duplicate images.

•BooleanDefault:false

Specifies whether or not to duplicate translations.

•ProductStatus

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

•String!required

The new title of the product.

•ID!required

The ID of the product to be duplicated.

•BooleanDefault:true

Specifies whether or not to run the mutation synchronously.


Fields

•Job

The asynchronous job that duplicates the product images.

•Product

The duplicated product.

Anchor to productDuplicateOperationproductDuplicateOperation
•ProductDuplicateOperation

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

•Shop!non-null

The user's shop.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Asynchronously reorders the media attached to a product.

Arguments

•ID!required

The ID of the product on which to reorder medias.

•[MoveInput!]!required

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


Fields

•Job

The asynchronous job which reorders the media.

•[MediaUserError!]!non-null

The list of errors that occurred from executing the mutation.

•[UserError!]!non-nullDeprecated
•mutation

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.

Arguments

•ProductInputDeprecated
•[CreateMediaInput!]

List of new media to be added to the product.

•ProductUpdateInput

The updated properties for a product.


Fields

•Product

The updated product object.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•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 (requiresSellingPlan: true) can be published only on online stores.

Arguments

•ID!required

The resource to create or update publications for.

•[PublicationInput!]!required

Specifies the input fields required to publish a resource.


Fields

•Publishable

Resource that has been published.

•Shop!non-null

The user's shop.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•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 (requiresSellingPlan: true) can be published only on online stores.

Arguments

•ID!required

The resource to create or update publications for.


Fields

•Publishable

Resource that has been published.

•Shop!non-null

The user's shop.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

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

Arguments

•ID!required

The resource to delete or update publications for.

•[PublicationInput!]!required

Specifies the input fields required to unpublish a resource.


Fields

•Publishable

Resource that has been unpublished.

•Shop!non-null

The user's shop.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

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

Arguments

•ID!required

The resource to delete or update publications for.


Fields

•Publishable

Resource that has been unpublished.

•Shop!non-null

The user's shop.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Creates a refund for an order, allowing you to process returns and issue payments back to customers.

Use the refundCreate 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 refundCreate 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

The refunding behavior of the refundCreate mutation is similar to the refundReturn mutation. The key difference is that the refundCreate mutation lets you to specify restocking behavior for line items, whereas the returnRefund mutation focuses solely on handling the financial refund without any restocking input.


Arguments

•RefundInput!required

The input fields that are used in the mutation for creating a refund.


Fields

•Order

The order associated with the created refund.

•Refund

The created refund.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Creates a saved search.

Arguments

•SavedSearchCreateInput!required

Specifies the input fields for a saved search.


Fields

•SavedSearch

The saved search that was created.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Delete a saved search.

Arguments

•SavedSearchDeleteInput!required

The input fields to delete a saved search.


Fields

Anchor to deletedSavedSearchIddeletedSavedSearchId
•ID

The ID of the saved search that was deleted.

•Shop!non-null

The shop of the saved search that was deleted.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Updates a saved search.

Arguments

•SavedSearchUpdateInput!required

The input fields to update a saved search.


Fields

•SavedSearch

The saved search that was updated.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

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

Arguments

•ScriptTagInput!required

The input fields for a script tag.


Fields

•ScriptTag

The script tag that was created.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

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

Arguments

•ID!required

The ID of the script tag to delete.


Fields

•ID

The ID of the deleted script tag.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

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

Arguments

•ID!required

The ID of the script tag to update.

•ScriptTagInput!required

Specifies the input fields for a script tag.


Fields

•ScriptTag

The script tag that was updated.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Creates a segment.

Arguments

•String!required

The name of the segment to be created. Segment names must be unique.

•String!required

A precise definition of the segment. The definition is composed of a combination of conditions on facts about customers such as email_subscription_status = 'SUBSCRIBED' with this syntax.


Fields

•Segment

The newly created segment.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Deletes a segment.

Arguments

•ID!required

Specifies the segment to delete.


Fields

•ID

ID of the deleted segment.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Updates a segment.

Arguments

•ID!required

Specifies the segment to be updated.

•String

The new name for the segment.

•String

A precise definition of the segment. The definition is composed of a combination of conditions on facts about customers such as email_subscription_status = 'SUBSCRIBED' with this syntax.


Fields

•Segment

The updated segment.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Deletes a shipping package.

Arguments

•ID!required

The ID of the shipping package to remove.


Fields

•ID

The ID of the deleted shipping package.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Set a shipping package as the default. The default shipping package is the one used to calculate shipping costs on checkout.

Arguments

•ID!required

The ID of the shipping package to set as the default.


Fields

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Updates a shipping package.

Arguments

•ID!required

The ID of the shipping package to update.

•CustomShippingPackageInput!required

Specifies the input fields for a shipping package.


Fields

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Deletes a locale for a shop. This also deletes all translations of this locale.

Arguments

•String!required

ISO code of the locale to delete.


Fields

•String

ISO code of the locale that was deleted.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Adds a locale for a shop. The newly added locale is in the unpublished state.

Arguments

•String!required

ISO code of the locale to enable.

Anchor to marketWebPresenceIdsmarketWebPresenceIds
•[ID!]

The list of markets web presences to add the locale to.


Fields

•ShopLocale

ISO code of the locale that was enabled.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Updates a locale for a shop.

Arguments

•String!required

ISO code of the locale to update.

•ShopLocaleInput!required

Specifies the input fields for a shop locale.


Fields

•ShopLocale

The locale that was updated.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

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

Arguments

•[StagedUploadInput!]!required

The information required to generate staged upload targets.


Fields

•[StagedMediaUploadTarget!]

The staged upload targets that were generated.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

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

Get started with the Storefront API.

Arguments

•StorefrontAccessTokenInput!required

Provides the input fields for creating a storefront access token.


Fields

•Shop!non-null

The user's shop.

Anchor to storefrontAccessTokenstorefrontAccessToken
•StorefrontAccessToken

The storefront access token.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Deletes a storefront access token.

Arguments

•StorefrontAccessTokenDeleteInput!required

Provides the input fields required to delete a storefront access token.


Fields

Anchor to deletedStorefrontAccessTokenIddeletedStorefrontAccessTokenId
•ID

The ID of the deleted storefront access token.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Add tags to an order, a draft order, a customer, a product, or an online store article.

Arguments

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


Fields

•Node

The object that was updated.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Remove tags from an order, a draft order, a customer, a product, or an online store article.

Arguments

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


Fields

•Node

The object that was updated.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Asynchronously delete URL redirects in bulk.

•Job

The asynchronous job removing the redirects.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

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.

Arguments

•WebhookSubscriptionTopic!required

The type of event that triggers the webhook.

•WebhookSubscriptionInput!required

Specifies the input fields for a webhook subscription.


Fields

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•WebhookSubscription

The webhook subscription that was created.

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

Arguments

•ID!required

The ID of the webhook subscription to delete.


Fields

Anchor to deletedWebhookSubscriptionIddeletedWebhookSubscriptionId
•ID

The ID of the deleted webhook subscription.

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

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

Arguments

•ID!required

The ID of the webhook subscription to update.

•WebhookSubscriptionInput!required

Specifies the input fields for a webhook subscription.


Fields

•[UserError!]!non-null

The list of errors that occurred from executing the mutation.

•WebhookSubscription

The webhook subscription that was updated.

Deprecated mutations


Was this section helpful?


Was this section helpful?
OSZAR »