{"info":{"_postman_id":"6243a601-b458-4105-8b2c-f31a78aa8b5e","name":"SLBFE-API","description":"<html><head></head><body><h2 id=\"sri-lanka-bureau-of-foreign-employment-api\">Sri Lanka Bureau of Foreign Employment API</h2>\n<h4 id=\"info\">Info</h4>\n<blockquote>\n<p>Api is hosted in: <a href=\"https://slbfe-api-app.herokuapp.com\">https://slbfe-api-app.herokuapp.com</a></p>\n</blockquote>\n<blockquote>\n<p>To use the hosted API locally, clone the <strong>api folder</strong> from the following Github link and replace <a href=\"http://localhost:8080\">http://localhost:8080</a> with <a href=\"https://slbfe-api-app.herokuapp.com\">https://slbfe-api-app.herokuapp.com</a></p>\n</blockquote>\n<blockquote>\n<p>Web and mobile samples are included in the git with the API</p>\n</blockquote>\n<blockquote>\n<p>Github link: <a href=\"https://github.com/mAlex28/SLBFE-App.git\">https://github.com/mAlex28/SLBFE-App.git</a></p>\n</blockquote>\n<h4 id=\"description\">Description</h4>\n<p>This is a sample API for the Sri Lankan Bureau of Foreign Employment. This includes functions for three main categories of the users: Citizens, Foreign Companies, SLBFE officials.</p>\n<p>Followings are the functions of this project:</p>\n<ul>\n<li>Account signup / singIn</li>\n<li>Update accounts</li>\n<li>Store / Update / Download birth certificates, cv, passport photo, profile photo</li>\n<li>Verify accounts</li>\n<li>Delete accounts</li>\n<li>Contact citizens / companies</li>\n<li>Add / View complaints</li>\n<li>Reply to complaints</li>\n<li>Open locations in maps</li>\n<li>Call and Emailing</li>\n<li>Search citizen by qualifications, name and NIC</li>\n<li>Search companies by field and name</li>\n</ul>\n<blockquote>\n<p>A 5 hour JWT token is generated with each successful login and register request. These token will be used to authenticate the user when performing deleting and updating functions.</p>\n</blockquote>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"14803467","collectionId":"6243a601-b458-4105-8b2c-f31a78aa8b5e","publishedId":"UyxgHnA7","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-05-11T10:17:41.000Z"},"item":[{"name":"Company","item":[{"name":"Create company","id":"9397b108-6f46-4bab-bd03-4cdd252232b3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"companyName\": \"ABCD Compnay\",\n    \"description\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat\",\n    \"contact\": \"+19159969739\",\n    \"address\": \"50 Oakland Ave\",\n    \"city\": \"Boston\",\n    \"province\": \"MA\",\n    \"country\": \"USA\",\n    \"email\": \"abdc@company.com\",\n    \"website\": \"http://abcd.com\",\n    \"companyFields\": [\"Softwares\", \"Web developement\"],\n    \"password\": \"1234567\",\n    \"confirmPassword\": \"1234567\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/companies/signup","description":"<p>You can register company by filling the all required fields.</p>\n<blockquote>\n<p>Passwords will be encrypted using hash method</p>\n</blockquote>\n<blockquote>\n<p>If the request fails a <strong>500 error</strong> will be generated</p>\n</blockquote>\n","urlObject":{"protocol":"http","port":"5000","path":["companies","signup"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"98b1055f-088e-4e01-bdb8-1aaefab54b3f","name":"Create company example","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"companyName\": \"ABCD Compnay\",\n    \"description\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat\",\n    \"contact\": \"+19159969739\",\n    \"address\": \"50 Oakland Ave\",\n    \"city\": \"Boston\",\n    \"province\": \"MA\",\n    \"country\": \"USA\",\n    \"email\": \"abdc@company.com\",\n    \"website\": \"http://abcd.com\",\n    \"companyFields\": [\"Softwares\", \"Web developement\"],\n    \"password\": \"1234567\",\n    \"confirmPassword\": \"1234567\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/companies/signup"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"903"},{"key":"ETag","value":"W/\"387-yFuDj4Esb4wnDVpvfP0/neplPr8\""},{"key":"Date","value":"Wed, 11 May 2022 06:16:08 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"result\": {\n        \"companyFields\": [\n            \"Softwares\",\n            \"Web developement\"\n        ],\n        \"_id\": \"627b54a708fd600d6137b056\",\n        \"companyName\": \"ABCD Compnay\",\n        \"description\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat\",\n        \"contact\": \"+19159969739\",\n        \"address\": \"50 Oakland Ave\",\n        \"city\": \"Boston\",\n        \"province\": \"MA\",\n        \"country\": \"USA\",\n        \"website\": \"http://abcd.com\",\n        \"email\": \"abdc@company.com\",\n        \"password\": \"$2a$12$IEVBm5TEsa2z/YSNxa/R3.wEkoCmhUazGiu27BnmqgEpyxRjm3.9e\",\n        \"createdAt\": \"2022-05-11T06:16:07.765Z\",\n        \"updatedAt\": \"2022-05-11T06:16:07.765Z\",\n        \"__v\": 0\n    },\n    \"token\": \"JWT web token\"\n}"}],"_postman_id":"9397b108-6f46-4bab-bd03-4cdd252232b3"},{"name":"Login company","id":"d86937ae-dda8-4821-be88-cf519dec39f9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"piedpiper@pp.com\",\n    \"password\": \"1234567\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/companies/signin","description":"<p>Login users by entering their email and password.</p>\n<p>A JWT token is generated for the user in login for authentication.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["companies","signin"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"07c14618-b498-4b5f-bece-c470b67a0928","name":"Login company example","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"piedpiper@pp.com\",\n    \"password\": \"1234567\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/companies/signin"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"871"},{"key":"ETag","value":"W/\"367-i7CrdnSevgRqec3i2SfaZO3bIzQ\""},{"key":"Date","value":"Mon, 09 May 2022 19:46:11 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"result\": {\n        \"companyFields\": [\n            \"Software\",\n            \"Webdevelopement\"\n        ],\n        \"_id\": \"62796f2098405a0d54463677\",\n        \"companyName\": \"Pied Piper\",\n        \"description\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat\",\n        \"contact\": \"+19159969739\",\n        \"address\": \"50 Oakland Ave\",\n        \"city\": \"Boston\",\n        \"province\": \"MA\",\n        \"country\": \"USA\",\n        \"email\": \"piedpiper@pp.com\",\n        \"password\": \"$2a$12$gucARRcrDjfatQ12GRRB3efDzggECXTHnaVnYKH0U2smSoMtsLkny\",\n        \"createdAt\": \"2022-05-09T19:44:32.237Z\",\n        \"updatedAt\": \"2022-05-09T19:44:32.237Z\",\n        \"__v\": 0\n    },\n    \"token\": \"JWT web token\"\n}"}],"_postman_id":"d86937ae-dda8-4821-be88-cf519dec39f9"},{"name":"Get companies","id":"65d42b95-55b5-4291-a114-b079f3ace8a3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:5000/companies?page=1","description":"<p>The SLBFE API returns the citizens data in paginated format. To get the data in a definite page pass the <strong>page number</strong> as a <strong>Query Parameter</strong>.</p>\n<blockquote>\n<p>This request returns 8 companies data per page</p>\n</blockquote>\n","urlObject":{"protocol":"http","port":"5000","path":["companies"],"host":["localhost"],"query":[{"key":"page","value":"1"}],"variable":[]}},"response":[{"id":"9dc169cc-2056-47fe-b304-18220938eb5b","name":"Get companies example","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:5000/companies?page=1","protocol":"http","host":["localhost"],"port":"5000","path":["companies"],"query":[{"key":"page","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"2587"},{"key":"ETag","value":"W/\"a1b-iDBBlVE5WLkf/MUajZLh9OsTNnY\""},{"key":"Date","value":"Mon, 09 May 2022 19:48:40 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"companyFields\": [\n                \"Software\",\n                \"Webdevelopement\"\n            ],\n            \"_id\": \"62796f2098405a0d54463677\",\n            \"companyName\": \"Pied Piper\",\n            \"description\": \"description\",\n            \"contact\": \"+19159969739\",\n            \"address\": \"50 Oakland Ave\",\n            \"city\": \"Boston\",\n            \"province\": \"MA\",\n            \"country\": \"USA\",\n            \"email\": \"piedpiper@pp.com\",\n            \"password\": \"$2a$12$gucARRcrDjfatQ12GRRB3efDzggECXTHnaVnYKH0U2smSoMtsLkny\",\n            \"createdAt\": \"2022-05-09T19:44:32.237Z\",\n            \"updatedAt\": \"2022-05-09T19:44:32.237Z\",\n            \"__v\": 0\n        }\n    ],\n    \"currentPage\": 1,\n    \"numberOfPages\": 1\n}"}],"_postman_id":"65d42b95-55b5-4291-a114-b079f3ace8a3"},{"name":"Get company","id":"19d08cc3-82ff-4075-8cd7-f1a1b64b81dc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:5000/companies/:id","description":"<p>Get company by providing the <strong>Company ID</strong> as a path variable.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["companies",":id"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"62796f2098405a0d54463677","key":"id"}]}},"response":[{"id":"f5f5978b-4f3d-4a97-8bff-229c387027fc","name":"Get company example","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:5000/companies/:id","protocol":"http","host":["localhost"],"port":"5000","path":["companies",":id"],"variable":[{"key":"id","value":"62796f2098405a0d54463677"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"642"},{"key":"ETag","value":"W/\"282-UZBHFSg9qbydkSN3igC2heTCcSA\""},{"key":"Date","value":"Mon, 09 May 2022 19:53:25 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"companyFields\": [\n        \"Software\",\n        \"Webdevelopement\"\n    ],\n    \"_id\": \"62796f2098405a0d54463677\",\n    \"companyName\": \"Pied Piper\",\n    \"description\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat\",\n    \"contact\": \"+19159969739\",\n    \"address\": \"50 Oakland Ave\",\n    \"city\": \"Boston\",\n    \"province\": \"MA\",\n    \"country\": \"USA\",\n    \"email\": \"piedpiper@pp.com\",\n    \"password\": \"$2a$12$gucARRcrDjfatQ12GRRB3efDzggECXTHnaVnYKH0U2smSoMtsLkny\",\n    \"createdAt\": \"2022-05-09T19:44:32.237Z\",\n    \"updatedAt\": \"2022-05-09T19:44:32.237Z\",\n    \"__v\": 0\n}"}],"_postman_id":"19d08cc3-82ff-4075-8cd7-f1a1b64b81dc"},{"name":"Get companies by search","id":"86e7e4fa-cc25-4b01-a104-e3a94ee0ec87","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:5000/companies/search?searchQuery=pied&companyFields=Software","description":"<p>To search something in the application you can use query parameters. In this example the API fetched the data that are either similar to the searchQuery or companyField.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["companies","search"],"host":["localhost"],"query":[{"key":"searchQuery","value":"pied"},{"key":"companyFields","value":"Software"}],"variable":[]}},"response":[{"id":"1e5a75d5-1d01-4b91-992a-29b4fcb62c61","name":"Get companies by search example","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:5000/companies/search?searchQuery=pied&companyFields=Software","protocol":"http","host":["localhost"],"port":"5000","path":["companies","search"],"query":[{"key":"searchQuery","value":"pied"},{"key":"companyFields","value":"Software"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"1932"},{"key":"ETag","value":"W/\"78c-sM1368pDC+9Iya+L7/fc2dFeLeQ\""},{"key":"Date","value":"Mon, 09 May 2022 19:57:08 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"companyFields\": [\n                \"Software\",\n                \"Webdevelopement\"\n            ],\n            \"_id\": \"62734c9b8d91bd32fcbb7a56\",\n            \"companyName\": \"ABC Company\",\n            \"description\": \"\",\n            \"contact\": \"+19159969739\",\n            \"address\": \"50 Oakland Ave\",\n            \"city\": \"Boston\",\n            \"province\": \"MA\",\n            \"country\": \"USA\",\n            \"email\": \"abccompany@abc.com\",\n            \"password\": \"password\",\n            \"createdAt\": \"2022-05-05T04:03:39.998Z\",\n            \"updatedAt\": \"2022-05-05T04:03:39.998Z\",\n            \"__v\": 0\n        },\n        {\n            \"companyFields\": [\n                \"Software\",\n                \"Webdevelopement\"\n            ],\n            \"_id\": \"62796f2098405a0d54463677\",\n            \"companyName\": \"Pied Piper\",\n            \"description\": \"password\",\n            \"contact\": \"+19159969739\",\n            \"address\": \"50 Oakland Ave\",\n            \"city\": \"Boston\",\n            \"province\": \"MA\",\n            \"country\": \"USA\",\n            \"email\": \"piedpiper@pp.com\",\n            \"password\": \"password\",\n            \"createdAt\": \"2022-05-09T19:44:32.237Z\",\n            \"updatedAt\": \"2022-05-09T19:44:32.237Z\",\n            \"__v\": 0\n        }\n    ]\n}"}],"_postman_id":"86e7e4fa-cc25-4b01-a104-e3a94ee0ec87"},{"name":"Update company","id":"e6cf69f6-a1e6-4182-b5e8-182801d004d1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"companyFields\": [\n        \"Softwaredevelopment\",\n        \"Webdevelopement\"\n    ],\n    \"description\": \"We are a software and web development start up based in Boston\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/companies/:id","description":"<p>The SLBFE API used PATCH instead of POST because when we can update few fields instead of the whole object using PATCH.</p>\n<p>In this example only <strong>compnayFields, description</strong> is updated</p>\n<blockquote>\n<p>If a company could not be found, a <strong>404 error</strong> will be generated. Otherwise the method will return data.</p>\n</blockquote>\n","urlObject":{"protocol":"http","port":"5000","path":["companies",":id"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"6279d9092457823e28e4cdd8","key":"id"}]}},"response":[{"id":"975dcb67-5626-4e5b-8310-fe233cf9f8eb","name":"Update company example","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"companyFields\": [\n        \"Softwaredevelopment\",\n        \"Webdevelopement\"\n    ],\n    \"description\": \"We are a software and web development start up based in Boston\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:5000/companies/:id","protocol":"http","host":["localhost"],"port":"5000","path":["companies",":id"],"variable":[{"key":"id","value":"6279d9092457823e28e4cdd8"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"485"},{"key":"ETag","value":"W/\"1e5-clJ1UgLdIHKIPYcE9/nE99gAhcM\""},{"key":"Date","value":"Tue, 10 May 2022 03:18:36 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"companyFields\": [\n        \"Softwaredevelopment\",\n        \"Webdevelopement\"\n    ],\n    \"_id\": \"6279d9092457823e28e4cdd8\",\n    \"companyName\": \"Pied Piper\",\n    \"description\": \"We are a software and web development start up based in Boston\",\n    \"contact\": \"+19159969739\",\n    \"address\": \"50 Oakland Ave\",\n    \"city\": \"Boston\",\n    \"province\": \"MA\",\n    \"country\": \"USA\",\n    \"email\": \"piedpiper@pp.com\",\n    \"password\": \"$2a$12$kRO/EmkzpBUpdcHnSub...SxViEGuMwDOrAnuzy1OWmdapPDAAqO.\",\n    \"createdAt\": \"2022-05-10T03:16:25.152Z\",\n    \"updatedAt\": \"2022-05-10T03:18:36.852Z\",\n    \"__v\": 0\n}"}],"_postman_id":"e6cf69f6-a1e6-4182-b5e8-182801d004d1"},{"name":"Delete company","id":"274dcb04-a91e-47af-9ac7-9b6b84120e17","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"DELETE","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6Inh5ekBjb21wYW55LmNvbSIsImlkIjoiNjI3YWQwN2IxYTMwM2FhYjZkMWUzM2YwIiwiaWF0IjoxNjUyMjE1OTMxLCJleHAiOjE2NTIyMzM5MzF9.PH-ODM4E--TBTQypEVwfSUvJQ5VBXQ_U9N0PkKuUK2M","type":"text"}],"url":"http://localhost:5000/companies/:id","description":"<p>Pass the <strong>company ID</strong> as a path variable to delete a company. This response will return <strong>404</strong> if the ID is invalid. It does not show a response code when the deletion is success.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["companies",":id"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"627ad0fd1a303aab6d1e33fb","key":"id"}]}},"response":[{"id":"7074ea07-9907-4398-8ae0-c2c79f85e15c","name":"Delete company example","originalRequest":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6Inh5ekBjb21wYW55LmNvbSIsImlkIjoiNjI3YWQwN2IxYTMwM2FhYjZkMWUzM2YwIiwiaWF0IjoxNjUyMjE1OTMxLCJleHAiOjE2NTIyMzM5MzF9.PH-ODM4E--TBTQypEVwfSUvJQ5VBXQ_U9N0PkKuUK2M","type":"text"}],"url":{"raw":"http://localhost:5000/companies/:id","protocol":"http","host":["localhost"],"port":"5000","path":["companies",":id"],"variable":[{"key":"id","value":"627ad0fd1a303aab6d1e33fb"}]}},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"274dcb04-a91e-47af-9ac7-9b6b84120e17"}],"id":"8f12b43d-6905-4dc1-93c6-5aa5e34fe26b","description":"<p>The company can be registered by entering the details asked. A company is allowed to view users data and search the users. Company can also be deleted or updated.</p>\n","_postman_id":"8f12b43d-6905-4dc1-93c6-5aa5e34fe26b"},{"name":"Citizen","item":[{"name":"Create citizen","id":"8d572a9e-c133-4c68-b0f9-dcc84896eaf7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"nic\": \"2001143495792\",\n    \"profilePic\": \"\",\n    \"firstName\": \"Alex\",\n    \"lastName\": \"Jones\",\n    \"age\": \"20\",\n    \"description\": \"Hi! I'm a software engineer expert in flutter, reactjs, and mongodb\",\n    \"contact\": \"0775675465\",\n    \"address\": \"10, Baker Street\",\n    \"postalCode\": \"1120\",\n    \"city\": \"Colombo\",\n    \"province\": \"Western\",\n    \"latitude\": \"6.9549145\",\n    \"longitude\": \"79.861626\",\n    \"profession\": \"Software Engineer\",\n    \"email\": \"alexjones@gmail.com\",\n    \"qualifications\": [\n        \"BSc(Hons) in software enginnering\",\n        \"3 years experience as a developer\"\n    ],\n    \"password\": \"12345\",\n    \"birthCertificate\": \"\",\n    \"cv\": \"\",\n    \"passport\": \"\",\n    \"confirmPassword\": \"12345\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/citizens/signup","description":"<p>You can register users by filling the all required fields. Profile picture, birth certificate, cv and passport photo are considered <strong>not required.</strong></p>\n<blockquote>\n<p>Passwords will be encrypted using hash method</p>\n</blockquote>\n<blockquote>\n<p>If the request fails a <strong>500 error</strong> will be generated</p>\n</blockquote>\n","urlObject":{"protocol":"http","port":"5000","path":["citizens","signup"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"f9a459b3-6886-4a71-aba6-f129166f3770","name":"Create citizen example","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"nic\": \"197419202757\",\n    \"profilePic\": \"\",\n    \"firstName\": \"Tom\",\n    \"lastName\": \"Cruise\",\n    \"age\": \"20\",\n    \"description\": \"Hi! I'm a software engineer expert in flutter, reactjs, and mongodb\",\n    \"contact\": \"0775675465\",\n    \"address\": \"166, Baker Street\",\n    \"postalCode\": \"00130\",\n    \"city\": \"Colombo\",\n    \"province\": \"Western\",\n    \"latitude\": \"6.9549145\",\n    \"longitude\": \"79.861626\",\n    \"profession\": \"software engineer\",\n    \"email\": \"tomcruice@gmail.com\",\n    \"qualifications\": [\n        \"BSc(Hons) in software enginnering\",\n        \"3 years experience as a developer\"\n    ],\n    \"password\": \"12345\",\n    \"birthCertificate\": \"\",\n    \"cv\": \"\",\n    \"passport\": \"\",\n    \"confirmPassword\": \"12345\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/citizens/signup"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"968"},{"key":"ETag","value":"W/\"3c8-9IoedFT++S8LGyW7LFS6Iwnzl5k\""},{"key":"Date","value":"Tue, 10 May 2022 05:12:30 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"result\": {\n        \"qualifications\": [\n            \"BSc(Hons) in software enginnering\",\n            \"3 years experience as a developer\"\n        ],\n        \"isVerified\": false,\n        \"_id\": \"6279f43d612927457509bc37\",\n        \"nic\": \"197419202757\",\n        \"profilePic\": \"\",\n        \"name\": \"Tom Cruise\",\n        \"age\": \"20\",\n        \"description\": \"Hi! I'm a software engineer expert in flutter, reactjs, and mongodb\",\n        \"contact\": \"0775675465\",\n        \"address\": \"166, Baker Street\",\n        \"postalCode\": \"00130\",\n        \"city\": \"Colombo\",\n        \"province\": \"Western\",\n        \"location\": {\n            \"latitude\": \"6.9549145\",\n            \"longitude\": \"79.861626\"\n        },\n        \"profession\": \"software engineer\",\n        \"email\": \"tomcruice@gmail.com\",\n        \"password\": \"$2a$12$a.PXspQJcuU9.CtQAASwaekJslUPmpvdwHGga.aoNB8r7SS7Dyc9.\",\n        \"birthCertificate\": \"\",\n        \"cv\": \"\",\n        \"passport\": \"\",\n        \"createdAt\": \"2022-05-10T05:12:29.886Z\",\n        \"updatedAt\": \"2022-05-10T05:12:29.886Z\",\n        \"__v\": 0\n    },\n    \"token\": \"JWT web token\"\n}"}],"_postman_id":"8d572a9e-c133-4c68-b0f9-dcc84896eaf7"},{"name":"Login citizen","id":"52b79bdf-54c8-427e-b917-be468622d810","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"alexsmith@gmail.com\",\n    \"password\": \"12345\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/citizens/signin","description":"<p>Login users by entering their email and password.</p>\n<p>A JWT token is generated for the user in login for authentication.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["citizens","signin"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"6a24a54a-59a5-4259-bc0c-9c3547c28f30","name":"Login citizen example","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"alexsmith@gmail.com\",\n    \"password\": \"12345\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/citizens/signin"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"951"},{"key":"ETag","value":"W/\"3b7-2Sf/HyDW4eQZUMbv/QPGPkHAREM\""},{"key":"Date","value":"Tue, 10 May 2022 05:13:23 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"result\": {\n        \"location\": {\n            \"latitude\": \"6.9549145\",\n            \"longitude\": \"79.861626\"\n        },\n        \"qualifications\": [\n            \"Software Engineer\",\n            \"Web developer\",\n            \"Mobile developer\"\n        ],\n        \"isVerified\": false,\n        \"_id\": \"626edfd9d246f2debca387cd\",\n        \"nic\": \"197419202757\",\n        \"profilePic\": \"\",\n        \"name\": \"Alex Smith\",\n        \"age\": \"20\",\n        \"description\": \"Hi! I'm a software engineer expert in flutter, reactjs, and mongodb\",\n        \"contact\": \"0775675465\",\n        \"address\": \"166, Baker Street\",\n        \"postalCode\": \"00130\",\n        \"city\": \"Colombo\",\n        \"province\": \"Western\",\n        \"profession\": \"software engineer\",\n        \"email\": \"alexsmith@gmail.com\",\n        \"password\": \"$2a$12$G6XJwVQ0gHaQRSkmkTxT0OpjkXgWcvPUxMglGKvv/JcwIC4YBafjq\",\n        \"birthCertificate\": \"\",\n        \"cv\": \"\",\n        \"passport\": \"\",\n        \"createdAt\": \"2022-05-01T19:30:33.322Z\",\n        \"updatedAt\": \"2022-05-01T19:30:33.322Z\",\n        \"__v\": 0\n    },\n    \"token\": \"JWT web token\"\n}"}],"_postman_id":"52b79bdf-54c8-427e-b917-be468622d810"},{"name":"Delete citizen","id":"cd56239c-f7dc-42ce-87a5-965b66833670","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InRvbWRjcnVpY2VAZ21haWwuY29tIiwiaWQiOiI2MjdhZDNlZTFhMzAzYWFiNmQxZTM0MDkiLCJpYXQiOjE2NTIyMTY4MTQsImV4cCI6MTY1MjIzNDgxNH0.feuDMmaMi16mKEx2KYVImPtYWwva9jWi_AG0RoOYGLU","type":"text"}],"url":"http://localhost:5000/citizens/:id","description":"<p>Pass the <strong>citizen ID</strong> as a path variable to delete a citizen. This response will return <strong>404</strong> if the ID is invalid. It does not show a response code when the deletion is success.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["citizens",":id"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"627ad3af1a303aab6d1e3404","key":"id"}]}},"response":[{"id":"f27f8440-065f-490a-80f2-aa58664e9854","name":"Delete citizen example","originalRequest":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InRvbWRjcnVpY2VAZ21haWwuY29tIiwiaWQiOiI2MjdhZDNlZTFhMzAzYWFiNmQxZTM0MDkiLCJpYXQiOjE2NTIyMTY4MTQsImV4cCI6MTY1MjIzNDgxNH0.feuDMmaMi16mKEx2KYVImPtYWwva9jWi_AG0RoOYGLU","type":"text"}],"url":{"raw":"http://localhost:5000/citizens/:id","protocol":"http","host":["localhost"],"port":"5000","path":["citizens",":id"],"variable":[{"key":"id","value":"627ad3af1a303aab6d1e3404"}]}},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"cd56239c-f7dc-42ce-87a5-965b66833670"},{"name":"Update citizen","id":"c593de6c-4645-4bb2-b560-b03a0ded9b6c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFsZXhzbWl0aEBnbWFpbC5jb20iLCJpZCI6IjYyNmVkZmQ5ZDI0NmYyZGViY2EzODdjZCIsImlhdCI6MTY1MjE1OTYwMywiZXhwIjoxNjUyMTc3NjAzfQ.EYSAs8w7Yi0hmOxd6nVLlz9xBh2OO56A4QXNUP0Tqzc","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"contact\": \"0773324567\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/citizens/:id","description":"<p>The SLBFE API used PATCH instead of POST because when we can update few fields instead of the whole object using PATCH.</p>\n<p>This example shows updating the citizen <strong>contact number</strong>.</p>\n<blockquote>\n<p>The Bureau officers can use the same request to verify or remove verify status of citizens.</p>\n</blockquote>\n<blockquote>\n<p>If a citizen could not be found, a <strong>404 error</strong> will be generated. Otherwise the method will return data.</p>\n</blockquote>\n","urlObject":{"protocol":"http","port":"5000","path":["citizens",":id"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"6279f43d612927457509bc37","key":"id"}]}},"response":[{"id":"4d2c5d05-2d69-4e33-bda2-da7abf502250","name":"Update citizen example","originalRequest":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFsZXhzbWl0aEBnbWFpbC5jb20iLCJpZCI6IjYyNmVkZmQ5ZDI0NmYyZGViY2EzODdjZCIsImlhdCI6MTY1MjE1OTYwMywiZXhwIjoxNjUyMTc3NjAzfQ.EYSAs8w7Yi0hmOxd6nVLlz9xBh2OO56A4QXNUP0Tqzc","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"contact\": \"0773324567\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:5000/citizens/:id","protocol":"http","host":["localhost"],"port":"5000","path":["citizens",":id"],"variable":[{"key":"id","value":"6279f43d612927457509bc37"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"735"},{"key":"ETag","value":"W/\"2df-4UBHfY6p3cT2kCaXsaLSMpFvYmU\""},{"key":"Date","value":"Tue, 10 May 2022 05:39:36 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"location\": {\n        \"latitude\": \"6.9549145\",\n        \"longitude\": \"79.861626\"\n    },\n    \"qualifications\": [\n        \"BSc(Hons) in software enginnering\",\n        \"3 years experience as a developer\"\n    ],\n    \"isVerified\": false,\n    \"_id\": \"6279f43d612927457509bc37\",\n    \"nic\": \"197419202757\",\n    \"profilePic\": \"\",\n    \"name\": \"Tom Cruise\",\n    \"age\": \"20\",\n    \"description\": \"Hi! I'm a software engineer expert in flutter, reactjs, and mongodb\",\n    \"contact\": \"0773324567\",\n    \"address\": \"166, Baker Street\",\n    \"postalCode\": \"00130\",\n    \"city\": \"Colombo\",\n    \"province\": \"Western\",\n    \"profession\": \"software engineer\",\n    \"email\": \"tomcruice@gmail.com\",\n    \"password\": \"$2a$12$a.PXspQJcuU9.CtQAASwaekJslUPmpvdwHGga.aoNB8r7SS7Dyc9.\",\n    \"birthCertificate\": \"\",\n    \"cv\": \"\",\n    \"passport\": \"\",\n    \"createdAt\": \"2022-05-10T05:12:29.886Z\",\n    \"updatedAt\": \"2022-05-10T05:39:35.609Z\",\n    \"__v\": 0\n}"}],"_postman_id":"c593de6c-4645-4bb2-b560-b03a0ded9b6c"},{"name":"Get citizens","id":"3e53cffc-ac1f-48d1-8a80-467850646eea","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:5000/citizens?page=1","description":"<p>The SLBFE API returns the citizens data in paginated format. To get the data in a definite page pass the <strong>page number</strong> as a <strong>Query Parameter</strong>.</p>\n<blockquote>\n<p>This request returns 8 citizen data per page</p>\n</blockquote>\n","urlObject":{"protocol":"http","port":"5000","path":["citizens"],"host":["localhost"],"query":[{"key":"page","value":"1"}],"variable":[]}},"response":[{"id":"fb2b923d-7673-416a-8f75-89b3179538e8","name":"Get citizens example","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:5000/citizens?page=1","protocol":"http","host":["localhost"],"port":"5000","path":["citizens"],"query":[{"key":"page","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"638916"},{"key":"ETag","value":"W/\"9bfc4-aj04mlro2PlxwuvejkgW17QVpJs\""},{"key":"Date","value":"Tue, 10 May 2022 05:51:07 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"location\": {\n                \"latitude\": \"6.9549145\",\n                \"longitude\": \"79.861626\"\n            },\n            \"qualifications\": [\n                \"BSc(Hons) in software enginnering\",\n                \"3 years experience as a developer\"\n            ],\n            \"isVerified\": false,\n            \"_id\": \"6279f43d612927457509bc37\",\n            \"nic\": \"197419202757\",\n            \"profilePic\": \"\",\n            \"name\": \"Tom Cruise\",\n            \"age\": \"20\",\n            \"description\": \"Hi! I'm a software engineer expert in flutter, reactjs, and mongodb\",\n            \"contact\": \"0773324567\",\n            \"address\": \"166, Baker Street\",\n            \"postalCode\": \"00130\",\n            \"city\": \"Colombo\",\n            \"province\": \"Western\",\n            \"profession\": \"software engineer\",\n            \"email\": \"tomcruice@gmail.com\",\n            \"password\": \"$2a$12$a.PXspQJcuU9.CtQAASwaekJslUPmpvdwHGga.aoNB8r7SS7Dyc9.\",\n            \"birthCertificate\": \"\",\n            \"cv\": \"\",\n            \"passport\": \"\",\n            \"createdAt\": \"2022-05-10T05:12:29.886Z\",\n            \"updatedAt\": \"2022-05-10T05:39:35.609Z\",\n            \"__v\": 0\n        },\n        {\n            \"location\": {\n                \"latitude\": \"6.9549145\",\n                \"longitude\": \"79.861626\"\n            },\n            \"qualifications\": [\n                \"Software Engineer\",\n                \"Web developer\",\n                \"Mobile developer\"\n            ],\n            \"isVerified\": false,\n            \"_id\": \"626edfd9d246f2debca387cd\",\n            \"nic\": \"197419202757\",\n            \"profilePic\": \"\",\n            \"name\": \"Alex Smith\",\n            \"age\": \"20\",\n            \"description\": \"Hi! I'm a software engineer expert in flutter, reactjs, and mongodb\",\n            \"contact\": \"0775675465\",\n            \"address\": \"166, Baker Street\",\n            \"postalCode\": \"00130\",\n            \"city\": \"Colombo\",\n            \"province\": \"Western\",\n            \"profession\": \"software engineer\",\n            \"email\": \"alexsmith@gmail.com\",\n            \"password\": \"$2a$12$G6XJwVQ0gHaQRSkmkTxT0OpjkXgWcvPUxMglGKvv/JcwIC4YBafjq\",\n            \"birthCertificate\": \"\",\n            \"cv\": \"\",\n            \"passport\": \"\",\n            \"createdAt\": \"2022-05-01T19:30:33.322Z\",\n            \"updatedAt\": \"2022-05-01T19:30:33.322Z\",\n            \"__v\": 0\n        }\n    ],\n    \"currentPage\": 1,\n    \"numberOfPages\": 1\n}"}],"_postman_id":"3e53cffc-ac1f-48d1-8a80-467850646eea"},{"name":"Get Citizen By Search","id":"3a34a396-1b36-4073-9c7d-62f22b73c4d7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"http://localhost:5000/citizens/search?nicQuery=197419202757&nameQuery=none&qualifications=","description":"<p>To search something in the application you can use query parameters. In this example the API fetched the data that are either similar to the given queries.</p>\n<p>Can search a citizen using their <strong>NIC, name and qualifications.</strong></p>\n<blockquote>\n<p>404 error if not found</p>\n</blockquote>\n","urlObject":{"protocol":"http","port":"5000","path":["citizens","search"],"host":["localhost"],"query":[{"key":"nicQuery","value":"197419202757"},{"key":"nameQuery","value":"none"},{"key":"qualifications","value":""}],"variable":[]}},"response":[{"id":"9d06eafa-19e6-4f86-803d-c26a5872c435","name":"Get citizen by search example","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:5000/citizens/search?nicQuery=197419202757&nameQuery=none&qualifications=","protocol":"http","host":["localhost"],"port":"5000","path":["citizens","search"],"query":[{"key":"nicQuery","value":"197419202757"},{"key":"nameQuery","value":"none"},{"key":"qualifications","value":""}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"text/html; charset=utf-8"},{"key":"Content-Length","value":"16"},{"key":"ETag","value":"W/\"10-6LV3WNkVHatPdAjZRxuI2xk0LeU\""},{"key":"Date","value":"Tue, 10 May 2022 23:01:38 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"location\": {\n                \"latitude\": \"6.9549145\",\n                \"longitude\": \"79.861626\"\n            },\n            \"qualifications\": [\n                \"BSc(Hons) in software enginnering\",\n                \"3 years experience as a developer\"\n            ],\n            \"isVerified\": false,\n            \"_id\": \"627aeeaf1616c3c3057ce48c\",\n            \"nic\": \"197419202757\",\n            \"profilePic\": \"\",\n            \"name\": \"Tom Cruise\",\n            \"age\": \"20\",\n            \"description\": \"Hi! I'm a software engineer expert in flutter, reactjs, and mongodb\",\n            \"contact\": \"0775675465\",\n            \"address\": \"166, Baker Street\",\n            \"postalCode\": \"00130\",\n            \"city\": \"Colombo\",\n            \"province\": \"Western\",\n            \"profession\": \"software engineer\",\n            \"email\": \"tomcruice@gmail.com\",\n            \"password\": \"$2a$12$we7U6rvnkOdVchi/EvqJx.T..4sO2XyBzvrDXdCTF3L1NOzsCLeFi\",\n            \"birthCertificate\": \"\",\n            \"cv\": \"\",\n            \"passport\": \"\",\n            \"createdAt\": \"2022-05-10T23:01:03.215Z\",\n            \"updatedAt\": \"2022-05-10T23:01:03.215Z\",\n            \"__v\": 0\n        }\n    ]\n}"}],"_postman_id":"3a34a396-1b36-4073-9c7d-62f22b73c4d7"},{"name":"Get Citizen","id":"be5ce395-8ebf-4390-8669-35ad48c938ab","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:5000/citizens/:id","description":"<p>Get citizen by providing the <strong>Citizen ID</strong> as a path variable.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["citizens",":id"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"62678f3870f066eb86978c3f","key":"id"}]}},"response":[{"id":"297fed12-f932-4bc9-9424-c1fe979a2d6b","name":"Get citizen example","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:5000/citizens/:id","protocol":"http","host":["localhost"],"port":"5000","path":["citizens",":id"],"variable":[{"key":"id","value":"62678f3870f066eb86978c3f"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"360730"},{"key":"ETag","value":"W/\"5811a-K/PT5vJM0wuxHe3qccnEfWH+snA\""},{"key":"Date","value":"Tue, 10 May 2022 06:16:32 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"location\": {\n        \"latitude\": \"7.081332761790711\",\n        \"longitude\": \"80.02808685326151\"\n    },\n    \"qualifications\": [\n        \"Software Engineer\"\n    ],\n    \"isVerified\": false,\n    \"_id\": \"62678f3870f066eb86978c3f\",\n    \"nic\": \"197419202757\",\n    \"profilePic\": \"image of a profile picture\",\n    \"name\": \"John Smith\",\n    \"age\": \"25\",\n    \"description\": \"I am a software engineer expert in Java, PHP, Dart, and Python.\",\n    \"contact\": \"0779867586\",\n    \"address\": \"No. 17/B Baker Street\",\n    \"postalCode\": \"11870\",\n    \"city\": \"Colombo 10\",\n    \"province\": \"Western\",\n    \"profession\": \"Software Engineer\",\n    \"email\": \"johnsmith@gmail.com\",\n    \"password\": \"hashed password.\",\n    \"birthCertificate\": \"\",\n    \"passport\": \"\",\n    \"cv\": \"\",\n    \"createdAt\": \"2022-04-26T06:20:40.137Z\",\n    \"updatedAt\": \"2022-04-26T06:20:40.137Z\",\n    \"__v\": 0\n}"}],"_postman_id":"be5ce395-8ebf-4390-8669-35ad48c938ab"}],"id":"cb4101d5-89cd-4aeb-9dc1-e91691546e38","_postman_id":"cb4101d5-89cd-4aeb-9dc1-e91691546e38","description":""},{"name":"SLBFE Officer","item":[{"name":"Create officer","id":"64f7ca57-bfe2-4a50-9b1d-58dfd8ecd3ad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"firstName\": \"Micheal\",\n    \"lastName\": \"Jordan\",\n    \"email\": \"michealjordan@gmail.com\",\n    \"password\": \"123456\",\n    \"confirmPassword\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/officers/signup","description":"<p>Send the basic details as shown in the example to create a SLBFE officer account and generate a JWT token.</p>\n<p>If successful, JWT token will be generated and will receive a response with <strong>status code 200.</strong> Else a <strong>500 error code</strong> will be generated.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["officers","signup"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"cf0f2b44-29db-44ea-8e37-164cfc7c0451","name":"Create officer example","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"firstName\": \"Micheal\",\n    \"lastName\": \"Jordan\",\n    \"email\": \"michealjordan@gmail.com\",\n    \"password\": \"123456\",\n    \"confirmPassword\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/officers/signup"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"490"},{"key":"ETag","value":"W/\"1ea-Nw7ZNeGckVS2+qsQduA96PCx2p8\""},{"key":"Date","value":"Mon, 09 May 2022 18:28:09 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"result\": {\n        \"_id\": \"62795d39d662a8f555651e40\",\n        \"email\": \"michealjordan@gmail.com\",\n        \"password\": \"hashed password\",\n        \"name\": \"Micheal Jordan\",\n        \"createdAt\": \"2022-05-09T18:28:09.442Z\",\n        \"updatedAt\": \"2022-05-09T18:28:09.442Z\",\n        \"__v\": 0\n    },\n    \"token\": \"JWT token response\"\n}"}],"_postman_id":"64f7ca57-bfe2-4a50-9b1d-58dfd8ecd3ad"},{"name":"Login officer","id":"fb44da8d-1821-43c9-a6f2-021921da390e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"michealjordan@gmail.com\",\n    \"password\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/officers/signin","description":"<p>Login by entering email and password. If successful, JWT token will be generated and will receive a response with <strong>status code 200.</strong> Else a <strong>500 error code</strong> will be generated.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["officers","signin"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"1ad87f6d-e994-4c71-9d72-dbac9f862e67","name":"Login officer example","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"michealjordan@gmail.com\",\n    \"password\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/officers/signin"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"490"},{"key":"ETag","value":"W/\"1ea-zDKYFdfSivs+GruVyCO9EkJU6Tk\""},{"key":"Date","value":"Mon, 09 May 2022 18:30:38 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"result\": {\n        \"_id\": \"62795d39d662a8f555651e40\",\n        \"email\": \"michealjordan@gmail.com\",\n        \"password\": \"$2a$12$HY9lODokKlBsgY6wDim1k.zZ/MARfw3tgnGC/rOS1viqekPp3QPX.\",\n        \"name\": \"Micheal Jordan\",\n        \"createdAt\": \"2022-05-09T18:28:09.442Z\",\n        \"updatedAt\": \"2022-05-09T18:28:09.442Z\",\n        \"__v\": 0\n    },\n    \"token\": \"JWT Web token\"\n}"}],"_postman_id":"fb44da8d-1821-43c9-a6f2-021921da390e"}],"id":"2d05de14-498d-40a7-b5ee-b89304fc7da8","description":"<p>After registering as a SLBFE officer, the user can view citizens, companies, complains. They also can perform deleting, updating and replying to complain functions. However you need to send a <strong>JWT token</strong> as a <strong>header</strong> to perform these functions since these functions are high-risk.</p>\n","_postman_id":"2d05de14-498d-40a7-b5ee-b89304fc7da8"},{"name":"Complain","item":[{"name":"Get complains","id":"b9cc2b1a-0165-48dc-8552-d07b8d9cf5cb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:5000/complains?page=1","description":"<p>The SLBFE API returns the complain data in paginated format. To get the data in a definite page pass the <strong>page number</strong> as a <strong>Query Parameter</strong>. If something goes wrong <strong>404 code</strong> will be sent to the client.</p>\n<blockquote>\n<p>This request returns 8 complain data per page</p>\n</blockquote>\n","urlObject":{"protocol":"http","port":"5000","path":["complains"],"host":["localhost"],"query":[{"key":"page","value":"1"}],"variable":[]}},"response":[{"id":"af520761-c15f-4495-82be-086d6dd60768","name":"Get complains example","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:5000/complains?page=1","protocol":"http","host":["localhost"],"port":"5000","path":["complains"],"query":[{"key":"page","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"1028"},{"key":"ETag","value":"W/\"404-Zwf4wlo0FFYt/MGH1ZAskBTnDf0\""},{"key":"Date","value":"Tue, 10 May 2022 21:34:13 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"createdAt\": \"2022-05-09T19:20:00.589Z\",\n            \"_id\": \"62796960e44d4e02839bfab8\",\n            \"complainTitle\": \"Phone Number\",\n            \"complainText\": \"I can't view company phone number\",\n            \"email\": \"johnsmith@gmail.com\",\n            \"creator\": \"62795d39d662a8f555651e40\",\n            \"updatedAt\": \"2022-05-09T19:20:00.589Z\",\n            \"__v\": 0\n        },\n        {\n            \"createdAt\": \"2022-05-04T08:03:48.438Z\",\n            \"_id\": \"627233646d584f2382a48de7\",\n            \"creator\": \"626edfd9d246f2debca387cd\",\n            \"complainTitle\": \"test\",\n            \"complainText\": \"test\",\n            \"email\": \"alexev2001@gmail.com\",\n            \"updatedAt\": \"2022-05-04T08:03:48.438Z\",\n            \"__v\": 0\n        }\n    ],\n    \"currentPage\": 1,\n    \"numberOfPages\": 1\n}"}],"_postman_id":"b9cc2b1a-0165-48dc-8552-d07b8d9cf5cb"},{"name":"Create complain","id":"b5965e67-efda-4426-9fb3-a02f22e0ff56","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6Im1pY2hlYWxqb3JkYW5AZ21haWwuY29tIiwiaWQiOiI2Mjc5NWQzOWQ2NjJhOGY1NTU2NTFlNDAiLCJpYXQiOjE2NTIxMjIxNzgsImV4cCI6MTY1MjE0MDE3OH0.bfXk_OpU-lSeekdaSYfBGILMuRc007eR4vNRyPpJY1w","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"complainTitle\": \"Phone Number\",\n    \"complainText\": \"I can't view company phone number\",\n    \"email\": \"johnsmith@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/complains/create","description":"<p>A citizen can make complains to the Bureau officer by sending the complain content in the body. To make a complain the complainer need to have an already generated <strong>JWT token</strong> and pass it as a Auth Header.</p>\n<blockquote>\n<p>Error code is <strong>500</strong></p>\n</blockquote>\n<blockquote>\n<p>Success code is <strong>201</strong></p>\n</blockquote>\n","urlObject":{"protocol":"http","port":"5000","path":["complains","create"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"7b5c1b74-d6fe-4c02-9479-118f8dd30c7c","name":"Create complain example","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"JWT token","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"complainTitle\": \"Phone Number\",\n    \"complainText\": \"I can't view company phone number\",\n    \"email\": \"johnsmith@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/complains/create"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"269"},{"key":"ETag","value":"W/\"10d-uTDzVfzFjL69RiCO9Db4QC4Yht4\""},{"key":"Date","value":"Mon, 09 May 2022 19:20:00 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"createdAt\": \"2022-05-09T19:20:00.589Z\",\n    \"_id\": \"62796960e44d4e02839bfab8\",\n    \"complainTitle\": \"Phone Number\",\n    \"complainText\": \"I can't view company phone number\",\n    \"email\": \"johnsmith@gmail.com\",\n    \"creator\": \"62795d39d662a8f555651e40\",\n    \"updatedAt\": \"2022-05-09T19:20:00.589Z\",\n    \"__v\": 0\n}"}],"_postman_id":"b5965e67-efda-4426-9fb3-a02f22e0ff56"},{"name":"Get complains by user","id":"769cef73-cd00-4f45-b982-6861a86b1f14","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:5000/complains/creator?email=johnsmith@gmail.com","description":"<p>By passing the user's email address as a <strong>Query Parameter,</strong> you can get the all the complains made by a particular user.</p>\n<blockquote>\n<p>Error code is <strong>500</strong></p>\n</blockquote>\n","urlObject":{"protocol":"http","port":"5000","path":["complains","creator"],"host":["localhost"],"query":[{"key":"email","value":"johnsmith@gmail.com"}],"variable":[]}},"response":[{"id":"46eaa9d7-f773-4f43-b8e6-77abf65c0ead","name":"Get complains by user example","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:5000/complains/creator?email=johnsmith@gmail.com","protocol":"http","host":["localhost"],"port":"5000","path":["complains","creator"],"query":[{"key":"email","value":"johnsmith@gmail.com"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"271"},{"key":"ETag","value":"W/\"10f-4He6GLwu+re65mhUJS/yp4WY51Y\""},{"key":"Date","value":"Mon, 09 May 2022 19:34:13 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"createdAt\": \"2022-05-09T19:20:00.589Z\",\n        \"_id\": \"62796960e44d4e02839bfab8\",\n        \"complainTitle\": \"Phone Number\",\n        \"complainText\": \"I can't view company phone number\",\n        \"email\": \"johnsmith@gmail.com\",\n        \"creator\": \"62795d39d662a8f555651e40\",\n        \"updatedAt\": \"2022-05-09T19:20:00.589Z\",\n        \"__v\": 0\n    }\n]"}],"_postman_id":"769cef73-cd00-4f45-b982-6861a86b1f14"}],"id":"5f02d723-a07e-41d2-9d0a-33c9b14b513a","_postman_id":"5f02d723-a07e-41d2-9d0a-33c9b14b513a","description":""}]}