Skip to main content
object

Requires read_order_edits access scope.

An order with edits applied but not saved.

Anchor to Fields and connectionsFields and connections

Anchor to addedDiscountApplicationsaddedDiscountApplications
•CalculatedDiscountApplicationConnection!non-null

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

•CalculatedLineItemConnection!non-null

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

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.

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.

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. 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 shipping line to 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 to edit.

•OrderEditAddShippingLineInput!required

The shipping line to be added.


Fields

•CalculatedOrder

The calculated order with the edits applied but not saved.

Anchor to calculatedShippingLinecalculatedShippingLine
•CalculatedShippingLine

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

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

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

Anchor to discountApplicationIddiscountApplicationId
•ID!required

The ID of the calculated discount application to remove.

•ID!required

The ID of the calculated order from which to remove the discount.


Fields

•CalculatedOrder

An order with the edits applied but not saved.

•[OrderEditRemoveDiscountUserError!]!non-null

The list of errors that occurred from executing the mutation.

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

•ID!required

The ID of the calculated shipping line to remove.


Fields

•CalculatedOrder

The calculated order with the edits applied but not saved.

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

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

•OrderEditAppliedDiscountInput!required

The updated discount.

Anchor to discountApplicationIddiscountApplicationId
•ID!required

The ID of the calculated discount application to update.

•ID!required

The ID of the calculated order from which to update the discount.


Fields

•CalculatedOrder

An order with the edits applied but not saved.

•[OrderEditUpdateDiscountUserError!]!non-null

The list of errors that occurred from executing the mutation.

•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 from which to update the shipping line.

•OrderEditUpdateShippingLineInput!required

The updated shipping line.

•ID!required

The ID of the calculated shipping line to update.


Fields

•CalculatedOrder

An order with the edits applied but not saved.

•[OrderEditUpdateShippingLineUserError!]!non-null

The list of errors that occurred from executing the mutation.


Was this section helpful?

•interface

Was this section helpful?
OSZAR »