Models

Danger

We’re sorry but this documentation section is outdated. Please have that in mind when trying to use it. You can help us making documentation up to date via Sylius Github. Thank you!

Order

Order object represents order. Orders have the following properties:

Property Description
id Unique id of the order
checkoutCompletedAt The time at which checkout was completed
number Number is human-friendly identifier
notes Additional information about order
items Collection of items
itemsTotal Total value of items in order (default 0)
adjustments Collection of adjustments
adjustmentsTotal Total value of adjustments (default 0)
total Calculated total (items + adjustments)
state State of the order (e.g. “cart”, “pending”)
createdAt Date when order was created
updatedAt Date of last change

Note

This model implements the OrderInterface For more detailed information go to Sylius API Order.

OrderItem

OrderItem object represents items in order. OrderItems have the following properties:

Property Description
id Unique id of the orderItem
order Reference to Order
quantity Items quantity
unitPrice The price of a single unit
adjustments Collection of adjustments
adjustmentsTotal Total of the adjustments in orderItem
total Total of the orderItem (unitPrice * quantity + adjustmentsTotal)
immutable Boolean flag of immutability

Note

This model implements the OrderItemInterface For more detailed information go to Sylius API OrderItem.

OrderItemUnit

OrderItemUnit object represents every single unit of order (for example OrderItem with quantity 5 should have 5 units). OrderItemUnits have the following properties:

Property Description
id Unique id of the orderItem
total Total of the orderItemUnit (orderItem unitPrice + adjustmentsTotal)
orderItem Reference to OrderItem
adjustments Collection of adjustments
adjustmentsTotal Total of the adjustments in orderItem

Note

This model implements the OrderItemUnitInterface For more detailed information go to Sylius API OrderItemUnit.

Adjustment

Adjustment object represents an adjustment to the order’s or order item’s total. Their amount can be positive (charges - taxes, shipping fees etc.) or negative (discounts etc.). Adjustments have the following properties:

Property Description
id Unique id of the adjustment
order Reference to Order
orderItem Reference to OrderItem
orderItemUnit Reference to OrderItemUnit
type Type of the adjustment (e.g. “tax”)
label e.g. “Clothing Tax 9%”
amount Adjustment amount
neutral Boolean flag of neutrality
locked Adjustment lock (prevent from deletion)
originId Origin id of the adjustment
originType Origin type of the adjustment
createdAt Date when adjustment was created
updatedAt Date of last change

Note

This model implements the AdjustmentInterface For more detailed information go to Sylius API Adjustment.