# orderEditSetQuantity - admin - MUTATION
Version: 2024-04

## Description
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](https://shopify.dev/apps/fulfillment/order-management-apps/order-editing).

### Access Scopes
`write_order_edits` access scope.


## Arguments
* [id](/docs/api/admin/2024-04/scalars/ID): ID! - The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder)
to edit. The edit changes the quantity on the line item.
* [lineItemId](/docs/api/admin/2024-04/scalars/ID): ID! - The ID of the calculated line item to edit.
* [locationId](/docs/api/admin/2024-04/scalars/ID): ID - The ID of the location. If 'restock' is set to true, the restocked item will be made available
at the specified location.
* [quantity](/docs/api/admin/2024-04/scalars/Int): Int! - The new quantity to set for the line item. This value cannot be negative.
* [restock](/docs/api/admin/2024-04/scalars/Boolean): Boolean - Whether or not to restock the line item when the updated quantity is less than the original quantity.


## Returns
* [calculatedLineItem](/docs/api/admin/2024-04/objects/CalculatedLineItem): CalculatedLineItem The calculated line item with the edits applied but not saved.
* [calculatedOrder](/docs/api/admin/2024-04/objects/CalculatedOrder): CalculatedOrder The calculated order with the edits applied but not saved.
* [userErrors](/docs/api/admin/2024-04/objects/UserError): UserError! The list of errors that occurred from executing the mutation.


## Examples