Lines (also called order lines, sale lines or line items) describe the products included in an order.
Lines don’t have their own
GET actions, since they’re included in their entirety
when you get orders.
Add a line to an order
- Only the
product_idfield is required.
unit_priceshould only be specified if you want to override the default site pricing of the product. It should be specified as an ex tax price, and the current taxes that are set for that product will then be applied.
- Including the optional
numberfield will insert the line at that position in the order’s list of lines. The example above sets a value of
1, inserting it at the top of the order and pushing other lines down.
line_idis a unique identifier for this line in this order. It is not guaranteed to be unique across all orders.
Update a line
Before an order is accepted, you can update and re-order lines.
1in the example URI above represents the line's
number. If you update a line’s
number, its URI will also change.
- If you supply a
modifiersarray, all previously added modifiers will be overwritten. You should treat this array as a discreet value to be overwritten.
Delete a line