orderEditSetQuantity mutation

Version 2020-04 (Release candidate)

Set the quantity of an item on the order.

Required access

write_order_edits access scope

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

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.

Version 2020-01 (Latest)

Set the quantity of an item on the order.

Required access

write_order_edits access scope

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

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.

Sign up for a Partner account to get started.

Sign up