๐ฆ Ordering โ
The ordering system supports delivery and pickup, guest checkout, scheduled orders, and a complete status lifecycle.

๐ Order Types โ
| Type | Description |
|---|---|
DELIVERY | ๐ Order delivered to customer's address |
PICKUP | ๐ช Customer picks up from location |
Each location can independently enable/disable delivery and pickup, and set minimum order amounts and lead times.
๐ Order Status Lifecycle โ
PENDING โ CONFIRMED โ PREPARING โ READY โ DELIVERED / PICKED_UP
โ CANCELLED (from any status)| Status | Description |
|---|---|
PENDING | โณ Order placed, awaiting confirmation |
CONFIRMED | โ Staff confirmed the order |
PREPARING | ๐ณ Kitchen is preparing the order |
READY | ๐ Order is ready for pickup or delivery |
OUT_FOR_DELIVERY | ๐ Delivery driver is on the way (delivery only) |
DELIVERED | ๐ฌ Order delivered to customer |
PICKED_UP | ๐ค Customer picked up the order |
CANCELLED | โ Order cancelled |
Staff update order status via PATCH /api/orders/:id/status.
๐ค Guest Checkout โ
Customers can place orders without registering. Guest orders include:
- ๐
guestNameโ Customer name - ๐ง
guestEmailโ Email for notifications - ๐ฑ
guestPhoneโ Phone number
The optionalAuth middleware allows both authenticated and guest orders on the same endpoint.
๐ Scheduled Orders โ
Set scheduledAt to a future datetime when creating an order. The kitchen can see scheduled orders and prepare them ahead of time.

๐ฐ Order Totals โ
| Field | Description |
|---|---|
subtotal | Sum of item prices ร quantities |
deliveryFee | Based on delivery zone |
tax | Calculated tax amount |
discount | Coupon discount (if applied) |
tip | Optional customer tip |
total | Final total |
๐ท๏ธ Coupons โ
Apply a coupon code at checkout. The coupon is validated against:
- ๐ Expiration date
- ๐ข Usage limits (total and per-customer)
- ๐ต Minimum order amount
- โ Active status
See Coupons for details.
๐ก Real-Time Updates โ
When an order is created or its status changes, a Socket.IO event is emitted. See Kitchen Display and Real-Time Events.
๐ API โ
See Orders API for the complete endpoint reference.