{"info":{"_postman_id":"92366d83-0261-44a3-8d81-dc103762306b","name":"African Marketplace API","description":"<html><head></head><body><h1 id=\"introduction\">Introduction</h1>\n<p>Welcome to the African Marketplace API. The following is a full listing of endpoints to help you connect and interact with the RESTful API.</p>\n<h1 id=\"base-url\">Base Url</h1>\n<p>All endpoints listed below in this documentation require the following baseURL: <a href=\"https://africanmarket.herokuapp.com/api/\">https://africanmarket.herokuapp.com/api/</a></p>\n<h1 id=\"authentication\">Authentication</h1>\n<p>When connecting to the server, authentication <code>tokens</code> are required to gain access to the databse. This requires a new <code>User</code> to register and then login to the database. At the point of a successful login, the <code>User</code> will then be assigned a token that can be uses as a key:value pair in the Headers:</p>\n<p><code>Authorization : Your access_token here</code></p>\n<h4 id=\"author\">Author</h4>\n<p>Jade Lopez</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Introduction","slug":"introduction"},{"content":"Base Url","slug":"base-url"},{"content":"Authentication","slug":"authentication"}],"owner":"8666652","collectionId":"92366d83-0261-44a3-8d81-dc103762306b","publishedId":"SVn3ruoH","public":true,"customColor":{"top-bar":"0D6872","right-sidebar":"062E33","highlight":"F29421"},"publishDate":"2019-09-27T05:08:44.000Z"},"item":[{"name":"Registration and Login","item":[{"name":"Sign Up","id":"dd79ca24-ba2c-41a3-8045-885d25cd875b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"username\": \"johnUser\",\n\t\"password\": \"johnPassword\",\n\t\"first_name\": \"John\",\n\t\"last_name\": \"Doe\",\n\t\"email\": \"john.doe@gmail.com\"\n}"},"url":"https://africanmarket.herokuapp.com/api/signup","description":"<p>To add a new <code>User</code>, you must <strong>not</strong> have an <code>authentication token</code> in your server request.</p>\n<p><em>Note</em> :  Creating a new <code>User</code> will <strong>not</strong> automatically log in a <code>User</code> to the database.</p>\n","urlObject":{"protocol":"https","path":["api","signup"],"host":["africanmarket","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"fed0a7db-963f-4c15-b5c7-b47739fb335d","name":"SignUp","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"username\": \"johnUser\",\n\t\"password\": \"johnPassword\",\n\t\"first_name\": \"John\",\n\t\"last_name\": \"Doe\",\n\t\"email\": \"john.doe@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://africanmarket.herokuapp.com/api/signup"},"status":"Created ","code":201,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Cowboy"},{"key":"Connection","value":"keep-alive"},{"key":"X-Dns-Prefetch-Control","value":"off"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Strict-Transport-Security","value":"max-age=15552000; includeSubDomains"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Xss-Protection","value":"1; mode=block"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"171"},{"key":"Etag","value":"W/\"ab-ARiqIgoqxGKGkNRA+l7X+3MjDsQ\""},{"key":"Date","value":"Fri, 27 Sep 2019 01:58:45 GMT"},{"key":"Via","value":"1.1 vegur"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 1,\n    \"username\": \"johnUser\",\n    \"password\": \"{{hash-password}}\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"email\": \"john.doe@gmail.com\"\n}"}],"_postman_id":"dd79ca24-ba2c-41a3-8045-885d25cd875b"},{"name":"Login","id":"41a1b08f-854d-473d-9494-f1bc430235de","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"username\": \"johnUser\",\n\t\"password\": \"johnPassword\"\n}"},"url":"https://africanmarket.herokuapp.com/api/login","description":"<p>After a new <code>User</code> has been created, the newly registered <code>User</code> must use a <code>username</code> and <code>password</code> to gain access. The <code>res.body</code> will send back an assigned <code>token</code> and <code>id</code> upon a successful login.</p>\n<p><em>Note</em> : The assigned <code>user id</code> sent in the <code>res.body</code> can be passed on when the new <code>User</code> adds a product to the database.</p>\n","urlObject":{"protocol":"https","path":["api","login"],"host":["africanmarket","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"e6d6262e-b234-48f5-a35c-8fba1718249a","name":"Login","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"username\": \"johnUser\",\n\t\"password\": \"johnPassword\"\n}","options":{"raw":{"language":"json"}}},"url":"https://africanmarket.herokuapp.com/api/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Cowboy"},{"key":"Connection","value":"keep-alive"},{"key":"X-Dns-Prefetch-Control","value":"off"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Strict-Transport-Security","value":"max-age=15552000; includeSubDomains"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Xss-Protection","value":"1; mode=block"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"147"},{"key":"Etag","value":"W/\"93-Di3yp5IgUK03eP2gID49Lm/Lges\""},{"key":"Date","value":"Fri, 27 Sep 2019 03:14:23 GMT"},{"key":"Via","value":"1.1 vegur"}],"cookie":[],"responseTime":null,"body":"{\n    \"token\": \"{{user-token}}\",\n    \"id\": \"3\"\n}"}],"_postman_id":"41a1b08f-854d-473d-9494-f1bc430235de"}],"id":"3f9a5055-0790-4247-b558-e37edc8df06c","_postman_id":"3f9a5055-0790-4247-b558-e37edc8df06c","description":""},{"name":"Relevent Pricing","item":[{"name":"Get All Pricing Data","id":"2faefd8c-b8dc-4013-a710-c2d4c2a5faa2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{user-token}}","type":"text"}],"url":"https://africanmarket.herokuapp.com/api/pricing","urlObject":{"protocol":"https","path":["api","pricing"],"host":["africanmarket","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"760c4ddb-8066-42c2-9b24-ea929559467a","name":"Get All Pricing Data","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{user-token}}","type":"text"}],"url":"https://africanmarket.herokuapp.com/api/pricing"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Cowboy"},{"key":"Connection","value":"keep-alive"},{"key":"X-Dns-Prefetch-Control","value":"off"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Strict-Transport-Security","value":"max-age=15552000; includeSubDomains"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Xss-Protection","value":"1; mode=block"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"3523"},{"key":"Etag","value":"W/\"dc3-Wk4nsLwXZ+BPLkNCE9w78CPrtnA\""},{"key":"Date","value":"Fri, 27 Sep 2019 03:18:56 GMT"},{"key":"Via","value":"1.1 vegur"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"productName\": \"Wheat Flour\",\n        \"price\": 4,\n        \"image\": \"http://agrodaily.com/wp-content/uploads/2016/04/wheat.png\",\n        \"subCategory\": \"Wheat\",\n        \"location\": \"Mombasa\"\n    },\n    {\n        \"productName\": \"Beef\",\n        \"price\": 14,\n        \"image\": \"https://purepng.com/public/uploads/large/purepng.com-meatfood-meat-red-fresh-grill-cook-beef-steak-9415246237676ksid.png\",\n        \"subCategory\": \"Livestock\",\n        \"location\": \"Mombasa\"\n    },\n    {\n        \"productName\": \"White Millet Grain\",\n        \"price\": 12,\n        \"image\": \"https://i.imgur.com/l8pXyWM.jpg\",\n        \"subCategory\": \"Millet\",\n        \"location\": \"Dodoma\"\n    }\n    \n]"}],"_postman_id":"2faefd8c-b8dc-4013-a710-c2d4c2a5faa2"},{"name":"Get Pricing Data be Id","id":"ae7b5d08-c034-4e51-a5e0-9208cc78a618","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{user-token}}","type":"text"}],"url":"https://africanmarket.herokuapp.com/api/pricing/{{user-id}}","urlObject":{"protocol":"https","path":["api","pricing","{{user-id}}"],"host":["africanmarket","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"317f891a-11cb-4b17-a633-6e0f5ee4f4c7","name":"Get Pricing Data be Id","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{user-token}}","type":"text"}],"url":{"raw":"https://africanmarket.herokuapp.com/api/pricing/:id","protocol":"https","host":["africanmarket","herokuapp","com"],"path":["api","pricing",":id"],"query":[{"key":"","value":"","type":"text","disabled":true}],"variable":[{"key":"id","value":"id","description":"The product id"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Cowboy"},{"key":"Connection","value":"keep-alive"},{"key":"X-Dns-Prefetch-Control","value":"off"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Strict-Transport-Security","value":"max-age=15552000; includeSubDomains"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Xss-Protection","value":"1; mode=block"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"159"},{"key":"Etag","value":"W/\"9f-IVZXArfiUskguVwYXWaIEWYVxoM\""},{"key":"Date","value":"Fri, 27 Sep 2019 03:23:57 GMT"},{"key":"Via","value":"1.1 vegur"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 1,\n    \"productName\": \"Wheat Flour\",\n    \"image\": \"http://agrodaily.com/wp-content/uploads/2016/04/wheat.png\",\n    \"price\": 4,\n    \"category_id\": 3,\n    \"sub_id\": 11,\n    \"location_id\": 15\n}"}],"_postman_id":"ae7b5d08-c034-4e51-a5e0-9208cc78a618"}],"id":"6ac2cc48-4f6e-4c71-84a1-4adc4136ca8f","description":"<p>These endpoints give the relevant item pricing in various categories to help a <code>User</code> to set their own individual product prices.</p>\n","event":[{"listen":"prerequest","script":{"id":"c360fed4-beea-46a8-8414-a7393699d365","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"e9d4aa28-7c9a-41c9-83d8-8c02e3a3925f","type":"text/javascript","exec":[""]}}],"_postman_id":"6ac2cc48-4f6e-4c71-84a1-4adc4136ca8f"},{"name":"Products","item":[{"name":"Get All Products","id":"cf39013d-0c45-4c13-855c-629339e11d02","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{user-token}}","type":"text"}],"url":"https://africanmarket.herokuapp.com/api/products","urlObject":{"protocol":"https","path":["api","products"],"host":["africanmarket","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"0b29feda-56fc-4a75-9856-456a8b13911c","name":"Get All Products","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{user-token}}","type":"text"}],"url":"https://africanmarket.herokuapp.com/api/products"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Cowboy"},{"key":"Connection","value":"keep-alive"},{"key":"X-Dns-Prefetch-Control","value":"off"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Strict-Transport-Security","value":"max-age=15552000; includeSubDomains"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Xss-Protection","value":"1; mode=block"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"707"},{"key":"Etag","value":"W/\"2c3-3CQ45+1ig4s2C7K93KlFkg80bOI\""},{"key":"Date","value":"Fri, 27 Sep 2019 03:32:02 GMT"},{"key":"Via","value":"1.1 vegur"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": 1,\n        \"productName\": \"Eggs\",\n        \"image\": \"https://i.imgur.com/skrBl9o.jpg\",\n        \"description\": \"Beautiful fresh farmed brown eggs.\",\n        \"price\": 3,\n        \"user_id\": 1\n    },\n    {\n        \"id\": 2,\n        \"productName\": \"Beef\",\n        \"image\": \"https://i.imgur.com/NwvSAbX.jpg\",\n        \"description\": \"Juicy slabs of beef from grass feed cows\",\n        \"price\": 14,\n        \"user_id\": 1\n    },\n    {\n        \"id\": 3,\n        \"productName\": \"Milk\",\n        \"image\": \"https://i.imgur.com/4iRINNJ.jpg\",\n        \"description\": \"Delicious from grass feed cows\",\n        \"price\": 14,\n        \"user_id\": 1\n    },\n    {\n        \"id\": 4,\n        \"productName\": \"Honey\",\n        \"image\": \"https://i.imgur.com/L65zYph.jpg\",\n        \"description\": \"Unprocessed Honey\",\n        \"price\": 8,\n        \"user_id\": 1\n    },\n    {\n        \"id\": 5,\n        \"productName\": \"Morogoro Rice\",\n        \"image\": \"https://i.imgur.com/zR5g1nX.jpg\",\n        \"description\": \"Unprocessed Honey\",\n        \"price\": 10,\n        \"user_id\": 1\n    }\n]"},{"id":"ae0c15d6-9be0-49c3-9209-82844f987104","name":"Get All Products","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{user-token}}","type":"text"}],"url":"https://africanmarket.herokuapp.com/api/products"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Cowboy"},{"key":"Connection","value":"keep-alive"},{"key":"X-Dns-Prefetch-Control","value":"off"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Strict-Transport-Security","value":"max-age=15552000; includeSubDomains"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Xss-Protection","value":"1; mode=block"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"707"},{"key":"Etag","value":"W/\"2c3-3CQ45+1ig4s2C7K93KlFkg80bOI\""},{"key":"Date","value":"Fri, 27 Sep 2019 03:32:02 GMT"},{"key":"Via","value":"1.1 vegur"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": 1,\n        \"productName\": \"Eggs\",\n        \"image\": \"https://i.imgur.com/skrBl9o.jpg\",\n        \"description\": \"Beautiful fresh farmed brown eggs.\",\n        \"price\": 3,\n        \"user_id\": 1\n    },\n    {\n        \"id\": 2,\n        \"productName\": \"Beef\",\n        \"image\": \"https://i.imgur.com/NwvSAbX.jpg\",\n        \"description\": \"Juicy slabs of beef from grass feed cows\",\n        \"price\": 14,\n        \"user_id\": 1\n    },\n    {\n        \"id\": 3,\n        \"productName\": \"Milk\",\n        \"image\": \"https://i.imgur.com/4iRINNJ.jpg\",\n        \"description\": \"Delicious from grass feed cows\",\n        \"price\": 14,\n        \"user_id\": 1\n    },\n    {\n        \"id\": 4,\n        \"productName\": \"Honey\",\n        \"image\": \"https://i.imgur.com/L65zYph.jpg\",\n        \"description\": \"Unprocessed Honey\",\n        \"price\": 8,\n        \"user_id\": 1\n    },\n    {\n        \"id\": 5,\n        \"productName\": \"Morogoro Rice\",\n        \"image\": \"https://i.imgur.com/zR5g1nX.jpg\",\n        \"description\": \"Unprocessed Honey\",\n        \"price\": 10,\n        \"user_id\": 1\n    }\n]"}],"_postman_id":"cf39013d-0c45-4c13-855c-629339e11d02"},{"name":"GET Products by Id","id":"b1396f8d-749d-4985-9cac-2c7b437cbfdc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{user-token}}","type":"text"}],"body":{"mode":"raw","raw":""},"url":"https://africanmarket.herokuapp.com/api/products/{{product-id}}","description":"<p>This endpoint gets the <code>products</code> by the <code>user_id</code>.</p>\n","urlObject":{"protocol":"https","path":["api","products","{{product-id}}"],"host":["africanmarket","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"d8a32e23-00c4-4fb9-a5a0-2c95e344749a","name":"GET Products by Id","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{user-token}}","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":{"raw":"https://africanmarket.herokuapp.com/api/products/:id","protocol":"https","host":["africanmarket","herokuapp","com"],"path":["api","products",":id"],"variable":[{"key":"id","value":"user_id"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Cowboy"},{"key":"Connection","value":"keep-alive"},{"key":"X-Dns-Prefetch-Control","value":"off"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Strict-Transport-Security","value":"max-age=15552000; includeSubDomains"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Xss-Protection","value":"1; mode=block"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"707"},{"key":"Etag","value":"W/\"2c3-3CQ45+1ig4s2C7K93KlFkg80bOI\""},{"key":"Date","value":"Fri, 27 Sep 2019 03:36:39 GMT"},{"key":"Via","value":"1.1 vegur"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": 1,\n        \"productName\": \"Eggs\",\n        \"image\": \"https://i.imgur.com/skrBl9o.jpg\",\n        \"description\": \"Beautiful fresh farmed brown eggs.\",\n        \"price\": 3,\n        \"user_id\": 1\n    },\n    {\n        \"id\": 2,\n        \"productName\": \"Beef\",\n        \"image\": \"https://i.imgur.com/NwvSAbX.jpg\",\n        \"description\": \"Juicy slabs of beef from grass feed cows\",\n        \"price\": 14,\n        \"user_id\": 1\n    },\n    {\n        \"id\": 3,\n        \"productName\": \"Milk\",\n        \"image\": \"https://i.imgur.com/4iRINNJ.jpg\",\n        \"description\": \"Delicious from grass feed cows\",\n        \"price\": 14,\n        \"user_id\": 1\n    },\n    {\n        \"id\": 4,\n        \"productName\": \"Honey\",\n        \"image\": \"https://i.imgur.com/L65zYph.jpg\",\n        \"description\": \"Unprocessed Honey\",\n        \"price\": 8,\n        \"user_id\": 1\n    },\n    {\n        \"id\": 5,\n        \"productName\": \"Morogoro Rice\",\n        \"image\": \"https://i.imgur.com/zR5g1nX.jpg\",\n        \"description\": \"Unprocessed Honey\",\n        \"price\": 10,\n        \"user_id\": 1\n    }\n]"}],"_postman_id":"b1396f8d-749d-4985-9cac-2c7b437cbfdc"},{"name":"Create Product","id":"129d4c21-f2e3-4f15-8abb-6aca3031d5f8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"{{user-token}}"}],"body":{"mode":"raw","raw":"{\t\t\r\n    \"productName\": \"Tilapia\",\r\n    \"description\": \"Freshly caught this morning\",\r\n    \"price\": 21,\r\n    \"user_id\": 2\r\n}"},"url":"https://africanmarket.herokuapp.com/api/products/add","description":"<p>The product name and price are required for a successful <code>POST</code> </p>\n<p><em>Note</em> : Here is where the assigned <code>user id</code> sent in the <code>res.body</code> during login comes into play. The <code>id</code> needs to be inserted into the <code>req.body</code> of the <code>products</code> objet key  <code>user_id</code>. By doing so, the newly created <code>product</code> will be attatcehd to the logged in <code>User</code>.</p>\n","urlObject":{"protocol":"https","path":["api","products","add"],"host":["africanmarket","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"e3af753e-b99a-43bd-889d-949a22e70b41","name":"Add Product","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{user-token}}","type":"text"}],"body":{"mode":"raw","raw":"{\t\t\r\n    \"productName\": \"Tilapia\",\r\n    \"description\": \"Freshly caught this morning\",\r\n    \"price\": 21,\r\n    \"user_id\": 2\r\n    }","options":{"raw":{"language":"json"}}},"url":"https://africanmarket.herokuapp.com/api/products/add"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Cowboy"},{"key":"Connection","value":"keep-alive"},{"key":"X-Dns-Prefetch-Control","value":"off"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Strict-Transport-Security","value":"max-age=15552000; includeSubDomains"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Xss-Protection","value":"1; mode=block"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"112"},{"key":"Etag","value":"W/\"70-Y58ly6SQxCokEwfHQZaWPzQi5h0\""},{"key":"Date","value":"Fri, 27 Sep 2019 03:41:42 GMT"},{"key":"Via","value":"1.1 vegur"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 6,\n    \"productName\": \"Tilapia\",\n    \"image\": null,\n    \"description\": \"Freshly caught this morning\",\n    \"price\": 21,\n    \"user_id\": 2\n}"}],"_postman_id":"129d4c21-f2e3-4f15-8abb-6aca3031d5f8"},{"name":"Update Product","id":"c7d73345-66e0-4879-8d72-8b0c4217efcb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{user-token}}","type":"text"}],"body":{"mode":"raw","raw":"{\t\t\r\n    \"productName\": \"Perch\",\r\n    \"description\": \"Freshly caught this morning\",\r\n    \"price\": 21,\r\n    \"user_id\": 2\r\n}"},"url":"https://africanmarket.herokuapp.com/api/products/update/{{product-id}}","urlObject":{"protocol":"https","path":["api","products","update","{{product-id}}"],"host":["africanmarket","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"4d51063e-a7b1-4dde-87d0-2b5020d9e8a7","name":"Update Product","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"{{user-token}}","type":"text"}],"body":{"mode":"raw","raw":"{\t\t\r\n    \"productName\": \"Perch\",\r\n    \"description\": \"Freshly caught this morning\",\r\n    \"price\": 21,\r\n    \"user_id\": 2\r\n}","options":{"raw":{"language":"json"}}},"url":"https://africanmarket.herokuapp.com/api/products/update/id"},"status":"Accepted","code":202,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Cowboy"},{"key":"Connection","value":"keep-alive"},{"key":"X-Dns-Prefetch-Control","value":"off"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Strict-Transport-Security","value":"max-age=15552000; includeSubDomains"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Xss-Protection","value":"1; mode=block"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"13"},{"key":"Etag","value":"W/\"d-/YTyJV6wvL4iM15CyH40vvUdKcQ\""},{"key":"Date","value":"Fri, 27 Sep 2019 03:45:24 GMT"},{"key":"Via","value":"1.1 vegur"}],"cookie":[],"responseTime":null,"body":"{\n    \"updated\": 1\n}"}],"_postman_id":"c7d73345-66e0-4879-8d72-8b0c4217efcb"},{"name":"Delete Product","id":"82226235-62ea-4bba-9a7d-e7832d481f19","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"{{user-token}}"}],"body":{"mode":"raw","raw":""},"url":"https://africanmarket.herokuapp.com/api/products/delete/{{product-id}}","urlObject":{"protocol":"https","path":["api","products","delete","{{product-id}}"],"host":["africanmarket","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"17a45bc1-bc82-4fcc-b53a-abde48a5a316","name":"Delete Product","originalRequest":{"method":"DELETE","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"{{user-token}}"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://africanmarket.herokuapp.com/api/products/delete/id"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Cowboy"},{"key":"Connection","value":"keep-alive"},{"key":"X-Dns-Prefetch-Control","value":"off"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Strict-Transport-Security","value":"max-age=15552000; includeSubDomains"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Xss-Protection","value":"1; mode=block"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"13"},{"key":"Etag","value":"W/\"d-sxBY/LX4pXuaC7e8WH2aXAaM3wg\""},{"key":"Date","value":"Fri, 27 Sep 2019 03:48:56 GMT"},{"key":"Via","value":"1.1 vegur"}],"cookie":[],"responseTime":null,"body":"{\n    \"removed\": 1\n}"}],"_postman_id":"82226235-62ea-4bba-9a7d-e7832d481f19"}],"id":"360e76b9-105c-4b98-80fa-b8d45e9a495d","description":"<p>These are the endpoints that deal with the <code>products</code> that can be <strong>added</strong>, <strong>updated</strong>, and <strong>deleted</strong> from the database of a particular <code>User</code> or seen globally.</p>\n","event":[{"listen":"prerequest","script":{"id":"f93924fa-180e-4abb-b25c-69248b997c76","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"f4cfd5b5-b9e6-495e-843b-b7998b48f058","type":"text/javascript","exec":[""]}}],"_postman_id":"360e76b9-105c-4b98-80fa-b8d45e9a495d"}],"event":[{"listen":"prerequest","script":{"id":"8c6797f6-9aa0-4edd-a504-7f89ede7594b","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"605537f9-d3c0-42c3-8a26-4f56491f9bf3","type":"text/javascript","exec":[""]}}]}