--- title: orderEditSetQuantity - GraphQL Admin description: |- 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). api_version: 2026-01 api_name: admin type: mutation api_type: graphql source_url: html: https://shopify.dev/docs/api/admin-graphql/latest/mutations/ordereditsetquantity md: https://shopify.dev/docs/api/admin-graphql/latest/mutations/ordereditsetquantity.md --- # order​Edit​Set​Quantity mutation Requires `write_order_edits` access scope. 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). ## Arguments * id * lineItemId * quantity * restock * locationId: deprecated *** ## Order​Edit​Set​Quantity​Payload returns * calculatedLineItem * calculatedOrder * orderEditSession * userErrors *** ## Examples * ### orderEditSetQuantity reference