{"info":{"_postman_id":"23212bcd-e7f3-4d23-8467-902b96311def","name":"Individual Challenge CH6","description":"<html><head></head><body><p>Mini Challenge Individu Chapter 6</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"22814931","collectionId":"23212bcd-e7f3-4d23-8467-902b96311def","publishedId":"2sA3BuVoXL","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-04-28T15:00:15.000Z"},"item":[{"name":"product","item":[{"name":"get products","id":"adb499d7-8a62-4fa3-bccb-66ad35e863eb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:2000/api/v1/products?search=&page=1&limit=10","urlObject":{"protocol":"http","port":"2000","path":["api","v1","products"],"host":["localhost"],"query":[{"key":"search","value":""},{"key":"page","value":"1"},{"key":"limit","value":"10"}],"variable":[]}},"response":[{"id":"8533f422-b5aa-4e7d-97d8-37460bc987c0","name":"success","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:2000/api/v1/products?search=&page=1&limit=10","protocol":"http","host":["localhost"],"port":"2000","path":["api","v1","products"],"query":[{"key":"search","value":""},{"key":"page","value":"1"},{"key":"limit","value":"10"}]}},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": \"all product data retrieved successfully\",\n    \"totalItems\": 1,\n    \"pagination\": {\n        \"totalPages\": 1,\n        \"currentPage\": 1,\n        \"pageItems\": 1,\n        \"nextPage\": null,\n        \"prevPage\": null\n    },\n    \"data\": [\n        {\n            \"id\": 1,\n            \"name\": \"product1\",\n            \"price\": 1000,\n            \"createdAt\": \"2024-04-28T20:18:27.000Z\",\n            \"updatedAt\": \"2024-04-28T20:18:29.000Z\"\n        }\n    ]\n}"},{"id":"fb3c3f4d-8028-4b62-872a-3b867f9cb6e7","name":"empty","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:2000/api/v1/products?search=&page=1&limit=10","protocol":"http","host":["localhost"],"port":"2000","path":["api","v1","products"],"query":[{"key":"search","value":""},{"key":"page","value":"1"},{"key":"limit","value":"10"}]}},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": \"all product data retrieved successfully\",\n    \"totalItems\": 1,\n    \"pagination\": {\n        \"totalPages\": 1,\n        \"currentPage\": 2,\n        \"pageItems\": 0,\n        \"nextPage\": null,\n        \"prevPage\": 1\n    },\n    \"data\": \"empty product data\"\n}"}],"_postman_id":"adb499d7-8a62-4fa3-bccb-66ad35e863eb"},{"name":"get product","id":"0c7b33da-ad02-48d5-b868-dc914a93bfd9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:2000/api/v1/products/1","urlObject":{"protocol":"http","port":"2000","path":["api","v1","products","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"b78f6f74-0b75-4f77-badf-befbe8403b0b","name":"success","originalRequest":{"method":"GET","header":[],"url":"http://localhost:2000/api/v1/products/id"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": \"product data retrieved successfully\",\n    \"data\": {\n        \"id\": 8,\n        \"name\": \"prod\",\n        \"price\": 123,\n        \"createdAt\": \"2024-04-28T18:11:26.234Z\",\n        \"updatedAt\": \"2024-04-28T18:11:26.234Z\"\n    }\n}"},{"id":"71d3607e-aa2f-4fd7-baef-58ce84672b90","name":"not found","originalRequest":{"method":"GET","header":[],"url":"http://localhost:2000/api/v1/products/1"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 404,\n    \"message\": \"product not found\"\n}"}],"_postman_id":"0c7b33da-ad02-48d5-b868-dc914a93bfd9"},{"name":"create product","id":"520f56ec-2275-4ec5-95a8-d71e565a43a9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"product 4\",\r\n    \"price\": 2000\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2000/api/v1/products","urlObject":{"protocol":"http","port":"2000","path":["api","v1","products"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"db1bfbf1-2f88-4e7b-af37-74d7e4bc3bda","name":"success","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"product 1\",\r\n    \"price\": 1000\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2000/api/v1/products"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": \"product created successfully\",\n    \"data\": {\n        \"id\": 3,\n        \"name\": \"product 1\",\n        \"price\": 1000,\n        \"createdAt\": \"2024-04-28T14:07:20.941Z\",\n        \"updatedAt\": \"2024-04-28T14:07:20.941Z\"\n    }\n}"},{"id":"b0919504-2106-4332-9f8a-c71b507dd5dd","name":"already exist","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"product 1\",\r\n    \"price\": 1000\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2000/api/v1/products"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 422,\n    \"message\": \"product already exist\"\n}"},{"id":"7ae4a4d7-ea22-4115-a029-d8d2c932b772","name":"invalid input","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": 1,\r\n    \"price\": 1000\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2000/api/v1/products"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 422,\n    \"message\": \"\\\"name\\\" must be a string\"\n}"}],"_postman_id":"520f56ec-2275-4ec5-95a8-d71e565a43a9"},{"name":"update product","id":"19db9fe1-6db1-47b8-ad18-da81a6614939","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"product 3\",\r\n    \"price\": 3000\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2000/api/v1/products/54","urlObject":{"protocol":"http","port":"2000","path":["api","v1","products","54"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"65cf7dd9-eb5d-4aac-a9c8-2ef8782223d4","name":"success","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"product 3\",\r\n    \"price\": 3000\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2000/api/v1/products/id"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": \"product updated successfully\",\n    \"data\": {\n        \"id\": 1,\n        \"name\": \"product 3\",\n        \"price\": 3000,\n        \"createdAt\": \"2024-04-28T14:02:54.975Z\",\n        \"updatedAt\": \"2024-04-28T14:02:54.975Z\"\n    }\n}"},{"id":"5600f118-c845-4b74-8ead-9e2beac22cbe","name":"already exist","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"product 1\",\r\n    \"price\": 1000\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2000/api/v1/products/id"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 422,\n    \"message\": \"product already exist\"\n}"},{"id":"8c3799af-01fc-4107-9d4b-3a06c3dddde9","name":"invalid input","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": 1,\r\n    \"price\": 1000\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2000/api/v1/products/id"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 422,\n    \"message\": \"\\\"name\\\" must be a string\"\n}"},{"id":"ac2ca199-82b5-470a-98db-347605c02614","name":"invalid id","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": 1,\r\n    \"price\": 1000\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2000/api/v1/products/id"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 400,\n    \"message\": \"id is not a number\"\n}"},{"id":"c2066937-2679-473e-961a-3282446168c1","name":"not found","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"product 3\",\r\n    \"price\": 3000\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2000/api/v1/products/8"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 404,\n    \"message\": \"product not found\"\n}"}],"_postman_id":"19db9fe1-6db1-47b8-ad18-da81a6614939"},{"name":"delete product","id":"8f8a6937-984c-42d5-8007-5be4287e6c33","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:2000/api/v1/products/sd","urlObject":{"protocol":"http","port":"2000","path":["api","v1","products","sd"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"cf3f8e38-b856-4a9f-a577-ee66f10cdcc7","name":"not found","originalRequest":{"method":"DELETE","header":[],"url":"http://localhost:2000/api/v1/products/1"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 404,\n    \"message\": \"product not found\"\n}"},{"id":"e1db985c-72d9-4994-a06b-63601a0bf484","name":"invalid id","originalRequest":{"method":"DELETE","header":[],"url":"http://localhost:2000/api/v1/products/viery"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 400,\n    \"message\": \"id is not a number\"\n}"},{"id":"10ee2dec-a381-4784-a0a2-0982524bb3af","name":"success","originalRequest":{"method":"DELETE","header":[],"url":"http://localhost:2000/api/v1/products/6"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": \"product deleted successfully\"\n}"}],"_postman_id":"8f8a6937-984c-42d5-8007-5be4287e6c33"}],"id":"064ac229-0d2b-47f2-8cdc-4ed7a4505c21","description":"<p>products API</p>\n","_postman_id":"064ac229-0d2b-47f2-8cdc-4ed7a4505c21"},{"name":"root","id":"729d34c7-adf3-4d20-949f-9a61e2bd5a02","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:2000/api/v1","urlObject":{"protocol":"http","port":"2000","path":["api","v1"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"b824224a-b534-4114-acc1-1536f0312952","name":"success","originalRequest":{"method":"GET","header":[],"url":"http://localhost:2000/api/v1/"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": \"Welcome to products API akuuuhh!\"\n}"},{"id":"aad5dd31-b410-4288-8ab0-10a79f5664c1","name":"not found","originalRequest":{"method":"GET","header":[],"url":"http://localhost:2000/api/v1"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": false,\n    \"method\": \"GET\",\n    \"url\": \"/api/v1s\",\n    \"message\": \"Not Found!\"\n}"}],"_postman_id":"729d34c7-adf3-4d20-949f-9a61e2bd5a02"}]}