Store Postman Doc: https://documenter.getpostman.com/view/20499442/[merchant-collection-id] -------------------------------------------------------------------------------- API: Create Store -------------------------------------------------------------------------------- POST /merchant/api/v1/domains/:domain_id/stores [Seller Admin, Orchestration] Description: Create a store under a domain. Supports store metadata, opening hours, multi-warehouse mapping and default flags. Request Body: { "name": "Main Store", "address": { "address1": "...", "city": "..." }, "is_default": true, "timezone": "America/New_York", "metadata": {...} } Flow Sequence: # Validate domain and account permissions # Create store record in Account Service # Initialize store settings and default schedules # Assign store to domain subscriptions # Cache and log Response: 201 Created with store object -------------------------------------------------------------------------------- API: List / Get / Update / Delete Store -------------------------------------------------------------------------------- GET /merchant/api/v1/domains/:domain_id/stores GET /merchant/api/v1/domains/:domain_id/stores/:id PATCH /merchant/api/v1/domains/:domain_id/stores/:id DELETE /merchant/api/v1/domains/:domain_id/stores/:id Description: Standard CRUD for stores. Update includes toggling active status, updating address, hours, and assigning warehouses. Sample Create Request: { "name": "Main Store", "address": { "address1": "123 Main St", "city": "NY" }, "is_default": true, "timezone": "America/New_York", "store_hours": [ { "day": "MON", "open": "09:00", "close": "18:00" } ] } Notes: Creating a store may trigger creation of default pickup points and assign fulfillment locations. Response: 200 OK with store object or 204 No Content on delete Flow Sequence (List/Get): # Step 1: Validate Token and Domain # Step 2: Fetch stores from Account/Store Service GET /api/stores?domain_id=:domain_id [Store Service] Flow Sequence (PATCH/DELETE): # Step 1: Validate Token and Permissions # Step 2: Update/Delete store in Store Service PATCH/DELETE /api/stores/:id [Store Service] # Step 3: If update affects fulfillment, notify Fulfillment Service POST /api/fulfillment/stores/update [Fulfillment Service] # Step 4: Invalidate related caches POST /api/cache/invalidate [Caching Service]