{"info":{"_postman_id":"893a1dee-fbd4-4114-acd8-30cde9ad8734","name":"inventory_assignment_devdynamics","description":"<html><head></head><body><h3 id=\"inventory-backend-api-documentation-and-usage\">Inventory Backend API Documentation and Usage</h3>\n<p>This project implements a RESTful API'S using Node.js with Express, designed to manage an inventory system, customer carts, and discount coupons. Below is a concise guide to understanding the core functionalities of this API, including various endpoints and their descriptions.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"32461181","collectionId":"893a1dee-fbd4-4114-acd8-30cde9ad8734","publishedId":"2sA3XMjP7u","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-06-11T19:31:36.000Z"},"item":[{"name":"Add to inventory","event":[{"listen":"test","script":{"id":"d1568e78-de8c-49e0-bea3-646273331989","exec":["pm.test(\"Successful POST request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 201]);","});",""],"type":"text/javascript","packages":{}}}],"id":"0e2a2454-d3a2-495e-b777-e5d6389c7751","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"productId\":\"1253\",\n    \"quantity\": 1000\n}","options":{"raw":{"language":"json"}}},"url":"https://inventory-assignment-npub.vercel.app/add-item-to-inventory","description":"<ol>\n<li>Add a few products with specific quantities to the inventory using the <code>/add-item-to-inventory</code> endpoint.</li>\n</ol>\n","urlObject":{"protocol":"https","path":["add-item-to-inventory"],"host":["inventory-assignment-npub","vercel","app"],"query":[],"variable":[]}},"response":[],"_postman_id":"0e2a2454-d3a2-495e-b777-e5d6389c7751"},{"name":"Remove from inventory","id":"36f829e1-eba5-49f8-8ceb-faa4169f5724","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"productId\":\"1251\",\r\n    \"quantity\": 80\r\n}","options":{"raw":{"language":"json"}}},"url":"https://inventory-assignment-npub.vercel.app/remove-item-from-inventory","description":"<p>2. Remove items from the inventory using the <code>/remove-item-from-inventory</code> endpoint.</p>\n","urlObject":{"protocol":"https","path":["remove-item-from-inventory"],"host":["inventory-assignment-npub","vercel","app"],"query":[],"variable":[]}},"response":[],"_postman_id":"36f829e1-eba5-49f8-8ceb-faa4169f5724"},{"name":"Add to cart","id":"72edc3fa-3c42-4ff7-98b8-ac68cb42ddcd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"customerId\":\"USER1\",\r\n    \"productId\":\"1252\",\r\n    \"quantity\": 100\r\n}","options":{"raw":{"language":"json"}}},"url":"https://inventory-assignment-npub.vercel.app/add-item-to-cart","description":"<p>3. Add products to a customer’s cart using the <code>/add-item-to-cart</code> endpoint.</p>\n","urlObject":{"protocol":"https","path":["add-item-to-cart"],"host":["inventory-assignment-npub","vercel","app"],"query":[],"variable":[]}},"response":[],"_postman_id":"72edc3fa-3c42-4ff7-98b8-ac68cb42ddcd"},{"name":"Apply discount coupon","id":"843e5c07-74d7-4a4e-accb-b602aa80fd84","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"cartValue\":300,\r\n    \"discountId\":\"SUMMER20\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://inventory-assignment-npub.vercel.app/apply-discount","description":"<p>4. Apply a discount coupon to the cart using the <code>/apply-discount</code> endpoint.</p>\n","urlObject":{"protocol":"https","path":["apply-discount"],"host":["inventory-assignment-npub","vercel","app"],"query":[],"variable":[]}},"response":[],"_postman_id":"843e5c07-74d7-4a4e-accb-b602aa80fd84"},{"name":"Get cart details","id":"718702f9-bc59-4a00-b3d5-f792060060da","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\r\n    \"customerId\":\"USER1\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://inventory-assignment-npub.vercel.app/getcart-details","description":"<p>get the content of the cart using <code>/getcart-details</code>endpoint.</p>\n","urlObject":{"protocol":"https","path":["getcart-details"],"host":["inventory-assignment-npub","vercel","app"],"query":[],"variable":[]}},"response":[],"_postman_id":"718702f9-bc59-4a00-b3d5-f792060060da"},{"name":"Add coupon code","id":"9b7195e7-23d7-42a4-aa11-aa7ac55a3c3c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"discountId\":\"SUMMER30\",\r\n     \"discountPercentage\":30,\r\n      \"maxDiscountCap\":200\r\n}","options":{"raw":{"language":"json"}}},"url":"https://inventory-assignment-npub.vercel.app/add-coupon-code","description":"<p>add new coupon code with discount percentage and maxdiscountcap <code>/add-coupon-code</code>endpoint.</p>\n","urlObject":{"protocol":"https","path":["add-coupon-code"],"host":["inventory-assignment-npub","vercel","app"],"query":[],"variable":[]}},"response":[],"_postman_id":"9b7195e7-23d7-42a4-aa11-aa7ac55a3c3c"},{"name":"Health_chech_api","id":"97ab90bf-eb84-465a-ae74-57ec5899c81e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://inventory-assignment-npub.vercel.app/","description":"<p>this api is just for health check of the server in production</p>\n","urlObject":{"protocol":"https","path":[""],"host":["inventory-assignment-npub","vercel","app"],"query":[],"variable":[]}},"response":[],"_postman_id":"97ab90bf-eb84-465a-ae74-57ec5899c81e"}],"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""]}},{"listen":"test","script":{"type":"text/javascript","exec":[""]}}],"variable":[{"id":"249ccd95-70dd-4206-89ae-6c8cff147d64","key":"id","value":"1"},{"id":"26c7780a-78af-4958-89f9-709d8f10635c","key":"base_url","value":"https://postman-rest-api-learner.glitch.me/"}]}