Skip to main content
object

Requires read_order_edits access scope.

A line item involved in order editing that may be newly added or have new changes applied.

Anchor to calculatedDiscountAllocationscalculatedDiscountAllocations
•

The discounts that have been allocated onto the line item by discount applications.

•

A list of attributes that represent custom features or special requests.

Anchor to discountedUnitPriceSetdiscountedUnitPriceSet
•
MoneyBag!non-null

The price of a single quantity of the line item with line item discounts applied, in shop and presentment currencies. Discounts applied to the entire order aren't included in this price.

•
Int!non-null

The total number of items that can be edited.

Anchor to editableQuantityBeforeChangeseditableQuantityBeforeChanges
•
Int!non-null

The editable quantity prior to any changes made in the current edit.

•
MoneyBag!non-null

The total price of editable lines in shop and presentment currencies.

Anchor to hasStagedLineItemDiscounthasStagedLineItemDiscount
•
Boolean!non-null

Whether the calculated line item has a staged discount.

•
ID!non-null

A globally-unique ID.

•

The image object associated to the line item's variant.

Anchor to originalUnitPriceSetoriginalUnitPriceSet
•
MoneyBag!non-null

The variant unit price in shop and presentment currencies, without any discounts applied.

•
Int!non-null

The total number of items.

•
Boolean!non-null

Whether the line item can be restocked or not.

•
Boolean!non-null

Whether the changes on the line item will result in a restock.

•

The variant SKU number.

•

A list of changes that affect this line item.

•
String!non-null

The title of the product.

Anchor to uneditableSubtotalSetuneditableSubtotalSet
•
MoneyBag!non-null

The total price of uneditable lines in shop and presentment currencies.

•

The product variant associated with this line item. The value is null for custom line items and items where the variant has been deleted.

•

The title of the variant.

•
[DiscountAllocation!]!non-null

The discounts that have been allocated onto the line item by discount applications.


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.

•

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.

•

Whether the custom item is taxable. Defaults to true.

•
String!required

The name of the custom item to add.


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

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

•

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

•
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 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 from which to remove the discount.


Fields

•

The calculated line item after removal of the discount.

•

An order with the edits applied but not saved.

•

The list of errors that occurred from executing the mutation.


Was this section helpful?