Skip to main content
object

Requires read_order_edits access scope.

An order during an active edit session with all proposed changes applied but not yet committed. When you begin editing an order with the orderEditBegin mutation, the system creates a CalculatedOrder that shows how the Order will look after your changes. The calculated order tracks the original order state and all staged modifications (added or removed LineItem objects, quantity adjustments, discount changes, and ShippingLine updates). Use the calculated order to preview the financial impact of edits before committing them with the orderEditCommit mutation.

Learn more about editing existing orders.

Anchor to addedDiscountApplicationsaddedDiscountApplications
•CalculatedDiscountApplicationConnection!
non-null

Returns only the new discount applications being added to the order in the current edit.

Arguments

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.


•CalculatedLineItemConnection!
non-null

Returns only the new line items being added to the order during the current edit.

Arguments

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.


Anchor to cartDiscountAmountSetcartDiscountAmountSet
•MoneyBag

Amount of the order-level discount (doesn't contain any line item discounts) in shop and presentment currencies.

•ID!
non-null

A globally-unique ID.

•CalculatedLineItemConnection!
non-null

Returns all items on the order that existed before starting the edit. Will include any changes that have been made. Will not include line items added during the current edit.

Arguments

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.

•String

A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about Shopify API search syntax.

Anchor to editable
•boolean
•id

Filter by id range.

Example:

  • id:1234
  • id:>=1234
  • id:<=1234

Anchor to notificationPreviewHtmlnotificationPreviewHtml
•HTML

The HTML of the customer notification for the order edit.

Anchor to notificationPreviewTitlenotificationPreviewTitle
•String!
non-null

The customer notification title.

•Order!
non-null

The order without any changes applied.

•[CalculatedShippingLine!]!
non-null

Returns the shipping lines on the order that existed before starting the edit. Will include any changes that have been made as well as shipping lines added during the current edit. Returns only the first 250 shipping lines.

•OrderStagedChangeConnection!
non-null

List of changes made to the order during the current edit.

Arguments

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.


Anchor to subtotalLineItemsQuantitysubtotalLineItemsQuantity
•Int!
non-null

The sum of the quantities for the line items that contribute to the order's subtotal.

•MoneyBag

The subtotal of the line items, in shop and presentment currencies, after all the discounts are applied. The subtotal doesn't include shipping. The subtotal includes taxes for taxes-included orders and excludes taxes for taxes-excluded orders.

•[TaxLine!]!
non-null

Taxes charged for the line item.

•MoneyBag!
non-null

Total price of the order less the total amount received from the customer in shop and presentment currencies.

•MoneyBag!
non-null

Total amount of the order (includes taxes and discounts) in shop and presentment currencies.

•Boolean!
non-nullDeprecated

Was this section helpful?

•mutation

Adds a custom line item to an existing Order. Custom line items represent products or services not in your catalog, such as gift wrapping, installation fees, or one-off charges.

Creates a CalculatedLineItem with the specified title, price, and quantity. Changes remain in the edit session until you commit them with the orderEditCommit mutation.

Learn more about adding custom line items.

Arguments

•ID!
required

The ID of the calculated order or the order edit session to edit. This is the edit to which the custom item is added.

•String!
required

The name of the custom item to add.

•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 is taxable. Defaults to true.

•Boolean

Whether the custom item requires shipping. Defaults to false.


•mutation

Applies a discount to a LineItem during an order edit session. The discount can be either a fixed amount or percentage value.

To modify pricing on specific line items, use this mutation after starting an order edit with the orderEditBegin mutation. The changes remain staged until you commit them with the orderEditCommit mutation.

Learn more about editing existing orders.

Arguments

•ID!
required

The ID of the calculated order or the order edit session to edit.

•ID!
required

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

•OrderEditAppliedDiscountInput!
required

The discount to add to the line item.


•mutation

Adds a custom shipping line to an Order during an edit session. Specify the shipping title and price to create a new ShippingLine.

Returns a CalculatedOrder showing the order with edits applied but not yet saved. To save your changes, use the orderEditCommit mutation.

Learn more about editing existing orders.

Arguments

•ID!
required

The ID of the calculated order or the order edit session to edit. This is the edit to which the shipping line is added.

•OrderEditAddShippingLineInput!
required

The shipping line to be added.


•mutation

Adds a ProductVariant as a line item to an Order that's being edited. The mutation respects the variant's contextual pricing.

You can specify a Location to check for inventory availability and control whether duplicate variants are allowed. The quantity must be a positive value.

Learn more about editing existing orders.

Arguments

•ID!
required

The ID of the calculated order or the order edit session to edit.

•ID!
required

The ID of the variant to add.

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

•Boolean
Default:false

Whether the mutation can create a line item for a variant that's already on the calculated order.


•mutation

Starts an order editing session that enables you to modify an existing Order. This mutation creates an OrderEditSession and returns a CalculatedOrder showing how the order looks with your changes applied.

Order editing follows a three-step workflow: Begin the edit with orderEditBegin, apply changes using mutations like orderEditAddVariant or orderEditSetQuantity, and then save the changes with the orderEditCommit mutation. The session tracks all staged changes until you commit or abandon them.

Learn more about editing existing orders.

Arguments

•ID!
required

The ID of the order to begin editing.


•mutation

Removes a discount 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

•ID!
required

The ID of the calculated order or the order edit session to edit. This is the edit from which the discount is removed.

Anchor to discountApplicationIddiscountApplicationId
•ID!
required

The ID of the calculated discount application to remove.


•mutation

Removes a shipping line from an existing order. 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 or the order edit session to edit. This is the edit from which the shipping line is removed.

•ID!
required

The ID of the calculated shipping line to remove.


•mutation

Sets the quantity of a line item on an order that's being edited. Use this mutation to increase, decrease, or remove items by adjusting their quantities.

Setting the quantity to zero effectively removes the line item from the order. The item still exists as a data structure with zero quantity. When decreasing quantities, you can optionally restock the removed items to inventory by setting the restock parameter to true.

Learn more about editing workflows for existing orders.

Arguments

•ID!
required

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

•ID!
required

The ID of the calculated line item to edit.

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

•ID
Deprecated

•mutation

Updates a manual line level discount 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

•ID!
required

The ID of the calculated order or the order edit session to edit. This is the edit used to update the discount.

•OrderEditAppliedDiscountInput!
required

The updated discount.

Anchor to discountApplicationIddiscountApplicationId
•ID!
required

The ID of the calculated discount application to update.


•mutation

Updates a shipping line 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

•ID!
required

The ID of the calculated order or the order edit session to edit. This is the edit used to update the shipping line.

•OrderEditUpdateShippingLineInput!
required

The updated shipping line.

•ID!
required

The ID of the calculated shipping line to update.


•mutation
Deprecated

Arguments

•ID!
required

The ID of the calculated order or the order edit session to edit. This is the edit from which the line item discount is removed.

Anchor to discountApplicationIddiscountApplicationId
•ID!
required

The ID of the calculated discount application to remove.



Was this section helpful?

•interface

Was this section helpful?