Schema
Line Item (Order)
Represents a line item that has been applied against an order.
Overview
Properties
uuid
The unique identifier.
uuid
source_item_uuid
The UUID of the original (catalog) item that was used to create this instance. For ad-hoc items, this field will be `null`.
uuid
Yes
name
The name of the item at the time the order was placed.
Chocolate Cake
1
255
source_category_name
The saved source category name. Null is displayed as "Unattributed" in category reports.
Lunch
1
255
Yes
qty
The quantity that the customer requested.
1
unit_price
The value of a single unit of the meal, before the value of modifiers, meals, discounts, surcharges and taxes are calculated.
References Money.
modifiers
The modifiers that the customer selected for this item.
Array items
Items
References Modifier (Order).
meal
The meal the customer selected for this item, if any.
Yes
One of
One of 1
One of 2
References Meal (Order).
sub_total
The unit price of the item, plus the aggregate value of the selected modifiers.
References Money.
discounts
The discounts that have been applied against the line item.
Array items
Items
References Discount (Order).
total_discounts
The aggregate value of the discounts applied against the line item.
References Money.
surcharges
The surcharges that have been levied against the line item.
Array items
Items
References Surcharge (Order).
total_surcharges
The aggregate value of the surcharges levied against the line item.
References Money.
taxes
The taxes that have been levied against the line item.
Array items
Items
References Tax (Order).
total_taxes
The aggregate value of the taxes levied against the line item.
References Money.
total
The total value of the meal (this will be the same as `sub_total`).
References Money.
Used by
Raw YAML
title: Line Item (Order)
type: object
properties:
uuid:
type: string
format: uuid
description: The unique identifier.
source_item_uuid:
type:
- string
- 'null'
description: |-
The UUID of the original (catalog) item that was used to create this instance.
For ad-hoc items, this field will be `null`.
format: uuid
name:
type: string
minLength: 1
maxLength: 255
example: Chocolate Cake
description: The name of the item at the time the order was placed.
source_category_name:
type:
- string
- 'null'
minLength: 1
maxLength: 255
example: Lunch
description: The saved source category name. Null is displayed as "Unattributed" in category reports.
qty:
type: integer
minimum: 1
description: The quantity that the customer requested.
unit_price:
$ref: ./Money.yaml
description: 'The value of a single unit of the meal, before the value of modifiers, meals, discounts, surcharges and taxes are calculated.'
modifiers:
type: array
description: The modifiers that the customer selected for this item.
items:
$ref: ./OrderModifier.yaml
meal:
oneOf:
- type: 'null'
- type: object
$ref: ./OrderMeal.yaml
description: 'The meal the customer selected for this item, if any.'
sub_total:
$ref: ./Money.yaml
description: 'The unit price of the item, plus the aggregate value of the selected modifiers.'
discounts:
type: array
description: The discounts that have been applied against the line item.
items:
$ref: ./OrderDiscount.yaml
total_discounts:
$ref: ./Money.yaml
description: The aggregate value of the discounts applied against the line item.
surcharges:
type: array
description: The surcharges that have been levied against the line item.
items:
$ref: ./OrderSurcharge.yaml
total_surcharges:
$ref: ./Money.yaml
description: The aggregate value of the surcharges levied against the line item.
taxes:
type: array
description: The taxes that have been levied against the line item.
items:
$ref: ./OrderTax.yaml
total_taxes:
$ref: ./Money.yaml
description: The aggregate value of the taxes levied against the line item.
total:
$ref: ./Money.yaml
description: The total value of the meal (this will be the same as `sub_total`).
description: Represents a line item that has been applied against an order.
x-tags:
- Orders