Product and category browsing with 3-layer architecture: API Gateway → Orchestration → Microservices
View Postman DocumentationSearch and filter categories using Elasticsearch
POST /categories/search
POST /categories/search
POST /api/categories/search
Elasticsearch handles category filtering and search
Retrieve a specific category by its unique identifier
GET /categories/:categoryId
GET /categories/:categoryId
GET /api/category/:id
Retrieve available filter options for categories
GET /categories/filter
GET /categories/filter
GET /api/categories/filter
Elasticsearch returns available filter options
Search, filter, and sort products using Elasticsearch
POST /products/search
POST /products/search
POST /api/products/search
Elasticsearch handles product filtering, sorting, and search
Retrieve product details with inventory information
GET /products/:productId
GET /products/:productId
GET /api/products/:id
Fetch product details
GET /api/inventory/:productId
Fetch stock levels
Retrieve user's recently viewed products from cache (uses Redis)
GET /products/recent-view
GET /products/recent-view
POST /api/caching/get
user:{user_id}:recent_viewed_products
Returns list of recently viewed product IDs
GET /api/products/bulk
Fetch full product details for cached IDs
┌─────────────────┐ ┌──────────────────┐ ┌──────────────────────┐ ┌─────────────────────────┐
│ │ │ │ │ │ │ │
│ Mobile App │───▶│ API Gateway │───▶│ Storefront │───▶│ Services (Layer 3) │
│ / Web Client │ │ (Layer 1) │ │ (Layer 2) │ │ │
│ │ │ PUBLIC │ │ INTERNAL │ │ INTERNAL │
└─────────────────┘ └──────────────────┘ └──────────────────────┘ └─────────────────────────┘
═══════════════════════════════════════════════════════════════════════════════════════════════════════
PRODUCT SEARCH FLOW
═══════════════════════════════════════════════════════════════════════════════════════════════════════
│ POST /products/search │ │ │
│ { query, filters, sort } │ │ │
│ ─────────────────────────▶ │ │ │
│ │ POST /products/search │ │
│ │ ──────────────────────▶ │
│ │ │ POST /api/products/search │
│ │ │ ────────────────────────────▶ [Search Engine]
│ │ │ ◀──── Elasticsearch results │
│ │ │ │
│ { products[], total } │ ◀───── Response ──────│ │
│ ◀──────────────────────────│ │ │
═══════════════════════════════════════════════════════════════════════════════════════════════════════
GET PRODUCT BY ID FLOW
═══════════════════════════════════════════════════════════════════════════════════════════════════════
│ GET /products/:productId │ │ │
│ ─────────────────────────▶ │ │ │
│ │ GET /products/:id │ │
│ │ ──────────────────────▶ │
│ │ │ ┌─ Parallel Calls ──────┐ │
│ │ │ │ │ │
│ │ │ │ GET /api/products/:id │ │
│ │ │ │ ────────────────────────▶ [Product Service]
│ │ │ │ │ │
│ │ │ │ GET /api/inventory/:id│ │
│ │ │ │ ────────────────────────▶ [Inventory Service]
│ │ │ │ │ │
│ │ │ └───────────────────────┘ │
│ │ │ │
│ { product, stock } │ ◀───── Response ──────│ │
│ ◀──────────────────────────│ │ │
═══════════════════════════════════════════════════════════════════════════════════════════════════════
RECENTLY VIEWED PRODUCTS FLOW
═══════════════════════════════════════════════════════════════════════════════════════════════════════
│ GET /products/recent-view │ │ │
│ ─────────────────────────▶ │ │ │
│ │ GET /products/ │ │
│ │ recent-view │ │
│ │ ──────────────────────▶ │
│ │ │ 1. POST /api/caching/get │
│ │ │ Key: user:{id}: │
│ │ │ recent_viewed_products │
│ │ │ ────────────────────────────▶ [Caching Service]
│ │ │ ◀──── Returns: [id1,id2] │
│ │ │ │
│ │ │ 2. GET /api/products/bulk │
│ │ │ ids: [id1, id2, ...] │
│ │ │ ────────────────────────────▶ [Product Service]
│ │ │ ◀──── Returns products │
│ │ │ │
│ { products: [...] } │ ◀───── Response ──────│ │
│ ◀──────────────────────────│ │ │
═══════════════════════════════════════════════════════════════════════════════════════════════════════
CATEGORY SEARCH & FILTER FLOW
═══════════════════════════════════════════════════════════════════════════════════════════════════════
│ POST /categories/search │ │ │
│ GET /categories/filter │ │ │
│ ─────────────────────────▶ │ │ │
│ │ Forward Request │ │
│ │ ──────────────────────▶ │
│ │ │ /api/categories/search │
│ │ │ /api/categories/filter │
│ │ │ ────────────────────────────▶ [Search Engine]
│ │ │ ◀──── Elasticsearch results │
│ │ │ │
│ { categories[], filters } │ ◀───── Response ──────│ │
│ ◀──────────────────────────│ │ │
═══════════════════════════════════════════════════════════════════════════════════════════════════════
GET CATEGORY BY ID FLOW
═══════════════════════════════════════════════════════════════════════════════════════════════════════
│ GET /categories/:categoryId│ │ │
│ ─────────────────────────▶ │ │ │
│ │ GET /categories/:id │ │
│ │ ──────────────────────▶ │
│ │ │ GET /api/category/:id │
│ │ │ ────────────────────────────▶ [Product Service]
│ │ │ ◀──── Category details │
│ │ │ │
│ { category: {...} } │ ◀───── Response ──────│ │
│ ◀──────────────────────────│ │ │
POST /products/search - Product search, filtering, sorting
POST /categories/search - Category search
GET /categories/filter - Filter aggregations
GET /products/:productId - Single product details
GET /categories/:categoryId - Single category details
GET /products/recent-view - Bulk product fetch
Public entry point for all catalog requests. Handles routing and authentication.
Orchestrates catalog operations, aggregates data from multiple services.
Product Service and Inventory Service handle domain-specific operations.
Search Engine (Elasticsearch) and Caching Service (Redis) for performance.
Product CRUD, categories, product details by ID
Stock levels, availability checks
Elasticsearch for products and categories search, filtering
Redis for recently viewed products
Orchestra Internal API Mapping - Catalog Module
Last Updated: December 2025