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
•

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

•

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

Anchor to cartDiscountAmountSetcartDiscountAmountSet
•

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.

•

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
•

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.

•

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.

•

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.

•

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.

•

Duties charged on the order.

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

Whether the changes have been applied and saved to the order.


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 or the order edit session to edit. This is the edit to which the custom item is added.

•

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.

•

Whether the custom item requires shipping. Defaults to false.

•

The optional SKU for the custom item to add.

•

Whether the custom item is taxable. Defaults to true.

•
String!required

The name of the custom item to add.

•

Specifies the weight unit and value inputs.


Fields

•

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

•

An order with the edits applied but not saved.

•

The order edit session with the edits applied but not saved.

•

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

•

The discount to add to the line item.

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


Fields

Anchor to addedDiscountStagedChangeaddedDiscountStagedChange
•

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

•

The line item with the edits applied but not saved.

•

An order with the edits applied but not saved.

•

The order edit session with the edits applied but not saved.

•

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 or the order edit session to edit. This is the edit to which the shipping line is added.

•

The shipping line to be added.


Fields

•

The calculated order with the edits applied but not saved.

Anchor to calculatedShippingLinecalculatedShippingLine
•

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

•

The order edit session with the edits applied but not saved.

•

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 or the order edit session to edit.

•

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

•

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

•

The calculated order with the edits applied but not saved.

•

The order edit session with the edits applied but not saved.

•

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

•

The order that will be edited.

•

The order edit session that was created.

•

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 or the order edit session to edit. This is the edit from which the discount is removed.


Fields

•

An order with the edits applied but not saved.

•

The order edit session with the edits applied but not saved.

•

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


Fields

•

The calculated order with the edits applied but not saved.

•

The order edit session with the edits applied but not saved.

•

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

•
ID

The ID of the location. If 'restock' is set to true, the restocked item will be made available at the specified location.

•
Int!required

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

•

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


Fields

•

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

•

The calculated order with the edits applied but not saved.

•

The order edit session with the edits applied but not saved.

•

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

•

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 or the order edit session to edit. This is the edit used to update the discount.


Fields

•

An order with the edits applied but not saved.

•

The order edit session with the edits applied but not saved.

•

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 or the order edit session to edit. This is the edit used to update the shipping line.

•

The updated shipping line.

•
ID!required

The ID of the calculated shipping line to update.


Fields

•

An order with the edits applied but not saved.

•

The order edit session with the edits applied but not saved.

•

The list of errors that occurred from executing the mutation.

•
mutation

Removes a line item discount that was applied as part of an order edit.

Arguments

Anchor to discountApplicationIddiscountApplicationId
•
ID!required

The ID of the calculated discount application to remove.

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


Fields

•

The calculated line item after removal of the discount.

•

An order with the edits applied but not saved.

•

The order edit session with the edits applied but not saved.

•

The list of errors that occurred from executing the mutation.


Was this section helpful?

•
interface

Was this section helpful?
OSZAR »