Order Item Model
The OrderItem model represents a product that is an item on an order for your shop. For each product that is part of an order, there will be an order item. In other words, order items connect products to orders. Furthermore, an order item also defines the quantity of the product being ordered, as well as the actual price the product is being sold for on that order.
Using OrderItems can be a little confusing at first. You need to understand that OrderItems attached to an Order that you have retrieved from the API are complete objects and have all of their fields setup properly, including a complete Product object. On the other hand, when you are creating a new order, or updating an existing order, the OrderItem does not need a complete Product object to function properly - it only needs the order item's id for updating the price or quantity, and it only needs a Product object with an id when creating a new order item. Please see the example code provided for more details.
NOTE You will note that there is no "OrderItem Create" route. Currently, if you wish to add an order item to an existing order, you must use the "Order Update" route, passing only the new order item as a parameter.
RESTful Calls
Get Order Item
GET/orderitems/{id}
Get a specific order item by id.
Request Parameters
Response
Update Order Item
PATCH/orderitems/{id}
Get a specific delivery mode by id.
Request Parameters
Response
Delete Order Item
DELETE/order_item/{id}
Delete the order item identified by id from it's order.