Order Workflow
Orders progress through the following statuses:Orders can be cancelled from
pending, confirmed, or preparing status.Order Types
dine_in- Customer dining at a tabletakeout- Customer picking up orderdelivery- Order will be delivered to customer
Authentication
All endpoints require authentication using a Bearer token in the Authorization header:Permissions
Different roles have different access levels:- Create orders:
orders:create(waiter, cashier, branch_manager, org_admin) - Read orders:
orders:read(waiter, cashier, kitchen, branch_manager, org_admin) - Update orders:
orders:update(waiter, cashier, branch_manager, org_admin) - Update item status:
orders:update_item_status(kitchen staff)
WebSocket Events
When orders are created or updated, the system broadcasts events to relevant WebSocket channels:branch:{branchId}- All branch staffbranch:{branchId}:kitchen- Kitchen display systemssession:{sessionId}- Customer apps (when order has a table session)
Base URL
Available Endpoints
Create Order
POST /api/orders
Update Status
PATCH /api/orders/:id/status
Related APIs
- Kitchen API - Kitchen display and real-time order updates
- Payments API - Process payments for orders
- Menu API - Menu items used in orders