Order Items
In Lemon Squeezy, an order item represents a line item for an order that includes product, variant and price information.
An order item belongs to an Order and is associated with a Product and a Variant.
The order item object
Attributes
order_id
The ID of the order this order item belongs to.
product_id
The ID of the product associated with this order item.
variant_id
The ID of the variant associated with this order item.
product_name
The name of the product.
variant_name
The name of the variant.
price
A positive integer in cents representing the price of this order item (in the order currency).
Note, for “pay what you want” products the price will be whatever the customer entered at checkout.
quantity
A positive integer representing the quantity of this order item.
created_at
An ISO 8601 formatted date-time string indicating when the object was created.
updated_at
An ISO 8601 formatted date-time string indicating when the object was last updated.
Order item object
Retrieve an order item
Retrieves the order item with the given ID.
GET /v1/order-items/:id
Returns
Returns an order item object.
Response
List all order items
Returns a paginated list of order items.
Parameters
order_id
Only return order items belonging to the order with this ID.
product_id
Only return order items belonging to the product with this ID.
variant_id
Only return order items belonging to the variant with this ID.
GET /v1/order-items
Returns
Returns a paginated list of order item objects ordered by id
.