{"info":{"_postman_id":"daa6d1cf-9cb4-4f7c-a720-a8df9840b4f5","name":"API Testing For Finance Backend System","description":"<html><head></head><body><h3 id=\"this-collection-contains-4-sub-folders\">This collection contains 4 sub folders:</h3>\n<ol>\n<li><p>Users: It contains all the APIs tested for the user.</p>\n</li>\n<li><p>Financial Records: It contains all the APIs tested for the records.</p>\n</li>\n<li><p>Dashboard: It contains all the APIs tested for getting the summary of the records.</p>\n</li>\n<li><p>Miscellaneous: It contains all other possible routes.</p>\n</li>\n</ol>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"53714216","collectionId":"daa6d1cf-9cb4-4f7c-a720-a8df9840b4f5","publishedId":"2sBXionW1Q","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-04-04T04:23:13.000Z"},"item":[{"name":"Users","item":[{"name":"Creating new user","id":"012b1e50-7b49-4177-ba6f-fc434579f5ea","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"role","value":"admin","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"Analyst User\",\r\n  \"email\": \"analyst@gmail.com\",\r\n  \"role\": \"analyst\",\r\n  \"status\": \"active\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/users","urlObject":{"protocol":"http","port":"3000","path":["api","users"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"05c65132-dd5f-4938-b87c-dfbf5e9d66d7","name":"Creating new user","originalRequest":{"method":"POST","header":[{"key":"role","value":"admin","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"Analyst User\",\r\n  \"email\": \"analyst@gmail.com\",\r\n  \"role\": \"analyst\",\r\n  \"status\": \"active\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/users"},"status":"Created","code":201,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"229"},{"key":"ETag","value":"W/\"e5-90YhLqFbJ3CYhMrVARmbEnmnb08\""},{"key":"Date","value":"Sat, 04 Apr 2026 04:10:35 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"name\": \"Analyst User\",\n        \"email\": \"analyst@gmail.com\",\n        \"role\": \"analyst\",\n        \"status\": \"active\",\n        \"_id\": \"69d08f3b35885212cd8c7118\",\n        \"createdAt\": \"2026-04-04T04:10:35.561Z\",\n        \"updatedAt\": \"2026-04-04T04:10:35.561Z\",\n        \"__v\": 0\n    }\n}"}],"_postman_id":"012b1e50-7b49-4177-ba6f-fc434579f5ea"},{"name":"Get users","id":"c4904f70-0934-466e-8b3b-2a1b22081226","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"role","value":"admin","type":"text"}],"url":"http://localhost:3000/api/users","urlObject":{"protocol":"http","port":"3000","path":["api","users"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"c05123da-e676-4723-a56e-20726754ba49","name":"Get users","originalRequest":{"method":"GET","header":[{"key":"role","value":"admin","type":"text"}],"url":"http://localhost:3000/api/users"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"437"},{"key":"ETag","value":"W/\"1b5-wgre1g5Man87jpCuj/UePEWgtGs\""},{"key":"Date","value":"Sat, 04 Apr 2026 04:10:53 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": [\n        {\n            \"_id\": \"69cfc4b91608398cac9d6528\",\n            \"name\": \"Admin User First\",\n            \"email\": \"admin@gmail.com\",\n            \"role\": \"admin\",\n            \"status\": \"active\",\n            \"createdAt\": \"2026-04-03T13:46:33.517Z\",\n            \"updatedAt\": \"2026-04-03T13:53:02.401Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"69d08f3b35885212cd8c7118\",\n            \"name\": \"Analyst User\",\n            \"email\": \"analyst@gmail.com\",\n            \"role\": \"analyst\",\n            \"status\": \"active\",\n            \"createdAt\": \"2026-04-04T04:10:35.561Z\",\n            \"updatedAt\": \"2026-04-04T04:10:35.561Z\",\n            \"__v\": 0\n        }\n    ]\n}"}],"_postman_id":"c4904f70-0934-466e-8b3b-2a1b22081226"},{"name":"Updating user ","id":"f0ca1e91-4632-4113-baf3-f5ba26acac83","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"role","value":"admin","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Admin First\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/users/:id","urlObject":{"protocol":"http","port":"3000","path":["api","users",":id"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"69cfc4b91608398cac9d6528","key":"id"}]}},"response":[{"id":"e9d81220-cd83-43e5-96c3-0c5810b89fad","name":"Updating user","originalRequest":{"method":"PATCH","header":[{"key":"role","value":"admin","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Admin First\"\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/api/users/:id","protocol":"http","host":["localhost"],"port":"3000","path":["api","users",":id"],"variable":[{"key":"id","value":"69cfc4b91608398cac9d6528"}]}},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"224"},{"key":"ETag","value":"W/\"e0-kNjsfsgL41iYJJf196SU2+9xGFI\""},{"key":"Date","value":"Sat, 04 Apr 2026 04:12:51 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"_id\": \"69cfc4b91608398cac9d6528\",\n        \"name\": \"Admin First\",\n        \"email\": \"admin@gmail.com\",\n        \"role\": \"admin\",\n        \"status\": \"active\",\n        \"createdAt\": \"2026-04-03T13:46:33.517Z\",\n        \"updatedAt\": \"2026-04-04T04:12:51.099Z\",\n        \"__v\": 0\n    }\n}"}],"_postman_id":"f0ca1e91-4632-4113-baf3-f5ba26acac83"},{"name":"Get users by analyst - 403 Forbidden","id":"5235d939-43b0-4097-a8a9-d51cf12b7a22","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"role","value":"analyst","type":"text"}],"url":"http://localhost:3000/api/users","urlObject":{"protocol":"http","port":"3000","path":["api","users"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"ea54f49f-0f4f-4bf8-a7f4-af77ce8259e4","name":"Get users by analyst - 403 Forbidden","originalRequest":{"method":"GET","header":[{"key":"role","value":"analyst","type":"text"}],"url":"http://localhost:3000/api/users"},"status":"Forbidden","code":403,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"43"},{"key":"ETag","value":"W/\"2b-S5LF1Nie2QnWRaxtvmnJKQvZK+E\""},{"key":"Date","value":"Sat, 04 Apr 2026 04:13:23 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Access denied\"\n}"}],"_postman_id":"5235d939-43b0-4097-a8a9-d51cf12b7a22"},{"name":"Get users by viewer - 403 Forbidden","id":"d6739431-66a7-4c78-b5aa-d8c9c4949752","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"role","value":"viewer","type":"text"}],"url":"http://localhost:3000/api/users","urlObject":{"protocol":"http","port":"3000","path":["api","users"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"2c2919c9-a4ef-44c8-8493-7ea544523324","name":"Get users by viewer - 403 Forbidden","originalRequest":{"method":"GET","header":[{"key":"role","value":"viewer","type":"text"}],"url":"http://localhost:3000/api/users"},"status":"Forbidden","code":403,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"43"},{"key":"ETag","value":"W/\"2b-S5LF1Nie2QnWRaxtvmnJKQvZK+E\""},{"key":"Date","value":"Sat, 04 Apr 2026 04:13:48 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Access denied\"\n}"}],"_postman_id":"d6739431-66a7-4c78-b5aa-d8c9c4949752"},{"name":"Creating new user by viewer - 403 Forbidden","id":"032911dd-42da-4365-80fb-e289d09422e3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"role","value":"viewer","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"Admin User Second\",\r\n  \"email\": \"admin2@gmail.com\",\r\n  \"role\": \"admin\",\r\n  \"status\": \"active\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/users","urlObject":{"protocol":"http","port":"3000","path":["api","users"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"c9ecb5f3-c1b2-41dd-ac67-208c76621b2c","name":"Creating new user by viewer - 403 Forbidden","originalRequest":{"method":"POST","header":[{"key":"role","value":"viewer","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"Admin User Second\",\r\n  \"email\": \"admin2@gmail.com\",\r\n  \"role\": \"admin\",\r\n  \"status\": \"active\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/users"},"status":"Forbidden","code":403,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"43"},{"key":"ETag","value":"W/\"2b-S5LF1Nie2QnWRaxtvmnJKQvZK+E\""},{"key":"Date","value":"Sat, 04 Apr 2026 04:14:13 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Access denied\"\n}"}],"_postman_id":"032911dd-42da-4365-80fb-e289d09422e3"},{"name":"Creating new user by analyst - 403 Forbidden","id":"fc793f70-f3a6-4a21-9817-5019fdb76d02","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"role","value":"analyst","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"Admin User Second\",\r\n  \"email\": \"admin2@gmail.com\",\r\n  \"role\": \"admin\",\r\n  \"status\": \"active\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/users","urlObject":{"protocol":"http","port":"3000","path":["api","users"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"adb2792c-30a5-4ac9-a14d-a22c222b740f","name":"Creating new user by analyst - 403 Forbidden","originalRequest":{"method":"POST","header":[{"key":"role","value":"analyst","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"Admin User Second\",\r\n  \"email\": \"admin2@gmail.com\",\r\n  \"role\": \"admin\",\r\n  \"status\": \"active\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/users"},"status":"Forbidden","code":403,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"43"},{"key":"ETag","value":"W/\"2b-S5LF1Nie2QnWRaxtvmnJKQvZK+E\""},{"key":"Date","value":"Sat, 04 Apr 2026 04:14:33 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Access denied\"\n}"}],"_postman_id":"fc793f70-f3a6-4a21-9817-5019fdb76d02"},{"name":"Updating user with invalid id - 404 User not found","id":"8c949eea-2e34-4de6-a5fc-08ee7ba4a606","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"role","value":"admin","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"role\": \"analyst\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/users/:id","urlObject":{"protocol":"http","port":"3000","path":["api","users",":id"],"host":["localhost"],"query":[],"variable":[{"id":"28283b5b-9b5a-4a6e-ae48-a3b4f5e74b11","type":"any","value":"69cfc4b91608398cac9d6510","key":"id"}]}},"response":[{"id":"518926d3-7626-4eef-8207-45ba805c4360","name":"Updating user with invalid id - 404 User not found","originalRequest":{"method":"PATCH","header":[{"key":"role","value":"admin","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"role\": \"analyst\"\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/api/users/:id","protocol":"http","host":["localhost"],"port":"3000","path":["api","users",":id"],"variable":[{"key":"id","value":"69cfc4b91608398cac9d6510"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"44"},{"key":"ETag","value":"W/\"2c-EAnCIFy1uGovyo/FU6KYwnjLgrc\""},{"key":"Date","value":"Sat, 04 Apr 2026 04:14:59 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"User not found\"\n}"}],"_postman_id":"8c949eea-2e34-4de6-a5fc-08ee7ba4a606"}],"id":"9fac4fa1-8d09-428c-8a54-77a074a22b96","_postman_id":"9fac4fa1-8d09-428c-8a54-77a074a22b96","description":""},{"name":"Financial Records","item":[{"name":"Creating new financial record","id":"a3ad8647-4e39-4cf0-b0d5-f3590a59e2fb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"role","value":"admin","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"amount\": 10000,\r\n  \"type\": \"income\",\r\n  \"category\": \"salary\",\r\n  \"notes\": \"Monthly salary\",\r\n  \"userId\": \"69cfc4b91608398cac9d6528\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/records","urlObject":{"protocol":"http","port":"3000","path":["api","records"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"30ba5803-6580-4847-a595-f137318a87d9","name":"Creating new financial record","originalRequest":{"method":"POST","header":[{"key":"role","value":"admin","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"amount\": 10000,\r\n  \"type\": \"income\",\r\n  \"category\": \"salary\",\r\n  \"notes\": \"Monthly salary\",\r\n  \"userId\": \"69cfc4b91608398cac9d6528\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/records"},"status":"Created","code":201,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"290"},{"key":"ETag","value":"W/\"122-agCZo3XWec4Np5ZVUIaLu6zQYhs\""},{"key":"Date","value":"Sat, 04 Apr 2026 04:05:44 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"amount\": 10000,\n        \"type\": \"income\",\n        \"category\": \"salary\",\n        \"notes\": \"Monthly salary\",\n        \"userId\": \"69cfc4b91608398cac9d6528\",\n        \"_id\": \"69d08e1835885212cd8c710d\",\n        \"date\": \"2026-04-04T04:05:44.834Z\",\n        \"createdAt\": \"2026-04-04T04:05:44.844Z\",\n        \"updatedAt\": \"2026-04-04T04:05:44.844Z\",\n        \"__v\": 0\n    }\n}"}],"_postman_id":"a3ad8647-4e39-4cf0-b0d5-f3590a59e2fb"},{"name":"Get financial records","id":"b520b4e3-0630-4a3d-b5b9-002dea39ce46","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"role","value":"admin","type":"text"}],"url":"http://localhost:3000/api/records","urlObject":{"protocol":"http","port":"3000","path":["api","records"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"fc80782d-2ad5-46d2-9bbf-94c4d48940b7","name":"Get financial records","originalRequest":{"method":"GET","header":[{"key":"role","value":"admin","type":"text"}],"url":"http://localhost:3000/api/records"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"825"},{"key":"ETag","value":"W/\"339-F3+weUpmABmig/aSKc1IASUJM2s\""},{"key":"Date","value":"Sat, 04 Apr 2026 04:07:14 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": [\n        {\n            \"_id\": \"69cfc69e1608398cac9d652f\",\n            \"amount\": 5000,\n            \"type\": \"expense\",\n            \"category\": \"salary\",\n            \"notes\": \"Monthly salary\",\n            \"userId\": \"69cfc4b91608398cac9d6528\",\n            \"date\": \"2026-04-03T13:54:38.940Z\",\n            \"createdAt\": \"2026-04-03T13:54:38.943Z\",\n            \"updatedAt\": \"2026-04-03T14:44:05.622Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"69cfcb931608398cac9d6534\",\n            \"amount\": 500,\n            \"type\": \"expense\",\n            \"category\": \"salary\",\n            \"notes\": \"Monthly salary\",\n            \"userId\": \"69cfc4b91608398cac9d6528\",\n            \"date\": \"2026-04-03T14:15:47.382Z\",\n            \"createdAt\": \"2026-04-03T14:15:47.385Z\",\n            \"updatedAt\": \"2026-04-03T14:15:47.385Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"69d08e1835885212cd8c710d\",\n            \"amount\": 10000,\n            \"type\": \"income\",\n            \"category\": \"salary\",\n            \"notes\": \"Monthly salary\",\n            \"userId\": \"69cfc4b91608398cac9d6528\",\n            \"date\": \"2026-04-04T04:05:44.834Z\",\n            \"createdAt\": \"2026-04-04T04:05:44.844Z\",\n            \"updatedAt\": \"2026-04-04T04:05:44.844Z\",\n            \"__v\": 0\n        }\n    ]\n}"}],"_postman_id":"b520b4e3-0630-4a3d-b5b9-002dea39ce46"},{"name":"Creating new financial record by analyst - 403 Forbidden","id":"e17f19da-6f62-4d9c-9996-d0fb4c913b26","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"role","value":"analyst","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"amount\": 15000,\r\n  \"type\": \"income\",\r\n  \"category\": \"salary\",\r\n  \"notes\": \"Monthly salary\",\r\n  \"userId\": \"69cfc4b91608398cac9d6528\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/records","urlObject":{"protocol":"http","port":"3000","path":["api","records"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"58cd6b74-13c5-4c7b-bef2-c44d38a3bc01","name":"Creating new financial record by analyst - 403 Forbidden","originalRequest":{"method":"POST","header":[{"key":"role","value":"analyst","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"amount\": 15000,\r\n  \"type\": \"income\",\r\n  \"category\": \"salary\",\r\n  \"notes\": \"Monthly salary\",\r\n  \"userId\": \"69cfc4b91608398cac9d6528\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/records"},"status":"Forbidden","code":403,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"43"},{"key":"ETag","value":"W/\"2b-S5LF1Nie2QnWRaxtvmnJKQvZK+E\""},{"key":"Date","value":"Sat, 04 Apr 2026 04:07:31 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Access denied\"\n}"}],"_postman_id":"e17f19da-6f62-4d9c-9996-d0fb4c913b26"},{"name":"Creating new record by viewer - 403 Forbidden","id":"a284445e-85c4-4b36-b54f-f24e94b8af36","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"role","value":"viewer","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"amount\": 15000,\r\n  \"type\": \"income\",\r\n  \"category\": \"salary\",\r\n  \"notes\": \"Monthly salary\",\r\n  \"userId\": \"69cfc4b91608398cac9d6528\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/records","urlObject":{"protocol":"http","port":"3000","path":["api","records"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"f6abce3d-5657-4eb2-8149-e19bb9a741a1","name":"Creating new record by viewer - 403 Forbidden","originalRequest":{"method":"POST","header":[{"key":"role","value":"viewer","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"amount\": 15000,\r\n  \"type\": \"income\",\r\n  \"category\": \"salary\",\r\n  \"notes\": \"Monthly salary\",\r\n  \"userId\": \"69cfc4b91608398cac9d6528\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/records"},"status":"Forbidden","code":403,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"43"},{"key":"ETag","value":"W/\"2b-S5LF1Nie2QnWRaxtvmnJKQvZK+E\""},{"key":"Date","value":"Sat, 04 Apr 2026 04:07:45 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Access denied\"\n}"}],"_postman_id":"a284445e-85c4-4b36-b54f-f24e94b8af36"},{"name":"Get records with filter","id":"19419c89-b4b3-4dd0-8a28-89b4ba77930a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"role","value":"analyst","type":"text"}],"url":"http://localhost:3000/api/records?type=expense","urlObject":{"protocol":"http","port":"3000","path":["api","records"],"host":["localhost"],"query":[{"key":"type","value":"expense"}],"variable":[]}},"response":[{"id":"94cb4b3b-f9fa-4642-bfef-1935d144b15b","name":"Get records with filter","originalRequest":{"method":"GET","header":[{"key":"role","value":"analyst","type":"text"}],"url":{"raw":"http://localhost:3000/api/records?type=expense","protocol":"http","host":["localhost"],"port":"3000","path":["api","records"],"query":[{"key":"type","value":"expense"}]}},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"558"},{"key":"ETag","value":"W/\"22e-266oipkZcZD07Qtmg1y6Fb9FOIM\""},{"key":"Date","value":"Sat, 04 Apr 2026 04:07:59 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": [\n        {\n            \"_id\": \"69cfc69e1608398cac9d652f\",\n            \"amount\": 5000,\n            \"type\": \"expense\",\n            \"category\": \"salary\",\n            \"notes\": \"Monthly salary\",\n            \"userId\": \"69cfc4b91608398cac9d6528\",\n            \"date\": \"2026-04-03T13:54:38.940Z\",\n            \"createdAt\": \"2026-04-03T13:54:38.943Z\",\n            \"updatedAt\": \"2026-04-03T14:44:05.622Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"69cfcb931608398cac9d6534\",\n            \"amount\": 500,\n            \"type\": \"expense\",\n            \"category\": \"salary\",\n            \"notes\": \"Monthly salary\",\n            \"userId\": \"69cfc4b91608398cac9d6528\",\n            \"date\": \"2026-04-03T14:15:47.382Z\",\n            \"createdAt\": \"2026-04-03T14:15:47.385Z\",\n            \"updatedAt\": \"2026-04-03T14:15:47.385Z\",\n            \"__v\": 0\n        }\n    ]\n}"}],"_postman_id":"19419c89-b4b3-4dd0-8a28-89b4ba77930a"},{"name":"Updating record by admin","id":"b7eca81b-df25-4fca-87e2-72de7cda8988","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"role","value":"admin","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"type\": \"expense\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/records/:id","urlObject":{"protocol":"http","port":"3000","path":["api","records",":id"],"host":["localhost"],"query":[],"variable":[{"id":"03aff98f-1f44-4ac7-ab85-ad395fbfe224","type":"any","value":"69cfc69e1608398cac9d652f","key":"id"}]}},"response":[{"id":"e8e1b372-5ff5-47d3-93ff-2d1710225e9f","name":"Updating record by admin","originalRequest":{"method":"PATCH","header":[{"key":"role","value":"admin","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"type\": \"expense\"\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/api/records/:id","protocol":"http","host":["localhost"],"port":"3000","path":["api","records",":id"],"variable":[{"key":"id","value":"69cfc69e1608398cac9d652f"}]}},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"290"},{"key":"ETag","value":"W/\"122-d5Y+0yeobog1hedaYaK4UvpMr6g\""},{"key":"Date","value":"Sat, 04 Apr 2026 04:08:26 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"_id\": \"69cfc69e1608398cac9d652f\",\n        \"amount\": 5000,\n        \"type\": \"expense\",\n        \"category\": \"salary\",\n        \"notes\": \"Monthly salary\",\n        \"userId\": \"69cfc4b91608398cac9d6528\",\n        \"date\": \"2026-04-03T13:54:38.940Z\",\n        \"createdAt\": \"2026-04-03T13:54:38.943Z\",\n        \"updatedAt\": \"2026-04-04T04:08:26.428Z\",\n        \"__v\": 0\n    }\n}"}],"_postman_id":"b7eca81b-df25-4fca-87e2-72de7cda8988"},{"name":"Creating a record for non existing user - 400 Bad request","id":"563b0101-10a9-4275-bac8-b8981bd81c6c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"role","value":"admin","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"amount\": 17000,\r\n  \"type\": \"income\",\r\n  \"category\": \"salary\",\r\n  \"notes\": \"Monthly salary\",\r\n  \"userId\": \"69cfc4b91608398cac9d6538\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/records","urlObject":{"protocol":"http","port":"3000","path":["api","records"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"46183e50-026b-46e1-b4f9-57a202df4b56","name":"Creating a record for non existing user - 400 Bad request","originalRequest":{"method":"POST","header":[{"key":"role","value":"admin","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"amount\": 17000,\r\n  \"type\": \"income\",\r\n  \"category\": \"salary\",\r\n  \"notes\": \"Monthly salary\",\r\n  \"userId\": \"69cfc4b91608398cac9d6538\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/records"},"status":"Bad Request","code":400,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"65"},{"key":"ETag","value":"W/\"41-ABDIuTNK+7nLwzKP3WQuh161c0w\""},{"key":"Date","value":"Sat, 04 Apr 2026 04:09:11 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Invalid userId: User does not exist\"\n}"}],"_postman_id":"563b0101-10a9-4275-bac8-b8981bd81c6c"}],"id":"40efd4bb-6b99-4480-aa52-feb01ef6075f","_postman_id":"40efd4bb-6b99-4480-aa52-feb01ef6075f","description":""},{"name":"Dashboard","item":[{"name":"Dashboard summary by admin","id":"661e02cb-a2c5-46f8-acf6-e06ac377e369","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"role","value":"admin","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/dashboard/summary","urlObject":{"protocol":"http","port":"3000","path":["api","dashboard","summary"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"7ad31381-1a0c-49f4-a640-79d248c02012","name":"Dashboard summary by admin","originalRequest":{"method":"GET","header":[{"key":"role","value":"admin","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/dashboard/summary"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"80"},{"key":"ETag","value":"W/\"50-NHqkcg8HOAb1YAu2BRu5+nN3rVM\""},{"key":"Date","value":"Sat, 04 Apr 2026 04:06:03 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"totalIncome\": 10000,\n        \"totalExpense\": 5500,\n        \"balance\": 4500\n    }\n}"}],"_postman_id":"661e02cb-a2c5-46f8-acf6-e06ac377e369"},{"name":"Dashboard summary by analyst","id":"efc41297-26f5-46d7-9bf3-a340c09b4cb3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"role","value":"analyst","type":"text"}],"url":"http://localhost:3000/api/dashboard/summary","urlObject":{"protocol":"http","port":"3000","path":["api","dashboard","summary"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"0172eff0-6425-4056-b087-d59f179b3e4c","name":"Dashboard summary by analyst","originalRequest":{"method":"GET","header":[{"key":"role","value":"analyst","type":"text"}],"url":"http://localhost:3000/api/dashboard/summary"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"80"},{"key":"ETag","value":"W/\"50-NHqkcg8HOAb1YAu2BRu5+nN3rVM\""},{"key":"Date","value":"Sat, 04 Apr 2026 04:06:21 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"totalIncome\": 10000,\n        \"totalExpense\": 5500,\n        \"balance\": 4500\n    }\n}"}],"_postman_id":"efc41297-26f5-46d7-9bf3-a340c09b4cb3"},{"name":"Dashboard summary by viewer","id":"c9c602c7-27a2-4355-bb2d-7c644fef4145","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"role","value":"viewer","type":"text"}],"url":"http://localhost:3000/api/dashboard/summary","urlObject":{"protocol":"http","port":"3000","path":["api","dashboard","summary"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"be9c64e9-cbb7-49f9-b7eb-09924346a5e6","name":"Dashboard summary by viewer","originalRequest":{"method":"GET","header":[{"key":"role","value":"viewer","type":"text"}],"url":"http://localhost:3000/api/dashboard/summary"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"80"},{"key":"ETag","value":"W/\"50-NHqkcg8HOAb1YAu2BRu5+nN3rVM\""},{"key":"Date","value":"Sat, 04 Apr 2026 04:06:40 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"totalIncome\": 10000,\n        \"totalExpense\": 5500,\n        \"balance\": 4500\n    }\n}"}],"_postman_id":"c9c602c7-27a2-4355-bb2d-7c644fef4145"}],"id":"a6d3c0e9-b6d3-4319-83f7-2a4e58221bbd","_postman_id":"a6d3c0e9-b6d3-4319-83f7-2a4e58221bbd","description":""},{"name":"Miscellaneous","item":[{"name":"Route Not Found - 404","id":"80fe348a-9332-4b0e-a541-1d9e1438c64c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/api/1234abcde","urlObject":{"protocol":"http","port":"3000","path":["api","1234abcde"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"fa34e513-de08-4e25-ab3b-0e0396afb319","name":"Route Not Found - 404","originalRequest":{"method":"GET","header":[],"url":"http://localhost:3000/api/1234abcde"},"status":"Not Found","code":404,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"45"},{"key":"ETag","value":"W/\"2d-cNj29RQ25Pprcj6a6edy/V2YndQ\""},{"key":"Date","value":"Sat, 04 Apr 2026 04:03:49 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Route not found\"\n}"}],"_postman_id":"80fe348a-9332-4b0e-a541-1d9e1438c64c"},{"name":"Role header is missing - 401 Unauthorized","id":"914dab39-12b6-4878-be70-0c3a7925be80","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"Admin User Second\",\r\n  \"email\": \"admin2@gmail.com\",\r\n  \"role\": \"admin\",\r\n  \"status\": \"active\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/users","urlObject":{"protocol":"http","port":"3000","path":["api","users"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"b61d25b2-025d-42d2-86aa-767c4391e01c","name":"Role header is missing - 401 Unauthorized","originalRequest":{"method":"POST","header":[{"key":"","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"Admin User Second\",\r\n  \"email\": \"admin2@gmail.com\",\r\n  \"role\": \"admin\",\r\n  \"status\": \"active\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/users"},"status":"Unauthorized","code":401,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"49"},{"key":"ETag","value":"W/\"31-B0y4iKUDMTWRnZ6+zu605p3FrV0\""},{"key":"Date","value":"Sat, 04 Apr 2026 04:03:28 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Role header missing\"\n}"}],"_postman_id":"914dab39-12b6-4878-be70-0c3a7925be80"},{"name":"Creating new user with duplicate email - 500","id":"3e219197-12da-46f8-b39a-c16ed7e76ccc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"role","value":"admin","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Analyst User\",\r\n    \"email\": \"admin@gmail.com\",\r\n    \"role\": \"analyst\",\r\n    \"status\": \"active\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/users","urlObject":{"protocol":"http","port":"3000","path":["api","users"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"9d05b788-09ee-4229-8aeb-2342e5c4740d","name":"Creating new user with duplicate email - 500","originalRequest":{"method":"POST","header":[{"key":"role","value":"admin","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Analyst User\",\r\n    \"email\": \"admin@gmail.com\",\r\n    \"role\": \"analyst\",\r\n    \"status\": \"active\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/users"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"147"},{"key":"ETag","value":"W/\"93-01TNkaNp4OoQ9d+l1Y/pG+ZqOEE\""},{"key":"Date","value":"Sat, 04 Apr 2026 03:53:12 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"E11000 duplicate key error collection: finance-dashboard.users index: email_1 dup key: { email: \\\"admin@gmail.com\\\" }\"\n}"}],"_postman_id":"3e219197-12da-46f8-b39a-c16ed7e76ccc"}],"id":"9124b3a8-4534-467e-a70a-4aed842972d5","_postman_id":"9124b3a8-4534-467e-a70a-4aed842972d5","description":""}]}