Skip to main content

Order Lines

Retrieve line items for a POS order: product, quantity, unit price, and discount.

Endpoint

GET /api/v1/sales/{order_id}/lines

Ekomium model: pos.order.line · Method: search_read

Fields returned

FieldTypeDescription
idintegerLine ID
product_id[id, name]Product reference
full_product_namestringFull product name
qtyfloatQuantity sold
price_unitfloatUnit price before discount
discountfloatDiscount percentage (0–100)
price_subtotalfloatSubtotal excl. tax
price_subtotal_inclfloatSubtotal incl. tax

Example request

payload = {
"jsonrpc": "2.0",
"method": "call",
"params": {
"service": "object",
"method": "execute_kw",
"args": [
"prod", UID, PASSWORD,
"pos.order.line", "search_read",
[[["order_id", "=", 1]]],
{
"fields": [
"product_id", "full_product_name", "qty",
"price_unit", "discount", "price_subtotal_incl"
]
}
]
},
"id": 1
}

Example response

[
{
"id": 1,
"product_id": [5, "Vanilla Latte"],
"full_product_name": "Vanilla Latte",
"qty": 2.0,
"price_unit": 16.0,
"discount": 0.0,
"price_subtotal": 32.0,
"price_subtotal_incl": 32.0
},
{
"id": 2,
"product_id": [22, "Cookies"],
"full_product_name": "Cookies",
"qty": 1.0,
"price_unit": 10.0,
"discount": 10.0,
"price_subtotal": 9.0,
"price_subtotal_incl": 9.0
}
]

Discount calculation

When discount > 0, the effective unit price is:

effective_price = price_unit × (1 - discount / 100)

Test in API Playground →. Enter an Order ID.