{"info":{"_postman_id":"7f99eeb6-5013-44af-afc3-7d24c4d7634e","name":"DB2 Projekt","description":"<html><head></head><body><h1 id=\"shop-rest-api\">Shop REST API</h1>\n<p>Here is the documentation for my shop API written in Typescript with the mongo database. It provides simple CRUD endpoints as well as little more advanced ones for example for collecting orders.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Shop REST API","slug":"shop-rest-api"}],"owner":"17903248","collectionId":"7f99eeb6-5013-44af-afc3-7d24c4d7634e","publishedId":"2s8ZDVa3cT","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2023-01-18T07:15:54.000Z"},"item":[{"name":"Items","item":[{"name":"Get all items","id":"13c3f2ff-9f19-4fa3-9f27-05b007b2c46a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"127.0.0.1:3000/items","urlObject":{"port":"3000","path":["items"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"13c3f2ff-9f19-4fa3-9f27-05b007b2c46a"},{"name":"Get all with params","id":"e34d3895-2535-421a-83e1-0f392a57be34","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"127.0.0.1:3000/items?sort={\"price\":-1}&filter={\"delivery\": \"UPS\"}","urlObject":{"port":"3000","path":["items"],"host":["127","0","0","1"],"query":[{"key":"sort","value":"{\"price\":-1}"},{"key":"filter","value":"{\"delivery\": \"UPS\"}"}],"variable":[]}},"response":[],"_postman_id":"e34d3895-2535-421a-83e1-0f392a57be34"},{"name":"Create item","id":"c5b4606a-54d6-48df-9eff-8a530c0bd07b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"PC\",\n    \"price\": 123.456,\n    \"delivery\": [\"UPS\", \"PZU\"],\n    \"quantity\": 15,\n    \"categories\": [\"electronic\"],\n    \"rating\": [{\"score\": 10, \"description\" : \"\"}]\n}","options":{"raw":{"language":"json"}}},"url":"127.0.0.1:3000/items","urlObject":{"port":"3000","path":["items"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"c5b4606a-54d6-48df-9eff-8a530c0bd07b"},{"name":"Update item","id":"a5c64e7e-8692-4a04-b5c2-6b348249198a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"PC - test\",\n    \"price\": 123.456,\n    \"delivery\": [\"UPS\", \"PZU\"],\n    \"quantity\": 15,\n    \"categories\": [\"electronic\"],\n    \"rating\": [{\"score\": 10, \"description\" : \"\"}]\n}","options":{"raw":{"language":"json"}}},"url":"127.0.0.1:3000/items","urlObject":{"port":"3000","path":["items"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"a5c64e7e-8692-4a04-b5c2-6b348249198a"},{"name":"Delete item","id":"492875ae-5ea9-442a-8edb-b700293f0fb0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"127.0.0.1:3000/items","urlObject":{"port":"3000","path":["items"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"492875ae-5ea9-442a-8edb-b700293f0fb0"}],"id":"004c45de-b7f2-4baa-ada0-6c8b3048b0a3","_postman_id":"004c45de-b7f2-4baa-ada0-6c8b3048b0a3","description":""},{"name":"Ratings","item":[{"name":"Get ratings of all items","id":"0c21c58f-ba99-4428-b6eb-54d4aa4ae452","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"127.0.0.1:3000/ratings","urlObject":{"port":"3000","path":["ratings"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"0c21c58f-ba99-4428-b6eb-54d4aa4ae452"},{"name":"Get rating statistics","id":"901ca3cc-9b5a-49a3-b79f-6c25971629b3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"127.0.0.1:3000/ratings/stats","urlObject":{"port":"3000","path":["ratings","stats"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"901ca3cc-9b5a-49a3-b79f-6c25971629b3"},{"name":"Get avg ratings of one item","id":"247c0f33-7c47-45f2-8763-a4867b9b9aaf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"127.0.0.1:3000/ratings/avg","urlObject":{"port":"3000","path":["ratings","avg"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"247c0f33-7c47-45f2-8763-a4867b9b9aaf"},{"name":"Add rating to item","id":"94c5eb0c-d0d7-41bc-913a-2004e66b4a2c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"score\": 5,\n    \"description\": \"Very good\"\n}","options":{"raw":{"language":"json"}}},"url":"127.0.0.1:3000/ratings/63b896573ba8054dfaa13a7c","urlObject":{"port":"3000","path":["ratings","63b896573ba8054dfaa13a7c"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"94c5eb0c-d0d7-41bc-913a-2004e66b4a2c"}],"id":"64973c8c-e9fc-45bf-a1b8-e3b35d930a9f","_postman_id":"64973c8c-e9fc-45bf-a1b8-e3b35d930a9f","description":""},{"name":"Cart","item":[{"name":"Check cart","id":"d6ec57e2-dfa1-49f3-8267-d9fc592d4c2a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"cart\": [\n        {\"id\": \"63b896573ba8054dfaa13a81\", \"quantity\": 2}, \n        {\"id\": \"63b896573ba8054dfaa13a7c\", \"quantity\": 700 }\n    ]\n}\n","options":{"raw":{"language":"json"}}},"url":"127.0.0.1:3000/cart","urlObject":{"port":"3000","path":["cart"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"d6ec57e2-dfa1-49f3-8267-d9fc592d4c2a"}],"id":"eec1a304-e612-435c-bd8c-2ee6f62a2252","_postman_id":"eec1a304-e612-435c-bd8c-2ee6f62a2252","description":""},{"name":"Order","item":[{"name":"Get all orders","id":"4dc8ff47-11b2-402c-9f2d-049a55ee9552","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"127.0.0.1:3000/orders","urlObject":{"port":"3000","path":["orders"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"4dc8ff47-11b2-402c-9f2d-049a55ee9552"},{"name":"Get all unpaid orders ","id":"11936f3b-71ec-421f-b1c2-72b36aec9e83","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"127.0.0.1:3000/orders?sort={\"total_price\":-1}&filter={\"payed\": false}","urlObject":{"port":"3000","path":["orders"],"host":["127","0","0","1"],"query":[{"key":"sort","value":"{\"total_price\":-1}"},{"key":"filter","value":"{\"payed\": false}"}],"variable":[]}},"response":[],"_postman_id":"11936f3b-71ec-421f-b1c2-72b36aec9e83"},{"name":"Create order","id":"a1e37ddd-8389-4aa8-8763-42a3b4bd8de7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n   \"customer\": {\n        \"name\": \"John\",\n        \"surname\": \"Doe\",\n        \"email\": \"johndoe@example.com\",\n        \"phone_number\": \"555-555-5555\"\n    },\n    \"payment_method\": \"credit_card\",\n    \"message\": \"Please deliver as soon as possible.\",\n    \"delivery_address\": {\n        \"country\": \"United States\",\n        \"city\": \"New York\",\n        \"code\": \"10001\",\n        \"street_and_number\": \"123 Main St\"\n    },\n    \"items\": [\n        { \"id\": \"63b896573ba8054dfaa13a7c\", \"quantity\": 2, \"delivery\": \"63c6da45601c21f116357805\" },\n        { \"id\": \"63b896573ba8054dfaa13a7e\", \"quantity\": 1, \"delivery\": \"63c6da45601c21f116357805\" },\n        { \"id\": \"63b896573ba8054dfaa13a7f\", \"quantity\": 1, \"delivery\": \"63c6da45601c21f116357806\"}\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"127.0.0.1:3000/orders","urlObject":{"port":"3000","path":["orders"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"a1e37ddd-8389-4aa8-8763-42a3b4bd8de7"},{"name":"Pay for the order","id":"6ac866e3-0b1b-4351-ad23-1eab1b9fd123","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"url":"127.0.0.1:3000/orders/63c78af77bd9fa742e32b56d","urlObject":{"port":"3000","path":["orders","63c78af77bd9fa742e32b56d"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"6ac866e3-0b1b-4351-ad23-1eab1b9fd123"}],"id":"2b416f0d-d411-43ac-8012-957c7879c4eb","_postman_id":"2b416f0d-d411-43ac-8012-957c7879c4eb","description":""},{"name":"Delivery","item":[{"name":"Get all delivery types","id":"f39108bb-adcc-4643-9de6-03423cfdcc50","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"PSU\",\n    \"price\": 30,\n    \"free\": 50\n}","options":{"raw":{"language":"json"}}},"url":"127.0.0.1:3000/deliveries","urlObject":{"port":"3000","path":["deliveries"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"f39108bb-adcc-4643-9de6-03423cfdcc50"},{"name":"Create new delivery","id":"b07b98b0-abf5-40fa-970c-589557530fa6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"PSU\",\n    \"price\": 30,\n    \"free\": 50\n}","options":{"raw":{"language":"json"}}},"url":"127.0.0.1:3000/deliveries","urlObject":{"port":"3000","path":["deliveries"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"b07b98b0-abf5-40fa-970c-589557530fa6"}],"id":"eff47b6e-00a7-4954-90d8-2fe280aa21dc","_postman_id":"eff47b6e-00a7-4954-90d8-2fe280aa21dc","description":""}]}