{"info":{"_postman_id":"0bf6d6ed-915d-47ec-af5f-e131c83ec6e6","name":"Diaa Eldeen - Full Stack Developer | E-Commerce API","description":"<html><head></head><body><p>Complete Postman documentation for the E-Commerce NestJS project.\nDeveloped by: Diaa Eldeen - Full Stack Developer</p>\n<hr>\n<p><strong>Base URL:</strong> <a href=\"https://e-commerce-nest-js.vercel.app\">https://e-commerce-nest-js.vercel.app</a></p>\n<p><strong>Authentication:</strong></p>\n<ul>\n<li>Protected routes require a <code>token</code> header (JWT Access Token - expires in 1h)</li>\n<li>Refresh token routes require a <code>refreshtoken</code> header (JWT Refresh Token - expires in 1y)</li>\n<li>Admin-only routes require the user to have role <code>admin</code></li>\n<li>User-only routes require the user to have role <code>user</code></li>\n</ul>\n<hr>\n<p><strong>Security:</strong></p>\n<ul>\n<li><strong>Helmet</strong> — HTTP security headers enabled globally (crossOriginResourcePolicy disabled to allow S3 image access)</li>\n<li><strong>CORS</strong> — Enabled for all origins (<code>origin: true</code>)</li>\n<li><strong>Rate Limiting</strong> — Global: <strong>100 requests per 60 seconds</strong> per IP (via <code>@nestjs/throttler</code>)<ul>\n<li><code>POST /order/webhook</code> is excluded from rate limiting (<code>@SkipThrottle</code>) to ensure Stripe webhooks are never blocked</li>\n<li>When the limit is exceeded, the server returns <code>429 Too Many Requests</code></li>\n</ul>\n</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"49715513","collectionId":"0bf6d6ed-915d-47ec-af5f-e131c83ec6e6","publishedId":"2sBY4QsKkG","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-07-23T17:20:17.000Z"},"item":[{"name":"Auth","item":[{"name":"Sign Up","id":"8949a3dc-1f3d-409a-8cb3-acb48c92ce14","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"userName\": \"Diaa Eldeen\",\n  \"email\": \"diaaelseady@gmail.com\",\n  \"password\": \"StrongPass@123\",\n  \"cPassword\": \"StrongPass@123\",\n  \"age\": 23,\n  \"phone\": \"+201234567890\",\n  \"gender\": \"male\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/signup","description":"<p>Register a new user account. On success, an OTP is sent to the provided email.</p>\n<p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>userName</td>\n<td>string</td>\n<td>Required, Length 3-20</td>\n</tr>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>Required, Valid email format</td>\n</tr>\n<tr>\n<td>password</td>\n<td>string</td>\n<td>Required, Must be strong password (uppercase, lowercase, number, special character)</td>\n</tr>\n<tr>\n<td>cPassword</td>\n<td>string</td>\n<td>Required, Must match <code>password</code></td>\n</tr>\n<tr>\n<td>age</td>\n<td>integer</td>\n<td>Required, Min 18</td>\n</tr>\n<tr>\n<td>phone</td>\n<td>string</td>\n<td>Required, Valid phone number format</td>\n</tr>\n<tr>\n<td>gender</td>\n<td>string</td>\n<td>Required, Accepts: <code>male</code> or <code>female</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>OTP is sent to email automatically after registration (valid for 2 minutes)</li>\n<li>Phone is stored encrypted in DB</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["users","signup"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"98812f14-dd80-4f34-9e79-2b3810289395","name":"201 - User Created Successfully","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"userName\": \"Diaa Eldeen\",\n  \"email\": \"diaaelseady@gmail.com\",\n  \"password\": \"StrongPass@123\",\n  \"cPassword\": \"StrongPass@123\",\n  \"age\": 23,\n  \"phone\": \"+201234567890\",\n  \"gender\": \"male\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/signup","description":"Register a new user account. On success, an OTP is sent to the provided email.\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| userName | string | Required, Length 3-20 |\n| email | string | Required, Valid email format |\n| password | string | Required, Must be strong password (uppercase, lowercase, number, special character) |\n| cPassword | string | Required, Must match `password` |\n| age | integer | Required, Min 18 |\n| phone | string | Required, Valid phone number format |\n| gender | string | Required, Accepts: `male` or `female` |\n\n**Notes:**\n- OTP is sent to email automatically after registration (valid for 2 minutes)\n- Phone is stored encrypted in DB\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Created","code":201,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d1\",\n  \"userName\": \"Diaa Eldeen\",\n  \"email\": \"diaaelseady@gmail.com\",\n  \"age\": 23,\n  \"gender\": \"male\",\n  \"role\": \"user\",\n  \"createdAt\": \"2026-01-01T00:00:00.000Z\"\n}"},{"id":"799624a0-0d04-4592-881a-845807582217","name":"409 - Email Already Exist","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"userName\": \"Diaa Eldeen\",\n  \"email\": \"diaaelseady@gmail.com\",\n  \"password\": \"StrongPass@123\",\n  \"cPassword\": \"StrongPass@123\",\n  \"age\": 23,\n  \"phone\": \"+201234567890\",\n  \"gender\": \"male\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/signup","description":"Register a new user account. On success, an OTP is sent to the provided email.\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| userName | string | Required, Length 3-20 |\n| email | string | Required, Valid email format |\n| password | string | Required, Must be strong password (uppercase, lowercase, number, special character) |\n| cPassword | string | Required, Must match `password` |\n| age | integer | Required, Min 18 |\n| phone | string | Required, Valid phone number format |\n| gender | string | Required, Accepts: `male` or `female` |\n\n**Notes:**\n- OTP is sent to email automatically after registration (valid for 2 minutes)\n- Phone is stored encrypted in DB\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Conflict","code":409,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 409,\n  \"message\": \"Email Already Exist\"\n}"},{"id":"128120e9-dced-4e52-a1d3-a1e5c4c48d56","name":"429 - Too Many Requests","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"userName\": \"Diaa Eldeen\",\n  \"email\": \"diaaelseady@gmail.com\",\n  \"password\": \"StrongPass@123\",\n  \"cPassword\": \"StrongPass@123\",\n  \"age\": 23,\n  \"phone\": \"+201234567890\",\n  \"gender\": \"male\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/signup","description":"Register a new user account. On success, an OTP is sent to the provided email.\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| userName | string | Required, Length 3-20 |\n| email | string | Required, Valid email format |\n| password | string | Required, Must be strong password (uppercase, lowercase, number, special character) |\n| cPassword | string | Required, Must match `password` |\n| age | integer | Required, Min 18 |\n| phone | string | Required, Valid phone number format |\n| gender | string | Required, Accepts: `male` or `female` |\n\n**Notes:**\n- OTP is sent to email automatically after registration (valid for 2 minutes)\n- Phone is stored encrypted in DB\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"8949a3dc-1f3d-409a-8cb3-acb48c92ce14"},{"name":"Sign In","id":"adc4082a-40b7-4a08-b96b-cc0cb0bb0a3b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"password\": \"StrongPass@123\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/signin","description":"<p>Authenticate an existing user and receive access and refresh tokens.</p>\n<p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>Required, Valid email format</td>\n</tr>\n<tr>\n<td>password</td>\n<td>string</td>\n<td>Required</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li><code>token</code> expires in <strong>1 hour</strong></li>\n<li><code>refreshToken</code> expires in <strong>1 year</strong></li>\n<li>Save both tokens and set them in collection variables</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["users","signin"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"20399285-4fcb-468c-adfc-e6f1259a3404","name":"200 - Sign In Successful","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"password\": \"StrongPass@123\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/signin","description":"Authenticate an existing user and receive access and refresh tokens.\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| email | string | Required, Valid email format |\n| password | string | Required |\n\n**Notes:**\n- `token` expires in **1 hour**\n- `refreshToken` expires in **1 year**\n- Save both tokens and set them in collection variables\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"token\": \"{{supabase_service_role_api_key_0hsq}}...\",\n  \"refreshToken\": \"{{supabase_service_role_api_key_0hsq}}...\"\n}"},{"id":"8af25f84-10c2-402c-9095-428313ac3d38","name":"401 - Invalid Credentials","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"password\": \"StrongPass@123\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/signin","description":"Authenticate an existing user and receive access and refresh tokens.\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| email | string | Required, Valid email format |\n| password | string | Required |\n\n**Notes:**\n- `token` expires in **1 hour**\n- `refreshToken` expires in **1 year**\n- Save both tokens and set them in collection variables\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 401,\n  \"message\": \"Invalid Email\"\n}"},{"id":"b27f8fb5-1f85-42e8-9bb7-966eda506f81","name":"429 - Too Many Requests","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"password\": \"StrongPass@123\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/signin","description":"Authenticate an existing user and receive access and refresh tokens.\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| email | string | Required, Valid email format |\n| password | string | Required |\n\n**Notes:**\n- `token` expires in **1 hour**\n- `refreshToken` expires in **1 year**\n- Save both tokens and set them in collection variables\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"adc4082a-40b7-4a08-b96b-cc0cb0bb0a3b"},{"name":"Refresh Token","id":"d618b07f-33a1-4f84-bc3c-2d5e53cce41e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required)</p>\n"},{"key":"refreshtoken","value":"","description":"<p>JWT Refresh Token (Required)</p>\n"}],"url":"https://e-commerce-nest-js.vercel.app/users/refreshtoken","description":"<p>Generate a new access token using the refresh token.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required by AuthenticationGuard</td>\n</tr>\n<tr>\n<td>refreshtoken</td>\n<td>JWT Refresh Token</td>\n<td>Used to issue a new access token</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>New token expires in <strong>1 hour</strong></li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["users","refreshtoken"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"58f2e30e-da72-4ed7-bf4a-d5c8b5d9d8c4","name":"200 - New Token Issued","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"refreshtoken","value":"","description":"JWT Refresh Token (Required)"}],"url":"https://e-commerce-nest-js.vercel.app/users/refreshtoken","description":"Generate a new access token using the refresh token.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required by AuthenticationGuard |\n| refreshtoken | JWT Refresh Token | Used to issue a new access token |\n\n**Notes:**\n- New token expires in **1 hour**\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"data\": \"{{supabase_service_role_api_key_0hsq}}...\"\n}"},{"id":"47b277c2-3baf-4d17-a72a-56d3416966c6","name":"401 - Token Not Provided","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"refreshtoken","value":"","description":"JWT Refresh Token (Required)"}],"url":"https://e-commerce-nest-js.vercel.app/users/refreshtoken","description":"Generate a new access token using the refresh token.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required by AuthenticationGuard |\n| refreshtoken | JWT Refresh Token | Used to issue a new access token |\n\n**Notes:**\n- New token expires in **1 hour**\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 401,\n  \"message\": \"Token Not Provided\"\n}"},{"id":"f7f85aeb-a94a-4806-8c26-517a68de6366","name":"429 - Too Many Requests","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"refreshtoken","value":"","description":"JWT Refresh Token (Required)"}],"url":"https://e-commerce-nest-js.vercel.app/users/refreshtoken","description":"Generate a new access token using the refresh token.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required by AuthenticationGuard |\n| refreshtoken | JWT Refresh Token | Used to issue a new access token |\n\n**Notes:**\n- New token expires in **1 hour**\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"d618b07f-33a1-4f84-bc3c-2d5e53cce41e"},{"name":"Forget Password","id":"35a69d3e-a52f-4130-9e35-5b2bf10bfbf9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required)</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/forgetPassword","description":"<p>Send an OTP to the provided email to initiate the password reset flow.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>Required, Valid email format</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>OTP Rules:</strong></p>\n<ul>\n<li>Valid for <strong>2 minutes</strong></li>\n<li>Max <strong>3 attempts</strong> before being blocked for <strong>5 minutes</strong></li>\n<li>Cannot resend while an active OTP exists</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["users","forgetPassword"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"e50a2e4e-42ff-492f-ae4c-2dda303e76b8","name":"200 - OTP Sent","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/forgetPassword","description":"Send an OTP to the provided email to initiate the password reset flow.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| email | string | Required, Valid email format |\n\n**OTP Rules:**\n- Valid for **2 minutes**\n- Max **3 attempts** before being blocked for **5 minutes**\n- Cannot resend while an active OTP exists\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"data\": \"Otp Send Succefully\"\n}"},{"id":"658a8fae-4cac-4ea9-bfdf-35180ccb3c43","name":"404 - User Not Found","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/forgetPassword","description":"Send an OTP to the provided email to initiate the password reset flow.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| email | string | Required, Valid email format |\n\n**OTP Rules:**\n- Valid for **2 minutes**\n- Max **3 attempts** before being blocked for **5 minutes**\n- Cannot resend while an active OTP exists\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"User Not Exist\"\n}"},{"id":"b7d57e11-f9ab-4808-b5c4-185e323da27e","name":"400 - Resend Too Early","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/forgetPassword","description":"Send an OTP to the provided email to initiate the password reset flow.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| email | string | Required, Valid email format |\n\n**OTP Rules:**\n- Valid for **2 minutes**\n- Max **3 attempts** before being blocked for **5 minutes**\n- Cannot resend while an active OTP exists\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 400,\n  \"message\": \"You Can Resend Otp After 90 Second\"\n}"},{"id":"2eeab1e0-2428-4e00-8963-8afaa348cb39","name":"400 - Max OTP Tries Exceeded","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/forgetPassword","description":"Send an OTP to the provided email to initiate the password reset flow.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| email | string | Required, Valid email format |\n\n**OTP Rules:**\n- Valid for **2 minutes**\n- Max **3 attempts** before being blocked for **5 minutes**\n- Cannot resend while an active OTP exists\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 400,\n  \"message\": \"You Have Exceeded The Max Number Of Tries\"\n}"},{"id":"47adaff3-6b4e-425f-8808-cf66762345ea","name":"429 - Too Many Requests","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/forgetPassword","description":"Send an OTP to the provided email to initiate the password reset flow.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| email | string | Required, Valid email format |\n\n**OTP Rules:**\n- Valid for **2 minutes**\n- Max **3 attempts** before being blocked for **5 minutes**\n- Cannot resend while an active OTP exists\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"35a69d3e-a52f-4130-9e35-5b2bf10bfbf9"},{"name":"Resend OTP","id":"715d4e8e-dfa2-4ce1-94c9-86fcbbaa434a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required)</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/resendOtp","description":"<p>Resend OTP to the given email address.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>Required, Valid email format</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>OTP Rules:</strong></p>\n<ul>\n<li>Valid for <strong>2 minutes</strong></li>\n<li>Max <strong>3 attempts</strong> before being blocked for <strong>5 minutes</strong></li>\n<li>Cannot resend while an active OTP exists</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["users","resendOtp"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"4f210256-3ca2-4d80-b50b-7331bd56ef8a","name":"200 - OTP Resent","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/resendOtp","description":"Resend OTP to the given email address.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| email | string | Required, Valid email format |\n\n**OTP Rules:**\n- Valid for **2 minutes**\n- Max **3 attempts** before being blocked for **5 minutes**\n- Cannot resend while an active OTP exists\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Otp Resend Succefully!\"\n}"},{"id":"c66a8312-2a6c-4357-9fd4-7ab68dbb292f","name":"404 - User Not Found","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/resendOtp","description":"Resend OTP to the given email address.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| email | string | Required, Valid email format |\n\n**OTP Rules:**\n- Valid for **2 minutes**\n- Max **3 attempts** before being blocked for **5 minutes**\n- Cannot resend while an active OTP exists\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"User Not Exist Or Already Confirmed\"\n}"},{"id":"f9c68e7a-450b-46c2-a86b-6e3a00185b15","name":"400 - Blocked","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/resendOtp","description":"Resend OTP to the given email address.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| email | string | Required, Valid email format |\n\n**OTP Rules:**\n- Valid for **2 minutes**\n- Max **3 attempts** before being blocked for **5 minutes**\n- Cannot resend while an active OTP exists\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 400,\n  \"message\": \"Please Try Again After 300 Second\"\n}"},{"id":"75a805ec-a4b2-4337-90d8-7db4617d8217","name":"429 - Too Many Requests","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/resendOtp","description":"Resend OTP to the given email address.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| email | string | Required, Valid email format |\n\n**OTP Rules:**\n- Valid for **2 minutes**\n- Max **3 attempts** before being blocked for **5 minutes**\n- Cannot resend while an active OTP exists\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"715d4e8e-dfa2-4ce1-94c9-86fcbbaa434a"},{"name":"Confirm OTP","id":"e1fda45d-6804-4601-b746-c727aa9f9dbc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required)</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"otp\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/confirmPassword","description":"<p>Verify the OTP sent to the email. On success, marks the email as verified for 5 minutes to allow password reset.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>Required, Valid email format</td>\n</tr>\n<tr>\n<td>otp</td>\n<td>string</td>\n<td>Required, Exactly 6 digits</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Flow:</strong></p>\n<ol>\n<li>Call <code>forgetPassword</code> or <code>resendOtp</code> to receive OTP via email</li>\n<li>Submit OTP here to get verified</li>\n<li>Proceed to <code>resetPassword</code> within <strong>5 minutes</strong></li>\n</ol>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["users","confirmPassword"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"489677e9-14f2-4349-bca5-fe1594f2c854","name":"200 - OTP Valid","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"otp\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/confirmPassword","description":"Verify the OTP sent to the email. On success, marks the email as verified for 5 minutes to allow password reset.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| email | string | Required, Valid email format |\n| otp | string | Required, Exactly 6 digits |\n\n**Flow:**\n1. Call `forgetPassword` or `resendOtp` to receive OTP via email\n2. Submit OTP here to get verified\n3. Proceed to `resetPassword` within **5 minutes**\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Otp Is Valid\"\n}"},{"id":"21c70ddd-79ca-428d-b57d-f7a46854836e","name":"400 - Invalid or Expired OTP","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"otp\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/confirmPassword","description":"Verify the OTP sent to the email. On success, marks the email as verified for 5 minutes to allow password reset.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| email | string | Required, Valid email format |\n| otp | string | Required, Exactly 6 digits |\n\n**Flow:**\n1. Call `forgetPassword` or `resendOtp` to receive OTP via email\n2. Submit OTP here to get verified\n3. Proceed to `resetPassword` within **5 minutes**\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 400,\n  \"message\": \"OTP is invalid\"\n}"},{"id":"3093e7b0-0b95-47e0-97af-855062f7b3d5","name":"429 - Too Many Requests","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"otp\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/confirmPassword","description":"Verify the OTP sent to the email. On success, marks the email as verified for 5 minutes to allow password reset.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| email | string | Required, Valid email format |\n| otp | string | Required, Exactly 6 digits |\n\n**Flow:**\n1. Call `forgetPassword` or `resendOtp` to receive OTP via email\n2. Submit OTP here to get verified\n3. Proceed to `resetPassword` within **5 minutes**\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"e1fda45d-6804-4601-b746-c727aa9f9dbc"},{"name":"Reset Password","id":"57563ee0-a5bb-4d68-961e-5ee4fbd8f677","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required)</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"newPassword\": \"NewStrongPass@456\",\n  \"rePassword\": \"NewStrongPass@456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/resetPassword","description":"<p>Reset the user's password after OTP has been verified via <code>confirmPassword</code>.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>Required, Valid email format</td>\n</tr>\n<tr>\n<td>newPassword</td>\n<td>string</td>\n<td>Required, Must be strong password</td>\n</tr>\n<tr>\n<td>rePassword</td>\n<td>string</td>\n<td>Required, Must match <code>newPassword</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Important:</strong> Must be called within <strong>5 minutes</strong> of a successful <code>confirmPassword</code> call.</p>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["users","resetPassword"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"b4eba438-b261-41fc-acec-f51e46641c41","name":"200 - Password Reset Successfully","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"newPassword\": \"NewStrongPass@456\",\n  \"rePassword\": \"NewStrongPass@456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/resetPassword","description":"Reset the user's password after OTP has been verified via `confirmPassword`.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| email | string | Required, Valid email format |\n| newPassword | string | Required, Must be strong password |\n| rePassword | string | Required, Must match `newPassword` |\n\n**Important:** Must be called within **5 minutes** of a successful `confirmPassword` call.\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Password Reset Succefully\"\n}"},{"id":"b70a39a6-763e-47c6-a7b1-65b37ff810ea","name":"400 - OTP Not Verified","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"newPassword\": \"NewStrongPass@456\",\n  \"rePassword\": \"NewStrongPass@456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/resetPassword","description":"Reset the user's password after OTP has been verified via `confirmPassword`.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| email | string | Required, Valid email format |\n| newPassword | string | Required, Must be strong password |\n| rePassword | string | Required, Must match `newPassword` |\n\n**Important:** Must be called within **5 minutes** of a successful `confirmPassword` call.\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 400,\n  \"message\": \"Otp not verified\"\n}"},{"id":"672521fe-1d63-49df-9aa5-88c55423430f","name":"404 - User Not Found","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"newPassword\": \"NewStrongPass@456\",\n  \"rePassword\": \"NewStrongPass@456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/resetPassword","description":"Reset the user's password after OTP has been verified via `confirmPassword`.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| email | string | Required, Valid email format |\n| newPassword | string | Required, Must be strong password |\n| rePassword | string | Required, Must match `newPassword` |\n\n**Important:** Must be called within **5 minutes** of a successful `confirmPassword` call.\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"User Not Exist\"\n}"},{"id":"9322ff98-1c26-4678-b3a2-07735836ae56","name":"429 - Too Many Requests","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"newPassword\": \"NewStrongPass@456\",\n  \"rePassword\": \"NewStrongPass@456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/resetPassword","description":"Reset the user's password after OTP has been verified via `confirmPassword`.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| email | string | Required, Valid email format |\n| newPassword | string | Required, Must be strong password |\n| rePassword | string | Required, Must match `newPassword` |\n\n**Important:** Must be called within **5 minutes** of a successful `confirmPassword` call.\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"57563ee0-a5bb-4d68-961e-5ee4fbd8f677"}],"id":"602ad1ec-8920-4c40-a315-ed169eb8cc03","description":"<p>Endpoints related to authentication: register, login, token refresh, and password management.</p>\n","_postman_id":"602ad1ec-8920-4c40-a315-ed169eb8cc03"},{"name":"User","item":[{"name":"Get All Users (Admin Only)","id":"52b8356e-4d81-4971-bf3a-3f0145f1672f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - Must be Admin role</p>\n"}],"url":"https://e-commerce-nest-js.vercel.app/users","description":"<p>Retrieve all registered users.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Must belong to a user with role <code>admin</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>No query params</li>\n<li>Returns all users from DB</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["users"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"07bb4388-da08-48ca-9838-1da353fb286b","name":"200 - List of Users","originalRequest":{"method":"GET","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Must be Admin role"}],"url":"https://e-commerce-nest-js.vercel.app/users","description":"Retrieve all registered users.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Must belong to a user with role `admin` |\n\n**Notes:**\n- No query params\n- Returns all users from DB\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"[\n  {\n    \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d1\",\n    \"userName\": \"Diaa Eldeen\",\n    \"email\": \"diaaelseady@gmail.com\",\n    \"age\": 23,\n    \"gender\": \"male\",\n    \"role\": \"user\",\n    \"createdAt\": \"2026-01-01T00:00:00.000Z\"\n  }\n]"},{"id":"bb8ccfca-16d6-49ca-a164-4f3520441086","name":"401 - No Permission","originalRequest":{"method":"GET","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Must be Admin role"}],"url":"https://e-commerce-nest-js.vercel.app/users","description":"Retrieve all registered users.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Must belong to a user with role `admin` |\n\n**Notes:**\n- No query params\n- Returns all users from DB\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 401,\n  \"message\": \"You don't have permission\"\n}"},{"id":"3784652c-8343-4e74-aa97-675e58c832c4","name":"429 - Too Many Requests","originalRequest":{"method":"GET","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Must be Admin role"}],"url":"https://e-commerce-nest-js.vercel.app/users","description":"Retrieve all registered users.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Must belong to a user with role `admin` |\n\n**Notes:**\n- No query params\n- Returns all users from DB\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"52b8356e-4d81-4971-bf3a-3f0145f1672f"},{"name":"Get Profile","id":"f5669c49-e67f-4aad-a4b1-5b3b08d360e7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required)</p>\n"}],"url":"https://e-commerce-nest-js.vercel.app/users/profile","description":"<p>Get the authenticated user's profile.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li><code>phone</code> field is returned <strong>decrypted</strong></li>\n<li>No body required</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["users","profile"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"4c3391a1-bd00-46c6-95f6-0476797f7d47","name":"200 - Profile Data","originalRequest":{"method":"GET","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"}],"url":"https://e-commerce-nest-js.vercel.app/users/profile","description":"Get the authenticated user's profile.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Notes:**\n- `phone` field is returned **decrypted**\n- No body required\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"data\": {\n    \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d1\",\n    \"userName\": \"Diaa Eldeen\",\n    \"email\": \"diaaelseady@gmail.com\",\n    \"age\": 23,\n    \"phone\": \"+201234567890\",\n    \"gender\": \"male\",\n    \"role\": \"user\",\n    \"profilePic\": \"ecommerce_app/users/64f1.../uuid_____photo.jpg\",\n    \"wishList\": []\n  }\n}"},{"id":"aa6ae7ec-5047-4b98-9421-fc7f98a0d7ac","name":"429 - Too Many Requests","originalRequest":{"method":"GET","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"}],"url":"https://e-commerce-nest-js.vercel.app/users/profile","description":"Get the authenticated user's profile.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Notes:**\n- `phone` field is returned **decrypted**\n- No body required\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"f5669c49-e67f-4aad-a4b1-5b3b08d360e7"},{"name":"Update Profile","id":"8c1d0729-adfe-425f-b037-e49ae1d0844a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required)</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"userName\": \"Diaa Eldeen\",\n  \"age\": 23,\n  \"phone\": \"+201098765432\",\n  \"gender\": \"male\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/updateProfile","description":"<p>Update the authenticated user's profile information.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>userName</td>\n<td>string</td>\n<td>Optional, Length 3-20</td>\n</tr>\n<tr>\n<td>age</td>\n<td>integer</td>\n<td>Optional, Min 18</td>\n</tr>\n<tr>\n<td>phone</td>\n<td>string</td>\n<td>Optional, Valid phone number format</td>\n</tr>\n<tr>\n<td>gender</td>\n<td>string</td>\n<td>Optional, Accepts: <code>male</code> or <code>female</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>All fields are optional</li>\n<li>Phone will be stored encrypted</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["users","updateProfile"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"068bc1eb-fa82-4c87-b4a1-6e43c27b5d69","name":"200 - Profile Updated","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"userName\": \"Diaa Eldeen\",\n  \"age\": 23,\n  \"phone\": \"+201098765432\",\n  \"gender\": \"male\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/updateProfile","description":"Update the authenticated user's profile information.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| userName | string | Optional, Length 3-20 |\n| age | integer | Optional, Min 18 |\n| phone | string | Optional, Valid phone number format |\n| gender | string | Optional, Accepts: `male` or `female` |\n\n**Notes:**\n- All fields are optional\n- Phone will be stored encrypted\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d1\",\n  \"userName\": \"Diaa Eldeen\",\n  \"email\": \"diaaelseady@gmail.com\",\n  \"age\": 23,\n  \"gender\": \"male\",\n  \"role\": \"user\"\n}"},{"id":"700604f9-3f80-46f5-a217-28d09309428f","name":"404 - User Not Found","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"userName\": \"Diaa Eldeen\",\n  \"age\": 23,\n  \"phone\": \"+201098765432\",\n  \"gender\": \"male\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/updateProfile","description":"Update the authenticated user's profile information.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| userName | string | Optional, Length 3-20 |\n| age | integer | Optional, Min 18 |\n| phone | string | Optional, Valid phone number format |\n| gender | string | Optional, Accepts: `male` or `female` |\n\n**Notes:**\n- All fields are optional\n- Phone will be stored encrypted\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"User Not Exist\"\n}"},{"id":"224e9ce3-094a-4ce1-8a30-b85101b905b5","name":"429 - Too Many Requests","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"userName\": \"Diaa Eldeen\",\n  \"age\": 23,\n  \"phone\": \"+201098765432\",\n  \"gender\": \"male\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/updateProfile","description":"Update the authenticated user's profile information.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| userName | string | Optional, Length 3-20 |\n| age | integer | Optional, Min 18 |\n| phone | string | Optional, Valid phone number format |\n| gender | string | Optional, Accepts: `male` or `female` |\n\n**Notes:**\n- All fields are optional\n- Phone will be stored encrypted\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"8c1d0729-adfe-425f-b037-e49ae1d0844a"},{"name":"Update Password","id":"b80c45ce-248a-49f4-999e-ce87a5b210e7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required)</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"oldPassword\": \"StrongPass@123\",\n  \"newPassword\": \"NewStrongPass@456\",\n  \"confirmPassword\": \"NewStrongPass@456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/updatePassword","description":"<p>Update the authenticated user's password.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>oldPassword</td>\n<td>string</td>\n<td>Required, Current password</td>\n</tr>\n<tr>\n<td>newPassword</td>\n<td>string</td>\n<td>Required, Must be strong password</td>\n</tr>\n<tr>\n<td>confirmPassword</td>\n<td>string</td>\n<td>Required, Must match <code>newPassword</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["users","updatePassword"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"c39c9e01-f396-4638-a7ee-845533351eea","name":"200 - Password Updated","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"oldPassword\": \"StrongPass@123\",\n  \"newPassword\": \"NewStrongPass@456\",\n  \"confirmPassword\": \"NewStrongPass@456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/updatePassword","description":"Update the authenticated user's password.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| oldPassword | string | Required, Current password |\n| newPassword | string | Required, Must be strong password |\n| confirmPassword | string | Required, Must match `newPassword` |\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"data\": \"Password Updated Succefully\"\n}"},{"id":"b2ed7634-d370-4fd6-9ac9-1ad65f9a952b","name":"400 - Invalid Old Password","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"oldPassword\": \"StrongPass@123\",\n  \"newPassword\": \"NewStrongPass@456\",\n  \"confirmPassword\": \"NewStrongPass@456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/updatePassword","description":"Update the authenticated user's password.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| oldPassword | string | Required, Current password |\n| newPassword | string | Required, Must be strong password |\n| confirmPassword | string | Required, Must match `newPassword` |\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 400,\n  \"message\": \"Invalid old Password\"\n}"},{"id":"025ecf5b-86b9-408d-81b9-4d3014994d32","name":"429 - Too Many Requests","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"oldPassword\": \"StrongPass@123\",\n  \"newPassword\": \"NewStrongPass@456\",\n  \"confirmPassword\": \"NewStrongPass@456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/updatePassword","description":"Update the authenticated user's password.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| oldPassword | string | Required, Current password |\n| newPassword | string | Required, Must be strong password |\n| confirmPassword | string | Required, Must match `newPassword` |\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"b80c45ce-248a-49f4-999e-ce87a5b210e7"},{"name":"Upload Profile Picture (Get Pre-Signed URL)","id":"bc9ae85b-247a-435f-bd5f-6348230a36f7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required)</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"fileName\": \"profile.jpg\",\n  \"ContentType\": \"image/jpeg\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/uploadProfilePic","description":"<p>Request a pre-signed S3 URL to upload the user's profile picture directly to AWS S3.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>fileName</td>\n<td>string</td>\n<td>Required, Original file name (e.g. <code>photo.jpg</code>)</td>\n</tr>\n<tr>\n<td>ContentType</td>\n<td>string</td>\n<td>Required, MIME type (e.g. <code>image/jpeg</code>, <code>image/png</code>, <code>image/webp</code>)</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>How to use the returned URL:</strong></p>\n<ol>\n<li>Call this endpoint to get <code>url</code> and <code>Key</code></li>\n<li>Use the <code>url</code> to PUT your image file directly to S3 (valid for 60 seconds)</li>\n<li>The <code>Key</code> is already saved to your profile automatically</li>\n</ol>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["users","uploadProfilePic"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"9d337f0a-5cf5-41b1-a3b6-e5d37efda3fe","name":"200 - Pre-Signed URL Generated","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"fileName\": \"profile.jpg\",\n  \"ContentType\": \"image/jpeg\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/uploadProfilePic","description":"Request a pre-signed S3 URL to upload the user's profile picture directly to AWS S3.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| fileName | string | Required, Original file name (e.g. `photo.jpg`) |\n| ContentType | string | Required, MIME type (e.g. `image/jpeg`, `image/png`, `image/webp`) |\n\n**How to use the returned URL:**\n1. Call this endpoint to get `url` and `Key`\n2. Use the `url` to PUT your image file directly to S3 (valid for 60 seconds)\n3. The `Key` is already saved to your profile automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"data\": {\n    \"url\": \"https://s3.amazonaws.com/bucket/ecommerce_app/users/userId/uuid_____profile.jpg?X-Amz-Signature=...\",\n    \"Key\": \"ecommerce_app/users/64f1a2b3c4d5e6f7a8b9c0d1/uuid_____profile.jpg\"\n  }\n}"},{"id":"8ca24e2d-3c33-483d-82aa-2595703dbad4","name":"429 - Too Many Requests","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"fileName\": \"profile.jpg\",\n  \"ContentType\": \"image/jpeg\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/users/uploadProfilePic","description":"Request a pre-signed S3 URL to upload the user's profile picture directly to AWS S3.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| fileName | string | Required, Original file name (e.g. `photo.jpg`) |\n| ContentType | string | Required, MIME type (e.g. `image/jpeg`, `image/png`, `image/webp`) |\n\n**How to use the returned URL:**\n1. Call this endpoint to get `url` and `Key`\n2. Use the `url` to PUT your image file directly to S3 (valid for 60 seconds)\n3. The `Key` is already saved to your profile automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"bc9ae85b-247a-435f-bd5f-6348230a36f7"},{"name":"Upload File","id":"3dde5d46-2376-4f11-8406-c9aa24f212ba","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","description":"<p>Image file to upload</p>\n","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/users/upload","description":"<p>Upload a file using multipart/form-data with memory storage.</p>\n<p><strong>Auth:</strong> None required</p>\n<p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>file</td>\n<td>File (form-data)</td>\n<td>Required, Accepted types: <code>image/png</code>, <code>image/jpeg</code>, <code>image/webp</code>, <code>image/jpg</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["users","upload"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"993a843f-deb2-40d5-be2c-5feab56449d0","name":"200 - File Uploaded","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","description":"Image file to upload","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/users/upload","description":"Upload a file using multipart/form-data with memory storage.\n\n**Auth:** None required\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| file | File (form-data) | Required, Accepted types: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"File Uploaded Successfully\",\n  \"path\": \"/tmp/123456789-filename.jpg\"\n}"},{"id":"8f2c2ffd-3f9c-4481-888d-353ce4ebb09c","name":"400 - Invalid File Type","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","description":"Image file to upload","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/users/upload","description":"Upload a file using multipart/form-data with memory storage.\n\n**Auth:** None required\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| file | File (form-data) | Required, Accepted types: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 400,\n  \"message\": \"Invalid File Type\"\n}"},{"id":"dac1f4b2-be42-40ce-a9a1-d171d1ddd4ca","name":"429 - Too Many Requests","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","description":"Image file to upload","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/users/upload","description":"Upload a file using multipart/form-data with memory storage.\n\n**Auth:** None required\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| file | File (form-data) | Required, Accepted types: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"3dde5d46-2376-4f11-8406-c9aa24f212ba"}],"id":"3f26a2eb-62fc-4c87-a9c2-6d3222e51c4c","description":"<p>Endpoints related to user profile management, password update, and file uploads.</p>\n","_postman_id":"3f26a2eb-62fc-4c87-a9c2-6d3222e51c4c"},{"name":"Brand","item":[{"name":"Create Brand (Admin Only)","id":"faae35e8-741b-458f-a280-08d01bfe6665","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - Admin only</p>\n"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Diaa Brand","type":"text","description":"<p>Required, string, Length 2-25</p>\n"},{"key":"slogan","value":"Quality you can trust","type":"text","description":"<p>Required, string, Min 5 characters</p>\n"},{"key":"file","type":"file","description":"<p>Required, Brand logo image (Accepted: image/png, image/jpeg, image/webp, image/jpg)</p>\n","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/brand","description":"<p>Create a new brand with a logo image.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>admin</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>name</td>\n<td>string (form-data)</td>\n<td>Required, Length 2-25</td>\n</tr>\n<tr>\n<td>slogan</td>\n<td>string (form-data)</td>\n<td>Required, Min 5 characters</td>\n</tr>\n<tr>\n<td>file</td>\n<td>File (form-data)</td>\n<td>Required, Accepted: <code>image/png</code>, <code>image/jpeg</code>, <code>image/webp</code>, <code>image/jpg</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li><code>slug</code> is auto-generated from <code>name</code></li>\n<li>Logo is uploaded to S3 under <code>ecommerce_app/brands/</code></li>\n<li>If brand creation fails after upload, logo is deleted from S3 automatically</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["brand"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"56ea3890-c6d1-46cc-9f21-bfe1cead19a2","name":"201 - Brand Created","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Diaa Brand","type":"text","description":"Required, string, Length 2-25"},{"key":"slogan","value":"Quality you can trust","type":"text","description":"Required, string, Min 5 characters"},{"key":"file","type":"file","description":"Required, Brand logo image (Accepted: image/png, image/jpeg, image/webp, image/jpg)","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/brand","description":"Create a new brand with a logo image.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string (form-data) | Required, Length 2-25 |\n| slogan | string (form-data) | Required, Min 5 characters |\n| file | File (form-data) | Required, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- `slug` is auto-generated from `name`\n- Logo is uploaded to S3 under `ecommerce_app/brands/`\n- If brand creation fails after upload, logo is deleted from S3 automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Created","code":201,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d1\",\n  \"name\": \"Diaa Brand\",\n  \"slug\": \"diaa-brand\",\n  \"slogan\": \"Quality you can trust\",\n  \"logo\": \"ecommerce_app/brands/uuid_____logo.jpg\",\n  \"createdBy\": \"64f1a2b3c4d5e6f7a8b9c0d1\",\n  \"createdAt\": \"2026-01-01T00:00:00.000Z\"\n}"},{"id":"3e91be13-6241-40cd-94d7-d2934be13256","name":"409 - Name Already Exist","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Diaa Brand","type":"text","description":"Required, string, Length 2-25"},{"key":"slogan","value":"Quality you can trust","type":"text","description":"Required, string, Min 5 characters"},{"key":"file","type":"file","description":"Required, Brand logo image (Accepted: image/png, image/jpeg, image/webp, image/jpg)","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/brand","description":"Create a new brand with a logo image.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string (form-data) | Required, Length 2-25 |\n| slogan | string (form-data) | Required, Min 5 characters |\n| file | File (form-data) | Required, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- `slug` is auto-generated from `name`\n- Logo is uploaded to S3 under `ecommerce_app/brands/`\n- If brand creation fails after upload, logo is deleted from S3 automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Conflict","code":409,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 409,\n  \"message\": \"Name Already Exist\"\n}"},{"id":"4ee5d1f0-804e-4e13-883f-b14701b2e92a","name":"429 - Too Many Requests","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Diaa Brand","type":"text","description":"Required, string, Length 2-25"},{"key":"slogan","value":"Quality you can trust","type":"text","description":"Required, string, Min 5 characters"},{"key":"file","type":"file","description":"Required, Brand logo image (Accepted: image/png, image/jpeg, image/webp, image/jpg)","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/brand","description":"Create a new brand with a logo image.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string (form-data) | Required, Length 2-25 |\n| slogan | string (form-data) | Required, Min 5 characters |\n| file | File (form-data) | Required, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- `slug` is auto-generated from `name`\n- Logo is uploaded to S3 under `ecommerce_app/brands/`\n- If brand creation fails after upload, logo is deleted from S3 automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"faae35e8-741b-458f-a280-08d01bfe6665"},{"name":"Update Brand (Admin Only)","id":"69bf4eaf-e8c1-4292-b99d-a90f75d92349","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - Admin only</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Diaa Brand Updated\",\n  \"slogan\": \"New slogan here\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/brand/:id","description":"<p>Update brand name and/or slogan.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>admin</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>Brand MongoDB ObjectId</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>Optional, Length 2-25</td>\n</tr>\n<tr>\n<td>slogan</td>\n<td>string</td>\n<td>Optional, Min 5 characters</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>At least one of <code>name</code> or <code>slogan</code> must be provided</li>\n<li>Cannot use the same old name</li>\n<li><code>slug</code> is auto-updated when <code>name</code> changes</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["brand",":id"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[{"id":"782f85d2-955e-4064-b876-86e257fe0cd6","description":{"content":"<p>Brand MongoDB ObjectId</p>\n","type":"text/plain"},"type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d1","key":"id"}]}},"response":[{"id":"81fbf00c-cce8-41a4-824e-b04c0ce5cc8e","name":"200 - Brand Updated","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Diaa Brand Updated\",\n  \"slogan\": \"New slogan here\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://e-commerce-nest-js.vercel.app/brand/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["brand",":id"],"variable":[{"id":"782f85d2-955e-4064-b876-86e257fe0cd6","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d1","description":"Brand MongoDB ObjectId"}]},"description":"Update brand name and/or slogan.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Brand MongoDB ObjectId |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string | Optional, Length 2-25 |\n| slogan | string | Optional, Min 5 characters |\n\n**Notes:**\n- At least one of `name` or `slogan` must be provided\n- Cannot use the same old name\n- `slug` is auto-updated when `name` changes\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d1\",\n  \"name\": \"Diaa Brand Updated\",\n  \"slug\": \"diaa-brand-updated\",\n  \"slogan\": \"New slogan here\"\n}"},{"id":"a72854f6-e525-4b20-ad9e-d5690b8aae8b","name":"404 - Brand Not Found","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Diaa Brand Updated\",\n  \"slogan\": \"New slogan here\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://e-commerce-nest-js.vercel.app/brand/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["brand",":id"],"variable":[{"id":"782f85d2-955e-4064-b876-86e257fe0cd6","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d1","description":"Brand MongoDB ObjectId"}]},"description":"Update brand name and/or slogan.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Brand MongoDB ObjectId |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string | Optional, Length 2-25 |\n| slogan | string | Optional, Min 5 characters |\n\n**Notes:**\n- At least one of `name` or `slogan` must be provided\n- Cannot use the same old name\n- `slug` is auto-updated when `name` changes\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Brand Not Exist\"\n}"},{"id":"ef4f306f-aed7-4941-a089-3bb28cfceac5","name":"409 - Same Old Name","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Diaa Brand Updated\",\n  \"slogan\": \"New slogan here\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://e-commerce-nest-js.vercel.app/brand/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["brand",":id"],"variable":[{"id":"782f85d2-955e-4064-b876-86e257fe0cd6","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d1","description":"Brand MongoDB ObjectId"}]},"description":"Update brand name and/or slogan.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Brand MongoDB ObjectId |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string | Optional, Length 2-25 |\n| slogan | string | Optional, Min 5 characters |\n\n**Notes:**\n- At least one of `name` or `slogan` must be provided\n- Cannot use the same old name\n- `slug` is auto-updated when `name` changes\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Conflict","code":409,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 409,\n  \"message\": \"You Cant Put The Same Old Name\"\n}"},{"id":"f96513e7-de9d-40e1-97f3-05617a9425d0","name":"429 - Too Many Requests","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Diaa Brand Updated\",\n  \"slogan\": \"New slogan here\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://e-commerce-nest-js.vercel.app/brand/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["brand",":id"],"variable":[{"id":"782f85d2-955e-4064-b876-86e257fe0cd6","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d1","description":"Brand MongoDB ObjectId"}]},"description":"Update brand name and/or slogan.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Brand MongoDB ObjectId |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string | Optional, Length 2-25 |\n| slogan | string | Optional, Min 5 characters |\n\n**Notes:**\n- At least one of `name` or `slogan` must be provided\n- Cannot use the same old name\n- `slug` is auto-updated when `name` changes\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"69bf4eaf-e8c1-4292-b99d-a90f75d92349"},{"name":"Update Brand Logo (Admin Only)","id":"3a8450cd-ade3-428c-bf62-d870d04f6ee1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - Admin only</p>\n"}],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","description":"<p>Required, New brand logo (Accepted: image/png, image/jpeg, image/webp, image/jpg)</p>\n","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/brand/:id/logo","description":"<p>Update the brand's logo image.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>admin</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>Brand MongoDB ObjectId</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>file</td>\n<td>File (form-data)</td>\n<td>Required, Accepted: <code>image/png</code>, <code>image/jpeg</code>, <code>image/webp</code>, <code>image/jpg</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>New logo uploaded to S3 first</li>\n<li>Old logo deleted from S3 after successful update</li>\n<li>If update fails, new logo is deleted from S3</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["brand",":id","logo"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[{"id":"a53c89b8-be46-426a-852f-327af48eab8e","description":{"content":"<p>Brand MongoDB ObjectId</p>\n","type":"text/plain"},"type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d1","key":"id"}]}},"response":[{"id":"b277de27-0ded-427b-b049-56f25e6f0582","name":"200 - Logo Updated","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","description":"Required, New brand logo (Accepted: image/png, image/jpeg, image/webp, image/jpg)","value":null}]},"url":{"raw":"https://e-commerce-nest-js.vercel.app/brand/:id/logo","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["brand",":id","logo"],"variable":[{"id":"a53c89b8-be46-426a-852f-327af48eab8e","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d1","description":"Brand MongoDB ObjectId"}]},"description":"Update the brand's logo image.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Brand MongoDB ObjectId |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| file | File (form-data) | Required, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- New logo uploaded to S3 first\n- Old logo deleted from S3 after successful update\n- If update fails, new logo is deleted from S3\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d1\",\n  \"name\": \"Diaa Brand\",\n  \"logo\": \"ecommerce_app/brands/new-uuid_____newlogo.jpg\"\n}"},{"id":"65184844-56a2-4c55-8412-9acb1c597d69","name":"404 - Brand Not Found","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","description":"Required, New brand logo (Accepted: image/png, image/jpeg, image/webp, image/jpg)","value":null}]},"url":{"raw":"https://e-commerce-nest-js.vercel.app/brand/:id/logo","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["brand",":id","logo"],"variable":[{"id":"a53c89b8-be46-426a-852f-327af48eab8e","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d1","description":"Brand MongoDB ObjectId"}]},"description":"Update the brand's logo image.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Brand MongoDB ObjectId |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| file | File (form-data) | Required, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- New logo uploaded to S3 first\n- Old logo deleted from S3 after successful update\n- If update fails, new logo is deleted from S3\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Brand Not Found\"\n}"},{"id":"287bd9fe-c766-4d91-9b68-2505d9919cea","name":"429 - Too Many Requests","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","description":"Required, New brand logo (Accepted: image/png, image/jpeg, image/webp, image/jpg)","value":null}]},"url":{"raw":"https://e-commerce-nest-js.vercel.app/brand/:id/logo","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["brand",":id","logo"],"variable":[{"id":"a53c89b8-be46-426a-852f-327af48eab8e","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d1","description":"Brand MongoDB ObjectId"}]},"description":"Update the brand's logo image.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Brand MongoDB ObjectId |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| file | File (form-data) | Required, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- New logo uploaded to S3 first\n- Old logo deleted from S3 after successful update\n- If update fails, new logo is deleted from S3\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"3a8450cd-ade3-428c-bf62-d870d04f6ee1"},{"name":"Get All Brands","id":"24a69ed7-10cf-4025-abb1-78138d0a4ece","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://e-commerce-nest-js.vercel.app/brand?page=1&limit=10&search=diaa","description":"<p>Get all brands with pagination and optional search.</p>\n<p><strong>Auth:</strong> None required</p>\n<p><strong>Query Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Type</th>\n<th>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>page</td>\n<td>number</td>\n<td>Optional, Default: 1</td>\n</tr>\n<tr>\n<td>limit</td>\n<td>number</td>\n<td>Optional, Default: 10</td>\n</tr>\n<tr>\n<td>search</td>\n<td>string</td>\n<td>Optional, Searches in <code>name</code> and <code>slogan</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>Soft-deleted brands are excluded</li>\n<li>Results include pagination metadata</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["brand"],"host":["e-commerce-nest-js","vercel","app"],"query":[{"description":{"content":"<p>Optional, Page number (default: 1)</p>\n","type":"text/plain"},"key":"page","value":"1"},{"description":{"content":"<p>Optional, Items per page (default: 10)</p>\n","type":"text/plain"},"key":"limit","value":"10"},{"description":{"content":"<p>Optional, Search by name or slogan</p>\n","type":"text/plain"},"key":"search","value":"diaa"}],"variable":[]}},"response":[{"id":"e2cd9f2d-08c1-405b-a39b-47b25ab49faf","name":"200 - Brands List","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://e-commerce-nest-js.vercel.app/brand?page=1&limit=10&search=diaa","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["brand"],"query":[{"key":"page","value":"1","description":"Optional, Page number (default: 1)"},{"key":"limit","value":"10","description":"Optional, Items per page (default: 10)"},{"key":"search","value":"diaa","description":"Optional, Search by name or slogan"}]},"description":"Get all brands with pagination and optional search.\n\n**Auth:** None required\n\n**Query Params:**\n\n| Param | Type | Rules |\n|---|---|---|\n| page | number | Optional, Default: 1 |\n| limit | number | Optional, Default: 10 |\n| search | string | Optional, Searches in `name` and `slogan` |\n\n**Notes:**\n- Soft-deleted brands are excluded\n- Results include pagination metadata\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"meta\": {\n    \"currentPage\": 1,\n    \"totalPages\": 3,\n    \"limit\": 10,\n    \"totalDocs\": 25\n  },\n  \"data\": [\n    {\n      \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d1\",\n      \"name\": \"Diaa Brand\",\n      \"slug\": \"diaa-brand\",\n      \"slogan\": \"Quality you can trust\",\n      \"logo\": \"ecommerce_app/brands/uuid_____logo.jpg\"\n    }\n  ]\n}"},{"id":"d0034e21-e732-46ae-afe2-5afa199ce6fe","name":"429 - Too Many Requests","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://e-commerce-nest-js.vercel.app/brand?page=1&limit=10&search=diaa","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["brand"],"query":[{"key":"page","value":"1","description":"Optional, Page number (default: 1)"},{"key":"limit","value":"10","description":"Optional, Items per page (default: 10)"},{"key":"search","value":"diaa","description":"Optional, Search by name or slogan"}]},"description":"Get all brands with pagination and optional search.\n\n**Auth:** None required\n\n**Query Params:**\n\n| Param | Type | Rules |\n|---|---|---|\n| page | number | Optional, Default: 1 |\n| limit | number | Optional, Default: 10 |\n| search | string | Optional, Searches in `name` and `slogan` |\n\n**Notes:**\n- Soft-deleted brands are excluded\n- Results include pagination metadata\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"24a69ed7-10cf-4025-abb1-78138d0a4ece"},{"name":"Delete Brand (Admin Only)","id":"661ea157-ad46-4a4c-8e7e-b67ac6c5e42d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - Admin only</p>\n"}],"url":"https://e-commerce-nest-js.vercel.app/brand/:brandId","description":"<p>Soft delete a brand.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>admin</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>brandId</td>\n<td>Brand MongoDB ObjectId</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>This is a <strong>soft delete</strong> (sets <code>deletedAt</code> field, does not remove from DB)</li>\n<li>Deleted brand will not appear in <code>getBrands</code> results</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["brand",":brandId"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[{"id":"0876037c-75ec-4e50-9e6c-649cf82df25c","description":{"content":"<p>Brand MongoDB ObjectId</p>\n","type":"text/plain"},"type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d1","key":"brandId"}]}},"response":[{"id":"1603da6d-805f-4bae-bd2a-a546bf9a74dc","name":"200 - Brand Deleted","originalRequest":{"method":"DELETE","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/brand/:brandId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["brand",":brandId"],"variable":[{"id":"0876037c-75ec-4e50-9e6c-649cf82df25c","key":"brandId","value":"64f1a2b3c4d5e6f7a8b9c0d1","description":"Brand MongoDB ObjectId"}]},"description":"Soft delete a brand.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| brandId | Brand MongoDB ObjectId |\n\n**Notes:**\n- This is a **soft delete** (sets `deletedAt` field, does not remove from DB)\n- Deleted brand will not appear in `getBrands` results\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Brand Deleted Successfully\"\n}"},{"id":"5bef8b39-c406-4f10-b20d-6ee398d51c7a","name":"404 - Brand Not Found","originalRequest":{"method":"DELETE","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/brand/:brandId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["brand",":brandId"],"variable":[{"id":"0876037c-75ec-4e50-9e6c-649cf82df25c","key":"brandId","value":"64f1a2b3c4d5e6f7a8b9c0d1","description":"Brand MongoDB ObjectId"}]},"description":"Soft delete a brand.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| brandId | Brand MongoDB ObjectId |\n\n**Notes:**\n- This is a **soft delete** (sets `deletedAt` field, does not remove from DB)\n- Deleted brand will not appear in `getBrands` results\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Brand Not Found\"\n}"},{"id":"558105dd-1296-49c8-9f1e-f09e1009db0c","name":"429 - Too Many Requests","originalRequest":{"method":"DELETE","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/brand/:brandId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["brand",":brandId"],"variable":[{"id":"0876037c-75ec-4e50-9e6c-649cf82df25c","key":"brandId","value":"64f1a2b3c4d5e6f7a8b9c0d1","description":"Brand MongoDB ObjectId"}]},"description":"Soft delete a brand.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| brandId | Brand MongoDB ObjectId |\n\n**Notes:**\n- This is a **soft delete** (sets `deletedAt` field, does not remove from DB)\n- Deleted brand will not appear in `getBrands` results\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"661ea157-ad46-4a4c-8e7e-b67ac6c5e42d"}],"id":"3506c2bb-6a61-44aa-ba40-2fdff322b748","description":"<p>Endpoints for brand management. All write operations are Admin only.</p>\n","_postman_id":"3506c2bb-6a61-44aa-ba40-2fdff322b748"},{"name":"Category","item":[{"name":"Create Category (Admin Only)","id":"8fd45c1a-7915-44de-8c44-7237369aed6b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - Admin only</p>\n"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Diaa Category","type":"text","description":"<p>Required, string, Length 2-25</p>\n"},{"key":"brands[]","value":"64f1a2b3c4d5e6f7a8b9c0d1","type":"text","description":"<p>Optional, Array of Brand MongoDB ObjectIds</p>\n"},{"key":"file","type":"file","description":"<p>Required, Category image (Accepted: image/png, image/jpeg, image/webp, image/jpg)</p>\n","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/category","description":"<p>Create a new category with an image and optional brand associations.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>admin</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>name</td>\n<td>string (form-data)</td>\n<td>Required, Length 2-25</td>\n</tr>\n<tr>\n<td>brands[]</td>\n<td>MongoId[] (form-data)</td>\n<td>Optional, Array of valid Brand ObjectIds (must exist and not be deleted)</td>\n</tr>\n<tr>\n<td>file</td>\n<td>File (form-data)</td>\n<td>Required, Accepted: <code>image/png</code>, <code>image/jpeg</code>, <code>image/webp</code>, <code>image/jpg</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li><code>slug</code> is auto-generated from <code>name</code></li>\n<li>Duplicate brand IDs are removed automatically</li>\n<li>Image uploaded to S3 under <code>ecommerce_app/category/</code></li>\n<li>If creation fails after upload, image is deleted from S3</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["category"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"7f9070ba-5841-4a28-a890-1917a9efba9e","name":"201 - Category Created","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Diaa Category","type":"text","description":"Required, string, Length 2-25"},{"key":"brands[]","value":"64f1a2b3c4d5e6f7a8b9c0d1","type":"text","description":"Optional, Array of Brand MongoDB ObjectIds"},{"key":"file","type":"file","description":"Required, Category image (Accepted: image/png, image/jpeg, image/webp, image/jpg)","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/category","description":"Create a new category with an image and optional brand associations.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string (form-data) | Required, Length 2-25 |\n| brands[] | MongoId[] (form-data) | Optional, Array of valid Brand ObjectIds (must exist and not be deleted) |\n| file | File (form-data) | Required, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- `slug` is auto-generated from `name`\n- Duplicate brand IDs are removed automatically\n- Image uploaded to S3 under `ecommerce_app/category/`\n- If creation fails after upload, image is deleted from S3\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Created","code":201,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d2\",\n  \"name\": \"Diaa Category\",\n  \"slug\": \"diaa-category\",\n  \"brands\": [\"64f1a2b3c4d5e6f7a8b9c0d1\"],\n  \"image\": \"ecommerce_app/category/uuid_____image.jpg\",\n  \"createdBy\": \"64f1a2b3c4d5e6f7a8b9c0d1\"\n}"},{"id":"936d5861-9bf5-4461-af43-e151b167abca","name":"409 - Name Already Exist","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Diaa Category","type":"text","description":"Required, string, Length 2-25"},{"key":"brands[]","value":"64f1a2b3c4d5e6f7a8b9c0d1","type":"text","description":"Optional, Array of Brand MongoDB ObjectIds"},{"key":"file","type":"file","description":"Required, Category image (Accepted: image/png, image/jpeg, image/webp, image/jpg)","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/category","description":"Create a new category with an image and optional brand associations.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string (form-data) | Required, Length 2-25 |\n| brands[] | MongoId[] (form-data) | Optional, Array of valid Brand ObjectIds (must exist and not be deleted) |\n| file | File (form-data) | Required, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- `slug` is auto-generated from `name`\n- Duplicate brand IDs are removed automatically\n- Image uploaded to S3 under `ecommerce_app/category/`\n- If creation fails after upload, image is deleted from S3\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Conflict","code":409,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 409,\n  \"message\": \"Name already exists\"\n}"},{"id":"79f41c33-5131-408c-8bff-35c113c83c36","name":"404 - Some Brand IDs Not Found","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Diaa Category","type":"text","description":"Required, string, Length 2-25"},{"key":"brands[]","value":"64f1a2b3c4d5e6f7a8b9c0d1","type":"text","description":"Optional, Array of Brand MongoDB ObjectIds"},{"key":"file","type":"file","description":"Required, Category image (Accepted: image/png, image/jpeg, image/webp, image/jpg)","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/category","description":"Create a new category with an image and optional brand associations.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string (form-data) | Required, Length 2-25 |\n| brands[] | MongoId[] (form-data) | Optional, Array of valid Brand ObjectIds (must exist and not be deleted) |\n| file | File (form-data) | Required, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- `slug` is auto-generated from `name`\n- Duplicate brand IDs are removed automatically\n- Image uploaded to S3 under `ecommerce_app/category/`\n- If creation fails after upload, image is deleted from S3\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Some brand IDs not found\"\n}"},{"id":"97614a25-71fa-4d04-af5a-844b11f5305c","name":"429 - Too Many Requests","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Diaa Category","type":"text","description":"Required, string, Length 2-25"},{"key":"brands[]","value":"64f1a2b3c4d5e6f7a8b9c0d1","type":"text","description":"Optional, Array of Brand MongoDB ObjectIds"},{"key":"file","type":"file","description":"Required, Category image (Accepted: image/png, image/jpeg, image/webp, image/jpg)","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/category","description":"Create a new category with an image and optional brand associations.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string (form-data) | Required, Length 2-25 |\n| brands[] | MongoId[] (form-data) | Optional, Array of valid Brand ObjectIds (must exist and not be deleted) |\n| file | File (form-data) | Required, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- `slug` is auto-generated from `name`\n- Duplicate brand IDs are removed automatically\n- Image uploaded to S3 under `ecommerce_app/category/`\n- If creation fails after upload, image is deleted from S3\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"8fd45c1a-7915-44de-8c44-7237369aed6b"},{"name":"Update Category (Admin Only)","id":"84302e45-20d8-48f7-8a0b-8ec60204c302","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - Admin only</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Diaa Category Updated\",\n  \"brands\": [\"64f1a2b3c4d5e6f7a8b9c0d1\"]\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/category/:id","description":"<p>Update a category's name and/or brand associations.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>admin</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>Category MongoDB ObjectId</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>Optional, Length 2-25</td>\n</tr>\n<tr>\n<td>brands</td>\n<td>MongoId[]</td>\n<td>Optional, Array of valid Brand ObjectIds (must exist and not be deleted)</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>Cannot use the same old name</li>\n<li><code>slug</code> is auto-updated when <code>name</code> changes</li>\n<li>Duplicate brand IDs are removed automatically</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["category",":id"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[{"id":"25c26718-1b40-4446-a292-899ccce0c22a","description":{"content":"<p>Category MongoDB ObjectId</p>\n","type":"text/plain"},"type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d2","key":"id"}]}},"response":[{"id":"d5b89a16-115d-4981-9335-dc4a22b0e2d3","name":"200 - Category Updated","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Diaa Category Updated\",\n  \"brands\": [\"64f1a2b3c4d5e6f7a8b9c0d1\"]\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://e-commerce-nest-js.vercel.app/category/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["category",":id"],"variable":[{"id":"25c26718-1b40-4446-a292-899ccce0c22a","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d2","description":"Category MongoDB ObjectId"}]},"description":"Update a category's name and/or brand associations.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Category MongoDB ObjectId |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string | Optional, Length 2-25 |\n| brands | MongoId[] | Optional, Array of valid Brand ObjectIds (must exist and not be deleted) |\n\n**Notes:**\n- Cannot use the same old name\n- `slug` is auto-updated when `name` changes\n- Duplicate brand IDs are removed automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d2\",\n  \"name\": \"Diaa Category Updated\",\n  \"slug\": \"diaa-category-updated\",\n  \"brands\": [\"64f1a2b3c4d5e6f7a8b9c0d1\"]\n}"},{"id":"3b88bd1c-0a74-4d31-bead-12c79f0d81bd","name":"404 - Category Not Found","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Diaa Category Updated\",\n  \"brands\": [\"64f1a2b3c4d5e6f7a8b9c0d1\"]\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://e-commerce-nest-js.vercel.app/category/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["category",":id"],"variable":[{"id":"25c26718-1b40-4446-a292-899ccce0c22a","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d2","description":"Category MongoDB ObjectId"}]},"description":"Update a category's name and/or brand associations.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Category MongoDB ObjectId |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string | Optional, Length 2-25 |\n| brands | MongoId[] | Optional, Array of valid Brand ObjectIds (must exist and not be deleted) |\n\n**Notes:**\n- Cannot use the same old name\n- `slug` is auto-updated when `name` changes\n- Duplicate brand IDs are removed automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Category Not Found\"\n}"},{"id":"90251c0b-6348-4b90-bea6-21cbcf9d1341","name":"409 - Same Old Name","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Diaa Category Updated\",\n  \"brands\": [\"64f1a2b3c4d5e6f7a8b9c0d1\"]\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://e-commerce-nest-js.vercel.app/category/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["category",":id"],"variable":[{"id":"25c26718-1b40-4446-a292-899ccce0c22a","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d2","description":"Category MongoDB ObjectId"}]},"description":"Update a category's name and/or brand associations.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Category MongoDB ObjectId |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string | Optional, Length 2-25 |\n| brands | MongoId[] | Optional, Array of valid Brand ObjectIds (must exist and not be deleted) |\n\n**Notes:**\n- Cannot use the same old name\n- `slug` is auto-updated when `name` changes\n- Duplicate brand IDs are removed automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Conflict","code":409,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 409,\n  \"message\": \"You Cant Put The Same Old Name\"\n}"},{"id":"8e2f1344-636d-41c1-8b95-6cb90a39cbac","name":"429 - Too Many Requests","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Diaa Category Updated\",\n  \"brands\": [\"64f1a2b3c4d5e6f7a8b9c0d1\"]\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://e-commerce-nest-js.vercel.app/category/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["category",":id"],"variable":[{"id":"25c26718-1b40-4446-a292-899ccce0c22a","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d2","description":"Category MongoDB ObjectId"}]},"description":"Update a category's name and/or brand associations.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Category MongoDB ObjectId |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string | Optional, Length 2-25 |\n| brands | MongoId[] | Optional, Array of valid Brand ObjectIds (must exist and not be deleted) |\n\n**Notes:**\n- Cannot use the same old name\n- `slug` is auto-updated when `name` changes\n- Duplicate brand IDs are removed automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"84302e45-20d8-48f7-8a0b-8ec60204c302"},{"name":"Update Category Image (Admin Only)","id":"a2edebd0-429d-48aa-aa3f-69940b13f52a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - Admin only</p>\n"}],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","description":"<p>Required, New category image (Accepted: image/png, image/jpeg, image/webp, image/jpg)</p>\n","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/category/:id/image","description":"<p>Update the category's image.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>admin</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>Category MongoDB ObjectId</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>file</td>\n<td>File (form-data)</td>\n<td>Required, Accepted: <code>image/png</code>, <code>image/jpeg</code>, <code>image/webp</code>, <code>image/jpg</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>New image uploaded to S3 first</li>\n<li>Old image deleted from S3 after successful update</li>\n<li>If update fails, new image is deleted from S3</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["category",":id","image"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[{"id":"0c587a13-af53-4d7c-b52f-83994c825f51","description":{"content":"<p>Category MongoDB ObjectId</p>\n","type":"text/plain"},"type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d2","key":"id"}]}},"response":[{"id":"0f63fd88-0c06-4d0a-b229-b5f94ef5b6e1","name":"200 - Image Updated","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","description":"Required, New category image (Accepted: image/png, image/jpeg, image/webp, image/jpg)","value":null}]},"url":{"raw":"https://e-commerce-nest-js.vercel.app/category/:id/image","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["category",":id","image"],"variable":[{"id":"0c587a13-af53-4d7c-b52f-83994c825f51","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d2","description":"Category MongoDB ObjectId"}]},"description":"Update the category's image.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Category MongoDB ObjectId |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| file | File (form-data) | Required, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- New image uploaded to S3 first\n- Old image deleted from S3 after successful update\n- If update fails, new image is deleted from S3\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d2\",\n  \"name\": \"Diaa Category\",\n  \"image\": \"ecommerce_app/category/new-uuid_____newimage.jpg\"\n}"},{"id":"ff59bbe4-232a-44b5-a6e9-b58a10bb7f9a","name":"404 - Category Not Found","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","description":"Required, New category image (Accepted: image/png, image/jpeg, image/webp, image/jpg)","value":null}]},"url":{"raw":"https://e-commerce-nest-js.vercel.app/category/:id/image","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["category",":id","image"],"variable":[{"id":"0c587a13-af53-4d7c-b52f-83994c825f51","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d2","description":"Category MongoDB ObjectId"}]},"description":"Update the category's image.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Category MongoDB ObjectId |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| file | File (form-data) | Required, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- New image uploaded to S3 first\n- Old image deleted from S3 after successful update\n- If update fails, new image is deleted from S3\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Category Not Found\"\n}"},{"id":"c0429608-3db4-4785-b52c-95e5fe002e01","name":"429 - Too Many Requests","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","description":"Required, New category image (Accepted: image/png, image/jpeg, image/webp, image/jpg)","value":null}]},"url":{"raw":"https://e-commerce-nest-js.vercel.app/category/:id/image","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["category",":id","image"],"variable":[{"id":"0c587a13-af53-4d7c-b52f-83994c825f51","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d2","description":"Category MongoDB ObjectId"}]},"description":"Update the category's image.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Category MongoDB ObjectId |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| file | File (form-data) | Required, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- New image uploaded to S3 first\n- Old image deleted from S3 after successful update\n- If update fails, new image is deleted from S3\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"a2edebd0-429d-48aa-aa3f-69940b13f52a"},{"name":"Get All Categories","id":"6f8b3f1d-73be-4749-abf2-2077edd569a7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://e-commerce-nest-js.vercel.app/category?page=1&limit=10&search=diaa","description":"<p>Get all categories with pagination, search, and populated brand details.</p>\n<p><strong>Auth:</strong> None required</p>\n<p><strong>Query Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Type</th>\n<th>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>page</td>\n<td>number</td>\n<td>Optional, Default: 1</td>\n</tr>\n<tr>\n<td>limit</td>\n<td>number</td>\n<td>Optional, Default: 10</td>\n</tr>\n<tr>\n<td>search</td>\n<td>string</td>\n<td>Optional, Searches in <code>name</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>Soft-deleted categories are excluded</li>\n<li>Brands populated with: <code>name</code>, <code>slug</code>, <code>logo</code></li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["category"],"host":["e-commerce-nest-js","vercel","app"],"query":[{"description":{"content":"<p>Optional, Page number (default: 1)</p>\n","type":"text/plain"},"key":"page","value":"1"},{"description":{"content":"<p>Optional, Items per page (default: 10)</p>\n","type":"text/plain"},"key":"limit","value":"10"},{"description":{"content":"<p>Optional, Search by category name</p>\n","type":"text/plain"},"key":"search","value":"diaa"}],"variable":[]}},"response":[{"id":"e91c40ec-8b58-4ddf-a353-58f8f122aeb6","name":"200 - Categories List","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://e-commerce-nest-js.vercel.app/category?page=1&limit=10&search=diaa","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["category"],"query":[{"key":"page","value":"1","description":"Optional, Page number (default: 1)"},{"key":"limit","value":"10","description":"Optional, Items per page (default: 10)"},{"key":"search","value":"diaa","description":"Optional, Search by category name"}]},"description":"Get all categories with pagination, search, and populated brand details.\n\n**Auth:** None required\n\n**Query Params:**\n\n| Param | Type | Rules |\n|---|---|---|\n| page | number | Optional, Default: 1 |\n| limit | number | Optional, Default: 10 |\n| search | string | Optional, Searches in `name` |\n\n**Notes:**\n- Soft-deleted categories are excluded\n- Brands populated with: `name`, `slug`, `logo`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"meta\": {\n    \"currentPage\": 1,\n    \"totalPages\": 2,\n    \"limit\": 10,\n    \"totalDocs\": 15\n  },\n  \"data\": [\n    {\n      \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d2\",\n      \"name\": \"Diaa Category\",\n      \"slug\": \"diaa-category\",\n      \"image\": \"ecommerce_app/category/uuid_____image.jpg\",\n      \"brands\": [\n        {\n          \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d1\",\n          \"name\": \"Diaa Brand\",\n          \"slug\": \"diaa-brand\",\n          \"logo\": \"ecommerce_app/brands/uuid_____logo.jpg\"\n        }\n      ]\n    }\n  ]\n}"},{"id":"51c12c98-8b68-4f6c-a683-e15702318023","name":"429 - Too Many Requests","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://e-commerce-nest-js.vercel.app/category?page=1&limit=10&search=diaa","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["category"],"query":[{"key":"page","value":"1","description":"Optional, Page number (default: 1)"},{"key":"limit","value":"10","description":"Optional, Items per page (default: 10)"},{"key":"search","value":"diaa","description":"Optional, Search by category name"}]},"description":"Get all categories with pagination, search, and populated brand details.\n\n**Auth:** None required\n\n**Query Params:**\n\n| Param | Type | Rules |\n|---|---|---|\n| page | number | Optional, Default: 1 |\n| limit | number | Optional, Default: 10 |\n| search | string | Optional, Searches in `name` |\n\n**Notes:**\n- Soft-deleted categories are excluded\n- Brands populated with: `name`, `slug`, `logo`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"6f8b3f1d-73be-4749-abf2-2077edd569a7"},{"name":"Delete Category (Admin Only)","id":"a7702e41-0788-4f6d-baae-ff47e28811f6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - Admin only</p>\n"}],"url":"https://e-commerce-nest-js.vercel.app/category/:categoryId","description":"<p>Soft delete a category.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>admin</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>categoryId</td>\n<td>Category MongoDB ObjectId</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>This is a <strong>soft delete</strong> (sets <code>deletedAt</code> field, does not remove from DB)</li>\n<li>Deleted category will not appear in <code>getCategories</code> results</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["category",":categoryId"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[{"id":"ccd3a02b-0abc-402f-b7a9-b0a499abc375","description":{"content":"<p>Category MongoDB ObjectId</p>\n","type":"text/plain"},"type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d2","key":"categoryId"}]}},"response":[{"id":"60b6fbe0-a5ab-4452-9ddb-71c7a7040fc0","name":"200 - Category Deleted","originalRequest":{"method":"DELETE","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/category/:categoryId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["category",":categoryId"],"variable":[{"id":"ccd3a02b-0abc-402f-b7a9-b0a499abc375","key":"categoryId","value":"64f1a2b3c4d5e6f7a8b9c0d2","description":"Category MongoDB ObjectId"}]},"description":"Soft delete a category.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| categoryId | Category MongoDB ObjectId |\n\n**Notes:**\n- This is a **soft delete** (sets `deletedAt` field, does not remove from DB)\n- Deleted category will not appear in `getCategories` results\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Category Deleted Successfully\"\n}"},{"id":"ab25b49a-06e7-4404-be3a-c16993ffeaf2","name":"404 - Category Not Found","originalRequest":{"method":"DELETE","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/category/:categoryId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["category",":categoryId"],"variable":[{"id":"ccd3a02b-0abc-402f-b7a9-b0a499abc375","key":"categoryId","value":"64f1a2b3c4d5e6f7a8b9c0d2","description":"Category MongoDB ObjectId"}]},"description":"Soft delete a category.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| categoryId | Category MongoDB ObjectId |\n\n**Notes:**\n- This is a **soft delete** (sets `deletedAt` field, does not remove from DB)\n- Deleted category will not appear in `getCategories` results\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Category Not Found\"\n}"},{"id":"27cd3bad-049a-49b9-8885-21818b3f59fb","name":"429 - Too Many Requests","originalRequest":{"method":"DELETE","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/category/:categoryId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["category",":categoryId"],"variable":[{"id":"ccd3a02b-0abc-402f-b7a9-b0a499abc375","key":"categoryId","value":"64f1a2b3c4d5e6f7a8b9c0d2","description":"Category MongoDB ObjectId"}]},"description":"Soft delete a category.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| categoryId | Category MongoDB ObjectId |\n\n**Notes:**\n- This is a **soft delete** (sets `deletedAt` field, does not remove from DB)\n- Deleted category will not appear in `getCategories` results\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"a7702e41-0788-4f6d-baae-ff47e28811f6"}],"id":"186976c7-603a-49f9-8a14-4dfdbb31a922","description":"<p>Endpoints for category management. All write operations are Admin only.</p>\n","_postman_id":"186976c7-603a-49f9-8a14-4dfdbb31a922"},{"name":"Product","item":[{"name":"Create Product (Admin Only)","id":"edc3cba6-c3bd-4a7b-8c92-359568b6b220","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - Admin only</p>\n"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Diaa Product","type":"text","description":"<p>Required, string, Length 2-25</p>\n"},{"key":"description","value":"Product description here","type":"text","description":"<p>Optional, string, Min 5 characters</p>\n"},{"key":"price","value":"299","type":"text","description":"<p>Required, number, Min 0</p>\n"},{"key":"discount","value":"10","type":"text","description":"<p>Optional, number, Min 0, Max 100, Default: 0</p>\n"},{"key":"stock","value":"50","type":"text","description":"<p>Required, number, Min 0</p>\n"},{"key":"brandId","value":"64f1a2b3c4d5e6f7a8b9c0d1","type":"text","description":"<p>Required, valid Brand MongoDB ObjectId</p>\n"},{"key":"categoryId","value":"64f1a2b3c4d5e6f7a8b9c0d2","type":"text","description":"<p>Required, valid Category MongoDB ObjectId</p>\n"},{"key":"mainImage","type":"file","description":"<p>Required, Main product image (Max 1 file)</p>\n","value":null},{"key":"subImages","type":"file","description":"<p>Optional, Sub product images (Max 5 files)</p>\n","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/product","description":"<p>Create a new product with main image and optional sub images.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>admin</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>name</td>\n<td>string (form-data)</td>\n<td>Required, Length 2-25</td>\n</tr>\n<tr>\n<td>description</td>\n<td>string (form-data)</td>\n<td>Optional, Min 5 characters</td>\n</tr>\n<tr>\n<td>price</td>\n<td>number (form-data)</td>\n<td>Required, Min 0</td>\n</tr>\n<tr>\n<td>discount</td>\n<td>number (form-data)</td>\n<td>Optional, Min 0, Max 100, Default: 0</td>\n</tr>\n<tr>\n<td>stock</td>\n<td>number (form-data)</td>\n<td>Required, Min 0</td>\n</tr>\n<tr>\n<td>brandId</td>\n<td>MongoId (form-data)</td>\n<td>Required, Must be a valid existing Brand</td>\n</tr>\n<tr>\n<td>categoryId</td>\n<td>MongoId (form-data)</td>\n<td>Required, Must be a valid existing Category</td>\n</tr>\n<tr>\n<td>mainImage</td>\n<td>File (form-data)</td>\n<td>Required, Max 1 file, Accepted: <code>image/png</code>, <code>image/jpeg</code>, <code>image/webp</code>, <code>image/jpg</code></td>\n</tr>\n<tr>\n<td>subImages</td>\n<td>File[] (form-data)</td>\n<td>Optional, Max 5 files, Accepted: <code>image/png</code>, <code>image/jpeg</code>, <code>image/webp</code>, <code>image/jpg</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li><code>slug</code> is auto-generated from <code>name</code></li>\n<li><code>mainImage</code> uploaded to S3 under <code>ecommerce_app/products/main/</code></li>\n<li><code>subImages</code> uploaded to S3 under <code>ecommerce_app/products/sub/</code></li>\n<li>If creation fails, all uploaded images are deleted from S3 automatically</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["product"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"f3b238df-861a-45b0-8b3e-9c4ef572939a","name":"201 - Product Created","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Diaa Product","type":"text","description":"Required, string, Length 2-25"},{"key":"description","value":"Product description here","type":"text","description":"Optional, string, Min 5 characters"},{"key":"price","value":"299","type":"text","description":"Required, number, Min 0"},{"key":"discount","value":"10","type":"text","description":"Optional, number, Min 0, Max 100, Default: 0"},{"key":"stock","value":"50","type":"text","description":"Required, number, Min 0"},{"key":"brandId","value":"64f1a2b3c4d5e6f7a8b9c0d1","type":"text","description":"Required, valid Brand MongoDB ObjectId"},{"key":"categoryId","value":"64f1a2b3c4d5e6f7a8b9c0d2","type":"text","description":"Required, valid Category MongoDB ObjectId"},{"key":"mainImage","type":"file","description":"Required, Main product image (Max 1 file)","value":null},{"key":"subImages","type":"file","description":"Optional, Sub product images (Max 5 files)","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/product","description":"Create a new product with main image and optional sub images.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string (form-data) | Required, Length 2-25 |\n| description | string (form-data) | Optional, Min 5 characters |\n| price | number (form-data) | Required, Min 0 |\n| discount | number (form-data) | Optional, Min 0, Max 100, Default: 0 |\n| stock | number (form-data) | Required, Min 0 |\n| brandId | MongoId (form-data) | Required, Must be a valid existing Brand |\n| categoryId | MongoId (form-data) | Required, Must be a valid existing Category |\n| mainImage | File (form-data) | Required, Max 1 file, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n| subImages | File[] (form-data) | Optional, Max 5 files, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- `slug` is auto-generated from `name`\n- `mainImage` uploaded to S3 under `ecommerce_app/products/main/`\n- `subImages` uploaded to S3 under `ecommerce_app/products/sub/`\n- If creation fails, all uploaded images are deleted from S3 automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Created","code":201,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d3\",\n  \"name\": \"Diaa Product\",\n  \"slug\": \"diaa-product\",\n  \"description\": \"Product description here\",\n  \"price\": 299,\n  \"discount\": 10,\n  \"stock\": 50,\n  \"brandId\": \"64f1a2b3c4d5e6f7a8b9c0d1\",\n  \"categoryId\": \"64f1a2b3c4d5e6f7a8b9c0d2\",\n  \"mainImage\": \"ecommerce_app/products/main/uuid_____main.jpg\",\n  \"subImages\": [\"ecommerce_app/products/sub/uuid_____sub1.jpg\"],\n  \"createdBy\": \"64f1a2b3c4d5e6f7a8b9c0d1\"\n}"},{"id":"bf475bd5-4f89-40d6-9939-c2931e68a5ff","name":"409 - Name Already Exist","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Diaa Product","type":"text","description":"Required, string, Length 2-25"},{"key":"description","value":"Product description here","type":"text","description":"Optional, string, Min 5 characters"},{"key":"price","value":"299","type":"text","description":"Required, number, Min 0"},{"key":"discount","value":"10","type":"text","description":"Optional, number, Min 0, Max 100, Default: 0"},{"key":"stock","value":"50","type":"text","description":"Required, number, Min 0"},{"key":"brandId","value":"64f1a2b3c4d5e6f7a8b9c0d1","type":"text","description":"Required, valid Brand MongoDB ObjectId"},{"key":"categoryId","value":"64f1a2b3c4d5e6f7a8b9c0d2","type":"text","description":"Required, valid Category MongoDB ObjectId"},{"key":"mainImage","type":"file","description":"Required, Main product image (Max 1 file)","value":null},{"key":"subImages","type":"file","description":"Optional, Sub product images (Max 5 files)","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/product","description":"Create a new product with main image and optional sub images.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string (form-data) | Required, Length 2-25 |\n| description | string (form-data) | Optional, Min 5 characters |\n| price | number (form-data) | Required, Min 0 |\n| discount | number (form-data) | Optional, Min 0, Max 100, Default: 0 |\n| stock | number (form-data) | Required, Min 0 |\n| brandId | MongoId (form-data) | Required, Must be a valid existing Brand |\n| categoryId | MongoId (form-data) | Required, Must be a valid existing Category |\n| mainImage | File (form-data) | Required, Max 1 file, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n| subImages | File[] (form-data) | Optional, Max 5 files, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- `slug` is auto-generated from `name`\n- `mainImage` uploaded to S3 under `ecommerce_app/products/main/`\n- `subImages` uploaded to S3 under `ecommerce_app/products/sub/`\n- If creation fails, all uploaded images are deleted from S3 automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Conflict","code":409,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 409,\n  \"message\": \"Name Already Exist\"\n}"},{"id":"dad15a39-74d9-4f51-b105-639827d19729","name":"404 - Brand Not Found","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Diaa Product","type":"text","description":"Required, string, Length 2-25"},{"key":"description","value":"Product description here","type":"text","description":"Optional, string, Min 5 characters"},{"key":"price","value":"299","type":"text","description":"Required, number, Min 0"},{"key":"discount","value":"10","type":"text","description":"Optional, number, Min 0, Max 100, Default: 0"},{"key":"stock","value":"50","type":"text","description":"Required, number, Min 0"},{"key":"brandId","value":"64f1a2b3c4d5e6f7a8b9c0d1","type":"text","description":"Required, valid Brand MongoDB ObjectId"},{"key":"categoryId","value":"64f1a2b3c4d5e6f7a8b9c0d2","type":"text","description":"Required, valid Category MongoDB ObjectId"},{"key":"mainImage","type":"file","description":"Required, Main product image (Max 1 file)","value":null},{"key":"subImages","type":"file","description":"Optional, Sub product images (Max 5 files)","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/product","description":"Create a new product with main image and optional sub images.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string (form-data) | Required, Length 2-25 |\n| description | string (form-data) | Optional, Min 5 characters |\n| price | number (form-data) | Required, Min 0 |\n| discount | number (form-data) | Optional, Min 0, Max 100, Default: 0 |\n| stock | number (form-data) | Required, Min 0 |\n| brandId | MongoId (form-data) | Required, Must be a valid existing Brand |\n| categoryId | MongoId (form-data) | Required, Must be a valid existing Category |\n| mainImage | File (form-data) | Required, Max 1 file, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n| subImages | File[] (form-data) | Optional, Max 5 files, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- `slug` is auto-generated from `name`\n- `mainImage` uploaded to S3 under `ecommerce_app/products/main/`\n- `subImages` uploaded to S3 under `ecommerce_app/products/sub/`\n- If creation fails, all uploaded images are deleted from S3 automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Brand Not Found\"\n}"},{"id":"30b71660-000b-4e20-9e89-12d7a501077f","name":"404 - Category Not Found","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Diaa Product","type":"text","description":"Required, string, Length 2-25"},{"key":"description","value":"Product description here","type":"text","description":"Optional, string, Min 5 characters"},{"key":"price","value":"299","type":"text","description":"Required, number, Min 0"},{"key":"discount","value":"10","type":"text","description":"Optional, number, Min 0, Max 100, Default: 0"},{"key":"stock","value":"50","type":"text","description":"Required, number, Min 0"},{"key":"brandId","value":"64f1a2b3c4d5e6f7a8b9c0d1","type":"text","description":"Required, valid Brand MongoDB ObjectId"},{"key":"categoryId","value":"64f1a2b3c4d5e6f7a8b9c0d2","type":"text","description":"Required, valid Category MongoDB ObjectId"},{"key":"mainImage","type":"file","description":"Required, Main product image (Max 1 file)","value":null},{"key":"subImages","type":"file","description":"Optional, Sub product images (Max 5 files)","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/product","description":"Create a new product with main image and optional sub images.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string (form-data) | Required, Length 2-25 |\n| description | string (form-data) | Optional, Min 5 characters |\n| price | number (form-data) | Required, Min 0 |\n| discount | number (form-data) | Optional, Min 0, Max 100, Default: 0 |\n| stock | number (form-data) | Required, Min 0 |\n| brandId | MongoId (form-data) | Required, Must be a valid existing Brand |\n| categoryId | MongoId (form-data) | Required, Must be a valid existing Category |\n| mainImage | File (form-data) | Required, Max 1 file, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n| subImages | File[] (form-data) | Optional, Max 5 files, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- `slug` is auto-generated from `name`\n- `mainImage` uploaded to S3 under `ecommerce_app/products/main/`\n- `subImages` uploaded to S3 under `ecommerce_app/products/sub/`\n- If creation fails, all uploaded images are deleted from S3 automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Category Not Found\"\n}"},{"id":"229aba99-57d8-4fba-b95e-2a06eb1208b6","name":"400 - Main Image Required","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Diaa Product","type":"text","description":"Required, string, Length 2-25"},{"key":"description","value":"Product description here","type":"text","description":"Optional, string, Min 5 characters"},{"key":"price","value":"299","type":"text","description":"Required, number, Min 0"},{"key":"discount","value":"10","type":"text","description":"Optional, number, Min 0, Max 100, Default: 0"},{"key":"stock","value":"50","type":"text","description":"Required, number, Min 0"},{"key":"brandId","value":"64f1a2b3c4d5e6f7a8b9c0d1","type":"text","description":"Required, valid Brand MongoDB ObjectId"},{"key":"categoryId","value":"64f1a2b3c4d5e6f7a8b9c0d2","type":"text","description":"Required, valid Category MongoDB ObjectId"},{"key":"mainImage","type":"file","description":"Required, Main product image (Max 1 file)","value":null},{"key":"subImages","type":"file","description":"Optional, Sub product images (Max 5 files)","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/product","description":"Create a new product with main image and optional sub images.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string (form-data) | Required, Length 2-25 |\n| description | string (form-data) | Optional, Min 5 characters |\n| price | number (form-data) | Required, Min 0 |\n| discount | number (form-data) | Optional, Min 0, Max 100, Default: 0 |\n| stock | number (form-data) | Required, Min 0 |\n| brandId | MongoId (form-data) | Required, Must be a valid existing Brand |\n| categoryId | MongoId (form-data) | Required, Must be a valid existing Category |\n| mainImage | File (form-data) | Required, Max 1 file, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n| subImages | File[] (form-data) | Optional, Max 5 files, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- `slug` is auto-generated from `name`\n- `mainImage` uploaded to S3 under `ecommerce_app/products/main/`\n- `subImages` uploaded to S3 under `ecommerce_app/products/sub/`\n- If creation fails, all uploaded images are deleted from S3 automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 400,\n  \"message\": \"Main Image Is Required\"\n}"},{"id":"10d068c6-59d4-4fc2-a465-aa1c7bbaa888","name":"429 - Too Many Requests","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Diaa Product","type":"text","description":"Required, string, Length 2-25"},{"key":"description","value":"Product description here","type":"text","description":"Optional, string, Min 5 characters"},{"key":"price","value":"299","type":"text","description":"Required, number, Min 0"},{"key":"discount","value":"10","type":"text","description":"Optional, number, Min 0, Max 100, Default: 0"},{"key":"stock","value":"50","type":"text","description":"Required, number, Min 0"},{"key":"brandId","value":"64f1a2b3c4d5e6f7a8b9c0d1","type":"text","description":"Required, valid Brand MongoDB ObjectId"},{"key":"categoryId","value":"64f1a2b3c4d5e6f7a8b9c0d2","type":"text","description":"Required, valid Category MongoDB ObjectId"},{"key":"mainImage","type":"file","description":"Required, Main product image (Max 1 file)","value":null},{"key":"subImages","type":"file","description":"Optional, Sub product images (Max 5 files)","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/product","description":"Create a new product with main image and optional sub images.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string (form-data) | Required, Length 2-25 |\n| description | string (form-data) | Optional, Min 5 characters |\n| price | number (form-data) | Required, Min 0 |\n| discount | number (form-data) | Optional, Min 0, Max 100, Default: 0 |\n| stock | number (form-data) | Required, Min 0 |\n| brandId | MongoId (form-data) | Required, Must be a valid existing Brand |\n| categoryId | MongoId (form-data) | Required, Must be a valid existing Category |\n| mainImage | File (form-data) | Required, Max 1 file, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n| subImages | File[] (form-data) | Optional, Max 5 files, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- `slug` is auto-generated from `name`\n- `mainImage` uploaded to S3 under `ecommerce_app/products/main/`\n- `subImages` uploaded to S3 under `ecommerce_app/products/sub/`\n- If creation fails, all uploaded images are deleted from S3 automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"edc3cba6-c3bd-4a7b-8c92-359568b6b220"},{"name":"Update Product (Admin Only)","id":"37a0fb98-4fa4-4e87-aa0d-4057a36146ea","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - Admin only</p>\n"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Diaa Product Updated","type":"text","description":"<p>Optional, string, Length 2-25</p>\n"},{"key":"description","value":"Updated description","type":"text","description":"<p>Optional, string, Min 5 characters</p>\n"},{"key":"price","value":"350","type":"text","description":"<p>Optional, number, Min 0</p>\n"},{"key":"discount","value":"15","type":"text","description":"<p>Optional, number, Min 0, Max 100</p>\n"},{"key":"stock","value":"40","type":"text","description":"<p>Optional, number, Min 0</p>\n"},{"key":"brandId","value":"64f1a2b3c4d5e6f7a8b9c0d1","type":"text","description":"<p>Optional, valid Brand MongoDB ObjectId</p>\n"},{"key":"categoryId","value":"64f1a2b3c4d5e6f7a8b9c0d2","type":"text","description":"<p>Optional, valid Category MongoDB ObjectId</p>\n"},{"key":"mainImage","type":"file","description":"<p>Optional, New main image (Max 1 file)</p>\n","value":null},{"key":"subImages","type":"file","description":"<p>Optional, New sub images (Max 5 files)</p>\n","value":null}]},"url":"https://e-commerce-nest-js.vercel.app/product/:id","description":"<p>Update an existing product.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>admin</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>Product MongoDB ObjectId</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>name</td>\n<td>string (form-data)</td>\n<td>Optional, Length 2-25</td>\n</tr>\n<tr>\n<td>description</td>\n<td>string (form-data)</td>\n<td>Optional, Min 5 characters</td>\n</tr>\n<tr>\n<td>price</td>\n<td>number (form-data)</td>\n<td>Optional, Min 0</td>\n</tr>\n<tr>\n<td>discount</td>\n<td>number (form-data)</td>\n<td>Optional, Min 0, Max 100</td>\n</tr>\n<tr>\n<td>stock</td>\n<td>number (form-data)</td>\n<td>Optional, Min 0</td>\n</tr>\n<tr>\n<td>brandId</td>\n<td>MongoId (form-data)</td>\n<td>Optional, Must be a valid existing Brand</td>\n</tr>\n<tr>\n<td>categoryId</td>\n<td>MongoId (form-data)</td>\n<td>Optional, Must be a valid existing Category</td>\n</tr>\n<tr>\n<td>mainImage</td>\n<td>File (form-data)</td>\n<td>Optional, Max 1 file, Accepted: <code>image/png</code>, <code>image/jpeg</code>, <code>image/webp</code>, <code>image/jpg</code></td>\n</tr>\n<tr>\n<td>subImages</td>\n<td>File[] (form-data)</td>\n<td>Optional, Max 5 files, Accepted: <code>image/png</code>, <code>image/jpeg</code>, <code>image/webp</code>, <code>image/jpg</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>Cannot use the same old name</li>\n<li>If new mainImage provided, old one is deleted from S3</li>\n<li>If new subImages provided, all old sub images are deleted from S3</li>\n<li>If update fails, newly uploaded images are deleted from S3</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["product",":id"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[{"id":"fe735d7d-44b9-437b-8c22-d9d4cae4be66","description":{"content":"<p>Product MongoDB ObjectId</p>\n","type":"text/plain"},"type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d3","key":"id"}]}},"response":[{"id":"ece0dd10-270b-4b1e-a486-75b250fd561e","name":"200 - Product Updated","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Diaa Product Updated","type":"text","description":"Optional, string, Length 2-25"},{"key":"description","value":"Updated description","type":"text","description":"Optional, string, Min 5 characters"},{"key":"price","value":"350","type":"text","description":"Optional, number, Min 0"},{"key":"discount","value":"15","type":"text","description":"Optional, number, Min 0, Max 100"},{"key":"stock","value":"40","type":"text","description":"Optional, number, Min 0"},{"key":"brandId","value":"64f1a2b3c4d5e6f7a8b9c0d1","type":"text","description":"Optional, valid Brand MongoDB ObjectId"},{"key":"categoryId","value":"64f1a2b3c4d5e6f7a8b9c0d2","type":"text","description":"Optional, valid Category MongoDB ObjectId"},{"key":"mainImage","type":"file","description":"Optional, New main image (Max 1 file)","value":null},{"key":"subImages","type":"file","description":"Optional, New sub images (Max 5 files)","value":null}]},"url":{"raw":"https://e-commerce-nest-js.vercel.app/product/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["product",":id"],"variable":[{"id":"fe735d7d-44b9-437b-8c22-d9d4cae4be66","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d3","description":"Product MongoDB ObjectId"}]},"description":"Update an existing product.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Product MongoDB ObjectId |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string (form-data) | Optional, Length 2-25 |\n| description | string (form-data) | Optional, Min 5 characters |\n| price | number (form-data) | Optional, Min 0 |\n| discount | number (form-data) | Optional, Min 0, Max 100 |\n| stock | number (form-data) | Optional, Min 0 |\n| brandId | MongoId (form-data) | Optional, Must be a valid existing Brand |\n| categoryId | MongoId (form-data) | Optional, Must be a valid existing Category |\n| mainImage | File (form-data) | Optional, Max 1 file, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n| subImages | File[] (form-data) | Optional, Max 5 files, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- Cannot use the same old name\n- If new mainImage provided, old one is deleted from S3\n- If new subImages provided, all old sub images are deleted from S3\n- If update fails, newly uploaded images are deleted from S3\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d3\",\n  \"name\": \"Diaa Product Updated\",\n  \"slug\": \"diaa-product-updated\",\n  \"price\": 350,\n  \"discount\": 15,\n  \"stock\": 40\n}"},{"id":"d3403ae5-60a3-47bf-af15-cc71e83ca49d","name":"404 - Product Not Found","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Diaa Product Updated","type":"text","description":"Optional, string, Length 2-25"},{"key":"description","value":"Updated description","type":"text","description":"Optional, string, Min 5 characters"},{"key":"price","value":"350","type":"text","description":"Optional, number, Min 0"},{"key":"discount","value":"15","type":"text","description":"Optional, number, Min 0, Max 100"},{"key":"stock","value":"40","type":"text","description":"Optional, number, Min 0"},{"key":"brandId","value":"64f1a2b3c4d5e6f7a8b9c0d1","type":"text","description":"Optional, valid Brand MongoDB ObjectId"},{"key":"categoryId","value":"64f1a2b3c4d5e6f7a8b9c0d2","type":"text","description":"Optional, valid Category MongoDB ObjectId"},{"key":"mainImage","type":"file","description":"Optional, New main image (Max 1 file)","value":null},{"key":"subImages","type":"file","description":"Optional, New sub images (Max 5 files)","value":null}]},"url":{"raw":"https://e-commerce-nest-js.vercel.app/product/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["product",":id"],"variable":[{"id":"fe735d7d-44b9-437b-8c22-d9d4cae4be66","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d3","description":"Product MongoDB ObjectId"}]},"description":"Update an existing product.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Product MongoDB ObjectId |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string (form-data) | Optional, Length 2-25 |\n| description | string (form-data) | Optional, Min 5 characters |\n| price | number (form-data) | Optional, Min 0 |\n| discount | number (form-data) | Optional, Min 0, Max 100 |\n| stock | number (form-data) | Optional, Min 0 |\n| brandId | MongoId (form-data) | Optional, Must be a valid existing Brand |\n| categoryId | MongoId (form-data) | Optional, Must be a valid existing Category |\n| mainImage | File (form-data) | Optional, Max 1 file, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n| subImages | File[] (form-data) | Optional, Max 5 files, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- Cannot use the same old name\n- If new mainImage provided, old one is deleted from S3\n- If new subImages provided, all old sub images are deleted from S3\n- If update fails, newly uploaded images are deleted from S3\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Product Not Found\"\n}"},{"id":"6243226d-52fa-4a00-92b3-90eae077d6f0","name":"409 - Same Old Name","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Diaa Product Updated","type":"text","description":"Optional, string, Length 2-25"},{"key":"description","value":"Updated description","type":"text","description":"Optional, string, Min 5 characters"},{"key":"price","value":"350","type":"text","description":"Optional, number, Min 0"},{"key":"discount","value":"15","type":"text","description":"Optional, number, Min 0, Max 100"},{"key":"stock","value":"40","type":"text","description":"Optional, number, Min 0"},{"key":"brandId","value":"64f1a2b3c4d5e6f7a8b9c0d1","type":"text","description":"Optional, valid Brand MongoDB ObjectId"},{"key":"categoryId","value":"64f1a2b3c4d5e6f7a8b9c0d2","type":"text","description":"Optional, valid Category MongoDB ObjectId"},{"key":"mainImage","type":"file","description":"Optional, New main image (Max 1 file)","value":null},{"key":"subImages","type":"file","description":"Optional, New sub images (Max 5 files)","value":null}]},"url":{"raw":"https://e-commerce-nest-js.vercel.app/product/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["product",":id"],"variable":[{"id":"fe735d7d-44b9-437b-8c22-d9d4cae4be66","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d3","description":"Product MongoDB ObjectId"}]},"description":"Update an existing product.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Product MongoDB ObjectId |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string (form-data) | Optional, Length 2-25 |\n| description | string (form-data) | Optional, Min 5 characters |\n| price | number (form-data) | Optional, Min 0 |\n| discount | number (form-data) | Optional, Min 0, Max 100 |\n| stock | number (form-data) | Optional, Min 0 |\n| brandId | MongoId (form-data) | Optional, Must be a valid existing Brand |\n| categoryId | MongoId (form-data) | Optional, Must be a valid existing Category |\n| mainImage | File (form-data) | Optional, Max 1 file, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n| subImages | File[] (form-data) | Optional, Max 5 files, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- Cannot use the same old name\n- If new mainImage provided, old one is deleted from S3\n- If new subImages provided, all old sub images are deleted from S3\n- If update fails, newly uploaded images are deleted from S3\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Conflict","code":409,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 409,\n  \"message\": \"You Cant Put The Same Old Name\"\n}"},{"id":"aab84985-eac0-47cd-af70-5a769d48e395","name":"429 - Too Many Requests","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Diaa Product Updated","type":"text","description":"Optional, string, Length 2-25"},{"key":"description","value":"Updated description","type":"text","description":"Optional, string, Min 5 characters"},{"key":"price","value":"350","type":"text","description":"Optional, number, Min 0"},{"key":"discount","value":"15","type":"text","description":"Optional, number, Min 0, Max 100"},{"key":"stock","value":"40","type":"text","description":"Optional, number, Min 0"},{"key":"brandId","value":"64f1a2b3c4d5e6f7a8b9c0d1","type":"text","description":"Optional, valid Brand MongoDB ObjectId"},{"key":"categoryId","value":"64f1a2b3c4d5e6f7a8b9c0d2","type":"text","description":"Optional, valid Category MongoDB ObjectId"},{"key":"mainImage","type":"file","description":"Optional, New main image (Max 1 file)","value":null},{"key":"subImages","type":"file","description":"Optional, New sub images (Max 5 files)","value":null}]},"url":{"raw":"https://e-commerce-nest-js.vercel.app/product/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["product",":id"],"variable":[{"id":"fe735d7d-44b9-437b-8c22-d9d4cae4be66","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d3","description":"Product MongoDB ObjectId"}]},"description":"Update an existing product.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Product MongoDB ObjectId |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| name | string (form-data) | Optional, Length 2-25 |\n| description | string (form-data) | Optional, Min 5 characters |\n| price | number (form-data) | Optional, Min 0 |\n| discount | number (form-data) | Optional, Min 0, Max 100 |\n| stock | number (form-data) | Optional, Min 0 |\n| brandId | MongoId (form-data) | Optional, Must be a valid existing Brand |\n| categoryId | MongoId (form-data) | Optional, Must be a valid existing Category |\n| mainImage | File (form-data) | Optional, Max 1 file, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n| subImages | File[] (form-data) | Optional, Max 5 files, Accepted: `image/png`, `image/jpeg`, `image/webp`, `image/jpg` |\n\n**Notes:**\n- Cannot use the same old name\n- If new mainImage provided, old one is deleted from S3\n- If new subImages provided, all old sub images are deleted from S3\n- If update fails, newly uploaded images are deleted from S3\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"37a0fb98-4fa4-4e87-aa0d-4057a36146ea"},{"name":"Get All Products","id":"3af3ac88-090f-4253-9c74-2f9fbd35d9af","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://e-commerce-nest-js.vercel.app/product?page=1&limit=10&search=diaa","description":"<p>Get all products with pagination, search, and populated brand and category.</p>\n<p><strong>Auth:</strong> None required</p>\n<p><strong>Query Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Type</th>\n<th>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>page</td>\n<td>number</td>\n<td>Optional, Default: 1</td>\n</tr>\n<tr>\n<td>limit</td>\n<td>number</td>\n<td>Optional, Default: 10</td>\n</tr>\n<tr>\n<td>search</td>\n<td>string</td>\n<td>Optional, Searches in <code>name</code> and <code>description</code></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>Soft-deleted products are excluded</li>\n<li>Brand populated with: <code>name</code>, <code>slug</code>, <code>logo</code></li>\n<li>Category populated with: <code>name</code>, <code>slug</code>, <code>image</code></li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["product"],"host":["e-commerce-nest-js","vercel","app"],"query":[{"description":{"content":"<p>Optional, Page number (default: 1)</p>\n","type":"text/plain"},"key":"page","value":"1"},{"description":{"content":"<p>Optional, Items per page (default: 10)</p>\n","type":"text/plain"},"key":"limit","value":"10"},{"description":{"content":"<p>Optional, Search by name or description</p>\n","type":"text/plain"},"key":"search","value":"diaa"}],"variable":[]}},"response":[{"id":"fba9c285-a37d-4c1a-830f-e68f5ea140ed","name":"200 - Products List","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://e-commerce-nest-js.vercel.app/product?page=1&limit=10&search=diaa","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["product"],"query":[{"key":"page","value":"1","description":"Optional, Page number (default: 1)"},{"key":"limit","value":"10","description":"Optional, Items per page (default: 10)"},{"key":"search","value":"diaa","description":"Optional, Search by name or description"}]},"description":"Get all products with pagination, search, and populated brand and category.\n\n**Auth:** None required\n\n**Query Params:**\n\n| Param | Type | Rules |\n|---|---|---|\n| page | number | Optional, Default: 1 |\n| limit | number | Optional, Default: 10 |\n| search | string | Optional, Searches in `name` and `description` |\n\n**Notes:**\n- Soft-deleted products are excluded\n- Brand populated with: `name`, `slug`, `logo`\n- Category populated with: `name`, `slug`, `image`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"meta\": {\n    \"currentPage\": 1,\n    \"totalPages\": 5,\n    \"limit\": 10,\n    \"totalDocs\": 50\n  },\n  \"data\": [\n    {\n      \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d3\",\n      \"name\": \"Diaa Product\",\n      \"slug\": \"diaa-product\",\n      \"price\": 299,\n      \"discount\": 10,\n      \"stock\": 50,\n      \"mainImage\": \"ecommerce_app/products/main/uuid_____main.jpg\",\n      \"subImages\": [],\n      \"brandId\": { \"name\": \"Diaa Brand\", \"slug\": \"diaa-brand\", \"logo\": \"...\" },\n      \"categoryId\": { \"name\": \"Diaa Category\", \"slug\": \"diaa-category\", \"image\": \"...\" }\n    }\n  ]\n}"},{"id":"e5e45d00-c44a-4cf9-bf13-7b91927074a5","name":"429 - Too Many Requests","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://e-commerce-nest-js.vercel.app/product?page=1&limit=10&search=diaa","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["product"],"query":[{"key":"page","value":"1","description":"Optional, Page number (default: 1)"},{"key":"limit","value":"10","description":"Optional, Items per page (default: 10)"},{"key":"search","value":"diaa","description":"Optional, Search by name or description"}]},"description":"Get all products with pagination, search, and populated brand and category.\n\n**Auth:** None required\n\n**Query Params:**\n\n| Param | Type | Rules |\n|---|---|---|\n| page | number | Optional, Default: 1 |\n| limit | number | Optional, Default: 10 |\n| search | string | Optional, Searches in `name` and `description` |\n\n**Notes:**\n- Soft-deleted products are excluded\n- Brand populated with: `name`, `slug`, `logo`\n- Category populated with: `name`, `slug`, `image`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"3af3ac88-090f-4253-9c74-2f9fbd35d9af"},{"name":"Delete Product (Admin Only)","id":"e5b95646-51b1-4245-a30d-c09617041111","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - Admin only</p>\n"}],"url":"https://e-commerce-nest-js.vercel.app/product/:productId","description":"<p>Soft delete a product.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>admin</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>productId</td>\n<td>Product MongoDB ObjectId</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>This is a <strong>soft delete</strong> (sets <code>deletedAt</code> field, does not remove from DB)</li>\n<li>Deleted product will not appear in <code>getProducts</code> results</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["product",":productId"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[{"id":"7dc1f71e-3e56-4125-a885-85a3b3e8f152","description":{"content":"<p>Product MongoDB ObjectId</p>\n","type":"text/plain"},"type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d3","key":"productId"}]}},"response":[{"id":"de4e9eb9-5dc2-4e78-b25c-88e73b987d72","name":"200 - Product Deleted","originalRequest":{"method":"DELETE","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/product/:productId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["product",":productId"],"variable":[{"id":"7dc1f71e-3e56-4125-a885-85a3b3e8f152","key":"productId","value":"64f1a2b3c4d5e6f7a8b9c0d3","description":"Product MongoDB ObjectId"}]},"description":"Soft delete a product.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| productId | Product MongoDB ObjectId |\n\n**Notes:**\n- This is a **soft delete** (sets `deletedAt` field, does not remove from DB)\n- Deleted product will not appear in `getProducts` results\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Product Deleted Successfully\"\n}"},{"id":"46c24f19-c00c-4dfb-a918-47bae92483e8","name":"404 - Product Not Found","originalRequest":{"method":"DELETE","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/product/:productId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["product",":productId"],"variable":[{"id":"7dc1f71e-3e56-4125-a885-85a3b3e8f152","key":"productId","value":"64f1a2b3c4d5e6f7a8b9c0d3","description":"Product MongoDB ObjectId"}]},"description":"Soft delete a product.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| productId | Product MongoDB ObjectId |\n\n**Notes:**\n- This is a **soft delete** (sets `deletedAt` field, does not remove from DB)\n- Deleted product will not appear in `getProducts` results\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Product Not Found\"\n}"},{"id":"fc41c860-7d63-4e3e-8c1b-738edf5f84ea","name":"429 - Too Many Requests","originalRequest":{"method":"DELETE","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/product/:productId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["product",":productId"],"variable":[{"id":"7dc1f71e-3e56-4125-a885-85a3b3e8f152","key":"productId","value":"64f1a2b3c4d5e6f7a8b9c0d3","description":"Product MongoDB ObjectId"}]},"description":"Soft delete a product.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| productId | Product MongoDB ObjectId |\n\n**Notes:**\n- This is a **soft delete** (sets `deletedAt` field, does not remove from DB)\n- Deleted product will not appear in `getProducts` results\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"e5b95646-51b1-4245-a30d-c09617041111"},{"name":"Toggle Wishlist","id":"f2928946-ae26-482a-9218-03185ddd84bc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required)</p>\n"}],"url":"https://e-commerce-nest-js.vercel.app/product/wishList/:id","description":"<p>Toggle a product in the authenticated user's wishlist. If it exists it gets removed, if it doesn't exist it gets added.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>Product MongoDB ObjectId</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>No body required</li>\n<li>Acts as a toggle: adds if not in wishlist, removes if already in wishlist</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["product","wishList",":id"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[{"id":"454a9719-7938-4e71-b02c-2faebbebccda","description":{"content":"<p>Product MongoDB ObjectId</p>\n","type":"text/plain"},"type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d3","key":"id"}]}},"response":[{"id":"a4ecd79f-0899-4868-b97f-114d5e4628c6","name":"200 - Added to Wishlist","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/product/wishList/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["product","wishList",":id"],"variable":[{"id":"454a9719-7938-4e71-b02c-2faebbebccda","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d3","description":"Product MongoDB ObjectId"}]},"description":"Toggle a product in the authenticated user's wishlist. If it exists it gets removed, if it doesn't exist it gets added.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Product MongoDB ObjectId |\n\n**Notes:**\n- No body required\n- Acts as a toggle: adds if not in wishlist, removes if already in wishlist\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"added to wishList\"\n}"},{"id":"611a9b33-af50-468c-a2f9-1b1ed506738f","name":"200 - Removed from Wishlist","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/product/wishList/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["product","wishList",":id"],"variable":[{"id":"454a9719-7938-4e71-b02c-2faebbebccda","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d3","description":"Product MongoDB ObjectId"}]},"description":"Toggle a product in the authenticated user's wishlist. If it exists it gets removed, if it doesn't exist it gets added.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Product MongoDB ObjectId |\n\n**Notes:**\n- No body required\n- Acts as a toggle: adds if not in wishlist, removes if already in wishlist\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"remove from wishList\"\n}"},{"id":"c5d44ff9-c994-457c-9cae-39cfeccb657f","name":"404 - Product Not Found","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/product/wishList/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["product","wishList",":id"],"variable":[{"id":"454a9719-7938-4e71-b02c-2faebbebccda","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d3","description":"Product MongoDB ObjectId"}]},"description":"Toggle a product in the authenticated user's wishlist. If it exists it gets removed, if it doesn't exist it gets added.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Product MongoDB ObjectId |\n\n**Notes:**\n- No body required\n- Acts as a toggle: adds if not in wishlist, removes if already in wishlist\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Product Not Found\"\n}"},{"id":"8f5f70b1-312f-4c9b-b244-ebe3995feaf7","name":"429 - Too Many Requests","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required)"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/product/wishList/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["product","wishList",":id"],"variable":[{"id":"454a9719-7938-4e71-b02c-2faebbebccda","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d3","description":"Product MongoDB ObjectId"}]},"description":"Toggle a product in the authenticated user's wishlist. If it exists it gets removed, if it doesn't exist it gets added.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Product MongoDB ObjectId |\n\n**Notes:**\n- No body required\n- Acts as a toggle: adds if not in wishlist, removes if already in wishlist\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"f2928946-ae26-482a-9218-03185ddd84bc"}],"id":"363425fa-c512-48e0-963c-d96769c5a0df","description":"<p>Endpoints for product management. All write operations are Admin only.</p>\n","_postman_id":"363425fa-c512-48e0-963c-d96769c5a0df"},{"name":"Cart","item":[{"name":"Add To Cart","id":"b24a4d91-0bad-4c33-a0a6-bac3ccc8d461","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - User only</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"productId\": \"64f1a2b3c4d5e6f7a8b9c0d3\",\n  \"quantity\": 2\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/cart","description":"<p>Add a product to the user's cart. If cart doesn't exist, a new one is created. If product already exists in cart, quantity is increased.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>user</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>productId</td>\n<td>MongoId</td>\n<td>Required, Must be a valid existing Product</td>\n</tr>\n<tr>\n<td>quantity</td>\n<td>integer</td>\n<td>Required, Min 1</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li><code>finalPrice</code> is calculated as <code>price - discount</code></li>\n<li><code>subTotal</code> is updated automatically</li>\n<li>Stock is validated before adding</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["cart"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"078da9f5-bad5-49ab-b76d-8df6b59da5e6","name":"201 - Added To Cart","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"productId\": \"64f1a2b3c4d5e6f7a8b9c0d3\",\n  \"quantity\": 2\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/cart","description":"Add a product to the user's cart. If cart doesn't exist, a new one is created. If product already exists in cart, quantity is increased.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| productId | MongoId | Required, Must be a valid existing Product |\n| quantity | integer | Required, Min 1 |\n\n**Notes:**\n- `finalPrice` is calculated as `price - discount`\n- `subTotal` is updated automatically\n- Stock is validated before adding\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Created","code":201,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d4\",\n  \"createdBy\": \"64f1a2b3c4d5e6f7a8b9c0d1\",\n  \"products\": [\n    {\n      \"productId\": \"64f1a2b3c4d5e6f7a8b9c0d3\",\n      \"quantity\": 2,\n      \"finalPrice\": 289\n    }\n  ],\n  \"subTotal\": 578,\n  \"isOrdered\": false\n}"},{"id":"358156dd-de40-4443-ac74-fe2ad500432c","name":"400 - Insufficient Stock","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"productId\": \"64f1a2b3c4d5e6f7a8b9c0d3\",\n  \"quantity\": 2\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/cart","description":"Add a product to the user's cart. If cart doesn't exist, a new one is created. If product already exists in cart, quantity is increased.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| productId | MongoId | Required, Must be a valid existing Product |\n| quantity | integer | Required, Min 1 |\n\n**Notes:**\n- `finalPrice` is calculated as `price - discount`\n- `subTotal` is updated automatically\n- Stock is validated before adding\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 400,\n  \"message\": \"Insufficient Stock\"\n}"},{"id":"63296c91-8214-47df-bdd8-7108a0ac1747","name":"404 - Product Not Found","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"productId\": \"64f1a2b3c4d5e6f7a8b9c0d3\",\n  \"quantity\": 2\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/cart","description":"Add a product to the user's cart. If cart doesn't exist, a new one is created. If product already exists in cart, quantity is increased.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| productId | MongoId | Required, Must be a valid existing Product |\n| quantity | integer | Required, Min 1 |\n\n**Notes:**\n- `finalPrice` is calculated as `price - discount`\n- `subTotal` is updated automatically\n- Stock is validated before adding\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Product Not Found\"\n}"},{"id":"5bf9a6f1-aca6-499d-9daf-208edc658cbc","name":"429 - Too Many Requests","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"productId\": \"64f1a2b3c4d5e6f7a8b9c0d3\",\n  \"quantity\": 2\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/cart","description":"Add a product to the user's cart. If cart doesn't exist, a new one is created. If product already exists in cart, quantity is increased.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| productId | MongoId | Required, Must be a valid existing Product |\n| quantity | integer | Required, Min 1 |\n\n**Notes:**\n- `finalPrice` is calculated as `price - discount`\n- `subTotal` is updated automatically\n- Stock is validated before adding\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"b24a4d91-0bad-4c33-a0a6-bac3ccc8d461"},{"name":"Get Cart","id":"6a14bc55-396b-496e-a022-302394619231","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - User only</p>\n"}],"url":"https://e-commerce-nest-js.vercel.app/cart","description":"<p>Get the authenticated user's active cart with populated product details.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>user</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>Returns <code>{ subTotal: 0, products: [] }</code> if no active cart exists</li>\n<li>Products populated with: <code>name</code>, <code>slug</code>, <code>mainImage</code>, <code>price</code>, <code>discount</code>, <code>stock</code></li>\n<li>Only returns carts where <code>isOrdered: false</code></li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["cart"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"8655c08c-0d12-4fbe-a9a9-c7115bfa1514","name":"200 - Cart Data","originalRequest":{"method":"GET","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":"https://e-commerce-nest-js.vercel.app/cart","description":"Get the authenticated user's active cart with populated product details.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Notes:**\n- Returns `{ subTotal: 0, products: [] }` if no active cart exists\n- Products populated with: `name`, `slug`, `mainImage`, `price`, `discount`, `stock`\n- Only returns carts where `isOrdered: false`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d4\",\n  \"createdBy\": \"64f1a2b3c4d5e6f7a8b9c0d1\",\n  \"products\": [\n    {\n      \"productId\": {\n        \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d3\",\n        \"name\": \"Diaa Product\",\n        \"slug\": \"diaa-product\",\n        \"mainImage\": \"ecommerce_app/products/main/uuid_____main.jpg\",\n        \"price\": 299,\n        \"discount\": 10,\n        \"stock\": 50\n      },\n      \"quantity\": 2,\n      \"finalPrice\": 289\n    }\n  ],\n  \"subTotal\": 578,\n  \"isOrdered\": false\n}"},{"id":"54569d34-6db9-4b7f-9ad0-83310024b46f","name":"200 - Empty Cart","originalRequest":{"method":"GET","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":"https://e-commerce-nest-js.vercel.app/cart","description":"Get the authenticated user's active cart with populated product details.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Notes:**\n- Returns `{ subTotal: 0, products: [] }` if no active cart exists\n- Products populated with: `name`, `slug`, `mainImage`, `price`, `discount`, `stock`\n- Only returns carts where `isOrdered: false`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"subTotal\": 0,\n  \"products\": []\n}"},{"id":"25568f0a-2b1d-4c27-b85b-b56c49fa3f21","name":"429 - Too Many Requests","originalRequest":{"method":"GET","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":"https://e-commerce-nest-js.vercel.app/cart","description":"Get the authenticated user's active cart with populated product details.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Notes:**\n- Returns `{ subTotal: 0, products: [] }` if no active cart exists\n- Products populated with: `name`, `slug`, `mainImage`, `price`, `discount`, `stock`\n- Only returns carts where `isOrdered: false`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"6a14bc55-396b-496e-a022-302394619231"},{"name":"Update Quantity","id":"4d3f2dda-f8ad-4ce9-b6fa-e99d34922c04","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - User only</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"productId\": \"64f1a2b3c4d5e6f7a8b9c0d3\",\n  \"quantity\": 5\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/cart/quantity","description":"<p>Set a specific quantity for a product in the cart.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>user</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>productId</td>\n<td>MongoId</td>\n<td>Required, Product must exist in cart</td>\n</tr>\n<tr>\n<td>quantity</td>\n<td>integer</td>\n<td>Required, Min 1</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>Replaces the current quantity (not incremental)</li>\n<li>Stock is validated</li>\n<li><code>finalPrice</code> is recalculated from current product price</li>\n<li><code>subTotal</code> is updated automatically</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["cart","quantity"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"18d296d9-af16-4a35-9b17-99fb5886bdc3","name":"200 - Quantity Updated","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"productId\": \"64f1a2b3c4d5e6f7a8b9c0d3\",\n  \"quantity\": 5\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/cart/quantity","description":"Set a specific quantity for a product in the cart.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| productId | MongoId | Required, Product must exist in cart |\n| quantity | integer | Required, Min 1 |\n\n**Notes:**\n- Replaces the current quantity (not incremental)\n- Stock is validated\n- `finalPrice` is recalculated from current product price\n- `subTotal` is updated automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d4\",\n  \"products\": [\n    {\n      \"productId\": \"64f1a2b3c4d5e6f7a8b9c0d3\",\n      \"quantity\": 5,\n      \"finalPrice\": 289\n    }\n  ],\n  \"subTotal\": 1445\n}"},{"id":"3960088b-0bda-4d14-8399-3313bb253367","name":"400 - Insufficient Stock","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"productId\": \"64f1a2b3c4d5e6f7a8b9c0d3\",\n  \"quantity\": 5\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/cart/quantity","description":"Set a specific quantity for a product in the cart.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| productId | MongoId | Required, Product must exist in cart |\n| quantity | integer | Required, Min 1 |\n\n**Notes:**\n- Replaces the current quantity (not incremental)\n- Stock is validated\n- `finalPrice` is recalculated from current product price\n- `subTotal` is updated automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 400,\n  \"message\": \"Insufficient Stock\"\n}"},{"id":"4c81efd3-72b8-4a4c-b7a2-5533d3c600f4","name":"404 - Product Not Found In Cart","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"productId\": \"64f1a2b3c4d5e6f7a8b9c0d3\",\n  \"quantity\": 5\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/cart/quantity","description":"Set a specific quantity for a product in the cart.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| productId | MongoId | Required, Product must exist in cart |\n| quantity | integer | Required, Min 1 |\n\n**Notes:**\n- Replaces the current quantity (not incremental)\n- Stock is validated\n- `finalPrice` is recalculated from current product price\n- `subTotal` is updated automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Product Not Found In Cart\"\n}"},{"id":"d547a1e5-7227-417e-a0ce-ae181f695f06","name":"429 - Too Many Requests","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"productId\": \"64f1a2b3c4d5e6f7a8b9c0d3\",\n  \"quantity\": 5\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/cart/quantity","description":"Set a specific quantity for a product in the cart.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| productId | MongoId | Required, Product must exist in cart |\n| quantity | integer | Required, Min 1 |\n\n**Notes:**\n- Replaces the current quantity (not incremental)\n- Stock is validated\n- `finalPrice` is recalculated from current product price\n- `subTotal` is updated automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"4d3f2dda-f8ad-4ce9-b6fa-e99d34922c04"},{"name":"Increase Quantity","id":"20342471-eaa4-43f4-848d-6f92562aaee4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - User only</p>\n"}],"url":"https://e-commerce-nest-js.vercel.app/cart/increase/:productId","description":"<p>Increase the quantity of a product in the cart by 1.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>user</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>productId</td>\n<td>Product MongoDB ObjectId (must exist in cart)</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>Increases quantity by exactly 1</li>\n<li>Cannot exceed available stock</li>\n<li><code>subTotal</code> is updated automatically</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["cart","increase",":productId"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[{"id":"a5911709-ee68-467f-b7a1-66fcac1e1176","description":{"content":"<p>Product MongoDB ObjectId</p>\n","type":"text/plain"},"type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d3","key":"productId"}]}},"response":[{"id":"e115e588-12f4-47b5-b4f3-8e8abb81c1b4","name":"200 - Quantity Increased","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/cart/increase/:productId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["cart","increase",":productId"],"variable":[{"id":"a5911709-ee68-467f-b7a1-66fcac1e1176","key":"productId","value":"64f1a2b3c4d5e6f7a8b9c0d3","description":"Product MongoDB ObjectId"}]},"description":"Increase the quantity of a product in the cart by 1.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| productId | Product MongoDB ObjectId (must exist in cart) |\n\n**Notes:**\n- Increases quantity by exactly 1\n- Cannot exceed available stock\n- `subTotal` is updated automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d4\",\n  \"products\": [\n    {\n      \"productId\": \"64f1a2b3c4d5e6f7a8b9c0d3\",\n      \"quantity\": 3,\n      \"finalPrice\": 289\n    }\n  ],\n  \"subTotal\": 867\n}"},{"id":"42aae6d0-481b-4015-9258-ab797f285f6b","name":"400 - Insufficient Stock","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/cart/increase/:productId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["cart","increase",":productId"],"variable":[{"id":"a5911709-ee68-467f-b7a1-66fcac1e1176","key":"productId","value":"64f1a2b3c4d5e6f7a8b9c0d3","description":"Product MongoDB ObjectId"}]},"description":"Increase the quantity of a product in the cart by 1.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| productId | Product MongoDB ObjectId (must exist in cart) |\n\n**Notes:**\n- Increases quantity by exactly 1\n- Cannot exceed available stock\n- `subTotal` is updated automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 400,\n  \"message\": \"Insufficient Stock\"\n}"},{"id":"deac6737-dcd0-4473-bfbc-62edef26764f","name":"404 - Product Not Found In Cart","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/cart/increase/:productId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["cart","increase",":productId"],"variable":[{"id":"a5911709-ee68-467f-b7a1-66fcac1e1176","key":"productId","value":"64f1a2b3c4d5e6f7a8b9c0d3","description":"Product MongoDB ObjectId"}]},"description":"Increase the quantity of a product in the cart by 1.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| productId | Product MongoDB ObjectId (must exist in cart) |\n\n**Notes:**\n- Increases quantity by exactly 1\n- Cannot exceed available stock\n- `subTotal` is updated automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Product Not Found In Cart\"\n}"},{"id":"21d98844-55c6-4f3c-9382-b27cbcdd6c9d","name":"429 - Too Many Requests","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/cart/increase/:productId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["cart","increase",":productId"],"variable":[{"id":"a5911709-ee68-467f-b7a1-66fcac1e1176","key":"productId","value":"64f1a2b3c4d5e6f7a8b9c0d3","description":"Product MongoDB ObjectId"}]},"description":"Increase the quantity of a product in the cart by 1.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| productId | Product MongoDB ObjectId (must exist in cart) |\n\n**Notes:**\n- Increases quantity by exactly 1\n- Cannot exceed available stock\n- `subTotal` is updated automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"20342471-eaa4-43f4-848d-6f92562aaee4"},{"name":"Decrease Quantity","id":"0de71845-b70f-4491-a3c2-4bb1e033aa51","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - User only</p>\n"}],"url":"https://e-commerce-nest-js.vercel.app/cart/decrease/:productId","description":"<p>Decrease the quantity of a product in the cart by 1.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>user</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>productId</td>\n<td>Product MongoDB ObjectId (must exist in cart)</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>Decreases quantity by exactly 1</li>\n<li>Cannot go below 1 (use Remove Product instead)</li>\n<li><code>subTotal</code> is updated automatically</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["cart","decrease",":productId"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[{"id":"ea18de25-88e6-419f-bcd2-450ab7845ff6","description":{"content":"<p>Product MongoDB ObjectId</p>\n","type":"text/plain"},"type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d3","key":"productId"}]}},"response":[{"id":"6e8d2b7e-7008-4b18-a261-54ab742037ed","name":"200 - Quantity Decreased","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/cart/decrease/:productId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["cart","decrease",":productId"],"variable":[{"id":"ea18de25-88e6-419f-bcd2-450ab7845ff6","key":"productId","value":"64f1a2b3c4d5e6f7a8b9c0d3","description":"Product MongoDB ObjectId"}]},"description":"Decrease the quantity of a product in the cart by 1.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| productId | Product MongoDB ObjectId (must exist in cart) |\n\n**Notes:**\n- Decreases quantity by exactly 1\n- Cannot go below 1 (use Remove Product instead)\n- `subTotal` is updated automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d4\",\n  \"products\": [\n    {\n      \"productId\": \"64f1a2b3c4d5e6f7a8b9c0d3\",\n      \"quantity\": 1,\n      \"finalPrice\": 289\n    }\n  ],\n  \"subTotal\": 289\n}"},{"id":"37efc433-e2d3-43c1-af46-2d4c2b73dda7","name":"400 - Quantity Cannot Be Less Than One","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/cart/decrease/:productId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["cart","decrease",":productId"],"variable":[{"id":"ea18de25-88e6-419f-bcd2-450ab7845ff6","key":"productId","value":"64f1a2b3c4d5e6f7a8b9c0d3","description":"Product MongoDB ObjectId"}]},"description":"Decrease the quantity of a product in the cart by 1.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| productId | Product MongoDB ObjectId (must exist in cart) |\n\n**Notes:**\n- Decreases quantity by exactly 1\n- Cannot go below 1 (use Remove Product instead)\n- `subTotal` is updated automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 400,\n  \"message\": \"Quantity Cannot Be Less Than One, Use Remove Instead\"\n}"},{"id":"b591e0f7-82c1-4316-8abd-6c72f60b4bf1","name":"404 - Product Not Found In Cart","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/cart/decrease/:productId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["cart","decrease",":productId"],"variable":[{"id":"ea18de25-88e6-419f-bcd2-450ab7845ff6","key":"productId","value":"64f1a2b3c4d5e6f7a8b9c0d3","description":"Product MongoDB ObjectId"}]},"description":"Decrease the quantity of a product in the cart by 1.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| productId | Product MongoDB ObjectId (must exist in cart) |\n\n**Notes:**\n- Decreases quantity by exactly 1\n- Cannot go below 1 (use Remove Product instead)\n- `subTotal` is updated automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Product Not Found In Cart\"\n}"},{"id":"da522153-6b8f-4ab9-8c50-13b473dd6831","name":"429 - Too Many Requests","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/cart/decrease/:productId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["cart","decrease",":productId"],"variable":[{"id":"ea18de25-88e6-419f-bcd2-450ab7845ff6","key":"productId","value":"64f1a2b3c4d5e6f7a8b9c0d3","description":"Product MongoDB ObjectId"}]},"description":"Decrease the quantity of a product in the cart by 1.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| productId | Product MongoDB ObjectId (must exist in cart) |\n\n**Notes:**\n- Decreases quantity by exactly 1\n- Cannot go below 1 (use Remove Product instead)\n- `subTotal` is updated automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"0de71845-b70f-4491-a3c2-4bb1e033aa51"},{"name":"Remove Product From Cart","id":"6265ddcc-5f1f-4a43-abe5-f8a54da0b2e2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - User only</p>\n"}],"url":"https://e-commerce-nest-js.vercel.app/cart/:productId","description":"<p>Remove a specific product from the cart completely.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>user</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>productId</td>\n<td>Product MongoDB ObjectId (must exist in cart)</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>Removes the product entirely regardless of quantity</li>\n<li><code>subTotal</code> is updated automatically</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["cart",":productId"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[{"id":"b926a5bb-5207-40e2-a004-fb5d524017d1","description":{"content":"<p>Product MongoDB ObjectId</p>\n","type":"text/plain"},"type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d3","key":"productId"}]}},"response":[{"id":"57ae2ecf-ec24-4ef9-ab95-05fade4c641a","name":"200 - Product Removed","originalRequest":{"method":"DELETE","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/cart/:productId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["cart",":productId"],"variable":[{"id":"b926a5bb-5207-40e2-a004-fb5d524017d1","key":"productId","value":"64f1a2b3c4d5e6f7a8b9c0d3","description":"Product MongoDB ObjectId"}]},"description":"Remove a specific product from the cart completely.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| productId | Product MongoDB ObjectId (must exist in cart) |\n\n**Notes:**\n- Removes the product entirely regardless of quantity\n- `subTotal` is updated automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d4\",\n  \"products\": [],\n  \"subTotal\": 0\n}"},{"id":"ab460152-0aea-4638-806d-db46aa346730","name":"404 - Product Not Found In Cart","originalRequest":{"method":"DELETE","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/cart/:productId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["cart",":productId"],"variable":[{"id":"b926a5bb-5207-40e2-a004-fb5d524017d1","key":"productId","value":"64f1a2b3c4d5e6f7a8b9c0d3","description":"Product MongoDB ObjectId"}]},"description":"Remove a specific product from the cart completely.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| productId | Product MongoDB ObjectId (must exist in cart) |\n\n**Notes:**\n- Removes the product entirely regardless of quantity\n- `subTotal` is updated automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Product Not Found In Cart\"\n}"},{"id":"11b022f8-b39d-45a0-8f67-0989bbdf78a5","name":"429 - Too Many Requests","originalRequest":{"method":"DELETE","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/cart/:productId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["cart",":productId"],"variable":[{"id":"b926a5bb-5207-40e2-a004-fb5d524017d1","key":"productId","value":"64f1a2b3c4d5e6f7a8b9c0d3","description":"Product MongoDB ObjectId"}]},"description":"Remove a specific product from the cart completely.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| productId | Product MongoDB ObjectId (must exist in cart) |\n\n**Notes:**\n- Removes the product entirely regardless of quantity\n- `subTotal` is updated automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"6265ddcc-5f1f-4a43-abe5-f8a54da0b2e2"},{"name":"Clear Cart","id":"82bfb77a-b24f-4057-a3de-be5efcc77d75","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - User only</p>\n"}],"url":"https://e-commerce-nest-js.vercel.app/cart","description":"<p>Remove all products from the cart at once.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>user</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>Clears all products and resets <code>subTotal</code> to 0</li>\n<li>Cart document remains (not deleted)</li>\n<li>No body required</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["cart"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"8a3bd73f-ef83-4b34-870e-08fbb655cbe5","name":"200 - Cart Cleared","originalRequest":{"method":"DELETE","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":"https://e-commerce-nest-js.vercel.app/cart","description":"Remove all products from the cart at once.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Notes:**\n- Clears all products and resets `subTotal` to 0\n- Cart document remains (not deleted)\n- No body required\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Cart Cleared Successfully\"\n}"},{"id":"c596aec9-b415-4473-bfd8-a4694d556c3b","name":"404 - Cart Not Found","originalRequest":{"method":"DELETE","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":"https://e-commerce-nest-js.vercel.app/cart","description":"Remove all products from the cart at once.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Notes:**\n- Clears all products and resets `subTotal` to 0\n- Cart document remains (not deleted)\n- No body required\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Cart Not Found\"\n}"},{"id":"6851fe80-2489-483a-99e2-5f210b30edc9","name":"429 - Too Many Requests","originalRequest":{"method":"DELETE","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":"https://e-commerce-nest-js.vercel.app/cart","description":"Remove all products from the cart at once.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Notes:**\n- Clears all products and resets `subTotal` to 0\n- Cart document remains (not deleted)\n- No body required\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"82bfb77a-b24f-4057-a3de-be5efcc77d75"}],"id":"3df426b3-0f3c-4392-8359-4d75c5d9c11f","description":"<p>Endpoints for cart management. All endpoints are User only.</p>\n","_postman_id":"3df426b3-0f3c-4392-8359-4d75c5d9c11f"},{"name":"Coupon","item":[{"name":"Create Coupon (Admin Only)","id":"5e86f541-ceec-4451-b889-5cdcf0e019db","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - Admin only</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"code\": \"DIAA23\",\n  \"amount\": 20,\n  \"fromDate\": \"2026-08-01\",\n  \"toDate\": \"2026-09-01\",\n  \"minOrderPrice\": 100,\n  \"isActive\": true\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/coupon","description":"<p>Create a new discount coupon.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>admin</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>code</td>\n<td>string</td>\n<td>Required, Unique, stored lowercase</td>\n</tr>\n<tr>\n<td>amount</td>\n<td>integer</td>\n<td>Required, Min 1, Max 100 (percentage)</td>\n</tr>\n<tr>\n<td>fromDate</td>\n<td>Date</td>\n<td>Required, Must be today or future</td>\n</tr>\n<tr>\n<td>toDate</td>\n<td>Date</td>\n<td>Required, Must be greater than <code>fromDate</code></td>\n</tr>\n<tr>\n<td>minOrderPrice</td>\n<td>integer</td>\n<td>Optional, Min 0, Default: 0</td>\n</tr>\n<tr>\n<td>isActive</td>\n<td>boolean</td>\n<td>Optional, Default: true</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li><code>code</code> is stored in lowercase</li>\n<li><code>amount</code> represents a percentage discount</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["coupon"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"009677c4-0d3c-4c2c-abef-906a34a83149","name":"201 - Coupon Created","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"code\": \"DIAA23\",\n  \"amount\": 20,\n  \"fromDate\": \"2026-08-01\",\n  \"toDate\": \"2026-09-01\",\n  \"minOrderPrice\": 100,\n  \"isActive\": true\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/coupon","description":"Create a new discount coupon.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| code | string | Required, Unique, stored lowercase |\n| amount | integer | Required, Min 1, Max 100 (percentage) |\n| fromDate | Date | Required, Must be today or future |\n| toDate | Date | Required, Must be greater than `fromDate` |\n| minOrderPrice | integer | Optional, Min 0, Default: 0 |\n| isActive | boolean | Optional, Default: true |\n\n**Notes:**\n- `code` is stored in lowercase\n- `amount` represents a percentage discount\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Created","code":201,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d5\",\n  \"code\": \"diaa23\",\n  \"amount\": 20,\n  \"fromDate\": \"2026-08-01T00:00:00.000Z\",\n  \"toDate\": \"2026-09-01T00:00:00.000Z\",\n  \"minOrderPrice\": 100,\n  \"isActive\": true,\n  \"usedBy\": [],\n  \"createdBy\": \"64f1a2b3c4d5e6f7a8b9c0d1\"\n}"},{"id":"5e17a745-ab56-4263-beb8-4e6206e79c84","name":"409 - Code Already Exists","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"code\": \"DIAA23\",\n  \"amount\": 20,\n  \"fromDate\": \"2026-08-01\",\n  \"toDate\": \"2026-09-01\",\n  \"minOrderPrice\": 100,\n  \"isActive\": true\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/coupon","description":"Create a new discount coupon.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| code | string | Required, Unique, stored lowercase |\n| amount | integer | Required, Min 1, Max 100 (percentage) |\n| fromDate | Date | Required, Must be today or future |\n| toDate | Date | Required, Must be greater than `fromDate` |\n| minOrderPrice | integer | Optional, Min 0, Default: 0 |\n| isActive | boolean | Optional, Default: true |\n\n**Notes:**\n- `code` is stored in lowercase\n- `amount` represents a percentage discount\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Conflict","code":409,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 409,\n  \"message\": \"Coupon Code Already Exists\"\n}"},{"id":"0e30d395-3f5c-4dac-8ad6-93cecc22acf8","name":"429 - Too Many Requests","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"code\": \"DIAA23\",\n  \"amount\": 20,\n  \"fromDate\": \"2026-08-01\",\n  \"toDate\": \"2026-09-01\",\n  \"minOrderPrice\": 100,\n  \"isActive\": true\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/coupon","description":"Create a new discount coupon.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| code | string | Required, Unique, stored lowercase |\n| amount | integer | Required, Min 1, Max 100 (percentage) |\n| fromDate | Date | Required, Must be today or future |\n| toDate | Date | Required, Must be greater than `fromDate` |\n| minOrderPrice | integer | Optional, Min 0, Default: 0 |\n| isActive | boolean | Optional, Default: true |\n\n**Notes:**\n- `code` is stored in lowercase\n- `amount` represents a percentage discount\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"5e86f541-ceec-4451-b889-5cdcf0e019db"},{"name":"Update Coupon (Admin Only)","id":"2cfea651-12cd-446c-b517-88d10b0bdab4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - Admin only</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"code\": \"DIAA23NEW\",\n  \"amount\": 30,\n  \"fromDate\": \"2026-08-15\",\n  \"toDate\": \"2026-10-01\",\n  \"minOrderPrice\": 200,\n  \"isActive\": true\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/coupon/:couponId","description":"<p>Update an existing coupon.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>admin</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>couponId</td>\n<td>Coupon MongoDB ObjectId</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>code</td>\n<td>string</td>\n<td>Optional, Must be unique</td>\n</tr>\n<tr>\n<td>amount</td>\n<td>integer</td>\n<td>Optional, Min 1, Max 100</td>\n</tr>\n<tr>\n<td>fromDate</td>\n<td>Date</td>\n<td>Optional, Must be today or future</td>\n</tr>\n<tr>\n<td>toDate</td>\n<td>Date</td>\n<td>Optional, Must be greater than <code>fromDate</code></td>\n</tr>\n<tr>\n<td>minOrderPrice</td>\n<td>integer</td>\n<td>Optional, Min 0</td>\n</tr>\n<tr>\n<td>isActive</td>\n<td>boolean</td>\n<td>Optional</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li><code>toDate</code> cannot be in the past</li>\n<li><code>fromDate</code> cannot be in the past</li>\n<li><code>fromDate</code> must be less than <code>toDate</code></li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["coupon",":couponId"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[{"id":"5c1bc728-d9ed-4f13-84ca-c434506d1df7","description":{"content":"<p>Coupon MongoDB ObjectId</p>\n","type":"text/plain"},"type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d5","key":"couponId"}]}},"response":[{"id":"85eff208-0432-41f5-9852-700418a04750","name":"200 - Coupon Updated","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"code\": \"DIAA23NEW\",\n  \"amount\": 30,\n  \"fromDate\": \"2026-08-15\",\n  \"toDate\": \"2026-10-01\",\n  \"minOrderPrice\": 200,\n  \"isActive\": true\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://e-commerce-nest-js.vercel.app/coupon/:couponId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["coupon",":couponId"],"variable":[{"id":"5c1bc728-d9ed-4f13-84ca-c434506d1df7","key":"couponId","value":"64f1a2b3c4d5e6f7a8b9c0d5","description":"Coupon MongoDB ObjectId"}]},"description":"Update an existing coupon.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| couponId | Coupon MongoDB ObjectId |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| code | string | Optional, Must be unique |\n| amount | integer | Optional, Min 1, Max 100 |\n| fromDate | Date | Optional, Must be today or future |\n| toDate | Date | Optional, Must be greater than `fromDate` |\n| minOrderPrice | integer | Optional, Min 0 |\n| isActive | boolean | Optional |\n\n**Notes:**\n- `toDate` cannot be in the past\n- `fromDate` cannot be in the past\n- `fromDate` must be less than `toDate`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d5\",\n  \"code\": \"diaa23new\",\n  \"amount\": 30,\n  \"fromDate\": \"2026-08-15T00:00:00.000Z\",\n  \"toDate\": \"2026-10-01T00:00:00.000Z\",\n  \"minOrderPrice\": 200,\n  \"isActive\": true\n}"},{"id":"840f1b05-5c42-4b2f-983b-63f15573aa62","name":"404 - Coupon Not Found","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"code\": \"DIAA23NEW\",\n  \"amount\": 30,\n  \"fromDate\": \"2026-08-15\",\n  \"toDate\": \"2026-10-01\",\n  \"minOrderPrice\": 200,\n  \"isActive\": true\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://e-commerce-nest-js.vercel.app/coupon/:couponId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["coupon",":couponId"],"variable":[{"id":"5c1bc728-d9ed-4f13-84ca-c434506d1df7","key":"couponId","value":"64f1a2b3c4d5e6f7a8b9c0d5","description":"Coupon MongoDB ObjectId"}]},"description":"Update an existing coupon.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| couponId | Coupon MongoDB ObjectId |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| code | string | Optional, Must be unique |\n| amount | integer | Optional, Min 1, Max 100 |\n| fromDate | Date | Optional, Must be today or future |\n| toDate | Date | Optional, Must be greater than `fromDate` |\n| minOrderPrice | integer | Optional, Min 0 |\n| isActive | boolean | Optional |\n\n**Notes:**\n- `toDate` cannot be in the past\n- `fromDate` cannot be in the past\n- `fromDate` must be less than `toDate`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Coupon Not Found\"\n}"},{"id":"ae78283f-e229-4252-82f5-7f948ffe30a7","name":"400 - Invalid Dates","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"code\": \"DIAA23NEW\",\n  \"amount\": 30,\n  \"fromDate\": \"2026-08-15\",\n  \"toDate\": \"2026-10-01\",\n  \"minOrderPrice\": 200,\n  \"isActive\": true\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://e-commerce-nest-js.vercel.app/coupon/:couponId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["coupon",":couponId"],"variable":[{"id":"5c1bc728-d9ed-4f13-84ca-c434506d1df7","key":"couponId","value":"64f1a2b3c4d5e6f7a8b9c0d5","description":"Coupon MongoDB ObjectId"}]},"description":"Update an existing coupon.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| couponId | Coupon MongoDB ObjectId |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| code | string | Optional, Must be unique |\n| amount | integer | Optional, Min 1, Max 100 |\n| fromDate | Date | Optional, Must be today or future |\n| toDate | Date | Optional, Must be greater than `fromDate` |\n| minOrderPrice | integer | Optional, Min 0 |\n| isActive | boolean | Optional |\n\n**Notes:**\n- `toDate` cannot be in the past\n- `fromDate` cannot be in the past\n- `fromDate` must be less than `toDate`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 400,\n  \"message\": \"From Date Must Be Less Than To Date\"\n}"},{"id":"3ecfe927-dc4c-4032-b271-05ed79a14112","name":"429 - Too Many Requests","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"code\": \"DIAA23NEW\",\n  \"amount\": 30,\n  \"fromDate\": \"2026-08-15\",\n  \"toDate\": \"2026-10-01\",\n  \"minOrderPrice\": 200,\n  \"isActive\": true\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://e-commerce-nest-js.vercel.app/coupon/:couponId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["coupon",":couponId"],"variable":[{"id":"5c1bc728-d9ed-4f13-84ca-c434506d1df7","key":"couponId","value":"64f1a2b3c4d5e6f7a8b9c0d5","description":"Coupon MongoDB ObjectId"}]},"description":"Update an existing coupon.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| couponId | Coupon MongoDB ObjectId |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| code | string | Optional, Must be unique |\n| amount | integer | Optional, Min 1, Max 100 |\n| fromDate | Date | Optional, Must be today or future |\n| toDate | Date | Optional, Must be greater than `fromDate` |\n| minOrderPrice | integer | Optional, Min 0 |\n| isActive | boolean | Optional |\n\n**Notes:**\n- `toDate` cannot be in the past\n- `fromDate` cannot be in the past\n- `fromDate` must be less than `toDate`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"2cfea651-12cd-446c-b517-88d10b0bdab4"},{"name":"Get All Coupons (Admin Only)","id":"ef56fa73-1a00-4932-a9f8-317472d7d8f6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - Admin only</p>\n"}],"url":"https://e-commerce-nest-js.vercel.app/coupon","description":"<p>Get all active (non-deleted) coupons sorted by newest first.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>admin</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>Soft-deleted coupons are excluded</li>\n<li>Sorted by <code>createdAt</code> descending</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["coupon"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"a151096c-bcf1-431a-b01c-4a9c11569f40","name":"200 - Coupons List","originalRequest":{"method":"GET","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"url":"https://e-commerce-nest-js.vercel.app/coupon","description":"Get all active (non-deleted) coupons sorted by newest first.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**Notes:**\n- Soft-deleted coupons are excluded\n- Sorted by `createdAt` descending\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"[\n  {\n    \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d5\",\n    \"code\": \"diaa23\",\n    \"amount\": 20,\n    \"fromDate\": \"2026-08-01T00:00:00.000Z\",\n    \"toDate\": \"2026-09-01T00:00:00.000Z\",\n    \"minOrderPrice\": 100,\n    \"isActive\": true,\n    \"usedBy\": []\n  }\n]"},{"id":"187a49a2-ea49-4eeb-88b7-b130ce552e6d","name":"429 - Too Many Requests","originalRequest":{"method":"GET","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"url":"https://e-commerce-nest-js.vercel.app/coupon","description":"Get all active (non-deleted) coupons sorted by newest first.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**Notes:**\n- Soft-deleted coupons are excluded\n- Sorted by `createdAt` descending\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"ef56fa73-1a00-4932-a9f8-317472d7d8f6"},{"name":"Delete Coupon (Admin Only)","id":"621b7ed5-00f8-47bf-bf77-fd2358f727a8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - Admin only</p>\n"}],"url":"https://e-commerce-nest-js.vercel.app/coupon/:couponId","description":"<p>Soft delete a coupon and deactivate it.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>admin</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>couponId</td>\n<td>Coupon MongoDB ObjectId</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>This is a <strong>soft delete</strong> (sets <code>deletedAt</code> field)</li>\n<li>Also sets <code>isActive: false</code> automatically</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["coupon",":couponId"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[{"id":"ededfde4-cf3f-49be-bf2b-93b2c28d7ce3","description":{"content":"<p>Coupon MongoDB ObjectId</p>\n","type":"text/plain"},"type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d5","key":"couponId"}]}},"response":[{"id":"3e435bd2-b8c5-4e5a-bdfe-1313cd0aa9d6","name":"200 - Coupon Deleted","originalRequest":{"method":"DELETE","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/coupon/:couponId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["coupon",":couponId"],"variable":[{"id":"ededfde4-cf3f-49be-bf2b-93b2c28d7ce3","key":"couponId","value":"64f1a2b3c4d5e6f7a8b9c0d5","description":"Coupon MongoDB ObjectId"}]},"description":"Soft delete a coupon and deactivate it.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| couponId | Coupon MongoDB ObjectId |\n\n**Notes:**\n- This is a **soft delete** (sets `deletedAt` field)\n- Also sets `isActive: false` automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Coupon Deleted Successfully\"\n}"},{"id":"2b98f718-a461-414f-af16-2ca8832b87c8","name":"404 - Coupon Not Found","originalRequest":{"method":"DELETE","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/coupon/:couponId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["coupon",":couponId"],"variable":[{"id":"ededfde4-cf3f-49be-bf2b-93b2c28d7ce3","key":"couponId","value":"64f1a2b3c4d5e6f7a8b9c0d5","description":"Coupon MongoDB ObjectId"}]},"description":"Soft delete a coupon and deactivate it.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| couponId | Coupon MongoDB ObjectId |\n\n**Notes:**\n- This is a **soft delete** (sets `deletedAt` field)\n- Also sets `isActive: false` automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Coupon Not Found\"\n}"},{"id":"a534c626-a75e-4a71-90a3-98f27d9f07e8","name":"429 - Too Many Requests","originalRequest":{"method":"DELETE","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/coupon/:couponId","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["coupon",":couponId"],"variable":[{"id":"ededfde4-cf3f-49be-bf2b-93b2c28d7ce3","key":"couponId","value":"64f1a2b3c4d5e6f7a8b9c0d5","description":"Coupon MongoDB ObjectId"}]},"description":"Soft delete a coupon and deactivate it.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| couponId | Coupon MongoDB ObjectId |\n\n**Notes:**\n- This is a **soft delete** (sets `deletedAt` field)\n- Also sets `isActive: false` automatically\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"621b7ed5-00f8-47bf-bf77-fd2358f727a8"},{"name":"Apply Coupon","id":"ee4ec7ac-542e-430c-94d5-76f4de4cab48","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - User only</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"code\": \"DIAA23\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/coupon/apply","description":"<p>Apply a coupon to the user's active cart and get the discounted total.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>user</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>code</td>\n<td>string</td>\n<td>Required, Trimmed and converted to lowercase automatically</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>Cart must exist and not be empty</li>\n<li>Coupon must be active and within valid date range</li>\n<li>Cart <code>subTotal</code> must meet <code>minOrderPrice</code></li>\n<li>User cannot use the same coupon twice</li>\n<li>Returns discount calculation without modifying the cart (coupon is applied at order creation)</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["coupon","apply"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"9d788187-4151-4677-856e-86ae0aecfc7d","name":"200 - Coupon Applied","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"code\": \"DIAA23\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/coupon/apply","description":"Apply a coupon to the user's active cart and get the discounted total.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| code | string | Required, Trimmed and converted to lowercase automatically |\n\n**Notes:**\n- Cart must exist and not be empty\n- Coupon must be active and within valid date range\n- Cart `subTotal` must meet `minOrderPrice`\n- User cannot use the same coupon twice\n- Returns discount calculation without modifying the cart (coupon is applied at order creation)\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Coupon Applied Successfully\",\n  \"coupon\": {\n    \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d5\",\n    \"code\": \"diaa23\",\n    \"amount\": 20,\n    \"discountValue\": 115.6,\n    \"finalTotal\": 462.4\n  }\n}"},{"id":"96038ec6-088f-4ecc-8909-3ccea4a97d17","name":"404 - Invalid or Expired Coupon","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"code\": \"DIAA23\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/coupon/apply","description":"Apply a coupon to the user's active cart and get the discounted total.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| code | string | Required, Trimmed and converted to lowercase automatically |\n\n**Notes:**\n- Cart must exist and not be empty\n- Coupon must be active and within valid date range\n- Cart `subTotal` must meet `minOrderPrice`\n- User cannot use the same coupon twice\n- Returns discount calculation without modifying the cart (coupon is applied at order creation)\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Invalid Or Expired Coupon\"\n}"},{"id":"934ecffe-3de7-48f0-84e3-b0db90d28c65","name":"400 - Minimum Order Price Not Met","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"code\": \"DIAA23\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/coupon/apply","description":"Apply a coupon to the user's active cart and get the discounted total.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| code | string | Required, Trimmed and converted to lowercase automatically |\n\n**Notes:**\n- Cart must exist and not be empty\n- Coupon must be active and within valid date range\n- Cart `subTotal` must meet `minOrderPrice`\n- User cannot use the same coupon twice\n- Returns discount calculation without modifying the cart (coupon is applied at order creation)\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 400,\n  \"message\": \"Minimum Order Price Is 100\"\n}"},{"id":"9b7aca5e-4235-4017-b04f-87f3e197c31c","name":"400 - Coupon Already Used","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"code\": \"DIAA23\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/coupon/apply","description":"Apply a coupon to the user's active cart and get the discounted total.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| code | string | Required, Trimmed and converted to lowercase automatically |\n\n**Notes:**\n- Cart must exist and not be empty\n- Coupon must be active and within valid date range\n- Cart `subTotal` must meet `minOrderPrice`\n- User cannot use the same coupon twice\n- Returns discount calculation without modifying the cart (coupon is applied at order creation)\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 400,\n  \"message\": \"Coupon Already Used By This User\"\n}"},{"id":"0551f5f9-6a84-4021-bc78-fd183b40b257","name":"404 - Cart Not Found Or Empty","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"code\": \"DIAA23\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/coupon/apply","description":"Apply a coupon to the user's active cart and get the discounted total.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| code | string | Required, Trimmed and converted to lowercase automatically |\n\n**Notes:**\n- Cart must exist and not be empty\n- Coupon must be active and within valid date range\n- Cart `subTotal` must meet `minOrderPrice`\n- User cannot use the same coupon twice\n- Returns discount calculation without modifying the cart (coupon is applied at order creation)\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Cart Not Found Or Empty\"\n}"},{"id":"3044d132-7c20-46e2-8917-2cab62a63641","name":"429 - Too Many Requests","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"code\": \"DIAA23\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/coupon/apply","description":"Apply a coupon to the user's active cart and get the discounted total.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| code | string | Required, Trimmed and converted to lowercase automatically |\n\n**Notes:**\n- Cart must exist and not be empty\n- Coupon must be active and within valid date range\n- Cart `subTotal` must meet `minOrderPrice`\n- User cannot use the same coupon twice\n- Returns discount calculation without modifying the cart (coupon is applied at order creation)\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"ee4ec7ac-542e-430c-94d5-76f4de4cab48"}],"id":"c77084df-a5b6-42aa-aa5b-62918cba50e4","description":"<p>Endpoints for coupon management. Create/Update/Get/Delete are Admin only. Apply is User only.</p>\n","_postman_id":"c77084df-a5b6-42aa-aa5b-62918cba50e4"},{"name":"Order","item":[{"name":"Create Cash Order","id":"c5e37a37-51a5-4468-9cb2-18abe9364b4c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - User only</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"cartId\": \"64f1a2b3c4d5e6f7a8b9c0d4\",\n  \"address\": \"Diaa Eldeen Street, Cairo, Egypt\",\n  \"phone\": \"+201234567890\",\n  \"couponCode\": \"DIAA23\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/order/cash","description":"<p>Create a new cash on delivery order from the user's cart.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>user</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Validation Rules:</strong></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>Rules</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>cartId</td>\n<td>MongoId</td>\n<td>Required, Must be user's active unordered cart</td>\n</tr>\n<tr>\n<td>address</td>\n<td>string</td>\n<td>Required, Delivery address</td>\n</tr>\n<tr>\n<td>phone</td>\n<td>string</td>\n<td>Required, Valid Egyptian phone number (EG)</td>\n</tr>\n<tr>\n<td>couponCode</td>\n<td>string</td>\n<td>Optional, Trimmed and lowercased automatically</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>Cart is marked as <code>isOrdered: true</code> after order creation</li>\n<li>Product stock is decremented for each ordered item</li>\n<li>If coupon is used, user is added to <code>coupon.usedBy</code></li>\n<li><code>paymentStatus</code> starts as <code>unpaid</code></li>\n<li><code>status</code> starts as <code>pending</code></li>\n<li><code>arrivedAt</code> is set to 3 days from order creation</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["order","cash"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"54b57534-f6c0-4dad-b9ad-1844e1b6ab48","name":"201 - Order Created","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"cartId\": \"64f1a2b3c4d5e6f7a8b9c0d4\",\n  \"address\": \"Diaa Eldeen Street, Cairo, Egypt\",\n  \"phone\": \"+201234567890\",\n  \"couponCode\": \"DIAA23\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/order/cash","description":"Create a new cash on delivery order from the user's cart.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| cartId | MongoId | Required, Must be user's active unordered cart |\n| address | string | Required, Delivery address |\n| phone | string | Required, Valid Egyptian phone number (EG) |\n| couponCode | string | Optional, Trimmed and lowercased automatically |\n\n**Notes:**\n- Cart is marked as `isOrdered: true` after order creation\n- Product stock is decremented for each ordered item\n- If coupon is used, user is added to `coupon.usedBy`\n- `paymentStatus` starts as `unpaid`\n- `status` starts as `pending`\n- `arrivedAt` is set to 3 days from order creation\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Created","code":201,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Order Created Successfully\",\n  \"order\": {\n    \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d6\",\n    \"userId\": \"64f1a2b3c4d5e6f7a8b9c0d1\",\n    \"cart\": \"64f1a2b3c4d5e6f7a8b9c0d4\",\n    \"totalPrice\": 462.4,\n    \"phone\": \"+201234567890\",\n    \"address\": \"Diaa Eldeen Street, Cairo, Egypt\",\n    \"paymentMethod\": \"cash\",\n    \"paymentStatus\": \"unpaid\",\n    \"status\": \"pending\",\n    \"arrivedAt\": \"2026-01-04T00:00:00.000Z\",\n    \"products\": [\n      {\n        \"productId\": \"64f1a2b3c4d5e6f7a8b9c0d3\",\n        \"title\": \"Diaa Product\",\n        \"price\": 289,\n        \"quantity\": 2\n      }\n    ]\n  }\n}"},{"id":"b875b8e4-d540-4a7a-8b80-a061ba12e063","name":"400 - Cart Is Empty","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"cartId\": \"64f1a2b3c4d5e6f7a8b9c0d4\",\n  \"address\": \"Diaa Eldeen Street, Cairo, Egypt\",\n  \"phone\": \"+201234567890\",\n  \"couponCode\": \"DIAA23\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/order/cash","description":"Create a new cash on delivery order from the user's cart.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| cartId | MongoId | Required, Must be user's active unordered cart |\n| address | string | Required, Delivery address |\n| phone | string | Required, Valid Egyptian phone number (EG) |\n| couponCode | string | Optional, Trimmed and lowercased automatically |\n\n**Notes:**\n- Cart is marked as `isOrdered: true` after order creation\n- Product stock is decremented for each ordered item\n- If coupon is used, user is added to `coupon.usedBy`\n- `paymentStatus` starts as `unpaid`\n- `status` starts as `pending`\n- `arrivedAt` is set to 3 days from order creation\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 400,\n  \"message\": \"Cart Is Empty\"\n}"},{"id":"3669f539-92fa-4da1-818a-9ad1663330a8","name":"404 - Cart Not Found","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"cartId\": \"64f1a2b3c4d5e6f7a8b9c0d4\",\n  \"address\": \"Diaa Eldeen Street, Cairo, Egypt\",\n  \"phone\": \"+201234567890\",\n  \"couponCode\": \"DIAA23\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/order/cash","description":"Create a new cash on delivery order from the user's cart.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| cartId | MongoId | Required, Must be user's active unordered cart |\n| address | string | Required, Delivery address |\n| phone | string | Required, Valid Egyptian phone number (EG) |\n| couponCode | string | Optional, Trimmed and lowercased automatically |\n\n**Notes:**\n- Cart is marked as `isOrdered: true` after order creation\n- Product stock is decremented for each ordered item\n- If coupon is used, user is added to `coupon.usedBy`\n- `paymentStatus` starts as `unpaid`\n- `status` starts as `pending`\n- `arrivedAt` is set to 3 days from order creation\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Cart Not Found Or Not Authorized\"\n}"},{"id":"04e5570c-9968-453d-baf8-a7ba1a75a089","name":"429 - Too Many Requests","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"cartId\": \"64f1a2b3c4d5e6f7a8b9c0d4\",\n  \"address\": \"Diaa Eldeen Street, Cairo, Egypt\",\n  \"phone\": \"+201234567890\",\n  \"couponCode\": \"DIAA23\"\n}","options":{"raw":{"language":"json"}}},"url":"https://e-commerce-nest-js.vercel.app/order/cash","description":"Create a new cash on delivery order from the user's cart.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Validation Rules:**\n\n| Field | Type | Rules |\n|---|---|---|\n| cartId | MongoId | Required, Must be user's active unordered cart |\n| address | string | Required, Delivery address |\n| phone | string | Required, Valid Egyptian phone number (EG) |\n| couponCode | string | Optional, Trimmed and lowercased automatically |\n\n**Notes:**\n- Cart is marked as `isOrdered: true` after order creation\n- Product stock is decremented for each ordered item\n- If coupon is used, user is added to `coupon.usedBy`\n- `paymentStatus` starts as `unpaid`\n- `status` starts as `pending`\n- `arrivedAt` is set to 3 days from order creation\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"c5e37a37-51a5-4468-9cb2-18abe9364b4c"},{"name":"Create Card Order (Stripe Checkout)","id":"7c0e7f80-93a2-4887-8c89-671a65336374","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - User only</p>\n"}],"url":"https://e-commerce-nest-js.vercel.app/order/stripe/:id","description":"<p>Create a Stripe checkout session for a pending card order.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>user</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>Order MongoDB ObjectId (must be pending, card, unpaid)</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>Order must have <code>paymentMethod: card</code>, <code>status: pending</code>, <code>paymentStatus: unpaid</code></li>\n<li>Returns a Stripe checkout session URL</li>\n<li><code>success_url</code> redirects to <code>https://e-commerce-nest-js.vercel.app/order/success</code></li>\n<li><code>cancel_url</code> redirects to <code>https://e-commerce-nest-js.vercel.app/order/cancel</code></li>\n<li>Currency is <strong>EGP</strong></li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["order","stripe",":id"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[{"id":"82158c55-3d9f-4702-88a1-a39fdcac2b6c","description":{"content":"<p>Order MongoDB ObjectId</p>\n","type":"text/plain"},"type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d6","key":"id"}]}},"response":[{"id":"7554812b-1bc5-402e-a906-622deb732ec5","name":"200 - Stripe Session Created","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/order/stripe/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["order","stripe",":id"],"variable":[{"id":"82158c55-3d9f-4702-88a1-a39fdcac2b6c","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d6","description":"Order MongoDB ObjectId"}]},"description":"Create a Stripe checkout session for a pending card order.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Order MongoDB ObjectId (must be pending, card, unpaid) |\n\n**Notes:**\n- Order must have `paymentMethod: card`, `status: pending`, `paymentStatus: unpaid`\n- Returns a Stripe checkout session URL\n- `success_url` redirects to `https://e-commerce-nest-js.vercel.app/order/success`\n- `cancel_url` redirects to `https://e-commerce-nest-js.vercel.app/order/cancel`\n- Currency is **EGP**\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"id\": \"cs_test_...\",\n  \"url\": \"https://checkout.stripe.com/pay/cs_test_...\",\n  \"payment_status\": \"unpaid\",\n  \"customer_email\": \"diaaelseady@gmail.com\"\n}"},{"id":"64b8a847-0604-4229-95d1-ca19d7a4c811","name":"404 - Order Not Found Or Already Paid","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/order/stripe/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["order","stripe",":id"],"variable":[{"id":"82158c55-3d9f-4702-88a1-a39fdcac2b6c","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d6","description":"Order MongoDB ObjectId"}]},"description":"Create a Stripe checkout session for a pending card order.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Order MongoDB ObjectId (must be pending, card, unpaid) |\n\n**Notes:**\n- Order must have `paymentMethod: card`, `status: pending`, `paymentStatus: unpaid`\n- Returns a Stripe checkout session URL\n- `success_url` redirects to `https://e-commerce-nest-js.vercel.app/order/success`\n- `cancel_url` redirects to `https://e-commerce-nest-js.vercel.app/order/cancel`\n- Currency is **EGP**\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Order Not Found Or Already Paid\"\n}"},{"id":"f9ed4a5c-1364-4f58-b457-f1d8470d1522","name":"429 - Too Many Requests","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/order/stripe/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["order","stripe",":id"],"variable":[{"id":"82158c55-3d9f-4702-88a1-a39fdcac2b6c","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d6","description":"Order MongoDB ObjectId"}]},"description":"Create a Stripe checkout session for a pending card order.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Order MongoDB ObjectId (must be pending, card, unpaid) |\n\n**Notes:**\n- Order must have `paymentMethod: card`, `status: pending`, `paymentStatus: unpaid`\n- Returns a Stripe checkout session URL\n- `success_url` redirects to `https://e-commerce-nest-js.vercel.app/order/success`\n- `cancel_url` redirects to `https://e-commerce-nest-js.vercel.app/order/cancel`\n- Currency is **EGP**\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"7c0e7f80-93a2-4887-8c89-671a65336374"},{"name":"Stripe Webhook","id":"00527d1b-386f-46ba-94bc-c48a1934eb98","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"stripe-signature","value":"whsec_...","description":"<p>Stripe webhook signature (sent by Stripe automatically)</p>\n"},{"key":"Content-Type","value":"application/json"}],"url":"https://e-commerce-nest-js.vercel.app/order/webhook","description":"<p>Stripe webhook endpoint to handle payment confirmation events.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>stripe-signature</td>\n<td>Stripe Signature</td>\n<td>Sent automatically by Stripe, used to verify the event</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>This endpoint is called automatically by Stripe, not by the frontend</li>\n<li>Requires <code>rawBody</code> to be enabled in NestJS (already configured in <code>main.ts</code>)</li>\n<li>Handles <code>checkout.session.completed</code> event</li>\n<li>On success: sets <code>paymentStatus: paid</code>, saves <code>paymentIntent</code>, records <code>paidAt</code></li>\n<li>Do NOT test this manually unless using Stripe CLI</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["order","webhook"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"89232cf3-ef4e-44cb-984e-ee67f4b6ed00","name":"200 - Webhook Received","originalRequest":{"method":"POST","header":[{"key":"stripe-signature","value":"whsec_...","description":"Stripe webhook signature (sent by Stripe automatically)"},{"key":"Content-Type","value":"application/json"}],"url":"https://e-commerce-nest-js.vercel.app/order/webhook","description":"Stripe webhook endpoint to handle payment confirmation events.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| stripe-signature | Stripe Signature | Sent automatically by Stripe, used to verify the event |\n\n**Notes:**\n- This endpoint is called automatically by Stripe, not by the frontend\n- Requires `rawBody` to be enabled in NestJS (already configured in `main.ts`)\n- Handles `checkout.session.completed` event\n- On success: sets `paymentStatus: paid`, saves `paymentIntent`, records `paidAt`\n- Do NOT test this manually unless using Stripe CLI\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"received\": true,\n  \"order\": {\n    \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d6\",\n    \"paymentStatus\": \"paid\",\n    \"paymentIntent\": \"pi_...\"\n  }\n}"},{"id":"ff20886d-9b36-47c3-86b2-3c0be5c9907f","name":"400 - Webhook Signature Error","originalRequest":{"method":"POST","header":[{"key":"stripe-signature","value":"whsec_...","description":"Stripe webhook signature (sent by Stripe automatically)"},{"key":"Content-Type","value":"application/json"}],"url":"https://e-commerce-nest-js.vercel.app/order/webhook","description":"Stripe webhook endpoint to handle payment confirmation events.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| stripe-signature | Stripe Signature | Sent automatically by Stripe, used to verify the event |\n\n**Notes:**\n- This endpoint is called automatically by Stripe, not by the frontend\n- Requires `rawBody` to be enabled in NestJS (already configured in `main.ts`)\n- Handles `checkout.session.completed` event\n- On success: sets `paymentStatus: paid`, saves `paymentIntent`, records `paidAt`\n- Do NOT test this manually unless using Stripe CLI\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 400,\n  \"message\": \"Webhook Error: No signatures found matching the expected signature...\"\n}"}],"_postman_id":"00527d1b-386f-46ba-94bc-c48a1934eb98"},{"name":"Refund Order Payment","id":"f768fa59-182c-4eda-824e-d8e6834dc631","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - User only</p>\n"}],"url":"https://e-commerce-nest-js.vercel.app/order/refund/:id","description":"<p>Request a refund for a paid card order.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>user</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>Order MongoDB ObjectId</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>Order must have <code>paymentMethod: card</code> and <code>paymentStatus: paid</code></li>\n<li>Order status must NOT be <code>shipped</code> or <code>delivered</code></li>\n<li>On success: stock is restored, coupon usage is removed, cart is unlocked (<code>isOrdered: false</code>)</li>\n<li>Order status becomes <code>cancelled</code>, paymentStatus becomes <code>refunded</code></li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["order","refund",":id"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[{"id":"bf778c7c-f7f3-4ecf-9a77-f59dcc56fca6","description":{"content":"<p>Order MongoDB ObjectId</p>\n","type":"text/plain"},"type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d6","key":"id"}]}},"response":[{"id":"46cf7a5d-44f8-4dec-8536-9587135d83b0","name":"200 - Refund Successful","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/order/refund/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["order","refund",":id"],"variable":[{"id":"bf778c7c-f7f3-4ecf-9a77-f59dcc56fca6","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d6","description":"Order MongoDB ObjectId"}]},"description":"Request a refund for a paid card order.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Order MongoDB ObjectId |\n\n**Notes:**\n- Order must have `paymentMethod: card` and `paymentStatus: paid`\n- Order status must NOT be `shipped` or `delivered`\n- On success: stock is restored, coupon usage is removed, cart is unlocked (`isOrdered: false`)\n- Order status becomes `cancelled`, paymentStatus becomes `refunded`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Payment Refunded Successfully\",\n  \"order\": {\n    \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d6\",\n    \"status\": \"cancelled\",\n    \"paymentStatus\": \"refunded\"\n  }\n}"},{"id":"4d944bf4-2a95-4532-af8d-048f60d5a768","name":"404 - Order Not Found Or Cannot Be Refunded","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/order/refund/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["order","refund",":id"],"variable":[{"id":"bf778c7c-f7f3-4ecf-9a77-f59dcc56fca6","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d6","description":"Order MongoDB ObjectId"}]},"description":"Request a refund for a paid card order.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Order MongoDB ObjectId |\n\n**Notes:**\n- Order must have `paymentMethod: card` and `paymentStatus: paid`\n- Order status must NOT be `shipped` or `delivered`\n- On success: stock is restored, coupon usage is removed, cart is unlocked (`isOrdered: false`)\n- Order status becomes `cancelled`, paymentStatus becomes `refunded`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Order Not Found Or Cannot Be Refunded\"\n}"},{"id":"bc56f180-d019-47b2-b6c4-2128842ae9ed","name":"400 - Refund Failed","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/order/refund/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["order","refund",":id"],"variable":[{"id":"bf778c7c-f7f3-4ecf-9a77-f59dcc56fca6","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d6","description":"Order MongoDB ObjectId"}]},"description":"Request a refund for a paid card order.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Order MongoDB ObjectId |\n\n**Notes:**\n- Order must have `paymentMethod: card` and `paymentStatus: paid`\n- Order status must NOT be `shipped` or `delivered`\n- On success: stock is restored, coupon usage is removed, cart is unlocked (`isOrdered: false`)\n- Order status becomes `cancelled`, paymentStatus becomes `refunded`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 400,\n  \"message\": \"Refund failed\"\n}"},{"id":"1dc4cb0f-d278-46f2-9133-9369445cd6a7","name":"429 - Too Many Requests","originalRequest":{"method":"POST","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/order/refund/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["order","refund",":id"],"variable":[{"id":"bf778c7c-f7f3-4ecf-9a77-f59dcc56fca6","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d6","description":"Order MongoDB ObjectId"}]},"description":"Request a refund for a paid card order.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Order MongoDB ObjectId |\n\n**Notes:**\n- Order must have `paymentMethod: card` and `paymentStatus: paid`\n- Order status must NOT be `shipped` or `delivered`\n- On success: stock is restored, coupon usage is removed, cart is unlocked (`isOrdered: false`)\n- Order status becomes `cancelled`, paymentStatus becomes `refunded`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"f768fa59-182c-4eda-824e-d8e6834dc631"},{"name":"Get My Orders","id":"8e2569c3-d0d0-4d4b-9434-9cc30d92afba","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - User only</p>\n"}],"url":"https://e-commerce-nest-js.vercel.app/order/my-orders","description":"<p>Get all orders for the authenticated user.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>user</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>Sorted by <code>createdAt</code> descending (newest first)</li>\n<li>Coupon populated with: <code>code</code>, <code>amount</code></li>\n<li>No query params</li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["order","my-orders"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"41adbe05-a79a-4d23-a61b-3f16d9048ad4","name":"200 - My Orders","originalRequest":{"method":"GET","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":"https://e-commerce-nest-js.vercel.app/order/my-orders","description":"Get all orders for the authenticated user.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Notes:**\n- Sorted by `createdAt` descending (newest first)\n- Coupon populated with: `code`, `amount`\n- No query params\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"[\n  {\n    \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d6\",\n    \"totalPrice\": 462.4,\n    \"status\": \"pending\",\n    \"paymentMethod\": \"cash\",\n    \"paymentStatus\": \"unpaid\",\n    \"arrivedAt\": \"2026-01-04T00:00:00.000Z\",\n    \"coupon\": { \"code\": \"diaa23\", \"amount\": 20 },\n    \"products\": [\n      {\n        \"productId\": \"64f1a2b3c4d5e6f7a8b9c0d3\",\n        \"title\": \"Diaa Product\",\n        \"price\": 289,\n        \"quantity\": 2\n      }\n    ]\n  }\n]"},{"id":"e842f27d-b480-4d2f-8eb9-f6bb3e444f59","name":"429 - Too Many Requests","originalRequest":{"method":"GET","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":"https://e-commerce-nest-js.vercel.app/order/my-orders","description":"Get all orders for the authenticated user.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**Notes:**\n- Sorted by `createdAt` descending (newest first)\n- Coupon populated with: `code`, `amount`\n- No query params\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"8e2569c3-d0d0-4d4b-9434-9cc30d92afba"},{"name":"Get All Orders (Admin Only)","id":"61e67272-855e-4fe4-9f18-d098c0826891","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - Admin only</p>\n"}],"url":"https://e-commerce-nest-js.vercel.app/order?page=1&limit=10","description":"<p>Get all orders in the system.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>admin</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>Sorted by <code>createdAt</code> descending</li>\n<li>User populated with: <code>userName</code>, <code>email</code>, <code>phone</code></li>\n<li>Coupon populated with: <code>code</code>, <code>amount</code></li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["order"],"host":["e-commerce-nest-js","vercel","app"],"query":[{"description":{"content":"<p>Page number (default: 1, min: 1)</p>\n","type":"text/plain"},"key":"page","value":"1"},{"description":{"content":"<p>Items per page (default: 10, min: 1)</p>\n","type":"text/plain"},"key":"limit","value":"10"}],"variable":[]}},"response":[{"id":"b7cecf65-deb0-42b4-bf90-4b89f9adbdfd","name":"200 - All Orders","originalRequest":{"method":"GET","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/order?page=1&limit=10","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["order"],"query":[{"key":"page","value":"1","description":"Page number (default: 1, min: 1)"},{"key":"limit","value":"10","description":"Items per page (default: 10, min: 1)"}]},"description":"Get all orders in the system.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**Notes:**\n- Sorted by `createdAt` descending\n- User populated with: `userName`, `email`, `phone`\n- Coupon populated with: `code`, `amount`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"data\": [\n    {\n      \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d6\",\n      \"userId\": {\n        \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d1\",\n        \"userName\": \"Diaa Eldeen\",\n        \"email\": \"diaaelseady@gmail.com\"\n      },\n      \"totalPrice\": 462.4,\n      \"status\": \"pending\",\n      \"paymentMethod\": \"cash\",\n      \"paymentStatus\": \"unpaid\"\n    }\n  ],\n  \"page\": 1,\n  \"limit\": 10,\n  \"total\": 1,\n  \"totalPages\": 1\n}"},{"id":"6d8ae6b7-8a57-43e1-86e9-6f148edccb5c","name":"429 - Too Many Requests","originalRequest":{"method":"GET","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - Admin only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/order?page=1&limit=10","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["order"],"query":[{"key":"page","value":"1","description":"Page number (default: 1, min: 1)"},{"key":"limit","value":"10","description":"Items per page (default: 10, min: 1)"}]},"description":"Get all orders in the system.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `admin` role |\n\n**Notes:**\n- Sorted by `createdAt` descending\n- User populated with: `userName`, `email`, `phone`\n- Coupon populated with: `code`, `amount`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"61e67272-855e-4fe4-9f18-d098c0826891"},{"name":"Get Order By ID","id":"4e854de9-5275-4563-99cd-200a00503c05","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - User or Admin</p>\n"}],"url":"https://e-commerce-nest-js.vercel.app/order/:id","description":"<p>Get a specific order by ID.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, <code>user</code> or <code>admin</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>Order MongoDB ObjectId</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li><code>user</code> can only access their own orders</li>\n<li><code>admin</code> can access any order</li>\n<li>User populated with: <code>userName</code>, <code>email</code>, <code>phone</code></li>\n<li>Coupon populated with: <code>code</code>, <code>amount</code></li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["order",":id"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[{"id":"bd6a26c9-70d3-4ceb-b04b-e5df28c41783","description":{"content":"<p>Order MongoDB ObjectId</p>\n","type":"text/plain"},"type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d6","key":"id"}]}},"response":[{"id":"42a20c56-35ef-4f9c-85c9-f2e133ed2de8","name":"200 - Order Details","originalRequest":{"method":"GET","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User or Admin"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/order/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["order",":id"],"variable":[{"id":"bd6a26c9-70d3-4ceb-b04b-e5df28c41783","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d6","description":"Order MongoDB ObjectId"}]},"description":"Get a specific order by ID.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, `user` or `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Order MongoDB ObjectId |\n\n**Notes:**\n- `user` can only access their own orders\n- `admin` can access any order\n- User populated with: `userName`, `email`, `phone`\n- Coupon populated with: `code`, `amount`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d6\",\n  \"userId\": {\n    \"userName\": \"Diaa Eldeen\",\n    \"email\": \"diaaelseady@gmail.com\"\n  },\n  \"totalPrice\": 462.4,\n  \"status\": \"pending\",\n  \"paymentMethod\": \"cash\",\n  \"paymentStatus\": \"unpaid\",\n  \"arrivedAt\": \"2026-01-04T00:00:00.000Z\",\n  \"products\": [\n    {\n      \"productId\": \"64f1a2b3c4d5e6f7a8b9c0d3\",\n      \"title\": \"Diaa Product\",\n      \"price\": 289,\n      \"quantity\": 2\n    }\n  ]\n}"},{"id":"2579359b-123f-4518-ae61-a54d98b0b761","name":"404 - Order Not Found","originalRequest":{"method":"GET","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User or Admin"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/order/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["order",":id"],"variable":[{"id":"bd6a26c9-70d3-4ceb-b04b-e5df28c41783","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d6","description":"Order MongoDB ObjectId"}]},"description":"Get a specific order by ID.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, `user` or `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Order MongoDB ObjectId |\n\n**Notes:**\n- `user` can only access their own orders\n- `admin` can access any order\n- User populated with: `userName`, `email`, `phone`\n- Coupon populated with: `code`, `amount`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Not Found","code":404,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 404,\n  \"message\": \"Order Not Found\"\n}"},{"id":"3bdfd422-3b1c-4a11-a6ea-03f2ca6be747","name":"429 - Too Many Requests","originalRequest":{"method":"GET","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User or Admin"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/order/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["order",":id"],"variable":[{"id":"bd6a26c9-70d3-4ceb-b04b-e5df28c41783","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d6","description":"Order MongoDB ObjectId"}]},"description":"Get a specific order by ID.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, `user` or `admin` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Order MongoDB ObjectId |\n\n**Notes:**\n- `user` can only access their own orders\n- `admin` can access any order\n- User populated with: `userName`, `email`, `phone`\n- Coupon populated with: `code`, `amount`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"4e854de9-5275-4563-99cd-200a00503c05"},{"name":"Cancel Order","id":"12e0927a-e028-45a2-9ad1-99f444ef7e3b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":"","description":"<p>JWT Access Token (Required) - User only</p>\n"}],"url":"https://e-commerce-nest-js.vercel.app/order/cancel/:id","description":"<p>Cancel a pending order.</p>\n<p><strong>Headers Required:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>JWT Access Token</td>\n<td>Required, Must be <code>user</code> role</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>Order MongoDB ObjectId</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Notes:</strong></p>\n<ul>\n<li>Order must have <code>status: pending</code></li>\n<li>Cannot cancel a paid order (must refund first)</li>\n<li>On success: stock is restored, coupon usage is removed, cart is unlocked (<code>isOrdered: false</code>)</li>\n<li>Order status becomes <code>cancelled</code></li>\n</ul>\n<p><strong>Rate Limit:</strong> 100 requests / 60 seconds per IP</p>\n","urlObject":{"protocol":"https","path":["order","cancel",":id"],"host":["e-commerce-nest-js","vercel","app"],"query":[],"variable":[{"id":"68fd8dfe-4838-4732-823f-3ed49eea0cfe","description":{"content":"<p>Order MongoDB ObjectId</p>\n","type":"text/plain"},"type":"any","value":"64f1a2b3c4d5e6f7a8b9c0d6","key":"id"}]}},"response":[{"id":"bc4723f8-f4f2-4348-bba5-a5e60e80bd08","name":"200 - Order Cancelled","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/order/cancel/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["order","cancel",":id"],"variable":[{"id":"68fd8dfe-4838-4732-823f-3ed49eea0cfe","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d6","description":"Order MongoDB ObjectId"}]},"description":"Cancel a pending order.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Order MongoDB ObjectId |\n\n**Notes:**\n- Order must have `status: pending`\n- Cannot cancel a paid order (must refund first)\n- On success: stock is restored, coupon usage is removed, cart is unlocked (`isOrdered: false`)\n- Order status becomes `cancelled`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Order Cancelled Successfully\",\n  \"order\": {\n    \"_id\": \"64f1a2b3c4d5e6f7a8b9c0d6\",\n    \"status\": \"cancelled\"\n  }\n}"},{"id":"7e29d50a-da9c-44a9-8a09-09f32f4f35c3","name":"400 - Cannot Cancel Paid Order","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/order/cancel/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["order","cancel",":id"],"variable":[{"id":"68fd8dfe-4838-4732-823f-3ed49eea0cfe","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d6","description":"Order MongoDB ObjectId"}]},"description":"Cancel a pending order.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Order MongoDB ObjectId |\n\n**Notes:**\n- Order must have `status: pending`\n- Cannot cancel a paid order (must refund first)\n- On success: stock is restored, coupon usage is removed, cart is unlocked (`isOrdered: false`)\n- Order status becomes `cancelled`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 400,\n  \"message\": \"Paid Orders Must Be Refunded Before Cancellation\"\n}"},{"id":"cb506e50-4abe-4fbb-ae56-b6922aa92fe0","name":"400 - Order Cannot Be Cancelled","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/order/cancel/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["order","cancel",":id"],"variable":[{"id":"68fd8dfe-4838-4732-823f-3ed49eea0cfe","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d6","description":"Order MongoDB ObjectId"}]},"description":"Cancel a pending order.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Order MongoDB ObjectId |\n\n**Notes:**\n- Order must have `status: pending`\n- Cannot cancel a paid order (must refund first)\n- On success: stock is restored, coupon usage is removed, cart is unlocked (`isOrdered: false`)\n- Order status becomes `cancelled`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Bad Request","code":400,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 400,\n  \"message\": \"Order Cannot Be Cancelled\"\n}"},{"id":"4974adfc-e9da-4e96-9574-5f2ff55ad604","name":"429 - Too Many Requests","originalRequest":{"method":"PATCH","header":[{"key":"token","value":"","description":"JWT Access Token (Required) - User only"}],"url":{"raw":"https://e-commerce-nest-js.vercel.app/order/cancel/:id","protocol":"https","host":["e-commerce-nest-js","vercel","app"],"path":["order","cancel",":id"],"variable":[{"id":"68fd8dfe-4838-4732-823f-3ed49eea0cfe","key":"id","value":"64f1a2b3c4d5e6f7a8b9c0d6","description":"Order MongoDB ObjectId"}]},"description":"Cancel a pending order.\n\n**Headers Required:**\n\n| Header | Value | Description |\n|---|---|---|\n| token | JWT Access Token | Required, Must be `user` role |\n\n**URL Params:**\n\n| Param | Description |\n|---|---|\n| id | Order MongoDB ObjectId |\n\n**Notes:**\n- Order must have `status: pending`\n- Cannot cancel a paid order (must refund first)\n- On success: stock is restored, coupon usage is removed, cart is unlocked (`isOrdered: false`)\n- Order status becomes `cancelled`\n\n**Rate Limit:** 100 requests / 60 seconds per IP"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 429,\n  \"message\": \"ThrottlerException: Too Many Requests\"\n}"}],"_postman_id":"12e0927a-e028-45a2-9ad1-99f444ef7e3b"}],"id":"c062f9ec-72a2-40f7-b412-3a0b92d7a82e","description":"<p>Endpoints for order management. Includes cash orders, Stripe card payments, webhooks, refunds, and order retrieval.</p>\n","_postman_id":"c062f9ec-72a2-40f7-b412-3a0b92d7a82e"}],"variable":[{"key":"base_url","value":"https://e-commerce-nest-js.vercel.app"},{"key":"token","value":"","description":"JWT Access Token (expires in 1h) - Set this after Sign In"},{"key":"refreshtoken","value":"","description":"JWT Refresh Token (expires in 1y) - Set this after Sign In"},{"key":"supabase_service_role_api_key_0hsq","secret":true}]}