### GET /tenants/{tenantId}/products/{productId} Retrieve detailed information about a specific product including analytics and recommendations ```markdown ### Parameters - **tenantId** (string (uuid), path, required) - **productId** (string, path, required) (example: "prod_123") - **includeAnalytics** (boolean, query, optional): Include product analytics data - **includeRecommendations** (boolean, query, optional): Include AI-powered product recommendations ### Responses #### 200 - Product details retrieved successfully - **id** (string) (required): Unique product identifier (example: "prod_123") - **name** (string) (required): Product name (example: "Wireless Bluetooth Headphones") - **description** (string): Detailed product description (example: "High-quality wireless headphones with noise cancellation") - **price** (number (decimal)) (required): Product price in USD (example: 199.99) - **category** (string (electronics|clothing|books|home|sports|beauty|automotive)) (required): Product category (example: "electronics") ("electronics"|"clothing"|"books"|"home"|"sports"|"beauty"|"automotive") - **sku** (string): Stock Keeping Unit (example: "WBH-001-BLK") - **status** (string (active|inactive|discontinued|draft)) (required): Product status (example: "active") ("active"|"inactive"|"discontinued"|"draft") - **inventory** (object) - **quantity** (integer) (required): Current stock quantity (example: 150) - **lowStockThreshold** (integer) (required): Low stock alert threshold (example: 10) - **reserved** (integer): Reserved quantity for pending orders (example: 5) - **warehouse** (string): Warehouse location (example: "WH-001") - **lastRestocked** (string (date-time)): Last restock date (example: "2024-01-10T09:00:00Z") - **specifications** (object): Product specifications (example: {"brand":"TechCorp","model":"WH-2000","color":"Black","weight":"250g","connectivity":["Bluetooth 5.0","3.5mm jack"]}) - **images** (array (object)): Product images Array items: - **url** (string (uri)) (required): Image URL (example: "https://example.com/images/product1.jpg") - **alt** (string) (required): Alt text for accessibility (example: "Product front view") - **caption** (string): Image caption (example: "Main product image") - **order** (integer): Display order (example: 1) - **isPrimary** (boolean): Whether this is the primary image (example: true) - **tags** (array (string)): Product tags (example: ["wireless","bluetooth","noise-cancelling"]) - **seo** (object) - **metaTitle** (string): SEO meta title (example: "Wireless Bluetooth Headphones - TechCorp") - **metaDescription** (string): SEO meta description (example: "High-quality wireless headphones with noise cancellation. Free shipping.") - **keywords** (array (string)): SEO keywords (example: ["wireless headphones","bluetooth","noise cancelling"]) - **slug** (string): URL-friendly slug (example: "wireless-bluetooth-headphones") - **pricing** (object) - **basePrice** (number (decimal)): Base price before discounts (example: 249.99) - **salePrice** (number (decimal)): Current sale price (example: 199.99) - **currency** (string): Currency code (ISO 4217) (example: "USD") - **taxRate** (number (float)): Tax rate as decimal (example: 0.08) - **discounts** (array (unknown)): Applied discounts - **createdAt** (string (date-time)) (required): Product creation timestamp (example: "2024-01-15T10:30:00Z") - **updatedAt** (string (date-time)): Last update timestamp (example: "2024-01-20T14:45:00Z") - **version** (integer): Product version for optimistic locking (example: 5) - **analytics** (object): Product performance analytics - **views** (integer): Total product views - **purchases** (integer): Total purchases - **conversionRate** (number (float)): Conversion rate percentage - **averageRating** (number (float)): Average customer rating - **recommendations** (array (object)): AI-powered product recommendations Array items: - **productId** (string) (required): Recommended product ID (example: "prod_456") - **score** (number (float)) (required): Recommendation confidence score (example: 0.85) - **reason** (string (similar_category|frequently_bought_together|trending|personalized)) (required): Recommendation reason (example: "frequently_bought_together") ("similar_category"|"frequently_bought_together"|"trending"|"personalized") #### 404 - response - **error** (string) (required): Error code (example: "VALIDATION_ERROR") - **message** (string) (required): Error message (example: "Invalid input data") - **details** (object): Additional error details ### Example Usage ```bash curl -X GET "https://api.ecommerce-platform.com/v2/tenants/{tenantId}/products/{productId}?includeAnalytics=true&includeRecommendations=true" ``` ``` -------------------------------- ### GET /tenants/{tenantId}/products Retrieve a paginated list of products for a specific tenant with advanced filtering and sorting options ```markdown ### Parameters - **tenantId** (string (uuid), path, required): Unique identifier for the tenant (example: "123e4567-e89b-12d3-a456-426614174000") - **page** (integer, query, optional): Page number for pagination (example: 1) - **limit** (integer, query, optional): Number of items per page (example: 20) - **category** (string (electronics|clothing|books|home|sports), query, optional): Filter by product category (example: "electronics") - **priceMin** (number (decimal), query, optional): Minimum price filter (example: 10.99) - **priceMax** (number (decimal), query, optional): Maximum price filter (example: 999.99) - **sortBy** (string (name|price|createdAt|updatedAt|popularity), query, optional): Sort field (example: "price") - **sortOrder** (string (asc|desc), query, optional): Sort order (example: "asc") - **search** (string, query, optional): Search term for product name and description (example: "wireless headphones") - **inStock** (boolean, query, optional): Filter by stock availability (example: true) - **tags** (array (string), query, optional): Filter by product tags (example: ["sale","new","featured"]) ### Responses #### 200 - Successful response with paginated product list - **data** (array (object)) Array items: - **id** (string) (required): Unique product identifier (example: "prod_123") - **name** (string) (required): Product name (example: "Wireless Bluetooth Headphones") - **description** (string): Detailed product description (example: "High-quality wireless headphones with noise cancellation") - **price** (number (decimal)) (required): Product price in USD (example: 199.99) - **category** (string (electronics|clothing|books|home|sports|beauty|automotive)) (required): Product category (example: "electronics") ("electronics"|"clothing"|"books"|"home"|"sports"|"beauty"|"automotive") - **sku** (string): Stock Keeping Unit (example: "WBH-001-BLK") - **status** (string (active|inactive|discontinued|draft)) (required): Product status (example: "active") ("active"|"inactive"|"discontinued"|"draft") - **inventory** (unknown) - **specifications** (object): Product specifications (example: {"brand":"TechCorp","model":"WH-2000","color":"Black","weight":"250g","connectivity":["Bluetooth 5.0","3.5mm jack"]}) - **images** (array (unknown)): Product images - **tags** (array (string)): Product tags (example: ["wireless","bluetooth","noise-cancelling"]) - **seo** (unknown) - **pricing** (unknown) - **createdAt** (string (date-time)) (required): Product creation timestamp (example: "2024-01-15T10:30:00Z") - **updatedAt** (string (date-time)): Last update timestamp (example: "2024-01-20T14:45:00Z") - **version** (integer): Product version for optimistic locking (example: 5) - **pagination** (object) - **page** (integer) (required): Current page number (example: 1) - **limit** (integer) (required): Items per page (example: 20) - **total** (integer) (required): Total number of items (example: 1250) - **totalPages** (integer) (required): Total number of pages (example: 63) - **hasNext** (boolean): Whether there is a next page (example: true) - **hasPrev** (boolean): Whether there is a previous page (example: false) - **filters** (object) - **applied** (object): Currently applied filters - **category** (string) (example: "electronics") - **priceRange** (object) - **min** (number (decimal)) (example: 10.99) - **max** (number (decimal)) (example: 999.99) - **inStock** (boolean) (example: true) - **available** (object): Available filter options - **categories** (array (object)) Array items: - **value** (string) (example: "electronics") - **label** (string) (example: "Electronics") - **count** (integer) (example: 250) - **metadata** (object) - **processingTime** (number (float)): Request processing time in milliseconds (example: 45.2) - **cacheHit** (boolean): Whether the response was served from cache (example: false) - **aiRecommendations** (boolean): Whether AI recommendations were included (example: true) #### 400 - response - **error** (string) (required): Error code (example: "VALIDATION_ERROR") - **message** (string) (required): Error message (example: "Invalid input data") - **details** (object): Additional error details #### 401 - response - **error** (string) (required): Error code (example: "VALIDATION_ERROR") - **message** (string) (required): Error message (example: "Invalid input data") - **details** (object): Additional error details #### 403 - response - **error** (string) (required): Error code (example: "VALIDATION_ERROR") - **message** (string) (required): Error message (example: "Invalid input data") - **details** (object): Additional error details #### 429 - response - **error** (string) (required): Error code (example: "VALIDATION_ERROR") - **message** (string) (required): Error message (example: "Invalid input data") - **details** (object): Additional error details #### 500 - response - **error** (string) (required): Error code (example: "VALIDATION_ERROR") - **message** (string) (required): Error message (example: "Invalid input data") - **details** (object): Additional error details ### Example Usage ```bash curl -X GET "https://api.ecommerce-platform.com/v2/tenants/{tenantId}/products?page=1&limit=20&category=electronics&priceMin=10.99&priceMax=999.99&sortBy=price&sortOrder=asc&search=wireless headphones&inStock=true&tags=sale,new,featured" ``` ``` -------------------------------- ### GET /tenants/{tenantId}/analytics/dashboard Retrieve comprehensive analytics data for the tenant dashboard ```markdown ### Parameters - **tenantId** (string (uuid), path, required) - **dateRange** (string (today|yesterday|last7days|last30days|last90days|custom), query, optional): Date range for analytics - **startDate** (string (date), query, optional): Start date for custom range (ISO 8601) - **endDate** (string (date), query, optional): End date for custom range (ISO 8601) - **metrics** (array (string (revenue|orders|products|customers|conversion|inventory)), query, optional): Specific metrics to include ### Responses #### 200 - Analytics dashboard data - **dateRange** (object) (required) - **start** (string (date)) (example: "2024-01-01") - **end** (string (date)) (example: "2024-01-31") - **summary** (object) (required) - **totalRevenue** (number (decimal)): Total revenue in period (example: 125000.5) - **totalOrders** (integer): Total orders in period (example: 1250) - **totalProducts** (integer): Total active products (example: 500) - **totalCustomers** (integer): Total customers (example: 2500) - **conversionRate** (number (float)): Conversion rate percentage (example: 3.2) - **averageOrderValue** (number (decimal)): Average order value (example: 100) - **charts** (object) (required) - **revenueTrend** (array (object)) Array items: - **date** (string (date)) (example: "2024-01-01") - **revenue** (number (decimal)) (example: 4500) - **topProducts** (array (object)) Array items: - **productId** (string) (example: "prod_123") - **name** (string) (example: "Wireless Headphones") - **sales** (integer) (example: 150) - **revenue** (number (decimal)) (example: 22500) - **categoryBreakdown** (array (object)) Array items: - **category** (string) (example: "electronics") - **revenue** (number (decimal)) (example: 75000) - **percentage** (number (float)) (example: 60) ### Example Usage ```bash curl -X GET "https://api.ecommerce-platform.com/v2/tenants/{tenantId}/analytics/dashboard?dateRange=today&startDate=2023-01-01&endDate=2023-01-01&metrics=item1,item2" ``` ``` -------------------------------- ### POST /tenants/{tenantId}/products Create a new product for a specific tenant with validation and automatic categorization ```markdown ### Parameters - **tenantId** (string (uuid), path, required): Unique identifier for the tenant ### Request Body **Content-Type:** application/json - **name** (string) (required) - **description** (string) - **price** (number (decimal)) (required) - **category** (string (electronics|clothing|books|home|sports|beauty|automotive)) (required) ("electronics"|"clothing"|"books"|"home"|"sports"|"beauty"|"automotive") - **sku** (string) - **inventory** (unknown) - **specifications** (object) - **images** (array (unknown)) - **tags** (array (string)) - **seo** (unknown) - **pricing** (unknown) **Content-Type:** multipart/form-data - **product** (string): JSON string of product data - **images** (array (string (binary))): Product images ### Request Body **Content-Type:** application/json - **name** (string) (required) - **description** (string) - **price** (number (decimal)) (required) - **category** (string (electronics|clothing|books|home|sports|beauty|automotive)) (required) ("electronics"|"clothing"|"books"|"home"|"sports"|"beauty"|"automotive") - **sku** (string) - **inventory** (unknown) - **specifications** (object) - **images** (array (unknown)) - **tags** (array (string)) - **seo** (unknown) - **pricing** (unknown) **Content-Type:** multipart/form-data - **product** (string): JSON string of product data - **images** (array (string (binary))): Product images ### Responses #### 201 - Product created successfully - **id** (string) (required): Unique product identifier (example: "prod_123") - **name** (string) (required): Product name (example: "Wireless Bluetooth Headphones") - **description** (string): Detailed product description (example: "High-quality wireless headphones with noise cancellation") - **price** (number (decimal)) (required): Product price in USD (example: 199.99) - **category** (string (electronics|clothing|books|home|sports|beauty|automotive)) (required): Product category (example: "electronics") ("electronics"|"clothing"|"books"|"home"|"sports"|"beauty"|"automotive") - **sku** (string): Stock Keeping Unit (example: "WBH-001-BLK") - **status** (string (active|inactive|discontinued|draft)) (required): Product status (example: "active") ("active"|"inactive"|"discontinued"|"draft") - **inventory** (unknown) - **specifications** (object): Product specifications (example: {"brand":"TechCorp","model":"WH-2000","color":"Black","weight":"250g","connectivity":["Bluetooth 5.0","3.5mm jack"]}) - **images** (array (unknown)): Product images - **tags** (array (string)): Product tags (example: ["wireless","bluetooth","noise-cancelling"]) - **seo** (unknown) - **pricing** (unknown) - **createdAt** (string (date-time)) (required): Product creation timestamp (example: "2024-01-15T10:30:00Z") - **updatedAt** (string (date-time)): Last update timestamp (example: "2024-01-20T14:45:00Z") - **version** (integer): Product version for optimistic locking (example: 5) #### 400 - response - **error** (string) (required): Error code (example: "VALIDATION_ERROR") - **message** (string) (required): Error message (example: "Invalid input data") - **details** (object): Additional error details #### 401 - response - **error** (string) (required): Error code (example: "VALIDATION_ERROR") - **message** (string) (required): Error message (example: "Invalid input data") - **details** (object): Additional error details #### 403 - response - **error** (string) (required): Error code (example: "VALIDATION_ERROR") - **message** (string) (required): Error message (example: "Invalid input data") - **details** (object): Additional error details #### 409 - Product with SKU already exists - **error** (string) (required): Error code (example: "VALIDATION_ERROR") - **message** (string) (required): Error message (example: "Invalid input data") - **details** (object): Additional error details #### 422 - Validation error ### Example Usage ```bash curl -X POST "https://api.ecommerce-platform.com/v2/tenants/{tenantId}/products" \ -H "Content-Type: application/json" \ -d '{ "name": "example", "description": "example", "price": "1.0", "category": "electronics", "sku": "example", "inventory": "value", "specifications": "value", "images": [ "value" ], "tags": [ "example" ], "seo": "value", "pricing": "value" }' ``` ``` -------------------------------- ### PUT /tenants/{tenantId}/products/{productId} Update an existing product with partial updates and audit trail ```markdown ### Parameters - **tenantId** (string (uuid), path, required) - **productId** (string, path, required) ### Request Body **Content-Type:** application/json - **name** (string) - **description** (string) - **price** (number (decimal)) - **category** (string (electronics|clothing|books|home|sports|beauty|automotive)) ("electronics"|"clothing"|"books"|"home"|"sports"|"beauty"|"automotive") - **status** (string (active|inactive|discontinued|draft)) ("active"|"inactive"|"discontinued"|"draft") - **inventory** (unknown) - **specifications** (object) - **images** (array (unknown)) - **tags** (array (string)) - **seo** (unknown) - **pricing** (unknown) ### Request Body **Content-Type:** application/json - **name** (string) - **description** (string) - **price** (number (decimal)) - **category** (string (electronics|clothing|books|home|sports|beauty|automotive)) ("electronics"|"clothing"|"books"|"home"|"sports"|"beauty"|"automotive") - **status** (string (active|inactive|discontinued|draft)) ("active"|"inactive"|"discontinued"|"draft") - **inventory** (unknown) - **specifications** (object) - **images** (array (unknown)) - **tags** (array (string)) - **seo** (unknown) - **pricing** (unknown) ### Responses #### 200 - Product updated successfully - **id** (string) (required): Unique product identifier (example: "prod_123") - **name** (string) (required): Product name (example: "Wireless Bluetooth Headphones") - **description** (string): Detailed product description (example: "High-quality wireless headphones with noise cancellation") - **price** (number (decimal)) (required): Product price in USD (example: 199.99) - **category** (string (electronics|clothing|books|home|sports|beauty|automotive)) (required): Product category (example: "electronics") ("electronics"|"clothing"|"books"|"home"|"sports"|"beauty"|"automotive") - **sku** (string): Stock Keeping Unit (example: "WBH-001-BLK") - **status** (string (active|inactive|discontinued|draft)) (required): Product status (example: "active") ("active"|"inactive"|"discontinued"|"draft") - **inventory** (unknown) - **specifications** (object): Product specifications (example: {"brand":"TechCorp","model":"WH-2000","color":"Black","weight":"250g","connectivity":["Bluetooth 5.0","3.5mm jack"]}) - **images** (array (unknown)): Product images - **tags** (array (string)): Product tags (example: ["wireless","bluetooth","noise-cancelling"]) - **seo** (unknown) - **pricing** (unknown) - **createdAt** (string (date-time)) (required): Product creation timestamp (example: "2024-01-15T10:30:00Z") - **updatedAt** (string (date-time)): Last update timestamp (example: "2024-01-20T14:45:00Z") - **version** (integer): Product version for optimistic locking (example: 5) #### 404 - response - **error** (string) (required): Error code (example: "VALIDATION_ERROR") - **message** (string) (required): Error message (example: "Invalid input data") - **details** (object): Additional error details ### Example Usage ```bash curl -X PUT "https://api.ecommerce-platform.com/v2/tenants/{tenantId}/products/{productId}" \ -H "Content-Type: application/json" \ -d '{ "name": "example", "description": "example", "price": "1.0", "category": "electronics", "status": "active", "inventory": "value", "specifications": "value", "images": [ "value" ], "tags": [ "example" ], "seo": "value", "pricing": "value" }' ``` ``` -------------------------------- ### POST /tenants/{tenantId}/orders Create a new order with complex validation, inventory checks, and payment processing ```markdown ### Parameters - **tenantId** (string (uuid), path, required) ### Request Body **Content-Type:** application/json - **customerId** (string) (required): Customer identifier (example: "cust_456") - **items** (array (object)) (required) Array items: - **productId** (string) (required) (example: "prod_123") - **quantity** (integer) (required) (example: 2) - **shippingAddress** (unknown) (required) - **billingAddress** (unknown) - **paymentMethod** (unknown) (required) - **couponCode** (string): Applied coupon code (example: "SAVE20") - **notes** (string): Order notes (example: "Please deliver after 5 PM") ### Request Body **Content-Type:** application/json - **customerId** (string) (required): Customer identifier (example: "cust_456") - **items** (array (object)) (required) Array items: - **productId** (string) (required) (example: "prod_123") - **quantity** (integer) (required) (example: 2) - **shippingAddress** (unknown) (required) - **billingAddress** (unknown) - **paymentMethod** (unknown) (required) - **couponCode** (string): Applied coupon code (example: "SAVE20") - **notes** (string): Order notes (example: "Please deliver after 5 PM") ### Responses #### 201 - Order created successfully - **id** (string) (required): Unique order identifier (example: "order_789") - **tenantId** (string (uuid)) (required): Tenant identifier (example: "123e4567-e89b-12d3-a456-426614174000") - **customerId** (string) (required): Customer identifier (example: "cust_456") - **items** (array (unknown)) (required): Order items - **subtotal** (number (decimal)): Subtotal before taxes and fees (example: 299.98) - **tax** (number (decimal)): Tax amount (example: 24) - **shipping** (number (decimal)): Shipping cost (example: 9.99) - **discount** (number (decimal)): Total discount amount (example: 30) - **total** (number (decimal)) (required): Final total amount (example: 303.97) - **currency** (string): Currency code (example: "USD") - **status** (string (pending|confirmed|processing|shipped|delivered|cancelled|refunded)) (required): Order status (example: "confirmed") ("pending"|"confirmed"|"processing"|"shipped"|"delivered"|"cancelled"|"refunded") - **paymentStatus** (string (pending|paid|failed|refunded|partially_refunded)): Payment status (example: "paid") ("pending"|"paid"|"failed"|"refunded"|"partially_refunded") - **shippingAddress** (unknown) - **billingAddress** (unknown) - **paymentMethod** (unknown) - **tracking** (unknown) - **notes** (string): Order notes (example: "Please deliver after 5 PM") - **createdAt** (string (date-time)) (required): Order creation timestamp (example: "2024-01-15T14:30:00Z") - **updatedAt** (string (date-time)): Last update timestamp (example: "2024-01-16T09:15:00Z") #### 400 - response - **error** (string) (required): Error code (example: "VALIDATION_ERROR") - **message** (string) (required): Error message (example: "Invalid input data") - **details** (object): Additional error details #### 422 - Validation error ### Example Usage ```bash curl -X POST "https://api.ecommerce-platform.com/v2/tenants/{tenantId}/orders" \ -H "Content-Type: application/json" \ -d '{ "customerId": "cust_456", "items": [ { "productId": "prod_123", "quantity": 2 } ], "shippingAddress": "value", "billingAddress": "value", "paymentMethod": "value", "couponCode": "SAVE20", "notes": "Please deliver after 5 PM" }' ``` ``` -------------------------------- ### Security: X-API-Key API key authentication ```markdown ## Security: X-API-Key **Description:** API key authentication **Type:** apiKey ``` -------------------------------- ### Schema: Product Schema definition for Product ```markdown ## Schema: Product Schema definition for Product **Type:** object - **id** (string) (required): Unique product identifier (example: "prod_123") - **name** (string) (required): Product name (example: "Wireless Bluetooth Headphones") - **description** (string): Detailed product description (example: "High-quality wireless headphones with noise cancellation") - **price** (number (decimal)) (required): Product price in USD (example: 199.99) - **category** (string (electronics|clothing|books|home|sports|beauty|automotive)) (required): Product category (example: "electronics") ("electronics"|"clothing"|"books"|"home"|"sports"|"beauty"|"automotive") - **sku** (string): Stock Keeping Unit (example: "WBH-001-BLK") - **status** (string (active|inactive|discontinued|draft)) (required): Product status (example: "active") ("active"|"inactive"|"discontinued"|"draft") - **inventory** (object) - **quantity** (integer) (required): Current stock quantity (example: 150) - **lowStockThreshold** (integer) (required): Low stock alert threshold (example: 10) - **reserved** (integer): Reserved quantity for pending orders (example: 5) - **warehouse** (string): Warehouse location (example: "WH-001") - **lastRestocked** (string (date-time)): Last restock date (example: "2024-01-10T09:00:00Z") - **specifications** (object): Product specifications (example: {"brand":"TechCorp","model":"WH-2000","color":"Black","weight":"250g","connectivity":["Bluetooth 5.0","3.5mm jack"]}) - **images** (array (object)): Product images Array items: - **url** (string (uri)) (required): Image URL (example: "https://example.com/images/product1.jpg") - **alt** (string) (required): Alt text for accessibility (example: "Product front view") - **caption** (string): Image caption (example: "Main product image") - **order** (integer): Display order (example: 1) - **isPrimary** (boolean): Whether this is the primary image (example: true) - **tags** (array (string)): Product tags (example: ["wireless","bluetooth","noise-cancelling"]) - **seo** (object) - **metaTitle** (string): SEO meta title (example: "Wireless Bluetooth Headphones - TechCorp") - **metaDescription** (string): SEO meta description (example: "High-quality wireless headphones with noise cancellation. Free shipping.") - **keywords** (array (string)): SEO keywords (example: ["wireless headphones","bluetooth","noise cancelling"]) - **slug** (string): URL-friendly slug (example: "wireless-bluetooth-headphones") - **pricing** (object) - **basePrice** (number (decimal)): Base price before discounts (example: 249.99) - **salePrice** (number (decimal)): Current sale price (example: 199.99) - **currency** (string): Currency code (ISO 4217) (example: "USD") - **taxRate** (number (float)): Tax rate as decimal (example: 0.08) - **discounts** (array (unknown)): Applied discounts - **createdAt** (string (date-time)) (required): Product creation timestamp (example: "2024-01-15T10:30:00Z") - **updatedAt** (string (date-time)): Last update timestamp (example: "2024-01-20T14:45:00Z") - **version** (integer): Product version for optimistic locking (example: 5) ``` -------------------------------- ### DELETE /tenants/{tenantId}/products/{productId} Soft delete a product with option for hard delete ```markdown ### Parameters - **tenantId** (string (uuid), path, required) - **productId** (string, path, required) - **hardDelete** (boolean, query, optional): Perform hard delete instead of soft delete ### Responses #### 204 - Product deleted successfully Product deleted successfully #### 404 - response - **error** (string) (required): Error code (example: "VALIDATION_ERROR") - **message** (string) (required): Error message (example: "Invalid input data") - **details** (object): Additional error details ### Example Usage ```bash curl -X DELETE "https://api.ecommerce-platform.com/v2/tenants/{tenantId}/products/{productId}?hardDelete=true" ``` ``` -------------------------------- ### API Overview: E-Commerce Platform API A comprehensive e-commerce platform API with advanced features including: - Multi-tenant support - Real-time inventory management - Advanced payment processing - AI-powered recommendations - Analytics and reporting - Webhook notifications ```yaml # E-Commerce Platform API # Version: 2.1.0 A comprehensive e-commerce platform API with advanced features including: - Multi-tenant support - Real-time inventory management - Advanced payment processing - AI-powered recommendations - Analytics and reporting - Webhook notifications # Base URL: https://api.ecommerce-platform.com/v2 ``` -------------------------------- ### Schema: ProductRecommendation Schema definition for ProductRecommendation ```markdown ## Schema: ProductRecommendation Schema definition for ProductRecommendation **Type:** object - **productId** (string) (required): Recommended product ID (example: "prod_456") - **score** (number (float)) (required): Recommendation confidence score (example: 0.85) - **reason** (string (similar_category|frequently_bought_together|trending|personalized)) (required): Recommendation reason (example: "frequently_bought_together") ("similar_category"|"frequently_bought_together"|"trending"|"personalized") ``` -------------------------------- ### Schema: PricingInfo Schema definition for PricingInfo ```markdown ## Schema: PricingInfo Schema definition for PricingInfo **Type:** object - **basePrice** (number (decimal)): Base price before discounts (example: 249.99) - **salePrice** (number (decimal)): Current sale price (example: 199.99) - **currency** (string): Currency code (ISO 4217) (example: "USD") - **taxRate** (number (float)): Tax rate as decimal (example: 0.08) - **discounts** (array (object)): Applied discounts Array items: - **type** (string (percentage|fixed|bogo)) (required): Discount type (example: "percentage") ("percentage"|"fixed"|"bogo") - **value** (number (decimal)) (required): Discount value (example: 20) - **description** (string): Discount description (example: "20% off for new customers") - **validFrom** (string (date-time)): Discount start date (example: "2024-01-01T00:00:00Z") - **validTo** (string (date-time)): Discount end date (example: "2024-12-31T23:59:59Z") ``` -------------------------------- ### Schema: Discount Schema definition for Discount ```markdown ## Schema: Discount Schema definition for Discount **Type:** object - **type** (string (percentage|fixed|bogo)) (required): Discount type (example: "percentage") ("percentage"|"fixed"|"bogo") - **value** (number (decimal)) (required): Discount value (example: 20) - **description** (string): Discount description (example: "20% off for new customers") - **validFrom** (string (date-time)): Discount start date (example: "2024-01-01T00:00:00Z") - **validTo** (string (date-time)): Discount end date (example: "2024-12-31T23:59:59Z") ``` -------------------------------- ### Schema: AnalyticsDashboard Schema definition for AnalyticsDashboard ```markdown ## Schema: AnalyticsDashboard Schema definition for AnalyticsDashboard **Type:** object - **dateRange** (object) (required) - **start** (string (date)) (example: "2024-01-01") - **end** (string (date)) (example: "2024-01-31") - **summary** (object) (required) - **totalRevenue** (number (decimal)): Total revenue in period (example: 125000.5) - **totalOrders** (integer): Total orders in period (example: 1250) - **totalProducts** (integer): Total active products (example: 500) - **totalCustomers** (integer): Total customers (example: 2500) - **conversionRate** (number (float)): Conversion rate percentage (example: 3.2) - **averageOrderValue** (number (decimal)): Average order value (example: 100) - **charts** (object) (required) - **revenueTrend** (array (object)) Array items: - **date** (string (date)) (example: "2024-01-01") - **revenue** (number (decimal)) (example: 4500) - **topProducts** (array (object)) Array items: - **productId** (string) (example: "prod_123") - **name** (string) (example: "Wireless Headphones") - **sales** (integer) (example: 150) - **revenue** (number (decimal)) (example: 22500) - **categoryBreakdown** (array (object)) Array items: - **category** (string) (example: "electronics") - **revenue** (number (decimal)) (example: 75000) - **percentage** (number (float)) (example: 60) ``` -------------------------------- ### Schema: ProductCreateRequest Schema definition for ProductCreateRequest ```markdown ## Schema: ProductCreateRequest Schema definition for ProductCreateRequest **Type:** object - **name** (string) (required) - **description** (string) - **price** (number (decimal)) (required) - **category** (string (electronics|clothing|books|home|sports|beauty|automotive)) (required) ("electronics"|"clothing"|"books"|"home"|"sports"|"beauty"|"automotive") - **sku** (string) - **inventory** (object) - **quantity** (integer) (required): Current stock quantity (example: 150) - **lowStockThreshold** (integer) (required): Low stock alert threshold (example: 10) - **reserved** (integer): Reserved quantity for pending orders (example: 5) - **warehouse** (string): Warehouse location (example: "WH-001") - **lastRestocked** (string (date-time)): Last restock date (example: "2024-01-10T09:00:00Z") - **specifications** (object) - **images** (array (object)) Array items: - **url** (string (uri)) (required): Image URL (example: "https://example.com/images/product1.jpg") - **alt** (string) (required): Alt text for accessibility (example: "Product front view") - **caption** (string): Image caption (example: "Main product image") - **order** (integer): Display order (example: 1) - **isPrimary** (boolean): Whether this is the primary image (example: true) - **tags** (array (string)) - **seo** (object) - **metaTitle** (string): SEO meta title (example: "Wireless Bluetooth Headphones - TechCorp") - **metaDescription** (string): SEO meta description (example: "High-quality wireless headphones with noise cancellation. Free shipping.") - **keywords** (array (string)): SEO keywords (example: ["wireless headphones","bluetooth","noise cancelling"]) - **slug** (string): URL-friendly slug (example: "wireless-bluetooth-headphones") - **pricing** (object) - **basePrice** (number (decimal)): Base price before discounts (example: 249.99) - **salePrice** (number (decimal)): Current sale price (example: 199.99) - **currency** (string): Currency code (ISO 4217) (example: "USD") - **taxRate** (number (float)): Tax rate as decimal (example: 0.08) - **discounts** (array (unknown)): Applied discounts ``` -------------------------------- ### Schema: ProductImage Schema definition for ProductImage ```markdown ## Schema: ProductImage Schema definition for ProductImage **Type:** object - **url** (string (uri)) (required): Image URL (example: "https://example.com/images/product1.jpg") - **alt** (string) (required): Alt text for accessibility (example: "Product front view") - **caption** (string): Image caption (example: "Main product image") - **order** (integer): Display order (example: 1) - **isPrimary** (boolean): Whether this is the primary image (example: true) ```