E-commerce Vendor App — Mobile API
Product Management, Order Fulfilment & Payouts for Marketplace Sellers

Seller-side API for a multi-vendor marketplace. Vendors manage their products and stock from their phone, receive and fulfil orders, print shipping labels, and track sales and payouts — while only ever seeing their own store's data.
Architecture & System Design
Every vendor endpoint is scoped to the authenticated vendor through policies and query scopes, so one seller can never read or change another's products or orders. Marketplace orders are split into per-vendor sub-orders, and payouts are calculated from completed sub-orders minus commission.
- Policies and global scopes enforce strict per-vendor data isolation
- Marketplace orders split into vendor sub-orders for independent fulfilment
- Low-stock alerts sent to vendors automatically
- Payout statements generated from completed sub-orders
Engineering Challenges
Data Isolation Between Sellers
Vendors share the same tables, so a missed filter in any endpoint could expose another seller's data.
Applied a vendor global scope on vendor-facing models and authorization policies on every route, with tests asserting cross-vendor access is denied.
Vendor data isolation is enforced by default rather than by remembering to add filters.
Mixed-Vendor Orders
A single customer order can contain products from several vendors who ship separately.
Split each order into vendor sub-orders with their own status and shipping, while the customer still sees one order.
Vendors fulfil independently and payouts are calculated per vendor accurately.
Core Features
Inventory
Add and edit products, variants, prices and stock from the app.
Clean Code
1trait BelongsToVendor2{3 protected static function bootBelongsToVendor(): void4 {5 static::addGlobalScope('vendor', function (Builder $query) {6 if ($vendor = auth()->user()?->vendor) {7 $query->where('vendor_id', $vendor->id);8 }9 });1011 static::creating(function (Model $model) {12 $model->vendor_id ??= auth()->user()?->vendor?->id;13 });14 }15}Want something like this for your business?
I design and build full stack products end to end. Tell me about your idea and I'll get back to you with a plan.