Skip to main content

addOrderItem

DEPRECATED

Legacy Orders V1 mutation. It applies to V1 orders only and will be removed once Orders V1 support ends. For V2 orders, use updateOrderItems.

Add an item to an order.

**Arguments**

NameTypeDescriptionRequiredDefault
order_idIDThe ID of the order to add the item toYes
product_idIDThe ID of the product to add to the orderYes
quantityIntegerThe quantity of the product to addYes
priceDecimalThe price of the product to addYes0.0

**Returns**

An OrderItem object if the operation is successful.

**Errors**

NameDescription
NotFoundErrorReturns if the order or product is not found
ValidationErrorReturns if the product does not belong to the same brand
as the order, is not active, or if the quantity or price is not a positive
value. Also returns if the order is in a disallowed status (fulfilled,
canceled, shipped, completed)
addOrderItem(
input: AddOrderItemInput!
): OrderItem! @deprecated

Arguments

addOrderItem.input ● AddOrderItemInput! non-null input common

Parameters for AddOrderItem

Type

OrderItem object orders

The order item type. This type represents an order item in the system.