--- title: CalculatedOrder - GraphQL Admin description: An order with edits applied but not saved. api_version: 2025-10 api_name: admin type: object api_type: graphql source_url: html: https://shopify.dev/docs/api/admin-graphql/latest/objects/calculatedorder md: https://shopify.dev/docs/api/admin-graphql/latest/objects/calculatedorder.md --- # Calculated​Order object Requires `read_order_edits` access scope. An order with edits applied but not saved. ## Fields * added​Discount​Applications [Calculated​Discount​Application​Connection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/CalculatedDiscountApplicationConnection) non-null Returns only the new discount applications being added to the order in the current edit. * first [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int) ### Arguments The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * after [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * reverse [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean) Default:false Reverse the order of the underlying list. *** * added​Line​Items [Calculated​Line​Item​Connection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/CalculatedLineItemConnection) non-null Returns only the new line items being added to the order during the current edit. * first [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int) ### Arguments The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * after [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * reverse [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean) Default:false Reverse the order of the underlying list. *** * cart​Discount​Amount​Set [Money​Bag](https://shopify.dev/docs/api/admin-graphql/latest/objects/MoneyBag) Amount of the order-level discount (doesn't contain any line item discounts) in shop and presentment currencies. * id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) non-null A globally-unique ID. * line​Items [Calculated​Line​Item​Connection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/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. * first [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int) ### Arguments The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * after [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * reverse [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean) Default:false Reverse the order of the underlying list. * query [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String) A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax). * editable boolean * id id Filter by `id` range. Example: * `id:1234` * `id:>=1234` * `id:<=1234` *** * notification​Preview​Html [HTML](https://shopify.dev/docs/api/admin-graphql/latest/scalars/HTML) The HTML of the customer notification for the order edit. * notification​Preview​Title [String!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String) non-null The customer notification title. * original​Order [Order!](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) non-null The order without any changes applied. * shipping​Lines [\[Calculated​Shipping​Line!\]!](https://shopify.dev/docs/api/admin-graphql/latest/objects/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. * staged​Changes [Order​Staged​Change​Connection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/OrderStagedChangeConnection) non-null List of changes made to the order during the current edit. * first [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int) ### Arguments The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * after [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * reverse [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean) Default:false Reverse the order of the underlying list. *** * subtotal​Line​Items​Quantity [Int!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int) non-null The sum of the quantities for the line items that contribute to the order's subtotal. * subtotal​Price​Set [Money​Bag](https://shopify.dev/docs/api/admin-graphql/latest/objects/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. * tax​Lines [\[Tax​Line!\]!](https://shopify.dev/docs/api/admin-graphql/latest/objects/TaxLine) non-null Taxes charged for the line item. * total​Outstanding​Set [Money​Bag!](https://shopify.dev/docs/api/admin-graphql/latest/objects/MoneyBag) non-null Total price of the order less the total amount received from the customer in shop and presentment currencies. * total​Price​Set [Money​Bag!](https://shopify.dev/docs/api/admin-graphql/latest/objects/MoneyBag) non-null Total amount of the order (includes taxes and discounts) in shop and presentment currencies. * committed [Boolean!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean) non-nullDeprecated *** ## Map No referencing types *** ## Mutations * [order​Edit​Add​Custom​Item](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditAddCustomItem) mutation Adds a custom line item to an existing order. For example, you could add a gift wrapping service as a [custom line item](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing#add-a-custom-line-item). To learn how to edit existing orders, refer to [Edit an existing order with Admin API](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing). * id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required ### Arguments The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) or the order edit session to edit. This is the edit to which the custom item is added. * title [String!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String) required The name of the custom item to add. * location​Id [ID](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) The ID of the retail [location](https://shopify.dev/api/admin-graphql/latest/objects/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. * price [Money​Input!](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/MoneyInput) required The unit price of the custom item. This value can't be negative. * quantity [Int!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int) required The quantity of the custom item. This value must be greater than zero. * taxable [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean) Whether the custom item is taxable. Defaults to `true`. * requires​Shipping [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean) Whether the custom item requires shipping. Defaults to `false`. *** * [order​Edit​Add​Line​Item​Discount](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditAddLineItemDiscount) 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](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing). * id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required ### Arguments The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) or the order edit session to edit. * line​Item​Id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required The ID of the calculated line item to add the discount to. * discount [Order​Edit​Applied​Discount​Input!](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderEditAppliedDiscountInput) required The discount to add to the line item. *** * [order​Edit​Add​Shipping​Line](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditAddShippingLine) mutation Adds a custom shipping line to an [`Order`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) during an edit session. Specify the shipping title and price to create a new [`ShippingLine`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShippingLine). Returns a [`CalculatedOrder`](https://shopify.dev/docs/api/admin-graphql/latest/objects/CalculatedOrder) showing the order with edits applied but not yet saved. To save your changes, use the [`orderEditCommit`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditCommit) mutation. Learn more about [editing existing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders). * id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required ### Arguments The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) or the order edit session to edit. This is the edit to which the shipping line is added. * shipping​Line [Order​Edit​Add​Shipping​Line​Input!](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderEditAddShippingLineInput) required The shipping line to be added. *** * [order​Edit​Add​Variant](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditAddVariant) mutation Adds a line item from an existing product variant. As of API version 2025-04, the [orderEditAddVariant](https://shopify.dev/api/admin-graphql/latest/mutations/ordereditaddvariant) API will respect the contextual pricing of the variant. * id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required ### Arguments The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) or the order edit session to edit. * variant​Id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required The ID of the variant to add. * location​Id [ID](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) The ID of the [location](https://shopify.dev/api/admin-graphql/latest/objects/location) to check for inventory availability. A default location ID is chosen automatically if none is provided. * quantity [Int!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int) required The quantity of the item to add to the order. Must be a positive value. * allow​Duplicates [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean) Default:false Whether the mutation can create a line item for a variant that's already on the calculated order. *** * [order​Edit​Begin](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditBegin) 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`. * id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required ### Arguments The ID of the order to begin editing. *** * [order​Edit​Remove​Discount](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditRemoveDiscount) 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](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing). * id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required ### Arguments The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) or the order edit session to edit. This is the edit from which the discount is removed. * discount​Application​Id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required The ID of the [calculated discount application](https://shopify.dev/api/admin-graphql/latest/interfaces/calculateddiscountapplication) to remove. *** * [order​Edit​Remove​Shipping​Line](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditRemoveShippingLine) 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](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing). * id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required ### Arguments The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) or the order edit session to edit. This is the edit from which the shipping line is removed. * shipping​Line​Id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required The ID of the calculated shipping line to remove. *** * [order​Edit​Set​Quantity](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditSetQuantity) mutation Sets the quantity of a line item on an order that's being edited. Use this mutation to increase, decrease, or remove items by adjusting their quantities. Setting the quantity to zero effectively removes the line item from the order. The item still exists as a data structure with zero quantity. When decreasing quantities, you can optionally restock the removed items to inventory by setting the `restock` parameter to `true`. Learn more about [editing workflows for existing orders](https://shopify.dev/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders). * id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required ### Arguments The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) or the order edit session to edit. The edit changes the quantity on the line item. * line​Item​Id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required The ID of the calculated line item to edit. * quantity [Int!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int) required The new quantity to set for the line item. This value cannot be negative. * restock [Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean) Whether or not to restock the line item when the updated quantity is less than the original quantity. * location​Id [ID](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) Deprecated *** * [order​Edit​Update​Discount](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditUpdateDiscount) 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](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing). * id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required ### Arguments The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) or the order edit session to edit. This is the edit used to update the discount. * discount [Order​Edit​Applied​Discount​Input!](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderEditAppliedDiscountInput) required The updated discount. * discount​Application​Id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required The ID of the [calculated discount application](https://shopify.dev/api/admin-graphql/latest/interfaces/calculateddiscountapplication) to update. *** * [order​Edit​Update​Shipping​Line](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditUpdateShippingLine) 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](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing). * id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required ### Arguments The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) or the order edit session to edit. This is the edit used to update the shipping line. * shipping​Line [Order​Edit​Update​Shipping​Line​Input!](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderEditUpdateShippingLineInput) required The updated shipping line. * shipping​Line​Id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required The ID of the calculated shipping line to update. *** * [order​Edit​Remove​Line​Item​Discount](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditRemoveLineItemDiscount) mutation Deprecated * id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required ### Arguments The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) or the order edit session to edit. This is the edit from which the line item discount is removed. * discount​Application​Id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required The ID of the [calculated discount application](https://shopify.dev/api/admin-graphql/latest/interfaces/calculateddiscountapplication) to remove. *** *** ## <\~> CalculatedOrder Mutations ### Mutated by * <\~>[order​Edit​Add​Custom​Item](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditAddCustomItem) * <\~>[order​Edit​Add​Line​Item​Discount](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditAddLineItemDiscount) * <\~>[order​Edit​Add​Shipping​Line](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditAddShippingLine) * <\~>[order​Edit​Add​Variant](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditAddVariant) * <\~>[order​Edit​Begin](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditBegin) * <\~>[order​Edit​Remove​Discount](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditRemoveDiscount) * <\~>[order​Edit​Remove​Shipping​Line](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditRemoveShippingLine) * <\~>[order​Edit​Set​Quantity](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditSetQuantity) * <\~>[order​Edit​Update​Discount](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditUpdateDiscount) * <\~>[order​Edit​Update​Shipping​Line](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderEditUpdateShippingLine) *** ## Interfaces * [Node](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Node) interface *** ## ||-CalculatedOrder Implements ### Implements * ||-[Node](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Node)