How can we help?

Lightspeed’s Help Centre is here to provide support, tips and troubleshooting

API - Order lines, Sale lines, Line items

Lines

Lines (also called order linessale 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.json Add a new line to an order
{
  "number": 1,
  "line_id": "fjHRE1",
  "product_id": 8710,
  "quantity": 1,
  "notes": "15% surcharge for public holiday",
  "unit_price": 1.3636,
  "price_variation": 1.15,
  "modifiers": [
    -67
  ]
}
  • 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.

 

 

 

 

<!-- Placeholder for Re-Direct -->

Browse more topics

Was this article helpful?
0 out of 0 found this helpful
Powered by Zendesk