Skip to main content

removeOrderLineItem

Removes a line item from an order created through placeOrder or importOrder. The order totals are derived again from the remaining line items and the shipping costs, while the amount of the order's payment stays as it is. Calling the mutation again for a line item it already removed returns the order unchanged. Fails with CONFLICT for an order created in any other way, once the fulfillment of the order has started (see updateOrder) and for the last line item of the order, which cannot be removed: cancel the order instead. Returns the order.

Required scopes​

The token needs the orders:write access scope.

removeOrderLineItem(
orderId: ID!
lineItemId: ID!
): Order!

Arguments​

removeOrderLineItem.orderId ● ID! non-null scalar​

ID of the order to remove the line item from.

removeOrderLineItem.lineItemId ● ID! non-null scalar​

ID of the line item to remove.

Type​

Order object​

A customer order.