Calculated Order
Requires access scope.
An order with edits applied but not saved.
Anchor to Fields and connectionsFields and connections
- Anchor to addedDiscountApplicationsadded•Calculated
Discount Applications Discount Application Connection!non-null Returns only the new discount applications being added to the order in the current edit.
- Anchor to addedLineItemsadded•Calculated
Line Items Line Item Connection!non-null Returns only the new line items being added to the order during the current edit.
- Anchor to cartDiscountAmountSetcart•Money
Discount Amount Set Bag 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.
- Anchor to lineItemsline•Calculated
Items Line Item Connection!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 notificationPreviewHtmlnotification•HTML
Preview Html The HTML of the customer notification for the order edit.
- Anchor to notificationPreviewTitlenotification•String!non-null
Preview Title The customer notification title.
- Anchor to originalOrderoriginal•Order!non-null
Order The order without any changes applied.
- Anchor to shippingLinesshipping•[Calculated
Lines Shipping Line!]!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.
- Anchor to stagedChangesstaged•Order
Changes Staged Change Connection!non-null List of changes made to the order during the current edit.
- Anchor to subtotalLineItemsQuantitysubtotal•Int!non-null
Line Items Quantity The sum of the quantities for the line items that contribute to the order's subtotal.
- Anchor to subtotalPriceSetsubtotal•Money
Price Set Bag 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.
- Anchor to taxLinestax•[Tax
Lines Line!]!non-null Taxes charged for the line item.
- Anchor to totalOutstandingSettotal•Money
Outstanding Set Bag!non-null Total price of the order less the total amount received from the customer in shop and presentment currencies.
- Anchor to totalPriceSettotal•Money
Price Set Bag!non-null Total amount of the order (includes taxes and discounts) in shop and presentment currencies.
- Anchor to committedcommitted•Boolean!non-nullDeprecated
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 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
.- 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.
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 userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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 to update.
- Anchor to lineItemIdline•ID!required
Item Id 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 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 to edit.
- 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 userErrorsuser•[Order
Errors Edit Add Shipping Line User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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•BooleanDefault:false
Duplicates 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.
- 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!required
Id 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 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 userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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!required
Application Id The ID of the calculated discount application to remove.
- •ID!required
The ID of the calculated order from which to remove the discount.
Arguments
- Anchor to calculatedOrdercalculated•Calculated
Order Order An order 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 to edit.
- Anchor to shippingLineIdshipping•ID!required
Line Id 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 userErrorsuser•[Order
Errors Edit Remove Shipping Line User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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 to edit. The edit changes the quantity on the line item.
- Anchor to lineItemIdline•ID!required
Item Id The ID of the calculated line item to edit.
- Anchor to locationIdlocation•IDDeprecated
Id - 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 userErrorsuser•[User
Errors Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •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!required
Application Id The ID of the calculated discount application to update.
- •ID!required
The ID of the calculated order from which to update the discount.
Arguments
- Anchor to calculatedOrdercalculated•Calculated
Order Order An order 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 from which to update the shipping line.
- Anchor to shippingLineshipping•Order
Line Edit Update Shipping Line Input!required The updated shipping line.
- Anchor to shippingLineIdshipping•ID!required
Line Id 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 userErrorsuser•[Order
Errors Edit Update Shipping Line User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutationDeprecated