number | string | no | the number the customer sees; unique in the workspace |
customer | Ref<Customer> | no | the buyer; absent only when nobody is known, as in a walk-in sale |
bill_to | Address | no | the billing address as given; defaults from the customer's bill_to |
ship_to | Address | no | where the goods go, as given at checkout; defaults from the customer's ship_to |
placed_at | datetime | no | when the buyer committed; required once the order leaves draft |
expires_at | datetime | no | for a quote: when the offer lapses |
status | Status(draft|open|completed|cancelled) | yes | draft = a cart or a quote not yet placed; open = placed and in progress; completed = nothing left to do; cancelled; default map[category:open] |
payment_status | enum(unpaid|authorized|partially_paid|paid|partially_refunded|refunded|voided) | yes | default unpaid |
fulfillment_status | enum(unfulfilled|partial|fulfilled) | yes | default unfulfilled |
currency | string | yes | ISO 4217; every Money on the order uses it; pattern ^[A-Z]{3}$ |
tax_inclusive | bool | yes | default false |
lines | object[] | yes | {key: string, product?: Ref<Product>, price?: Ref<Price>, description: string, sku?: string, quantity: decimal, unit_price: Money, discount?: Money, tax_amount?: Money, amount: Money} |
subtotal | Money | yes | the sum of lines.amount |
discount_total | Money | no | order-level discount |
shipping_total | Money | no | |
tax_total | Money | no | |
total | Money | yes | |
discount_codes | string[] | no | |
shipping_method | string | no | the delivery option chosen at checkout, as text |
about | Ref<any>[] | no | the Invoice raised for it, the Deal it came from |