Blogs Postman Doc: https://documenter.getpostman.com/view/20499442/[merchant-collection-id] -------------------------------------------------------------------------------- API: Create Blog Post -------------------------------------------------------------------------------- POST /merchant/api/v1/domains/:domain_id/blogs [Seller Admin, Orchestration] Description: Create a blog post with metadata, tags, author, publish date and SEO fields. Supports drafts and scheduled publishing. Request Body: { "title": "How to Brew the Perfect Coffee", "slug": "brew-perfect-coffee", "content": "

...

", "excerpt": "Short summary", "author_id": "user_123", "status": "draft", // draft|published|scheduled "published_at": "2025-01-05T10:00:00Z", "tags": ["coffee","brewing"], "seo": { "title": "Brew Coffee", "description": "...", "keywords": ["coffee"] } } Flow Sequence: # Step 1: Validate token and domain # Step 2: Validate required fields and sanitize HTML # Step 3: Create Post record in CMS (Util Service) # Step 4: If status==published, generate page, update search index # Step 5: Cache and log event Response: 201 Created { "id": "blog_123", "domain_id": "670d...", "title": "How to Brew the Perfect Coffee", "slug": "brew-perfect-coffee", "status": "draft", "created_at": "2024-10-14T12:00:00Z" } Error Responses: 400 Bad Request - invalid input 401 Unauthorized - missing or invalid token -------------------------------------------------------------------------------- API: List Blog Posts -------------------------------------------------------------------------------- GET /merchant/api/v1/domains/:domain_id/blogs [Seller Admin, Orchestration] Query Parameters: ?page=&limit=&status=published,draft&tag=coffee&search=brew Flow Sequence: # Step 1: Validate Token and Domain # Step 2: Fetch Posts from Utility Service GET /api/blogs?domain_id=:domain_id [Utility Service, Core Microservices] # Step 3: Apply Filters, Pagination and Search # Step 4: Return Paginated Result Response: { "posts": [...], "pagination": {...} } -------------------------------------------------------------------------------- API: Get / Update / Delete Blog Post -------------------------------------------------------------------------------- GET /merchant/api/v1/domains/:domain_id/blogs/:id PATCH /merchant/api/v1/domains/:domain_id/blogs/:id DELETE /merchant/api/v1/domains/:domain_id/blogs/:id Description: Retrieve full content, update fields, soft-delete posts. PATCH supports partial updates and scheduling changes. Flow Sequence (GET): # Step 1: Validate Token and Domain # Step 2: Get Post from Utility Service GET /api/blogs/:id [Utility Service, Core Microservices] Flow Sequence (PATCH): # Step 1: Validate Token, Domain and Permissions # Step 2: Update Post in Utility Service PATCH /api/blogs/:id [Utility Service, Core Microservices] # Step 3: Invalidate Cache DELETE /api/cache/blogs/:id [Caching Service, Shared Services] Flow Sequence (DELETE): # Step 1: Validate Token and Permissions # Step 2: Soft-delete Post in Utility Service DELETE /api/blogs/:id [Utility Service, Core Microservices] # Step 3: Invalidate Cache DELETE /api/cache/blogs/:id [Caching Service, Shared Services]