Skip to main content

addOrderItem

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!

Arguments

addOrderItem.input ● AddOrderItemInput! non-null input

Parameters for AddOrderItem

Type

OrderItem object

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