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**
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
order_id | ID | The ID of the order to add the item to | Yes | |
product_id | ID | The ID of the product to add to the order | Yes | |
quantity | Integer | The quantity of the product to add | Yes | |
price | Decimal | The price of the product to add | Yes | 0.0 |
**Returns**
An OrderItem object if the operation is successful.
**Errors**
| Name | Description |
|---|---|
NotFoundError | Returns if the order or product is not found |
ValidationError | Returns 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.