Mart commerce API
Mart is implemented as a Workdo package underpackages/workdo/Mart. It reuses the current product, stock, invoice, and order projection tables instead of copying Admin source tables.
Data Ownership
Canonical data stays in existing tables:- Products:
product_service_items - Stock:
warehouse_stocks - Invoices:
sales_invoicesandsales_invoice_items - Order board projection:
unified_orders - Users, customers, delivery staff:
users - Workspaces:
workspaces
mart_carts,mart_cart_itemsmart_checkout_sessionsmart_order_status_eventsmart_delivery_assignments,mart_delivery_histories,mart_delivery_locationsmart_parcel_delivery_instructionsmart_offline_payment_verificationsmart_storefront_settings
API Routes
All routes are under/api/v1/mart and use auth:sanctum plus PlanModuleCheck:Mart.
Payment routes use the same authenticated /api/v1/mart base route.
Core storefront:
GET /statusGET /productsGET /products/{product}GET /cartPOST /cart/itemsPATCH /cart/items/{item}DELETE /cart/items/{item}POST /checkoutGET /ordersGET /orders/{order}
POST /pos/checkoutPOST /delivery/assignmentsPATCH /delivery/assignments/{assignment}/statusPOST /delivery/assignments/{assignment}/locationsPOST /parcel/instructionsGET /finance/summaryPOST /finance/offline-paymentsPATCH /finance/offline-payments/{verification}GET /support/settingsPOST /support/settingsGET /promotions/settingsPOST /promotions/settingsGET /reports/dashboard
Boundaries
Controllers only orchestrate requests and responses. Validation is handled by Form Request classes. Business rules live in services. Table access is isolated in repositories. POS uses the same checkout service as storefront checkout withchannel = pos. Delivery and parcel features write only Mart-owned workflow state and reference sales_invoices. Finance uses existing invoice amounts and updates invoice payment state only after offline payment verification. Support and promotions use mart_storefront_settings to avoid introducing duplicate support, coupon, or campaign source-of-truth tables before the existing platform modules are integrated.