Order Edit Session
Requires access scope.
An edit session for an order.
Anchor to FieldsFields
- •ID!non-null
The unique ID of the order edit session.
Anchor to QueriesQueries
- •query
Returns an Order editing session by order ID.
Anchor to MutationsMutations
- •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.
- •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.
- Anchor to locationIdlocation•ID
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.
- Anchor to priceprice•Money
Input! required The unit price of the custom item. This value can't be negative.
- Anchor to quantityquantity•Int!required
The quantity of the custom item. This value must be greater than zero.
- Anchor to requiresShippingrequires•Boolean
Shipping Whether the custom item requires shipping. Defaults to
false
.- •String
The optional SKU for the custom item to add.
- Anchor to taxabletaxable•Boolean
Whether the custom item is taxable. Defaults to
true
.- Anchor to titletitle•String!required
The name of the custom item to add.
- Anchor to weightweight•Weight
Input Specifies the weight unit and value inputs.
Arguments
- Anchor to calculatedLineItemcalculated•Calculated
Line Item Line Item The custom line item that will be added to the order based on the current edits.
- Anchor to calculatedOrdercalculated•Calculated
Order Order An order with the edits applied but not saved.
- Anchor to orderEditSessionorder•Order
Edit Session Edit Session The order edit session with the edits applied but not saved.
- Anchor to userErrorsuser•[User
Errors Error!]! non-null The list of errors that occurred from executing the mutation.
Fields
- •ID!
- •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.
- Anchor to discountdiscount•Order
Edit Applied Discount Input! required The discount to add to the line item.
- •ID!required
The ID of the calculated order or the order edit session to edit.
- Anchor to lineItemIdline•ID!
Item Id required The ID of the calculated line item to add the discount to.
Arguments
- Anchor to addedDiscountStagedChangeadded•Order
Discount Staged Change Staged Change Add Line Item Discount The discount applied to a line item during this order edit.
- Anchor to calculatedLineItemcalculated•Calculated
Line Item Line Item The line item with the edits applied but not saved.
- Anchor to calculatedOrdercalculated•Calculated
Order Order An order with the edits applied but not saved.
- Anchor to orderEditSessionorder•Order
Edit Session Edit Session The order edit session with the edits applied but not saved.
- Anchor to userErrorsuser•[User
Errors Error!]! non-null The list of errors that occurred from executing the mutation.
Fields
- •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.
- •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.
- Anchor to shippingLineshipping•Order
Line Edit Add Shipping Line Input! required The shipping line to be added.
Arguments
- Anchor to calculatedOrdercalculated•Calculated
Order Order The calculated order with the edits applied but not saved.
- Anchor to calculatedShippingLinecalculated•Calculated
Shipping Line Shipping Line The calculated shipping line that's added during this order edit.
- Anchor to orderEditSessionorder•Order
Edit Session Edit Session The order edit session with the edits applied but not saved.
- Anchor to userErrorsuser•[Order
Errors Edit Add Shipping Line User Error!]! non-null The list of errors that occurred from executing the mutation.
Fields
- •ID!
- •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.
- Anchor to allowDuplicatesallow•Boolean
Duplicates Default: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.
- Anchor to locationIdlocation•ID
Id The ID of the location to check for inventory availability. A default location ID is chosen automatically if none is provided.
- Anchor to quantityquantity•Int!required
The quantity of the item to add to the order. Must be a positive value.
- Anchor to variantIdvariant•ID!
Id required The ID of the variant to add.
Arguments
- Anchor to calculatedLineItemcalculated•Calculated
Line Item Line Item The calculated line item that's added during this order edit.
- Anchor to calculatedOrdercalculated•Calculated
Order Order The calculated order with the edits applied but not saved.
- Anchor to orderEditSessionorder•Order
Edit Session Edit Session The order edit session with the edits applied but not saved.
- Anchor to userErrorsuser•[User
Errors Error!]! non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Starts editing an order. Mutations are operating on
. All order edits start with
, have any number of
* mutations made, and end with
.
- •ID!required
The ID of the order to begin editing.
Arguments
- Anchor to calculatedOrdercalculated•Calculated
Order Order The order that will be edited.
- Anchor to orderEditSessionorder•Order
Edit Session Edit Session The order edit session that was created.
- Anchor to userErrorsuser•[User
Errors Error!]! non-null The list of errors that occurred from executing the mutation.
Fields
- •ID!
- •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.
- Anchor to discountApplicationIddiscount•ID!
Application 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.
Arguments
- Anchor to calculatedOrdercalculated•Calculated
Order Order An order with the edits applied but not saved.
- Anchor to orderEditSessionorder•Order
Edit Session Edit Session The order edit session with the edits applied but not saved.
- Anchor to userErrorsuser•[Order
Errors Edit Remove Discount User Error!]! non-null The list of errors that occurred from executing the mutation.
Fields
- •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.
- •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.
- Anchor to shippingLineIdshipping•ID!
Line Id required The ID of the calculated shipping line to remove.
Arguments
- Anchor to calculatedOrdercalculated•Calculated
Order Order The calculated order with the edits applied but not saved.
- Anchor to orderEditSessionorder•Order
Edit Session Edit Session The order edit session with the edits applied but not saved.
- Anchor to userErrorsuser•[Order
Errors Edit Remove Shipping Line User Error!]! non-null The list of errors that occurred from executing the mutation.
Fields
- •ID!
- •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.
- •ID!required
The ID of the calculated order or the order edit session to edit. The edit changes the quantity on the line item.
- Anchor to lineItemIdline•ID!
Item Id required The ID of the calculated line item to edit.
- Anchor to locationIdlocation•ID
Id Deprecated - Anchor to quantityquantity•Int!required
The new quantity to set for the line item. This value cannot be negative.
- Anchor to restockrestock•Boolean
Whether or not to restock the line item when the updated quantity is less than the original quantity.
Arguments
- Anchor to calculatedLineItemcalculated•Calculated
Line Item Line Item The calculated line item with the edits applied but not saved.
- Anchor to calculatedOrdercalculated•Calculated
Order Order The calculated order with the edits applied but not saved.
- Anchor to orderEditSessionorder•Order
Edit Session Edit Session The order edit session with the edits applied but not saved.
- Anchor to userErrorsuser•[User
Errors Error!]! non-null The list of errors that occurred from executing the mutation.
Fields
- •ID!
- •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.
- Anchor to discountdiscount•Order
Edit Applied Discount Input! required The updated discount.
- Anchor to discountApplicationIddiscount•ID!
Application 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.
Arguments
- Anchor to calculatedOrdercalculated•Calculated
Order Order An order with the edits applied but not saved.
- Anchor to orderEditSessionorder•Order
Edit Session Edit Session The order edit session with the edits applied but not saved.
- Anchor to userErrorsuser•[Order
Errors Edit Update Discount User Error!]! non-null The list of errors that occurred from executing the mutation.
Fields
- •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.
- •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.
- Anchor to shippingLineshipping•Order
Line Edit Update Shipping Line Input! required The updated shipping line.
- Anchor to shippingLineIdshipping•ID!
Line Id required The ID of the calculated shipping line to update.
Arguments
- Anchor to calculatedOrdercalculated•Calculated
Order Order An order with the edits applied but not saved.
- Anchor to orderEditSessionorder•Order
Edit Session Edit Session The order edit session with the edits applied but not saved.
- Anchor to userErrorsuser•[Order
Errors Edit Update Shipping Line User Error!]! non-null The list of errors that occurred from executing the mutation.
Fields
- •ID!
- •mutationDeprecated
- Anchor to discountApplicationIddiscount•ID!
Application 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.
Arguments
- Anchor to calculatedLineItemcalculated•Calculated
Line Item Line Item The calculated line item after removal of the discount.
- Anchor to calculatedOrdercalculated•Calculated
Order Order An order with the edits applied but not saved.
- Anchor to orderEditSessionorder•Order
Edit Session Edit Session The order edit session with the edits applied but not saved.
- Anchor to userErrorsuser•[User
Errors Error!]! non-null The list of errors that occurred from executing the mutation.
Fields