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

POST /v1/companies/5678/orders/93824701/lines Add a new line to an order
  • Only the product_id field is required.
  • unit_price should 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 number field 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.
  • The line_id is a unique identifier for this line in this order. It is not guaranteed to be unique across all orders.

The URI returned in the Location header can only be used to update or remove the line, as GET is not allowed on lines.

Update a line

Before an order is accepted, you can update and re-order lines.

PUT /v1/companies/5678/orders/93824701/lines/1 Update a line
  • The 1 in 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 modifiers array, all previously added modifiers will be overwritten. You should treat this array as a discreet value to be overwritten.

Delete a line

DELETE /v1/companies/5678/orders/93824701/lines/1 Delete a line