orderEditSetQuantity
Requires access scope.
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.
Arguments
- •ID!required
The ID of the calculated order to edit. The edit changes the quantity on the line item.
- Anchor to lineItemIdline•
Item Id ID!required The ID of the calculated line item to edit.
- Anchor to quantityquantity•Int!required
The new quantity to set for the line item. This value cannot be negative.
- Anchor to restockrestock•
Whether or not to restock the line item when the updated quantity is less than the original quantity.
- Anchor to locationIdlocation•
Id IDDeprecated The ID of the location. If 'restock' is set to true, the restocked item will be made available at the specified location. No longer supported.
Anchor to OrderEditSetQuantityPayload returnsOrderEditSetQuantityPayload returns
- Anchor to calculatedLineItemcalculated•
Line Item The calculated line item with the edits applied but not saved.
- Anchor to calculatedOrdercalculated•
Order The calculated order with the edits applied but not saved.
- Anchor to userErrorsuser•
Errors [UserError!]! non-null The list of errors that occurred from executing the mutation.
Mutation Reference
Input
{
"id": "gid://shopify/<objectName>/10079785100",
"lineItemId": "gid://shopify/<objectName>/10079785100",
"locationId": "gid://shopify/<objectName>/10079785100",
"quantity": 1,
"restock": true
}