{"info":{"_postman_id":"9e85a12a-1c66-4850-9655-2f357dbbf6e3","name":"Backend Auth","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"46739172","collectionId":"9e85a12a-1c66-4850-9655-2f357dbbf6e3","publishedId":"2sB3WvNJac","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-11-14T13:16:38.000Z"},"item":[{"name":"Sign-In","id":"fd54d4e1-3c21-4417-9436-2dd3a35048dd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"email\": \"admin@example.com\",\r\n  \"password\": \"password123\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://back-end-auth-9yua.onrender.com/api/auth/login","urlObject":{"protocol":"https","path":["api","auth","login"],"host":["back-end-auth-9yua","onrender","com"],"query":[],"variable":[]}},"response":[{"id":"88ae4f80-4134-48ba-81e6-9763b283ab9d","name":"Sign-In","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"email\": \"admin@example.com\",\r\n  \"password\": \"password123\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/auth/login"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"370"},{"key":"ETag","value":"W/\"172-iauJ9v9hXLAcJX12PaOJzHVMdmc\""},{"key":"Date","value":"Fri, 14 Nov 2025 10:21:15 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"message\": \"User logged in successfully\",\n    \"data\": {\n        \"user\": {\n            \"id\": \"6916edcf0df853fe9d65ac86\",\n            \"name\": \"Admin\",\n            \"email\": \"admin@example.com\",\n            \"role\": \"admin\"\n        },\n        \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY5MTZlZGNmMGRmODUzZmU5ZDY1YWM4NiIsInJvbGUiOiJhZG1pbiIsImlhdCI6MTc2MzExNTY3NSwiZXhwIjoxNzYzNzIwNDc1fQ.8cliYTZ05WtAyYynFCEIjfgf0YaBmGERKGlL3bnXbkM\"\n    }\n}"}],"_postman_id":"fd54d4e1-3c21-4417-9436-2dd3a35048dd"},{"name":"Sign-Up","id":"8f171fea-21e0-4575-9056-f47ac30597d3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"Admin-main\",\r\n  \"email\": \"main@example.com\",\r\n  \"password\": \"password\",\r\n  \"role\": \"admin\"\r\n}\r\n\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/auth/register","urlObject":{"protocol":"http","port":"5000","path":["api","auth","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"0d38890e-09c2-43e5-b314-32a6ba33a87a","name":"Sign-Up","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"Admin-main\",\r\n  \"email\": \"main@example.com\",\r\n  \"password\": \"password\",\r\n  \"role\": \"admin\"\r\n}\r\n\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/auth/register"},"status":"Created","code":201,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"375"},{"key":"ETag","value":"W/\"177-SYrwneuRNCaAIW64YE7C2aUdxNQ\""},{"key":"Date","value":"Fri, 14 Nov 2025 10:12:39 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"message\": \"User registered successfully\",\n    \"data\": {\n        \"user\": {\n            \"id\": \"69170096b5e45c89c8453440\",\n            \"name\": \"Admin-main\",\n            \"email\": \"main@example.com\",\n            \"role\": \"admin\"\n        },\n        \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY5MTcwMDk2YjVlNDVjODljODQ1MzQ0MCIsInJvbGUiOiJhZG1pbiIsImlhdCI6MTc2MzExNTE1OSwiZXhwIjoxNzYzNzE5OTU5fQ.jdgCcWcka0eALn31kMyRmvqFwhx6rkGMA14nSCoUZ18\"\n    }\n}"}],"_postman_id":"8f171fea-21e0-4575-9056-f47ac30597d3"},{"name":"CreateProduct","id":"b3cff5f0-e085-49ef-acdc-88a1c2a56d9f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Bearer","value":" eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY5MTVkMWUyMGI5MTBhMzFiMzJkMjlmNSIsInJvbGUiOiJhZG1pbiIsImlhdCI6MTc2MzAzNzgwNywiZXhwIjoxNzYzNjQyNjA3fQ.6q_o34edg5FFell8V5qodSfuk0zTvEFFkEvj-YaZfe8","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"Television\",\r\n  \"description\": \"Sleek flat screen televison\",\r\n  \"price\": 125000,\r\n  \"inStock\": true\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/product/create","urlObject":{"protocol":"http","port":"5000","path":["api","product","create"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"36853156-6d9e-4a93-8444-6df008c00fe5","name":"CreateProduct","originalRequest":{"method":"POST","header":[{"key":"Bearer","value":" eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY5MTVkMWUyMGI5MTBhMzFiMzJkMjlmNSIsInJvbGUiOiJhZG1pbiIsImlhdCI6MTc2MzAzNzgwNywiZXhwIjoxNzYzNjQyNjA3fQ.6q_o34edg5FFell8V5qodSfuk0zTvEFFkEvj-YaZfe8","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"Television\",\r\n  \"description\": \"Sleek flat screen televison\",\r\n  \"price\": 125000,\r\n  \"inStock\": true\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/product/create"},"status":"Created","code":201,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"244"},{"key":"ETag","value":"W/\"f4-kwOXm72QEzaaHYrMWnTJPTOfrmc\""},{"key":"Date","value":"Fri, 14 Nov 2025 09:58:04 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"message\": \"Product created successfully\",\n    \"data\": {\n        \"name\": \"Television\",\n        \"description\": \"Sleek flat screen televison\",\n        \"price\": 125000,\n        \"inStock\": true,\n        \"_id\": \"6916fd2cb5e45c89c8453435\",\n        \"createdAt\": \"2025-11-14T09:58:04.270Z\",\n        \"__v\": 0\n    }\n}"}],"_postman_id":"b3cff5f0-e085-49ef-acdc-88a1c2a56d9f"},{"name":"GetProduct","id":"01adaaab-f36f-4129-a0b6-1315e0607c8c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://back-end-auth-9yua.onrender.com/api/product/all","urlObject":{"protocol":"https","path":["api","product","all"],"host":["back-end-auth-9yua","onrender","com"],"query":[],"variable":[]}},"response":[{"id":"28a9b833-94de-4d83-bb29-d605d142043a","name":"GetProduct","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/product/all"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"363"},{"key":"ETag","value":"W/\"16b-ziLzqi6hX/xU1u81wr1S0eZAHo4\""},{"key":"Date","value":"Fri, 14 Nov 2025 10:27:57 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": [\n        {\n            \"_id\": \"6916eee10df853fe9d65ac8f\",\n            \"name\": \"Laptop\",\n            \"description\": \"Powerful laptop\",\n            \"price\": 2500,\n            \"inStock\": true,\n            \"createdAt\": \"2025-11-14T08:57:05.067Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"6916fd2cb5e45c89c8453435\",\n            \"name\": \"Television\",\n            \"description\": \"Sleek flat screen televison\",\n            \"price\": 125000,\n            \"inStock\": true,\n            \"createdAt\": \"2025-11-14T09:58:04.270Z\",\n            \"__v\": 0\n        }\n    ]\n}"}],"_postman_id":"01adaaab-f36f-4129-a0b6-1315e0607c8c"},{"name":"GetProductById","id":"04e2b3f4-6a5c-4f7c-beb6-32617cd20d60","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/product/6916eee10df853fe9d65ac8f","urlObject":{"protocol":"http","port":"5000","path":["api","product","6916eee10df853fe9d65ac8f"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"55ecf274-5443-440e-97b2-9af434c9140b","name":"GetProductById","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/product/6916eee10df853fe9d65ac8f"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"185"},{"key":"ETag","value":"W/\"b9-WOTHdMCxfJch1C146DHsw1ISfik\""},{"key":"Date","value":"Fri, 14 Nov 2025 13:41:10 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"_id\": \"6916eee10df853fe9d65ac8f\",\n        \"name\": \"Laptop\",\n        \"description\": \"Powerful laptop\",\n        \"price\": 2500,\n        \"inStock\": true,\n        \"createdAt\": \"2025-11-14T08:57:05.067Z\",\n        \"__v\": 0\n    }\n}"}],"_postman_id":"04e2b3f4-6a5c-4f7c-beb6-32617cd20d60"},{"name":"UpdateProduct","id":"0b9a45f9-9bad-418b-89b7-a7dbee0cee1e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"Television\",\r\n  \"description\": \"Sleek flat screen televison\",\r\n  \"price\": 125000,\r\n  \"inStock\": true\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/product/6916fd2cb5e45c89c8453435/update","urlObject":{"protocol":"http","port":"5000","path":["api","product","6916fd2cb5e45c89c8453435","update"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"576d0bb9-de0f-4ca4-9f2a-ab684e814eda","name":"UpdateProduct","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"Television\",\r\n  \"description\": \"Sleek flat screen televison\",\r\n  \"price\": 125000,\r\n  \"inStock\": true\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/product/6916fd2cb5e45c89c8453435/update"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"61"},{"key":"ETag","value":"W/\"3d-I5BvxNwuiP3GAdGT93vvo3u33GA\""},{"key":"Date","value":"Fri, 14 Nov 2025 10:36:30 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"message\": \"Product updated successfully\"\n}"}],"_postman_id":"0b9a45f9-9bad-418b-89b7-a7dbee0cee1e"},{"name":"DeleteProduct","id":"6fed0921-ee88-48ef-836a-1730516a8e5c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/product/6916eeb00df853fe9d65ac8c/delete","urlObject":{"protocol":"http","port":"5000","path":["api","product","6916eeb00df853fe9d65ac8c","delete"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"58fb3bea-3fa6-4787-9564-780dce63f2f3","name":"DeleteProduct","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/product/6916eeb00df853fe9d65ac8c/delete"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"61"},{"key":"ETag","value":"W/\"3d-0MKKEI/GFRktvf1V3ciVH0CiQ5A\""},{"key":"Date","value":"Fri, 14 Nov 2025 09:58:37 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"message\": \"Product deleted Successfully\"\n}"}],"_postman_id":"6fed0921-ee88-48ef-836a-1730516a8e5c"},{"name":"GetUsers","id":"abda653d-9d4f-4efd-b425-4abae5576dc2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/user/users","urlObject":{"protocol":"http","port":"5000","path":["api","user","users"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"630ffe7a-e1b2-4e5b-bc47-183ca3df6b25","name":"GetUsers","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/user/users"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"586"},{"key":"ETag","value":"W/\"24a-+YKY8yV1NxC0RdVm9DwYRT7hQ+o\""},{"key":"Date","value":"Fri, 14 Nov 2025 13:55:26 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": [\n        {\n            \"_id\": \"6916e9a07b2a752b408528b3\",\n            \"name\": \"Regular User\",\n            \"email\": \"user@example.com\",\n            \"role\": \"user\",\n            \"createdAt\": \"2025-11-14T08:34:40.664Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"6916edcf0df853fe9d65ac86\",\n            \"name\": \"Admin\",\n            \"email\": \"admin@example.com\",\n            \"role\": \"admin\",\n            \"createdAt\": \"2025-11-14T08:52:31.245Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"6916fc050df853fe9d65ac9c\",\n            \"name\": \"Uju\",\n            \"email\": \"uju@gmail.com\",\n            \"role\": \"user\",\n            \"createdAt\": \"2025-11-14T09:53:09.891Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"6916fff5b5e45c89c845343c\",\n            \"name\": \"User2\",\n            \"email\": \"user2@example.com\",\n            \"role\": \"user\",\n            \"createdAt\": \"2025-11-14T10:09:57.537Z\",\n            \"__v\": 0\n        }\n    ]\n}"}],"_postman_id":"abda653d-9d4f-4efd-b425-4abae5576dc2"},{"name":"DeleteUser","id":"fb9dca88-3548-4c60-8ffe-4f4240621519","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/users/69170096b5e45c89c8453440","urlObject":{"protocol":"http","port":"5000","path":["api","users","69170096b5e45c89c8453440"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"9c8be5ef-b1f3-4483-9273-0d33b9af6e5d","name":"DeleteUser","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/users/69170096b5e45c89c8453440"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"58"},{"key":"ETag","value":"W/\"3a-WIRP18LrlipyzL/lm3MsmTsH7cI\""},{"key":"Date","value":"Fri, 14 Nov 2025 10:13:11 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"message\": \"User deleted successfully\"\n}"}],"_postman_id":"fb9dca88-3548-4c60-8ffe-4f4240621519"}]}