orderEditSetQuantity mutation
Set the quantity of an item on the order.
Required access
write_order_edits
access scope.
On this page
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
Arguments
Argument | Description |
---|---|
id
(
ID!
)
required
|
The ID of the calculated order to edit. |
lineItemId
(
ID!
)
required
|
The ID of the line item to edit. |
locationId
(
ID
)
|
The ID of the location that will fulfill any added items, or the ID of the location that the restocked item will be made available at, if 'restock' is set to true. |
quantity
(
Int!
)
required
|
The new quantity of the line item. Cannot be negative. |
restock
(
Boolean
)
|
Whether or not to restock the line item when the updated quantity is less than the original quantity. |
Return fields
-
calculatedLineItem (
CalculatedLineItem
)The line item with changes calculated.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Set the quantity of an item on the order.
Required access
write_order_edits
access scope.
On this page
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
Arguments
Argument | Description |
---|---|
id
(
ID!
)
required
|
The ID of the calculated order to edit. |
lineItemId
(
ID!
)
required
|
The ID of the line item to edit. |
locationId
(
ID
)
|
The ID of the location that will fulfill any added items, or the ID of the location that the restocked item will be made available at, if 'restock' is set to true. |
quantity
(
Int!
)
required
|
The new quantity of the line item. Cannot be negative. |
restock
(
Boolean
)
|
Whether or not to restock the line item when the updated quantity is less than the original quantity. |
Return fields
-
calculatedLineItem (
CalculatedLineItem
)The line item with changes calculated.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Set the quantity of an item on the order.
Required access
write_order_edits
access scope.
On this page
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
Arguments
Argument | Description |
---|---|
id
(
ID!
)
required
|
The ID of the calculated order to edit. |
lineItemId
(
ID!
)
required
|
The ID of the line item to edit. |
locationId
(
ID
)
|
The ID of the location that will fulfill any added items, or the ID of the location that the restocked item will be made available at, if 'restock' is set to true. |
quantity
(
Int!
)
required
|
The new quantity of the line item. Cannot be negative. |
restock
(
Boolean
)
|
Whether or not to restock the line item when the updated quantity is less than the original quantity. |
Return fields
-
calculatedLineItem (
CalculatedLineItem
)The line item with changes calculated.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Set the quantity of an item on the order.
Required access
write_order_edits
access scope.
On this page
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
Arguments
Argument | Description |
---|---|
id
(
ID!
)
required
|
The ID of the calculated order to edit. |
lineItemId
(
ID!
)
required
|
The ID of the line item to edit. |
locationId
(
ID
)
|
The ID of the location that will fulfill any added items, or the ID of the location that the restocked item will be made available at, if 'restock' is set to true. |
quantity
(
Int!
)
required
|
The new quantity of the line item. Cannot be negative. |
restock
(
Boolean
)
|
Whether or not to restock the line item when the updated quantity is less than the original quantity. |
Return fields
-
calculatedLineItem (
CalculatedLineItem
)The line item with changes calculated.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Set the quantity of an item on the order.
Required access
write_order_edits
access scope.
On this page
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
Arguments
Argument | Description |
---|---|
id
(
ID!
)
required
|
The ID of the calculated order to edit. |
lineItemId
(
ID!
)
required
|
The ID of the line item to edit. |
locationId
(
ID
)
|
The ID of the location that will fulfill any added items, or the ID of the location that the restocked item will be made available at, if 'restock' is set to true. |
quantity
(
Int!
)
required
|
The new quantity of the line item. Cannot be negative. |
restock
(
Boolean
)
|
Whether or not to restock the line item when the updated quantity is less than the original quantity. |
Return fields
-
calculatedLineItem (
CalculatedLineItem
)The line item with changes calculated.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Set the quantity of an item on the order.
Required access
write_order_edits
access scope.
On this page
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
Arguments
Argument | Description |
---|---|
id
(
ID!
)
required
|
The ID of the calculated order to edit. |
lineItemId
(
ID!
)
required
|
The ID of the line item to edit. |
locationId
(
ID
)
|
The ID of the location that will fulfill any added items, or the ID of the location that the restocked item will be made available at, if 'restock' is set to true. |
quantity
(
Int!
)
required
|
The new quantity of the line item. Cannot be negative. |
restock
(
Boolean
)
|
Whether or not to restock the line item when the updated quantity is less than the original quantity. |
Return fields
-
calculatedLineItem (
CalculatedLineItem
)The line item with changes calculated.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Set the quantity of an item on the order.
Required access
write_order_edits
access scope.
On this page
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
Arguments
Argument | Description |
---|---|
id
(
ID!
)
required
|
The ID of the calculated order to edit. |
lineItemId
(
ID!
)
required
|
The ID of the line item to edit. |
locationId
(
ID
)
|
The ID of the location that will fulfill any added items, or the ID of the location that the restocked item will be made available at, if 'restock' is set to true. |
quantity
(
Int!
)
required
|
The new quantity of the line item. Cannot be negative. |
restock
(
Boolean
)
|
Whether or not to restock the line item when the updated quantity is less than the original quantity. |
Return fields
-
calculatedLineItem (
CalculatedLineItem
)The line item with changes calculated.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Set the quantity of an item on the order.
Required access
write_order_edits
access scope.
On this page
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
Arguments
Argument | Description |
---|---|
id
(
ID!
)
required
|
The ID of the calculated order to edit. |
lineItemId
(
ID!
)
required
|
The ID of the line item to edit. |
locationId
(
ID
)
|
The ID of the location that will fulfill any added items, or the ID of the location that the restocked item will be made available at, if 'restock' is set to true. |
quantity
(
Int!
)
required
|
The new quantity of the line item. Cannot be negative. |
restock
(
Boolean
)
|
Whether or not to restock the line item when the updated quantity is less than the original quantity. |
Return fields
-
calculatedLineItem (
CalculatedLineItem
)The line item with changes calculated.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Set the quantity of an item on the order.
Required access
write_order_edits
access scope.
On this page
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
Arguments
Argument | Description |
---|---|
id
(
ID!
)
required
|
The ID of the calculated order to edit. |
lineItemId
(
ID!
)
required
|
The ID of the line item to edit. |
locationId
(
ID
)
|
The ID of the location that will fulfill any added items, or the ID of the location that the restocked item will be made available at, if 'restock' is set to true. |
quantity
(
Int!
)
required
|
The new quantity of the line item. Cannot be negative. |
restock
(
Boolean
)
|
Whether or not to restock the line item when the updated quantity is less than the original quantity. |
Return fields
-
calculatedLineItem (
CalculatedLineItem
)The line item with changes calculated.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Set the quantity of an item on the order.
Required access
write_order_edits
access scope.
On this page
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
Arguments
Argument | Description |
---|---|
id
(
ID!
)
required
|
The ID of the calculated order to edit. |
lineItemId
(
ID!
)
required
|
The ID of the line item to edit. |
locationId
(
ID
)
|
The ID of the location that will fulfill any added items, or the ID of the location that the restocked item will be made available at, if 'restock' is set to true. |
quantity
(
Int!
)
required
|
The new quantity of the line item. Cannot be negative. |
restock
(
Boolean
)
|
Whether or not to restock the line item when the updated quantity is less than the original quantity. |
Return fields
-
calculatedLineItem (
CalculatedLineItem
)The line item with changes calculated.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.