{"info":{"_postman_id":"e9f4f06f-6873-4f7f-9185-e9d9ff99f199","name":"Credmap User Catalog","description":"<html><head></head><body><h1 id=\"how-to-use-credmap-user-catalog-rest-apis\">How to Use Credmap User Catalog REST APIs</h1>\n<p>The <strong>Credmap API</strong> is a collection of endpoints that allows you create a create a User, <strong>Activate</strong> your User Account and <strong>Reset</strong> your password. Users can also <strong>Add</strong> new products, <strong>Access</strong> a list of products, <strong>Edit</strong> products and <strong>Delete</strong> products through various endpoints protected with <strong>JWT Authentication</strong>.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"How to Use Credmap User Catalog REST APIs","slug":"how-to-use-credmap-user-catalog-rest-apis"}],"owner":"22954466","collectionId":"e9f4f06f-6873-4f7f-9185-e9d9ff99f199","publishedId":"2s8YeuLBAn","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-11-13T18:04:50.000Z"},"item":[{"name":"User Accounts","item":[{"name":"Create A New User","id":"d6b462cf-1175-47c9-8530-f6376e9005b8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"jamilalhassan1299@gmail.com\",\r\n    \"first_name\": \"Jamil\",\r\n    \"last_name\": \"Alhassan\",\r\n    \"username\": \"jamil\",\r\n    \"password\": \"StrongPassword123\",\r\n    \"re_password\": \"StrongPassword123\"\r\n\r\n}"},"url":"http://127.0.0.1:8000/auth/users/","urlObject":{"protocol":"http","port":"8000","path":["auth","users",""],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"a4efc4db-415c-4799-96b2-22b1ba0d0cec","name":"Create A New User","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"jamilalhassan1299@gmail.com\",\r\n    \"first_name\": \"Jamil\",\r\n    \"last_name\": \"Alhassan\",\r\n    \"username\": \"jamil\",\r\n    \"password\": \"StrongPassword123\",\r\n    \"re_password\": \"StrongPassword123\"\r\n\r\n}"},"url":"http://127.0.0.1:8000/auth/users/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 13 Nov 2022 15:54:37 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.11.0"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"109"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"username\": \"jamil\",\n    \"first_name\": \"Jamil\",\n    \"last_name\": \"Alhassan\",\n    \"email\": \"jamilalhassan1299@gmail.com\",\n    \"id\": 3\n}"}],"_postman_id":"d6b462cf-1175-47c9-8530-f6376e9005b8"},{"name":"Activating User Account","id":"1ffb469b-1f62-4b88-92a8-f3a8ddd6be1c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"uid\": \"Mw\",\r\n    \"token\": \"beu46y-5cdd9b247ff88e7395bef942f20f496d\"\r\n}"},"url":"http://127.0.0.1:8000/auth/users/activation/","description":"<h2 id=\"activating-account\">Activating Account</h2>\n<p>After clicking the link in the email, it should take you to a 404 Page since no templates or views have been added to this API. However, for testing purposes, the <strong>UID</strong> and generated <strong>Token</strong> are stored in the link sent to email. In this link example <a href=\"http://127.0.0.1:8000/activate/Mw/beu46y-5cdd9b247ff88e7395bef942f20f496d\"><strong>http://127.0.0.1:8000/activate/Mw/beu46y-5cdd9b247ff88e7395bef942f20f496d</strong></a>, the <strong>UID</strong> comes right after the <strong>activate/</strong> which is <strong>Mw</strong> and the is right after the next <strong>/</strong> as <strong>Mw/beu46y-5cdd9b247ff88e7395bef942f20f496d</strong>. These are then passed in the body of the request to the URL. If successful, an activation confirmation email will be send to your account.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["auth","users","activation",""],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"3e4353b2-0e87-4898-a9f5-9a8b905a5ed8","name":"Activating User Account","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"uid\": \"Mw\",\r\n    \"token\": \"beu46y-5cdd9b247ff88e7395bef942f20f496d\"\r\n}"},"url":"http://127.0.0.1:8000/auth/users/activation/"},"status":"No Content","code":204,"_postman_previewlanguage":"plain","header":[{"key":"Date","value":"Sun, 13 Nov 2022 16:10:21 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.11.0"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"POST, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"0"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"1ffb469b-1f62-4b88-92a8-f3a8ddd6be1c"},{"name":"User Login","id":"d914486a-8b1f-4706-9f8b-eab919bbb1b1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"jamilalhassan1299@gmail.com\",\r\n    \"password\": \"StrongPassword123\"\r\n}"},"url":"http://127.0.0.1:8000/auth/jwt/create/","description":"<p>To login, we need to generate a JWT token which can be used to authorize our requests to the Products endpoints. To create the <strong>JWT Tokens</strong>, we send a <strong>POST</strong> request to the <a href=\"http://127.0.0.1:8000/auth/jwt/create/\"><strong>http://127.0.0.1:8000/auth/jwt/create/</strong></a> endpoint specifying the <strong>email</strong> of the user in the body of the request as well as the <strong>password</strong>. A successful request returns an <strong>access</strong> and <strong>refresh</strong> token.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["auth","jwt","create",""],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"7e96be30-b0aa-4dcf-94d4-c0b3b383e262","name":"User Login","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"jamilalhassan1299@gmail.com\",\r\n    \"password\": \"StrongPassword123\"\r\n}"},"url":"http://127.0.0.1:8000/auth/jwt/create/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 13 Nov 2022 16:18:31 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.11.0"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"POST, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"438"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"refresh\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTY2ODQ0MjcxMSwianRpIjoiMjA2OTdlMTQwYTkxNGVmOGI5NzQyOWM2YTZhYjBlMTIiLCJ1c2VyX2lkIjozfQ.4yvm2ykg-hwrp5WXWyqNQ_LHavolvV4KIIVoGw9YSkg\",\n    \"access\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjY4MzU2NjExLCJqdGkiOiIyZDM5OWJhN2U0MjE0ODlhOTNjOTM3NjIwOTU1N2ZiNCIsInVzZXJfaWQiOjN9.dYGO1pcSAchRbdqtd569MS7UlWywyXF9hU1b9PBeN3w\"\n}"}],"_postman_id":"d914486a-8b1f-4706-9f8b-eab919bbb1b1"},{"name":"Obtaining a New Access Token","id":"28388020-c66c-433e-a926-29d1b8c7d017","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"refresh\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTY2ODQ0MjcxMSwianRpIjoiMjA2OTdlMTQwYTkxNGVmOGI5NzQyOWM2YTZhYjBlMTIiLCJ1c2VyX2lkIjozfQ.4yvm2ykg-hwrp5WXWyqNQ_LHavolvV4KIIVoGw9YSkg\"\r\n}"},"url":"http://127.0.0.1:8000/auth/jwt/refresh/","description":"<h2 id=\"getting-a-new-access-token\">Getting a new Access Token</h2>\n<p>To persist our login on the front-end, we need to generate a JWT a new <strong>access</strong> token after the old one expires. To do this, we need to send a <strong>refresh</strong> token to the endpoint <a href=\"http://127.0.0.1:8000/auth/jwt/refresh/\"><strong>http://127.0.0.1:8000/auth/jwt/refresh/</strong></a> which is used to generate a new <strong>access</strong> token. A successful request returns a new <strong>access</strong> token in the response body.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["auth","jwt","refresh",""],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"8dab6f5c-2d36-4609-bf64-488295c9bc69","name":"New Request","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"refresh\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTY2ODQ0MjcxMSwianRpIjoiMjA2OTdlMTQwYTkxNGVmOGI5NzQyOWM2YTZhYjBlMTIiLCJ1c2VyX2lkIjozfQ.4yvm2ykg-hwrp5WXWyqNQ_LHavolvV4KIIVoGw9YSkg\"\r\n}"},"url":"http://127.0.0.1:8000/auth/jwt/refresh/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 13 Nov 2022 16:27:26 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.11.0"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"POST, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"218"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"access\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjY4MzU3MTQ2LCJqdGkiOiI3NjFkZmYwYjZjM2E0NTk4YmI1ZTcwYzJmMTg1MjI4YSIsInVzZXJfaWQiOjN9.-y8rGMiaWtwqA0d4lsd2pmDZYgGY2ddxZnsrA2ME05Y\"\n}"}],"_postman_id":"28388020-c66c-433e-a926-29d1b8c7d017"},{"name":"Request Password Reset","id":"df9bc92f-9e3e-4f25-af4a-1ce833a789e7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"jamilalhassan1299@gmail.com\"\r\n}"},"url":"http://127.0.0.1:8000/auth/users/reset_password/","description":"<h2 id=\"requesting-a-password-reset-email\">Requesting a password reset email</h2>\n<p>In the case where a user forgets their password, the user can request a <strong>Password Reset</strong> email to be sent to their account containing the link to go to and change their password. For this, in the request body, the <strong>email</strong> is passed to the endpoint <a href=\"http://127.0.0.1:8000/auth/users/reset_password/\"><strong>http://127.0.0.1:8000/auth/users/reset_password/</strong></a> to request the reset email to their registered email. A successful response does not return a body, so users need to confirm the reset worked by checking their email for the link.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["auth","users","reset_password",""],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"b4412172-41f7-4d66-9225-00076e86bd72","name":"Request Password Reset","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"jamilalhassan1299@gmail.com\"\r\n}"},"url":"http://127.0.0.1:8000/auth/users/reset_password/"},"status":"No Content","code":204,"_postman_previewlanguage":"plain","header":[{"key":"Date","value":"Sun, 13 Nov 2022 16:54:38 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.11.0"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"POST, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"0"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"df9bc92f-9e3e-4f25-af4a-1ce833a789e7"},{"name":"Reset Password","id":"728937ed-8805-451c-a0d8-a796e962c41a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"uid\": \"Mw\",\r\n    \"token\": \"beu6yy-09fbdd407a7a54f97789f3549f7d1834\",\r\n    \"new_password\": \"NewStrongPassword123\",\r\n    \"re_new_password\": \"NewStrongPassword123\"\r\n}"},"url":"http://127.0.0.1:8000/auth/users/reset_password_confirm/","description":"<h2 id=\"reset-a-password\">Reset a password</h2>\n<p>To reset the password , the user has to click the link sent to their email. As with the user activation, the link contains the <strong>uid</strong> and the <strong>token</strong> which is used, alongside two new fields in the request body <strong>new_password</strong> and <strong>re_new_password</strong> which are for setting the new password and confirming the new password respectively. The request is sent to the endpoint <a href=\"http://127.0.0.1:8000/auth/users/reset_password_confirmation/\"><strong>http://127.0.0.1:8000/auth/users/reset_password_confirmation/</strong></a>. A successful response returns no body but a confirmation email will be sent to your account stating your password reset.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["auth","users","reset_password_confirm",""],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"ce817073-5fce-4379-a106-271c34ac1913","name":"Reset Password","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"uid\": \"Mw\",\r\n    \"token\": \"beu6yy-09fbdd407a7a54f97789f3549f7d1834\",\r\n    \"new_password\": \"NewStrongPassword123\",\r\n    \"re_new_password\": \"NewStrongPassword123\"\r\n}"},"url":"http://127.0.0.1:8000/auth/users/reset_password_confirm/"},"status":"No Content","code":204,"_postman_previewlanguage":"plain","header":[{"key":"Date","value":"Sun, 13 Nov 2022 17:05:40 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.11.0"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"POST, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"0"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"728937ed-8805-451c-a0d8-a796e962c41a"}],"id":"ac1403cf-f117-4210-941a-10c12cd340b8","description":"<h2 id=\"creating-a-new-user-activating-account-and-resetting-password\">Creating a New User, Activating Account and Resetting Password</h2>\n<p>The endpoints in this folder allow users to create new accounts and activate the accounts by following a link which contains a <strong>UID</strong> and automatically generated <strong>Token</strong> to verify their email address and activate their accounts. The endpoints also allow a user to request a password reset.</p>\n","_postman_id":"ac1403cf-f117-4210-941a-10c12cd340b8"},{"name":"Product Requests","item":[{"name":"Create a new product","id":"c2e70c1c-9fd7-4247-8a19-f9be3f2ea393","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjY4MzYwODU2LCJqdGkiOiIxMGIwOGMxYzE4ZjU0NGU4Yjk5ZGYzNzVlOTMxMTI2OCIsInVzZXJfaWQiOjN9.pY6GOX1bxfGR2X8Ui2_U_ZZPeJqXV5KgTocmvf4C2VM","type":"text"}],"body":{"mode":"raw","raw":"{\r\n        \"name\": \"Laptop\",\r\n        \"price\": 50,\r\n        \"quantity\": 9\r\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/products/","description":"<h2 id=\"creating-a-new-product\">Creating a new product</h2>\n<p>To add a new product, users need to send a <strong>POST</strong> request to the endpoint <a href=\"http://127.0.0.1:8000/api/products/\"><strong>http://127.0.0.1:8000/api/products/</strong></a> with the body containing the following fields:</p>\n<ul>\n<li>name</li>\n<li>price</li>\n<li>quantity</li>\n<li>image(optional)</li>\n</ul>\n<p>Authorization headers must be included in the headers of the request as <strong>Authorization: JWT {access token}</strong></p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","products",""],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"7b49d521-a659-4ccc-b8d5-2ba025cb7d5c","name":"Unauthorized User cannot add new products","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n        \"name\": \"Laptop\",\r\n        \"price\": 50,\r\n        \"quantity\": 9\r\n}"},"url":"http://127.0.0.1:8000/api/products/"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 13 Nov 2022 17:21:12 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.11.0"},{"key":"Content-Type","value":"application/json"},{"key":"WWW-Authenticate","value":"JWT realm=\"api\""},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"58"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"detail\": \"Authentication credentials were not provided.\"\n}"},{"id":"d2fb41de-2357-4627-a484-d3f645ad732a","name":"Create a new product Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text","disabled":true},{"key":"Authorization","value":"JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjY4MzYwODU2LCJqdGkiOiIxMGIwOGMxYzE4ZjU0NGU4Yjk5ZGYzNzVlOTMxMTI2OCIsInVzZXJfaWQiOjN9.pY6GOX1bxfGR2X8Ui2_U_ZZPeJqXV5KgTocmvf4C2VM","type":"text"}],"body":{"mode":"raw","raw":"{\r\n        \"name\": \"Laptop\",\r\n        \"price\": 50,\r\n        \"quantity\": 9\r\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/products/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 13 Nov 2022 17:30:07 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.11.0"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"61"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 2,\n    \"name\": \"Laptop\",\n    \"price\": 50,\n    \"quantity\": 9,\n    \"image\": null\n}"}],"_postman_id":"c2e70c1c-9fd7-4247-8a19-f9be3f2ea393"},{"name":"Getting list of products","id":"52594c50-f9b9-4792-869f-cc7440feb754","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"url":"http://127.0.0.1:8000/api/products/","description":"<h2 id=\"getting-a-list-of-products\">Getting a list of products</h2>\n<p>To get a list of all available products, users need to send a <strong>GET</strong> request to the endpoint <a href=\"http://127.0.0.1:8000/api/products/\"><strong>http://127.0.0.1:8000/api/products/</strong></a>. Authorization headers must be included in the headers of the request as <strong>Authorization: JWT {access token}.</strong> A successful response has the list of products in the response body.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","products",""],"host":["127","0","0","1"],"query":[{"disabled":true,"key":"","value":null}],"variable":[]}},"response":[{"id":"0aef1f5b-24df-4660-8d03-ae4d264962ef","name":"Getting list of products Success","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjY4MzYxMjQxLCJqdGkiOiJhMDdhNzU0YzI4ZjE0YjhkYTllZDQ1MWJhZjg4NjVkYSIsInVzZXJfaWQiOjN9.2aRKuoorjGf34L_89e7FJlAYGgKhieaAEnVAksiCeL4","type":"text"}],"url":{"raw":"http://127.0.0.1:8000/api/products/","protocol":"http","host":["127","0","0","1"],"port":"8000","path":["api","products",""],"query":[{"key":"","value":null,"type":"text","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 13 Nov 2022 17:35:54 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.11.0"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"165"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": 1,\n        \"name\": \"Headphones\",\n        \"price\": 20,\n        \"quantity\": 6,\n        \"image\": \"/product_images/2022/11/12/RE4Meqk.png\"\n    },\n    {\n        \"id\": 2,\n        \"name\": \"Laptop\",\n        \"price\": 50,\n        \"quantity\": 9,\n        \"image\": null\n    }\n]"},{"id":"5b97b1cc-fdde-4829-8847-90f0fc0c1c58","name":"Getting list of products Unauthorized","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjY4MzYxMjQxLCJqdGkiOiJhMDdhNzU0YzI4ZjE0YjhkYTllZDQ1MWJhZjg4NjVkYSIsInVzZXJfaWQiOjN9.2aRKuoorjGf34L_89e7FJlAYGgKhieaAEnVAksiCeL4","type":"text","disabled":true}],"url":{"raw":"http://127.0.0.1:8000/api/products/","protocol":"http","host":["127","0","0","1"],"port":"8000","path":["api","products",""],"query":[{"key":"","value":null,"type":"text","disabled":true}]}},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 13 Nov 2022 17:36:35 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.11.0"},{"key":"Content-Type","value":"application/json"},{"key":"WWW-Authenticate","value":"JWT realm=\"api\""},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"58"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"detail\": \"Authentication credentials were not provided.\"\n}"}],"_postman_id":"52594c50-f9b9-4792-869f-cc7440feb754"},{"name":"Getting a single product","id":"632d867d-e853-41fd-9d0e-2368f165ed8f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjY4MzYxNDExLCJqdGkiOiI3MDIxNGVkODc1YzI0MTI1YmU3Y2IyYmY3OWRkZjA0MSIsInVzZXJfaWQiOjN9.TOQrWEEyvGuv-_n0lnUHghnZKIVlvUW5IhuGW2oUbig","type":"text"}],"url":"http://127.0.0.1:8000/api/products/1","description":"<h2 id=\"getting-a-single-product\">Getting a single product</h2>\n<p>To get a single product, users need to send a <strong>GET</strong> request to the endpoint <a href=\"http://127.0.0.1:8000/api/products/%7Bid%7D\"><strong>http://127.0.0.1:8000/api/products/{id}</strong></a>, where <strong>id</strong> is the <strong>id</strong> of the product they wish to get . Authorization headers must be included in the headers of the request as <strong>Authorization: JWT {access token}</strong> A successful response has the product with the specified <strong>id</strong> in the response body.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","products","1"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"d296374c-bf75-4294-aa81-5f4f6759b685","name":"Getting a single product Unauthorized","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"url":"http://127.0.0.1:8000/api/products/1"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 13 Nov 2022 17:38:00 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.11.0"},{"key":"Content-Type","value":"application/json"},{"key":"WWW-Authenticate","value":"JWT realm=\"api\""},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, PUT, DELETE, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"58"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"detail\": \"Authentication credentials were not provided.\"\n}"},{"id":"d873ba46-2d88-484c-8177-4963e590b4a9","name":"Getting a single product Success","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjY4MzYxNDExLCJqdGkiOiI3MDIxNGVkODc1YzI0MTI1YmU3Y2IyYmY3OWRkZjA0MSIsInVzZXJfaWQiOjN9.TOQrWEEyvGuv-_n0lnUHghnZKIVlvUW5IhuGW2oUbig","type":"text"}],"url":"http://127.0.0.1:8000/api/products/1"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 13 Nov 2022 17:38:48 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.11.0"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, PUT, DELETE, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"101"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 1,\n    \"name\": \"Headphones\",\n    \"price\": 20,\n    \"quantity\": 6,\n    \"image\": \"/product_images/2022/11/12/RE4Meqk.png\"\n}"}],"_postman_id":"632d867d-e853-41fd-9d0e-2368f165ed8f"},{"name":"Deleting a product","id":"052ae499-c413-4f1a-89a9-16a21dd6d937","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjY4MzYxNDExLCJqdGkiOiI3MDIxNGVkODc1YzI0MTI1YmU3Y2IyYmY3OWRkZjA0MSIsInVzZXJfaWQiOjN9.TOQrWEEyvGuv-_n0lnUHghnZKIVlvUW5IhuGW2oUbig","type":"text"}],"url":"http://127.0.0.1:8000/api/products/2","description":"<h2 id=\"deleting-a-product\">Deleting a product</h2>\n<p>To delete a product, users need to send a <strong>DELETE</strong> request to the endpoint <a href=\"http://127.0.0.1:8000/api/products/%7Bid%7D\"><strong>http://127.0.0.1:8000/api/products/{id}</strong></a>, where <strong>id</strong> is the <strong>id</strong> of the product they wish to delete. Authorization headers must be included in the headers of the request as <strong>Authorization: JWT {access token}</strong>. A successful response has no body in the response, however, the product will no longer be visible in a list or when accessed by id.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","products","2"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"53d1c528-4090-4dee-8cd4-a989c4b1625f","name":"Deleting a product Unauthorized","originalRequest":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjY4MzYxNDExLCJqdGkiOiI3MDIxNGVkODc1YzI0MTI1YmU3Y2IyYmY3OWRkZjA0MSIsInVzZXJfaWQiOjN9.TOQrWEEyvGuv-_n0lnUHghnZKIVlvUW5IhuGW2oUbig","type":"text","disabled":true}],"url":"http://127.0.0.1:8000/api/products/2"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 13 Nov 2022 17:40:34 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.11.0"},{"key":"Content-Type","value":"application/json"},{"key":"WWW-Authenticate","value":"JWT realm=\"api\""},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, PUT, DELETE, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"58"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"detail\": \"Authentication credentials were not provided.\"\n}"},{"id":"13c5ba45-e91a-472a-981d-a05b20241bbe","name":"Deleting a product Success","originalRequest":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjY4MzYxNDExLCJqdGkiOiI3MDIxNGVkODc1YzI0MTI1YmU3Y2IyYmY3OWRkZjA0MSIsInVzZXJfaWQiOjN9.TOQrWEEyvGuv-_n0lnUHghnZKIVlvUW5IhuGW2oUbig","type":"text"}],"url":"http://127.0.0.1:8000/api/products/2"},"status":"No Content","code":204,"_postman_previewlanguage":"plain","header":[{"key":"Date","value":"Sun, 13 Nov 2022 17:42:24 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.11.0"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, PUT, DELETE, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"0"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"052ae499-c413-4f1a-89a9-16a21dd6d937"},{"name":"Updating a product","id":"d4c27fcf-48bb-4bf3-8374-313b774d0774","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjY4MzYxODU1LCJqdGkiOiJmYzI5ODA4NjkxNDQ0YTRjYWZkOWIyOGRjYmE3MWU5ZSIsInVzZXJfaWQiOjN9.F6lWA2Mw3JWNFUTwMJ--V3Wb1mp2gkuqY0KD_PSA5ic","type":"text"}],"body":{"mode":"raw","raw":"{\r\n        \"name\": \"Headphones-updated\",\r\n        \"price\": 20,\r\n        \"quantity\": 6\r\n}"},"url":"http://127.0.0.1:8000/api/products/1","description":"<h2 id=\"updating-a-product\">Updating a product</h2>\n<p>To update a product, users need to send a <strong>PUT</strong> request to the endpoint <a href=\"http://127.0.0.1:8000/api/products/%7Bid%7D\"><strong>http://127.0.0.1:8000/api/products/{id}</strong></a>, where <strong>id</strong> is the <strong>id</strong> of the product they wish to update. Authorization headers must be included in the headers of the request as <strong>Authorization: JWT {access token}</strong> A successful response has the product with the specified <strong>id</strong> in the response body and the change effected.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","products","1"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"54a60694-f531-462e-8f1c-92f1545e48e0","name":"Updating a product Unauthorized","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n        \"name\": \"Headphones-updated\",\r\n        \"price\": 20,\r\n        \"quantity\": 6,\r\n        \"image\": \"/product_images/2022/11/12/RE4Meqk.png\"\r\n}"},"url":"http://127.0.0.1:8000/api/products/1"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 13 Nov 2022 17:45:03 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.11.0"},{"key":"Content-Type","value":"application/json"},{"key":"WWW-Authenticate","value":"JWT realm=\"api\""},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, PUT, DELETE, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"58"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"detail\": \"Authentication credentials were not provided.\"\n}"},{"id":"436e8803-3755-48ef-80af-2a74bca24e7b","name":"Updating a product Success","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjY4MzYxODU1LCJqdGkiOiJmYzI5ODA4NjkxNDQ0YTRjYWZkOWIyOGRjYmE3MWU5ZSIsInVzZXJfaWQiOjN9.F6lWA2Mw3JWNFUTwMJ--V3Wb1mp2gkuqY0KD_PSA5ic","type":"text"}],"body":{"mode":"raw","raw":"{\r\n        \"name\": \"Headphones-updated\",\r\n        \"price\": 20,\r\n        \"quantity\": 6\r\n}"},"url":"http://127.0.0.1:8000/api/products/1"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 13 Nov 2022 17:46:31 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.11.0"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, PUT, DELETE, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"109"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 1,\n    \"name\": \"Headphones-updated\",\n    \"price\": 20,\n    \"quantity\": 6,\n    \"image\": \"/product_images/2022/11/12/RE4Meqk.png\"\n}"}],"_postman_id":"d4c27fcf-48bb-4bf3-8374-313b774d0774"}],"id":"ced37dfd-d82f-483e-85ce-2fde48f1488a","description":"<h2 id=\"adding-products-accessing-the-list-of-products-accessing-a-single-product-editing-a-product-and-deleting-a-product\">Adding products, accessing the list of products, accessing a single product, editing a product and deleting a product.</h2>\n<p>The endpoints in this folder allow users to create new products, access a list of products, access a single product, edit and delete products. All requests require users to login and gain access to a <strong>JWT access token</strong> to authorize their requests.</p>\n","_postman_id":"ced37dfd-d82f-483e-85ce-2fde48f1488a"}]}