{"info":{"_postman_id":"8e159ba2-6e37-4d9f-90a5-3cfc22cde9bf","name":"E-commerce API","description":"<html><head></head><body><h1 id=\"e-commerce-api-documentation\">E-commerce API Documentation</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>Welcome to the E-commerce API documentation. This RESTful API provides a comprehensive solution for managing an online store, including product catalog management, shopping cart functionality, and order processing.</p>\n<h2 id=\"base-url\">Base URL</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>http://localhost:5000\n\n</code></pre><p>All API endpoints are relative to this base URL.</p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>This API uses <strong>Bearer Token</strong> authentication. Include your API key in the Authorization header for all requests:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer {{api_key}}\n\n</code></pre><p>To obtain an API key, please contact your system administrator or register through the developer portal.</p>\n<h2 id=\"api-structure\">API Structure</h2>\n<p>The API is organized into three main resource groups:</p>\n<h3 id=\"📦-products\">📦 Products</h3>\n<p>Manage your product catalog with full CRUD operations. Create, read, update, and delete products with detailed information including pricing, inventory, and descriptions.</p>\n<h3 id=\"🛒-cart\">🛒 Cart</h3>\n<p>Handle shopping cart operations for your customers. Add items, update quantities, retrieve cart contents, and remove items seamlessly.</p>\n<h3 id=\"📋-orders\">📋 Orders</h3>\n<p>Process and manage customer orders. Create new orders from cart contents, retrieve order history, and view detailed order information.</p>\n<h2 id=\"response-format\">Response Format</h2>\n<p>All responses are returned in JSON format with appropriate HTTP status codes:</p>\n<ul>\n<li><p><code>200 OK</code> - Successful GET, PUT requests</p>\n</li>\n<li><p><code>201 Created</code> - Successful POST requests</p>\n</li>\n<li><p><code>204 No Content</code> - Successful DELETE requests</p>\n</li>\n<li><p><code>400 Bad Request</code> - Invalid request parameters</p>\n</li>\n<li><p><code>401 Unauthorized</code> - Missing or invalid authentication</p>\n</li>\n<li><p><code>404 Not Found</code> - Resource not found</p>\n</li>\n<li><p><code>500 Internal Server Error</code> - Server error</p>\n</li>\n</ul>\n<h2 id=\"rate-limiting\">Rate Limiting</h2>\n<p>API requests are limited to 1000 requests per hour per API key. Rate limit information is included in response headers:</p>\n<ul>\n<li><p><code>X-RateLimit-Limit</code> - Maximum requests per hour</p>\n</li>\n<li><p><code>X-RateLimit-Remaining</code> - Remaining requests in current window</p>\n</li>\n<li><p><code>X-RateLimit-Reset</code> - Time when the rate limit resets (Unix timestamp)</p>\n</li>\n</ul>\n<h2 id=\"error-handling\">Error Handling</h2>\n<p>Error responses include a descriptive message:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"Error description\",\n  \"message\": \"Detailed error message\",\n  \"statusCode\": 400\n}\n\n</code></pre>\n<h2 id=\"getting-started\">Getting Started</h2>\n<ol>\n<li><p>Obtain your API key</p>\n</li>\n<li><p>Set up the <code>api_key</code> variable in your Postman environment</p>\n</li>\n<li><p>Start with the Products endpoints to populate your catalog</p>\n</li>\n<li><p>Use Cart endpoints to simulate customer shopping experience</p>\n</li>\n<li><p>Create orders using the Orders endpoints</p>\n</li>\n</ol>\n<h2 id=\"support\">Support</h2>\n<p>For API support, bug reports, or feature requests, please contact:</p>\n<ul>\n<li><p>Email: <a href=\"https://mailto:api-support@ecommerce.com\">api-support@ecommerce.com</a></p>\n</li>\n<li><p>Documentation: <a href=\"https://docs.ecommerce.com/api\">https://docs.ecommerce.com/api</a></p>\n</li>\n<li><p>Status Page: <a href=\"https://status.ecommerce.com\">https://status.ecommerce.com</a></p>\n</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"E-commerce API Documentation","slug":"e-commerce-api-documentation"}],"owner":"50522412","collectionId":"8e159ba2-6e37-4d9f-90a5-3cfc22cde9bf","publishedId":"2sBXcBm21t","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-02-12T09:04:04.000Z"},"item":[{"name":"Products","item":[{"name":"Get All Products","id":"873ccb22-077a-4ed6-86c1-694bda08ec21","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{api_key}}"}],"url":"http://localhost:5000/api/products","description":"<h1 id=\"get-all-products\">Get All Products</h1>\n<p>Retrieves a list of all products in the catalog.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>GET /api/products</code></p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>Requires Bearer token authentication.</p>\n<h2 id=\"query-parameters\">Query Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>page</td>\n<td>integer</td>\n<td>No</td>\n<td>Page number for pagination (default: 1)</td>\n</tr>\n<tr>\n<td>limit</td>\n<td>integer</td>\n<td>No</td>\n<td>Number of items per page (default: 10)</td>\n</tr>\n<tr>\n<td>category</td>\n<td>string</td>\n<td>No</td>\n<td>Filter by product category</td>\n</tr>\n<tr>\n<td>minPrice</td>\n<td>number</td>\n<td>No</td>\n<td>Minimum price filter</td>\n</tr>\n<tr>\n<td>maxPrice</td>\n<td>number</td>\n<td>No</td>\n<td>Maximum price filter</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"response\">Response</h2>\n<p><strong>Status Code:</strong> <code>200 OK</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"products\": [\n    {\n      \"id\": \"prod_123\",\n      \"name\": \"Wireless Headphones\",\n      \"description\": \"High-quality wireless headphones with noise cancellation\",\n      \"price\": 99.99,\n      \"category\": \"Electronics\",\n      \"stock\": 50,\n      \"imageUrl\": \"https://example.com/images/headphones.jpg\"\n    }\n  ],\n  \"pagination\": {\n    \"currentPage\": 1,\n    \"totalPages\": 5,\n    \"totalItems\": 50\n  }\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["api","products"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"adea5896-47eb-4702-a7fb-5cccf274cd73","name":"Get All Products","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{api_key}}"}],"url":"http://localhost:5000/api/products"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"1586"},{"key":"ETag","value":"W/\"632-NNyd9uyojlemHYz+udSzelNvnZE\""},{"key":"Date","value":"Thu, 12 Feb 2026 09:21:50 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"count\": 6,\n    \"data\": [\n        {\n            \"_id\": \"698d777f8196b3f05961b6cd\",\n            \"name\": \"New Gaming Laptop\",\n            \"description\": \"High-performance gaming laptop with latest GPU\",\n            \"price\": 1000,\n            \"stock\": 280,\n            \"category\": \"Electronics\",\n            \"imageUrl\": \"https://example.com/laptop.jpg\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"698d78187d4bb0bb62af5cd2\",\n            \"name\": \"Wireless Bluetooth Headphones\",\n            \"description\": \"Noise-cancelling wireless headphones with 30-hour battery life\",\n            \"price\": 89.99,\n            \"stock\": 50,\n            \"category\": \"Electronics\",\n            \"imageUrl\": \"https://images.unsplash.com/photo-1505740420928-5e560c06d30e\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"698d784c7d4bb0bb62af5cd4\",\n            \"name\": \"Cotton T-Shirt\",\n            \"description\": \"100% cotton premium t-shirt, available in multiple colors\",\n            \"price\": 24.99,\n            \"stock\": 100,\n            \"category\": \"Clothing\",\n            \"imageUrl\": \"https://images.unsplash.com/photo-1521572163474-6864f9cf17ab\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"698d788e7d4bb0bb62af5cd8\",\n            \"name\": \"Stainless Steel Water Bottle\",\n            \"description\": \"Insulated stainless steel water bottle, keeps drinks cold for 24 hours\",\n            \"price\": 34.99,\n            \"stock\": 75,\n            \"category\": \"Home\",\n            \"imageUrl\": \"https://images.unsplash.com/photo-1523362628745-0c100150b504\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"698d78b07d4bb0bb62af5cda\",\n            \"name\": \"Yoga Mat\",\n            \"description\": \"Non-slip eco-friendly yoga mat with carrying strap\",\n            \"price\": 29.99,\n            \"stock\": 40,\n            \"category\": \"Sports\",\n            \"imageUrl\": \"https://images.unsplash.com/photo-1599901860904-17e6ed7083a0\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"698d78d07d4bb0bb62af5cdc\",\n            \"name\": \"Coffee Maker\",\n            \"description\": \"Programmable coffee maker with thermal carafe\",\n            \"price\": 79.99,\n            \"stock\": 30,\n            \"category\": \"Home\",\n            \"imageUrl\": \"https://images.unsplash.com/photo-1495474472287-4d71bcdd2085\",\n            \"__v\": 0\n        }\n    ]\n}"}],"_postman_id":"873ccb22-077a-4ed6-86c1-694bda08ec21"},{"name":"Get Product by ID","id":"c503f851-34a4-4f6e-a17d-8955ae1acdf8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{api_key}}"}],"url":"http://localhost:5000/api/products/{{product_id}}","description":"<h1 id=\"get-product-by-id\">Get Product by ID</h1>\n<p>Retrieves detailed information about a specific product.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>GET /api/products/:id</code></p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>Requires Bearer token authentication.</p>\n<h2 id=\"path-parameters\">Path Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>string</td>\n<td>Yes</td>\n<td>Unique product identifier</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"response\">Response</h2>\n<p><strong>Status Code:</strong> <code>200 OK</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": \"prod_123\",\n  \"name\": \"Wireless Headphones\",\n  \"description\": \"High-quality wireless headphones with noise cancellation\",\n  \"price\": 99.99,\n  \"category\": \"Electronics\",\n  \"stock\": 50,\n  \"imageUrl\": \"https://example.com/images/headphones.jpg\",\n  \"specifications\": {\n    \"brand\": \"TechBrand\",\n    \"color\": \"Black\",\n    \"weight\": \"250g\"\n  },\n  \"createdAt\": \"2024-01-15T10:30:00Z\",\n  \"updatedAt\": \"2024-01-20T14:45:00Z\"\n}\n</code></pre>\n<p><strong>Status Code:</strong> <code>404 Not Found</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"Product not found\",\n  \"message\": \"No product exists with the provided ID\"\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["api","products","{{product_id}}"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"b5ec50cb-ce3f-412f-87bf-4bede54526c3","name":"Get Product by ID","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{api_key}}"}],"url":"http://localhost:5000/api/products/{{product_id}}"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"250"},{"key":"ETag","value":"W/\"fa-NToSMJqi7FjflPmLeG58vVTAXpQ\""},{"key":"Date","value":"Thu, 12 Feb 2026 09:25:07 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"_id\": \"698d777f8196b3f05961b6cd\",\n        \"name\": \"New Gaming Laptop\",\n        \"description\": \"High-performance gaming laptop with latest GPU\",\n        \"price\": 1000,\n        \"stock\": 280,\n        \"category\": \"Electronics\",\n        \"imageUrl\": \"https://example.com/laptop.jpg\",\n        \"__v\": 0\n    }\n}"}],"_postman_id":"c503f851-34a4-4f6e-a17d-8955ae1acdf8"},{"name":"Create Product","id":"ad13cf3e-58d2-4b4b-9d90-2543aebf3506","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Wireless Headphones\",\n  \"description\": \"High-quality wireless headphones with noise cancellation\",\n  \"price\": 99.99,\n  \"category\": \"Electronics\",\n  \"stock\": 50,\n  \"imageUrl\": \"https://example.com/images/headphones.jpg\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/products","description":"<h1 id=\"create-product\">Create Product</h1>\n<p>Creates a new product in the catalog.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>POST /api/products</code></p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>Requires Bearer token authentication.</p>\n<h2 id=\"request-body\">Request Body</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>Yes</td>\n<td>Product name</td>\n</tr>\n<tr>\n<td>description</td>\n<td>string</td>\n<td>Yes</td>\n<td>Product description</td>\n</tr>\n<tr>\n<td>price</td>\n<td>number</td>\n<td>Yes</td>\n<td>Product price (must be positive)</td>\n</tr>\n<tr>\n<td>category</td>\n<td>string</td>\n<td>Yes</td>\n<td>Product category</td>\n</tr>\n<tr>\n<td>stock</td>\n<td>integer</td>\n<td>Yes</td>\n<td>Available stock quantity</td>\n</tr>\n<tr>\n<td>imageUrl</td>\n<td>string</td>\n<td>No</td>\n<td>URL to product image</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-request-body\">Example Request Body</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"name\": \"Wireless Headphones\",\n  \"description\": \"High-quality wireless headphones with noise cancellation\",\n  \"price\": 99.99,\n  \"category\": \"Electronics\",\n  \"stock\": 50,\n  \"imageUrl\": \"https://example.com/images/headphones.jpg\"\n}\n\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<p><strong>Status Code:</strong> <code>201 Created</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": \"prod_123\",\n  \"name\": \"Wireless Headphones\",\n  \"description\": \"High-quality wireless headphones with noise cancellation\",\n  \"price\": 99.99,\n  \"category\": \"Electronics\",\n  \"stock\": 50,\n  \"imageUrl\": \"https://example.com/images/headphones.jpg\",\n  \"createdAt\": \"2024-01-15T10:30:00Z\"\n}\n\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["api","products"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"ea05b97d-9cbf-430c-ad0a-e1588c6ae823","name":"Create Product","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Wireless Headphones\",\n  \"description\": \"High-quality wireless headphones with noise cancellation\",\n  \"price\": 99.99,\n  \"category\": \"Electronics\",\n  \"stock\": 50,\n  \"imageUrl\": \"https://example.com/images/headphones.jpg\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/products"},"status":"Created","code":201,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"273"},{"key":"ETag","value":"W/\"111-zoBrUdxhPb1WebTholte9uNTlD4\""},{"key":"Date","value":"Thu, 12 Feb 2026 09:26:19 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"name\": \"Wireless Headphones\",\n        \"description\": \"High-quality wireless headphones with noise cancellation\",\n        \"price\": 99.99,\n        \"stock\": 50,\n        \"category\": \"Electronics\",\n        \"imageUrl\": \"https://example.com/images/headphones.jpg\",\n        \"_id\": \"698d9cba055e19d44029bc40\",\n        \"__v\": 0\n    }\n}"}],"_postman_id":"ad13cf3e-58d2-4b4b-9d90-2543aebf3506"},{"name":"Update Product","id":"92723c1a-9f40-4392-8398-dc3ba25e6ba7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Wireless Headphones Pro\",\n  \"price\": 129.99,\n  \"stock\": 75\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/products/{{product_id}}","description":"<h1 id=\"update-product\">Update Product</h1>\n<p>Updates an existing product's information.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>PUT /api/products/:id</code></p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>Requires Bearer token authentication.</p>\n<h2 id=\"path-parameters\">Path Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>string</td>\n<td>Yes</td>\n<td>Unique product identifier</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"request-body\">Request Body</h2>\n<p>All fields are optional. Only include fields you want to update.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>Product name</td>\n</tr>\n<tr>\n<td>description</td>\n<td>string</td>\n<td>Product description</td>\n</tr>\n<tr>\n<td>price</td>\n<td>number</td>\n<td>Product price</td>\n</tr>\n<tr>\n<td>category</td>\n<td>string</td>\n<td>Product category</td>\n</tr>\n<tr>\n<td>stock</td>\n<td>integer</td>\n<td>Available stock quantity</td>\n</tr>\n<tr>\n<td>imageUrl</td>\n<td>string</td>\n<td>URL to product image</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-request-body\">Example Request Body</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"name\": \"Wireless Headphones Pro\",\n  \"price\": 129.99,\n  \"stock\": 75\n}\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<p><strong>Status Code:</strong> <code>200 OK</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": \"prod_123\",\n  \"name\": \"Wireless Headphones Pro\",\n  \"description\": \"High-quality wireless headphones with noise cancellation\",\n  \"price\": 129.99,\n  \"category\": \"Electronics\",\n  \"stock\": 75,\n  \"imageUrl\": \"https://example.com/images/headphones.jpg\",\n  \"updatedAt\": \"2024-01-20T14:45:00Z\"\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["api","products","{{product_id}}"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"187d8e1b-5728-4082-a3ed-6e469acadcbe","name":"Update Product","originalRequest":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Wireless Headphones Pro\",\n  \"price\": 129.99,\n  \"stock\": 75\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/products/{{product_id}}"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"286"},{"key":"ETag","value":"W/\"11e-Br6z6rVBR3Foa+fUAxEy43qKbus\""},{"key":"Date","value":"Thu, 12 Feb 2026 09:30:01 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"_id\": \"698d78b07d4bb0bb62af5cda\",\n        \"name\": \"Wireless Headphones Pro\",\n        \"description\": \"Non-slip eco-friendly yoga mat with carrying strap\",\n        \"price\": 129.99,\n        \"stock\": 75,\n        \"category\": \"Sports\",\n        \"imageUrl\": \"https://images.unsplash.com/photo-1599901860904-17e6ed7083a0\",\n        \"__v\": 0\n    }\n}"}],"_postman_id":"92723c1a-9f40-4392-8398-dc3ba25e6ba7"},{"name":"Delete Product","id":"7f8c853b-d131-4ca4-87a8-e618c6bc0c91","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{api_key}}"}],"url":"http://localhost:5000/api/products/{{product_id}}","description":"<h1 id=\"delete-product\">Delete Product</h1>\n<p>Permanently deletes a product from the catalog.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>DELETE /api/products/:id</code></p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>Requires Bearer token authentication.</p>\n<h2 id=\"path-parameters\">Path Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>string</td>\n<td>Yes</td>\n<td>Unique product identifier</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"response\">Response</h2>\n<p><strong>Status Code:</strong> <code>204 No Content</code></p>\n<p>No response body is returned on successful deletion.</p>\n<p><strong>Status Code:</strong> <code>404 Not Found</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"Product not found\",\n  \"message\": \"No product exists with the provided ID\"\n}\n</code></pre>\n<p><strong>Status Code:</strong> <code>409 Conflict</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"Cannot delete product\",\n  \"message\": \"Product is currently in active orders and cannot be deleted\"\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["api","products","{{product_id}}"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"59d0149f-2f23-49df-8019-0ba66599a87a","name":"Delete Product","originalRequest":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{api_key}}"}],"url":"http://localhost:5000/api/products/{{product_id}}"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"67"},{"key":"ETag","value":"W/\"43-iu0nc6O1+1BJjSVIq0htfKARwZ8\""},{"key":"Date","value":"Thu, 12 Feb 2026 09:31:43 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Product deleted successfully\",\n    \"data\": {}\n}"}],"_postman_id":"7f8c853b-d131-4ca4-87a8-e618c6bc0c91"}],"id":"523914bf-dc5d-4dc3-a76f-5c3ae9bd40af","_postman_id":"523914bf-dc5d-4dc3-a76f-5c3ae9bd40af","description":""},{"name":"Cart","item":[{"name":"Get Cart","id":"916cf35b-72cc-4de2-a7cf-d92e80d88248","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{api_key}}"}],"url":"http://localhost:5000/api/cart","description":"<h1 id=\"get-cart\">Get Cart</h1>\n<p>Retrieves the current user's shopping cart contents.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>GET /api/cart</code></p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>Requires Bearer token authentication. Cart is associated with the authenticated user.</p>\n<h2 id=\"response\">Response</h2>\n<p><strong>Status Code:</strong> <code>200 OK</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"cartId\": \"cart_789\",\n  \"userId\": \"user_456\",\n  \"items\": [\n    {\n      \"id\": \"item_001\",\n      \"productId\": \"prod_123\",\n      \"productName\": \"Wireless Headphones\",\n      \"price\": 99.99,\n      \"quantity\": 2,\n      \"subtotal\": 199.98,\n      \"imageUrl\": \"https://example.com/images/headphones.jpg\"\n    },\n    {\n      \"id\": \"item_002\",\n      \"productId\": \"prod_456\",\n      \"productName\": \"USB Cable\",\n      \"price\": 12.99,\n      \"quantity\": 1,\n      \"subtotal\": 12.99,\n      \"imageUrl\": \"https://example.com/images/cable.jpg\"\n    }\n  ],\n  \"totalItems\": 3,\n  \"subtotal\": 212.97,\n  \"tax\": 21.30,\n  \"total\": 234.27,\n  \"updatedAt\": \"2024-01-20T15:30:00Z\"\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["api","cart"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"0a6f0f36-ac4b-47f2-8001-a1e9101b4750","name":"Get Cart","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{api_key}}"}],"url":"http://localhost:5000/api/cart"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"134"},{"key":"ETag","value":"W/\"86-fs3ZnBvzChPa2cXnwKqRyf8eu/U\""},{"key":"Date","value":"Thu, 12 Feb 2026 09:36:51 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"_id\": \"698d7d61055e19d44029bbfd\",\n        \"userId\": \"global\",\n        \"items\": [],\n        \"createdAt\": \"2026-02-12T07:12:33.854Z\",\n        \"__v\": 4\n    }\n}"}],"_postman_id":"916cf35b-72cc-4de2-a7cf-d92e80d88248"},{"name":"Add Item to Cart","id":"71573819-1550-45be-94b4-eb77262b3269","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"productId\": \"698d784c7d4bb0bb62af5cd4\",\n  \"quantity\": 2\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/cart","description":"<h1 id=\"add-item-to-cart\">Add Item to Cart</h1>\n<p>Adds a product to the shopping cart or updates quantity if already present.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>POST /api/cart/items</code></p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>Requires Bearer token authentication.</p>\n<h2 id=\"request-body\">Request Body</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>productId</td>\n<td>string</td>\n<td>Yes</td>\n<td>ID of the product to add</td>\n</tr>\n<tr>\n<td>quantity</td>\n<td>integer</td>\n<td>Yes</td>\n<td>Quantity to add (must be positive)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-request-body\">Example Request Body</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"productId\": \"prod_123\",\n  \"quantity\": 2\n}\n\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<p><strong>Status Code:</strong> <code>201 Created</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"cartId\": \"cart_789\",\n  \"item\": {\n    \"id\": \"item_001\",\n    \"productId\": \"prod_123\",\n    \"productName\": \"Wireless Headphones\",\n    \"price\": 99.99,\n    \"quantity\": 2,\n    \"subtotal\": 199.98\n  },\n  \"cartTotal\": 234.27,\n  \"message\": \"Item added to cart successfully\"\n}\n\n</code></pre>\n<p><strong>Status Code:</strong> <code>400 Bad Request</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"Insufficient stock\",\n  \"message\": \"Only 5 items available in stock\",\n  \"availableStock\": 5\n}\n\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["api","cart"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"6a57dc57-8e2c-4ace-bb83-72d4103d8f64","name":"Add Item to Cart","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"productId\": \"698d784c7d4bb0bb62af5cd4\",\n  \"quantity\": 2\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/cart"},"status":"Created","code":201,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"383"},{"key":"ETag","value":"W/\"17f-rfkBc48Ybws07BwuT5AhMzZ05U0\""},{"key":"Date","value":"Thu, 12 Feb 2026 09:39:43 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Item added to cart\",\n    \"data\": {\n        \"_id\": \"698d7d61055e19d44029bbfd\",\n        \"userId\": \"global\",\n        \"items\": [\n            {\n                \"productId\": {\n                    \"_id\": \"698d784c7d4bb0bb62af5cd4\",\n                    \"name\": \"Cotton T-Shirt\",\n                    \"price\": 24.99,\n                    \"stock\": 100,\n                    \"imageUrl\": \"https://images.unsplash.com/photo-1521572163474-6864f9cf17ab\"\n                },\n                \"quantity\": 2,\n                \"_id\": \"698d9fde055e19d44029bc4a\"\n            }\n        ],\n        \"createdAt\": \"2026-02-12T07:12:33.854Z\",\n        \"__v\": 5\n    }\n}"}],"_postman_id":"71573819-1550-45be-94b4-eb77262b3269"},{"name":"Update Cart Item","id":"826e040d-2a1c-4975-b1af-5fd3bb56e8ba","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"\n{\n  \"items\": [\n    { \"productId\": \"698d784c7d4bb0bb62af5cd4\", \"quantity\": 30 }\n\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/cart","description":"<h1 id=\"update-cart-item\">Update Cart Item</h1>\n<p>Updates the quantity of an item in the cart.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>PUT /api/cart/items/:itemId</code></p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>Requires Bearer token authentication.</p>\n<h2 id=\"path-parameters\">Path Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>itemId</td>\n<td>string</td>\n<td>Yes</td>\n<td>Unique cart item identifier</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"request-body\">Request Body</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>quantity</td>\n<td>integer</td>\n<td>Yes</td>\n<td>New quantity (must be positive)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-request-body\">Example Request Body</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"quantity\": 3\n}\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<p><strong>Status Code:</strong> <code>200 OK</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"item\": {\n    \"id\": \"item_001\",\n    \"productId\": \"prod_123\",\n    \"productName\": \"Wireless Headphones\",\n    \"price\": 99.99,\n    \"quantity\": 3,\n    \"subtotal\": 299.97\n  },\n  \"cartTotal\": 334.26,\n  \"message\": \"Cart item updated successfully\"\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["api","cart"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"6f223656-7bb5-4ac3-a393-889c25ccd859","name":"Update Cart Item","originalRequest":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"\n{\n  \"items\": [\n    { \"productId\": \"698d784c7d4bb0bb62af5cd4\", \"quantity\": 30 }\n\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/cart"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"391"},{"key":"ETag","value":"W/\"187-J/q/wBe2HoNIsY3fO4IFtNk3UyQ\""},{"key":"Date","value":"Thu, 12 Feb 2026 09:48:43 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Cart updated successfully\",\n    \"data\": {\n        \"_id\": \"698d7d61055e19d44029bbfd\",\n        \"userId\": \"global\",\n        \"items\": [\n            {\n                \"productId\": {\n                    \"_id\": \"698d784c7d4bb0bb62af5cd4\",\n                    \"name\": \"Cotton T-Shirt\",\n                    \"price\": 24.99,\n                    \"stock\": 100,\n                    \"imageUrl\": \"https://images.unsplash.com/photo-1521572163474-6864f9cf17ab\"\n                },\n                \"quantity\": 30,\n                \"_id\": \"698da1fb055e19d44029bc5a\"\n            }\n        ],\n        \"createdAt\": \"2026-02-12T07:12:33.854Z\",\n        \"__v\": 6\n    }\n}"}],"_postman_id":"826e040d-2a1c-4975-b1af-5fd3bb56e8ba"},{"name":"Remove Item from Cart","id":"0c0a8d9b-fce7-47b3-9ff6-deea1e2e9f9f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{api_key}}"}],"url":"http://localhost:5000/api/cart/items/{{item_id}}","description":"<h1 id=\"remove-item-from-cart\">Remove Item from Cart</h1>\n<p>Removes a specific item from the shopping cart.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>DELETE /api/cart/items/:itemId</code></p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>Requires Bearer token authentication.</p>\n<h2 id=\"path-parameters\">Path Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>itemId</td>\n<td>string</td>\n<td>Yes</td>\n<td>Unique cart item identifier</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"response\">Response</h2>\n<p><strong>Status Code:</strong> <code>200 OK</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Item removed from cart successfully\",\n  \"cartTotal\": 134.28,\n  \"remainingItems\": 2\n}\n</code></pre>\n<p><strong>Status Code:</strong> <code>404 Not Found</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"Item not found\",\n  \"message\": \"No item exists in cart with the provided ID\"\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["api","cart","items","{{item_id}}"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"7d342436-2481-4b34-8b69-8011a2cb7d1f","name":"Remove Item from Cart","originalRequest":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{api_key}}"}],"url":"http://localhost:5000/api/cart/698d78b07d4bb0bb62af5cda"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"388"},{"key":"ETag","value":"W/\"184-xAtZMaem9+5Tkf28I1PoKfq6Y+I\""},{"key":"Date","value":"Thu, 12 Feb 2026 09:54:28 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Item removed from cart\",\n    \"data\": {\n        \"_id\": \"698d7d61055e19d44029bbfd\",\n        \"userId\": \"global\",\n        \"items\": [\n            {\n                \"productId\": {\n                    \"_id\": \"698d784c7d4bb0bb62af5cd4\",\n                    \"name\": \"Cotton T-Shirt\",\n                    \"price\": 24.99,\n                    \"stock\": 100,\n                    \"imageUrl\": \"https://images.unsplash.com/photo-1521572163474-6864f9cf17ab\"\n                },\n                \"quantity\": 30,\n                \"_id\": \"698da1fb055e19d44029bc5a\"\n            }\n        ],\n        \"createdAt\": \"2026-02-12T07:12:33.854Z\",\n        \"__v\": 8\n    }\n}"}],"_postman_id":"0c0a8d9b-fce7-47b3-9ff6-deea1e2e9f9f"}],"id":"c56634cf-435c-43cd-9e4b-2da6791b0472","_postman_id":"c56634cf-435c-43cd-9e4b-2da6791b0472","description":""},{"name":"Orders","item":[{"name":"Get All Orders","id":"e5be1da2-b3ea-4735-b406-26157234c060","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{api_key}}"}],"url":"http://localhost:5000/api/orders/698d818a055e19d44029bc31","description":"<h1 id=\"get-all-orders\">Get All Orders</h1>\n<p>Retrieves a list of all orders placed by the authenticated user.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>GET /api/orders</code></p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>Requires Bearer token authentication.</p>\n<h2 id=\"query-parameters\">Query Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>status</code></td>\n<td>string</td>\n<td>No</td>\n<td>Filter orders by status (pending, processing, shipped, delivered, cancelled)</td>\n</tr>\n<tr>\n<td><code>page</code></td>\n<td>integer</td>\n<td>No</td>\n<td>Page number for pagination (default: 1)</td>\n</tr>\n<tr>\n<td><code>limit</code></td>\n<td>integer</td>\n<td>No</td>\n<td>Number of orders per page (default: 10, max: 100)</td>\n</tr>\n<tr>\n<td><code>sort</code></td>\n<td>string</td>\n<td>No</td>\n<td>Sort field (createdAt, totalAmount)</td>\n</tr>\n<tr>\n<td><code>order</code></td>\n<td>string</td>\n<td>No</td>\n<td>Sort order (asc, desc)</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"response\">Response</h2>\n<p><strong>Status Code:</strong> <code>200 OK</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"orders\": [\n    {\n      \"orderId\": \"order_123\",\n      \"userId\": \"user_456\",\n      \"items\": [\n        {\n          \"productId\": \"prod_789\",\n          \"name\": \"Wireless Headphones\",\n          \"quantity\": 1,\n          \"price\": 79.99\n        }\n      ],\n      \"totalAmount\": 79.99,\n      \"status\": \"delivered\",\n      \"shippingAddress\": {\n        \"street\": \"123 Main St\",\n        \"city\": \"New York\",\n        \"state\": \"NY\",\n        \"zipCode\": \"10001\",\n        \"country\": \"USA\"\n      },\n      \"createdAt\": \"2024-01-15T10:30:00Z\",\n      \"updatedAt\": \"2024-01-20T14:45:00Z\"\n    }\n  ],\n  \"pagination\": {\n    \"currentPage\": 1,\n    \"totalPages\": 5,\n    \"totalOrders\": 47,\n    \"limit\": 10\n  }\n}\n</code></pre>\n<h2 id=\"error-responses\">Error Responses</h2>\n<p><strong>Status Code:</strong> <code>401 Unauthorized</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"Authentication required\"\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["api","orders","698d818a055e19d44029bc31"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"8dd1cb6a-713b-491d-aace-dce12ac9280b","name":"Get All Orders","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{api_key}}"}],"url":"http://localhost:5000/api/orders"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"695"},{"key":"ETag","value":"W/\"2b7-RLLKWZ2mADTZdYMWDrTYIKzKECs\""},{"key":"Date","value":"Thu, 12 Feb 2026 16:15:44 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"count\": 2,\n    \"data\": [\n        {\n            \"customerInfo\": {\n                \"name\": \"Firaol Bashada\",\n                \"email\": \"dfiraol986@gmail.com\",\n                \"address\": \"Addis Ababa\"\n            },\n            \"_id\": \"698dfc731708be27157b3fe1\",\n            \"items\": [\n                {\n                    \"productId\": \"698d784c7d4bb0bb62af5cd4\",\n                    \"name\": \"Cotton T-Shirt\",\n                    \"price\": 24.99,\n                    \"quantity\": 30,\n                    \"_id\": \"698dfc731708be27157b3fe2\"\n                }\n            ],\n            \"total\": 749.6999999999999,\n            \"date\": \"2026-02-12T16:14:43.909Z\",\n            \"__v\": 0\n        },\n        {\n            \"customerInfo\": {\n                \"name\": \"Firaol Bashada\",\n                \"email\": \"dfiraol986@gmail.com\",\n                \"address\": \"Addis Ababa\"\n            },\n            \"_id\": \"698d818a055e19d44029bc31\",\n            \"items\": [\n                {\n                    \"productId\": \"698d777f8196b3f05961b6cd\",\n                    \"name\": \"New Gaming Laptop\",\n                    \"price\": 1000,\n                    \"quantity\": 20,\n                    \"_id\": \"698d818a055e19d44029bc32\"\n                }\n            ],\n            \"total\": 20000,\n            \"date\": \"2026-02-12T07:30:18.490Z\",\n            \"__v\": 0\n        }\n    ]\n}"}],"_postman_id":"e5be1da2-b3ea-4735-b406-26157234c060"},{"name":"Get Order by ID","id":"fc9d144d-41fd-4806-a04a-9f1aebf03a79","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{api_key}}"}],"url":"http://localhost:5000/api/orders/698d818a055e19d44029bc31","description":"<h1 id=\"get-order-by-id\">Get Order by ID</h1>\n<p>Retrieves detailed information about a specific order.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>GET /api/orders/{orderId}</code></p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>Requires Bearer token authentication.</p>\n<h2 id=\"path-parameters\">Path Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>orderId</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>Unique identifier of the order</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"response\">Response</h2>\n<p><strong>Status Code:</strong> <code>200 OK</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"orderId\": \"order_123\",\n  \"userId\": \"user_456\",\n  \"items\": [\n    {\n      \"productId\": \"prod_789\",\n      \"name\": \"Wireless Headphones\",\n      \"quantity\": 1,\n      \"price\": 79.99,\n      \"subtotal\": 79.99\n    }\n  ],\n  \"subtotal\": 79.99,\n  \"tax\": 6.40,\n  \"shipping\": 5.99,\n  \"totalAmount\": 92.38,\n  \"status\": \"delivered\",\n  \"paymentMethod\": \"credit_card\",\n  \"paymentStatus\": \"paid\",\n  \"shippingAddress\": {\n    \"street\": \"123 Main St\",\n    \"city\": \"New York\",\n    \"state\": \"NY\",\n    \"zipCode\": \"10001\",\n    \"country\": \"USA\"\n  },\n  \"trackingNumber\": \"TRACK123456789\",\n  \"createdAt\": \"2024-01-15T10:30:00Z\",\n  \"updatedAt\": \"2024-01-20T14:45:00Z\"\n}\n</code></pre>\n<h2 id=\"error-responses\">Error Responses</h2>\n<p><strong>Status Code:</strong> <code>404 Not Found</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"Order not found\"\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["api","orders","698d818a055e19d44029bc31"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"0a714d75-f54c-4964-91ab-6d5e436971c3","name":"Get Order by ID","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{api_key}}"}],"url":"http://localhost:5000/api/orders/698d818a055e19d44029bc31"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"348"},{"key":"ETag","value":"W/\"15c-hl84zlbmtaDLIX/lf+19oWNfbYo\""},{"key":"Date","value":"Thu, 12 Feb 2026 16:17:43 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"customerInfo\": {\n            \"name\": \"Firaol Bashada\",\n            \"email\": \"dfiraol986@gmail.com\",\n            \"address\": \"Addis Ababa\"\n        },\n        \"_id\": \"698d818a055e19d44029bc31\",\n        \"items\": [\n            {\n                \"productId\": \"698d777f8196b3f05961b6cd\",\n                \"name\": \"New Gaming Laptop\",\n                \"price\": 1000,\n                \"quantity\": 20,\n                \"_id\": \"698d818a055e19d44029bc32\"\n            }\n        ],\n        \"total\": 20000,\n        \"date\": \"2026-02-12T07:30:18.490Z\",\n        \"__v\": 0\n    }\n}"}],"_postman_id":"fc9d144d-41fd-4806-a04a-9f1aebf03a79"},{"name":"Create Order","id":"da105280-3d5b-4ca5-9d63-15f3d6855810","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"customerInfo\": {\n    \"name\": \"Firaol Bashada\",\n    \"email\": \"dfiraol986@gmail.com\",\n    \"address\": \"Addis Ababa\"\n  }\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/orders","description":"<h1 id=\"create-order\">Create Order</h1>\n<p>Creates a new order from the user's shopping cart.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><code>POST /api/orders</code></p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>Requires Bearer token authentication.</p>\n<h2 id=\"request-body\">Request Body</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"cartId\": \"cart_789\",\n  \"shippingAddress\": {\n    \"street\": \"123 Main St\",\n    \"city\": \"New York\",\n    \"state\": \"NY\",\n    \"zipCode\": \"10001\",\n    \"country\": \"USA\"\n  },\n  \"paymentMethod\": \"credit_card\",\n  \"paymentDetails\": {\n    \"cardNumber\": \"4111111111111111\",\n    \"expiryMonth\": \"12\",\n    \"expiryYear\": \"2025\",\n    \"cvv\": \"123\"\n  }\n}\n</code></pre>\n<h2 id=\"request-body-parameters\">Request Body Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>cartId</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>ID of the cart to convert to order</td>\n</tr>\n<tr>\n<td><code>shippingAddress</code></td>\n<td>object</td>\n<td>Yes</td>\n<td>Delivery address for the order</td>\n</tr>\n<tr>\n<td><code>shippingAddress.street</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>Street address</td>\n</tr>\n<tr>\n<td><code>shippingAddress.city</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>City name</td>\n</tr>\n<tr>\n<td><code>shippingAddress.state</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>State/Province</td>\n</tr>\n<tr>\n<td><code>shippingAddress.zipCode</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>Postal code</td>\n</tr>\n<tr>\n<td><code>shippingAddress.country</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>Country name</td>\n</tr>\n<tr>\n<td><code>paymentMethod</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>Payment method (credit_card, debit_card, paypal)</td>\n</tr>\n<tr>\n<td><code>paymentDetails</code></td>\n<td>object</td>\n<td>Yes</td>\n<td>Payment information</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"response\">Response</h2>\n<p><strong>Status Code:</strong> <code>201 Created</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"orderId\": \"order_123\",\n  \"status\": \"pending\",\n  \"totalAmount\": 92.38,\n  \"estimatedDelivery\": \"2024-01-25T00:00:00Z\",\n  \"message\": \"Order created successfully\"\n}\n</code></pre>\n<h2 id=\"error-responses\">Error Responses</h2>\n<p><strong>Status Code:</strong> <code>400 Bad Request</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"Invalid cart ID or empty cart\"\n}\n</code></pre>\n<p><strong>Status Code:</strong> <code>402 Payment Required</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": \"Payment processing failed\"\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["api","orders"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"c6853d03-33b9-41c5-962d-3dfe984fb4b3","name":"Create Order","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"customerInfo\": {\n    \"name\": \"Firaol Bashada\",\n    \"email\": \"dfiraol986@gmail.com\",\n    \"address\": \"Addis Ababa\"\n  }\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/orders"},"status":"Created","code":201,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"541"},{"key":"ETag","value":"W/\"21d-UNUnBLGnxEPyYY+r7rJCS2MXjKQ\""},{"key":"Date","value":"Thu, 12 Feb 2026 16:14:44 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Order created successfully\",\n    \"data\": {\n        \"items\": [\n            {\n                \"productId\": \"698d784c7d4bb0bb62af5cd4\",\n                \"name\": \"Cotton T-Shirt\",\n                \"price\": 24.99,\n                \"quantity\": 30,\n                \"_id\": \"698dfc731708be27157b3fe2\"\n            }\n        ],\n        \"total\": 749.6999999999999,\n        \"customerInfo\": {\n            \"name\": \"Firaol Bashada\",\n            \"email\": \"dfiraol986@gmail.com\",\n            \"address\": \"Addis Ababa\"\n        },\n        \"_id\": \"698dfc731708be27157b3fe1\",\n        \"date\": \"2026-02-12T16:14:43.909Z\",\n        \"__v\": 0\n    },\n    \"receipt\": {\n        \"orderId\": \"698dfc731708be27157b3fe1\",\n        \"date\": \"2026-02-12T16:14:43.909Z\",\n        \"customer\": \"Firaol Bashada\",\n        \"total\": \"$749.70\",\n        \"itemsCount\": 1\n    }\n}"}],"_postman_id":"da105280-3d5b-4ca5-9d63-15f3d6855810"}],"id":"bba38a11-8216-42ea-8b78-afd28ac645e8","_postman_id":"bba38a11-8216-42ea-8b78-afd28ac645e8","description":""},{"name":"Error Case","item":[{"name":"Negative price","id":"f794ca3e-1522-446b-80ff-a34ee3067f1c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{api_key}}"}],"body":{"mode":"raw","raw":"{ \"name\": \"Bad\", \"description\": \"Test\", \"price\": -10, \"category\": \"Test\" }","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/products","urlObject":{"protocol":"http","port":"5000","path":["api","products"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"55009941-b9b5-44c0-8d3d-4afb178aebc8","name":"Negative price","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{api_key}}"}],"body":{"mode":"raw","raw":"{ \"name\": \"Bad\", \"description\": \"Test\", \"price\": -10, \"category\": \"Test\" }","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/products"},"status":"Bad Request","code":400,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"56"},{"key":"ETag","value":"W/\"38-GWuAUG16AnhLIqzraRoM6zS4unI\""},{"key":"Date","value":"Thu, 12 Feb 2026 16:23:27 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"error\": \"Price must be greater than 0\"\n}"}],"_postman_id":"f794ca3e-1522-446b-80ff-a34ee3067f1c"},{"name":"Insufficient stock","id":"75244c7f-4523-4309-a713-e8951d6aa543","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{ \"productId\": \"698d788e7d4bb0bb62af5cd8\", \"quantity\": 9999 }\r\n\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/cart","urlObject":{"protocol":"http","port":"5000","path":["api","cart"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"0f413825-7489-49d6-b7c8-37e12b0cdcb1","name":"Insufficient stock","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{ \"productId\": \"698d788e7d4bb0bb62af5cd8\", \"quantity\": 9999 }\r\n\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/cart"},"status":"Bad Request","code":400,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"61"},{"key":"ETag","value":"W/\"3d-mYsdEiHMvmRvCk7M+L7JdhmIb7U\""},{"key":"Date","value":"Thu, 12 Feb 2026 16:27:29 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"error\": \"Insufficient stock. Available: 75\"\n}"}],"_postman_id":"75244c7f-4523-4309-a713-e8951d6aa543"},{"name":"Non-Existent Product","id":"82ebe41a-87b4-4ace-8bdc-af5f61749f13","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{ \"productId\": \"3453\", \"quantity\": 1 }\r\n\r\n"},"url":"http://localhost:5000/api/cart","urlObject":{"protocol":"http","port":"5000","path":["api","cart"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"c5043b95-d59d-4684-afe8-7757916c6c1d","name":"New Request","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{ \"productId\": \"3453\", \"quantity\": 1 }\r\n\r\n"},"url":"http://localhost:5000/api/cart"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"101"},{"key":"ETag","value":"W/\"65-UCxLx7aW+0agTUEJ86iNBDCRX84\""},{"key":"Date","value":"Thu, 12 Feb 2026 16:29:12 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"error\": \"Cannot destructure property 'productId' of 'req.body' as it is undefined.\"\n}"}],"_postman_id":"82ebe41a-87b4-4ace-8bdc-af5f61749f13"},{"name":"Delete","id":"85555904-fc5c-4d11-a240-828fd5a19afc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{ \"productId\": \"3453\", \"quantity\": 1 }\r\n\r\n"},"url":"http://localhost:5000/api/products/65f8a1b2c3d4e5f6a7b8c999","urlObject":{"protocol":"http","port":"5000","path":["api","products","65f8a1b2c3d4e5f6a7b8c999"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"e403da4f-47d9-460b-b1c6-5981ed23de0c","name":"Delete","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{ \"productId\": \"3453\", \"quantity\": 1 }\r\n\r\n"},"url":"http://localhost:5000/api/products/65f8a1b2c3d4e5f6a7b8c999"},"status":"Not Found","code":404,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"45"},{"key":"ETag","value":"W/\"2d-EI5NysibK/ftuLJURlm6QTpdGxs\""},{"key":"Date","value":"Thu, 12 Feb 2026 16:31:20 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"error\": \"Product not found\"\n}"}],"_postman_id":"85555904-fc5c-4d11-a240-828fd5a19afc"},{"name":"Invalid ID","id":"fd1d06fb-c524-48b6-971c-a28b1c735beb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:5000/api/product/abc123","urlObject":{"protocol":"http","port":"5000","path":["api","product","abc123"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"ba8255c9-9de6-4fd1-a7e6-c4d8041ccee6","name":"Without Customer Info","originalRequest":{"method":"GET","header":[],"url":"http://localhost:5000/api/product/abc123"},"status":"Not Found","code":404,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"37"},{"key":"ETag","value":"W/\"25-SHXXyTIG9wXjxNGg5kKDwD5i7sc\""},{"key":"Date","value":"Thu, 12 Feb 2026 16:38:03 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"error\": \"Not Found\"\n}"}],"_postman_id":"fd1d06fb-c524-48b6-971c-a28b1c735beb"}],"id":"93211638-c448-4156-a203-fdd47dc78ff8","_postman_id":"93211638-c448-4156-a203-fdd47dc78ff8","description":""}]}