{"info":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","description":"<html><head></head><body><p>Finance Data Processing and Access Control Backend</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"39478794","collectionId":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","publishedId":"2sBXiqE8qv","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-04-05T12:33:43.000Z"},"item":[{"name":"Auth","item":[{"name":"Health check","id":"fce5c03c-f8dd-4e64-b34e-4e2caa354f2b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"http://localhost:3000/health","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","type":"collection"}},"urlObject":{"protocol":"http","port":"3000","path":["health"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"58a06acf-8e2e-494d-aaef-26730ae75c96","name":"Server is running","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"http://localhost:3000/health"},"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":"91"},{"key":"ETag","value":"W/\"5b-Id/jdfP9lIsXlW61yT4D+PH3WTY\""},{"key":"Date","value":"Sun, 05 Apr 2026 08:23:37 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Finance API is running.\",\n    \"timestamp\": \"2026-04-05T08:23:37.957Z\"\n}"}],"_postman_id":"fce5c03c-f8dd-4e64-b34e-4e2caa354f2b"},{"name":"Login and get JWT token","id":"fe5f316b-4d09-4ce2-85a6-c0b8a33d76a7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"admin@finance.com\",\n  \"password\": \"admin123\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"http://localhost:3000/api/auth/login","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","type":"collection"}},"urlObject":{"protocol":"http","port":"3000","path":["api","auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"317c8886-4ae3-410e-89be-38b31341d8ed","name":"Login Successful","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"admin@finance.com\",\n  \"password\": \"admin123\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"http://localhost:3000/api/auth/login"},"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":"299"},{"key":"ETag","value":"W/\"12b-wwHT1HDpXAecq8uZ8lAvoZ2bCJY\""},{"key":"Date","value":"Sun, 05 Apr 2026 08:40:49 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Login successful.\",\n    \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEsInJvbGUiOiJhZG1pbiIsImlhdCI6MTc3NTM3ODQ0OSwiZXhwIjoxNzc1NDY0ODQ5fQ.khlQ_PdwGuRNjp7PsWkxkhTILH65KhvaV1mICuNyaYE\",\n    \"user\": {\n        \"id\": 1,\n        \"name\": \"Admin User\",\n        \"email\": \"admin@finance.com\",\n        \"role\": \"admin\"\n    }\n}"},{"id":"a9bc442c-545a-4aa0-9b02-78b46c1771b1","name":"Invalid Credentials","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"admin@finance.com\",\n  \"password\": \"adm12\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"http://localhost:3000/api/auth/login"},"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":"56"},{"key":"ETag","value":"W/\"38-obZcUVkuBo9U8Ea/9i6cli+4R/0\""},{"key":"Date","value":"Sun, 05 Apr 2026 09:19:44 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Invalid email or password.\"\n}"}],"_postman_id":"fe5f316b-4d09-4ce2-85a6-c0b8a33d76a7"},{"name":"Get current authenticated user","id":"933fc1cf-7e4f-4f90-8bb8-3e09956ccff5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"{{baseUrl}}/api/auth/me","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","type":"collection"}},"urlObject":{"path":["api","auth","me"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[{"id":"f1427eab-5aa9-4e82-8055-a191ab55a7dd","name":"Current user info successful","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"http://localhost:3000/api/auth/me"},"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":"113"},{"key":"ETag","value":"W/\"71-xRTnYzxymEB98QSMtZfdIWLAieI\""},{"key":"Date","value":"Sun, 05 Apr 2026 08:42:30 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"user\": {\n        \"id\": 1,\n        \"name\": \"Admin User\",\n        \"email\": \"admin@finance.com\",\n        \"role\": \"admin\",\n        \"status\": \"active\"\n    }\n}"},{"id":"23b3942f-7029-48d8-86c9-b62d40e09e27","name":"Not authenticated","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"http://localhost:3000/api/auth/me"},"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":"55"},{"key":"ETag","value":"W/\"37-J1JurpJaJ2iET3UTTfEcU3gjszc\""},{"key":"Date","value":"Sun, 05 Apr 2026 09:25:43 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Invalid or expired token.\"\n}"}],"_postman_id":"933fc1cf-7e4f-4f90-8bb8-3e09956ccff5"}],"id":"807ffda3-1757-4369-869f-480388d4851e","_postman_id":"807ffda3-1757-4369-869f-480388d4851e","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","type":"collection"}}},{"name":"Users","item":[{"name":"List all users (Admin only)","id":"bff71437-e60d-4199-9eec-a1e1ce1fda9a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"http://localhost:3000/api/users?page=1&limit=20","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","type":"collection"}},"urlObject":{"protocol":"http","port":"3000","path":["api","users"],"host":["localhost"],"query":[{"key":"page","value":"1"},{"key":"limit","value":"20"}],"variable":[]}},"response":[{"id":"7121e08f-27a5-479b-8d39-8f5aeb36a482","name":"Paginated user list successful","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"http://localhost:3000/api/users?page=1&limit=20","protocol":"http","host":["localhost"],"port":"3000","path":["api","users"],"query":[{"key":"page","value":"1"},{"key":"limit","value":"20"}]}},"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":"576"},{"key":"ETag","value":"W/\"240-GyHqIyawpfBbAARwcxJVIqk0IB8\""},{"key":"Date","value":"Sun, 05 Apr 2026 08:44:05 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": [\n        {\n            \"id\": 1,\n            \"name\": \"Admin User\",\n            \"email\": \"admin@finance.com\",\n            \"role\": \"admin\",\n            \"status\": \"active\",\n            \"created_at\": \"2026-04-04 22:04:49\",\n            \"updated_at\": \"2026-04-04 22:04:49\"\n        },\n        {\n            \"id\": 2,\n            \"name\": \"Alice Updated\",\n            \"email\": \"analyst@finance.com\",\n            \"role\": \"viewer\",\n            \"status\": \"active\",\n            \"created_at\": \"2026-04-04 22:04:50\",\n            \"updated_at\": \"2026-04-05 08:38:55\"\n        },\n        {\n            \"id\": 3,\n            \"name\": \"Victor Viewer\",\n            \"email\": \"viewer@finance.com\",\n            \"role\": \"viewer\",\n            \"status\": \"active\",\n            \"created_at\": \"2026-04-04 22:04:50\",\n            \"updated_at\": \"2026-04-04 22:04:50\"\n        }\n    ],\n    \"pagination\": {\n        \"total\": 3,\n        \"page\": 1,\n        \"limit\": 20,\n        \"totalPages\": 1\n    }\n}"},{"id":"fd12092f-41e2-4845-aa1c-8025a302a86c","name":"Forbidden - access denied","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"http://localhost:3000/api/users?page=1&limit=20","protocol":"http","host":["localhost"],"port":"3000","path":["api","users"],"query":[{"key":"page","value":"1"},{"key":"limit","value":"20"}]}},"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":"88"},{"key":"ETag","value":"W/\"58-fBf8+5qEapa9DKWYRcEH5psC/5w\""},{"key":"Date","value":"Sun, 05 Apr 2026 09:36:43 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Access denied. Required role(s): admin. Your role: viewer.\"\n}"}],"_postman_id":"bff71437-e60d-4199-9eec-a1e1ce1fda9a"},{"name":"Create a new user (Admin only)","id":"3eed5434-2c3d-4fce-8163-66595a169ae6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Jane Doe\",\n  \"email\": \"jane@example.com\",\n  \"password\": \"securepass123\",\n  \"role\": \"analyst\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"http://localhost:3000/api/users","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","type":"collection"}},"urlObject":{"protocol":"http","port":"3000","path":["api","users"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"d9ff6ba8-638b-4993-b34e-96d0188fa392","name":"User Created successfully","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Jane Doe\",\n  \"email\": \"jane@example.com\",\n  \"password\": \"securepass123\",\n  \"role\": \"analyst\"\n}","options":{"raw":{"headerFamily":"json","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":"221"},{"key":"ETag","value":"W/\"dd-UdqHYutgVo4iyDPvt0B2rlmj4W8\""},{"key":"Date","value":"Sun, 05 Apr 2026 08:45:29 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"User created successfully.\",\n    \"user\": {\n        \"id\": 5,\n        \"name\": \"Jane Doe\",\n        \"email\": \"jane@example.com\",\n        \"role\": \"analyst\",\n        \"status\": \"active\",\n        \"created_at\": \"2026-04-05 08:45:29\",\n        \"updated_at\": \"2026-04-05 08:45:29\"\n    }\n}"},{"id":"26aef20c-a1b3-44aa-8235-d85fb0d261b7","name":"Email already exists","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Jane Doe\",\n  \"email\": \"jane@example.com\",\n  \"password\": \"securepass123\",\n  \"role\": \"analyst\"\n}","options":{"raw":{"headerFamily":"json","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":"67"},{"key":"ETag","value":"W/\"43-E4ylV6VqkWE+eOqtZCg8ssRJ7lY\""},{"key":"Date","value":"Sun, 05 Apr 2026 08:46:29 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"UNIQUE constraint failed: users.email\"\n}"}],"_postman_id":"3eed5434-2c3d-4fce-8163-66595a169ae6"},{"name":"Get user by ID (Admin only)","id":"c9d23399-7e78-4aeb-86ef-48ae48da600d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/api/users/:id","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","type":"collection"}},"urlObject":{"protocol":"http","port":"3000","path":["api","users",":id"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"1","key":"id"}]}},"response":[{"id":"a7f8347b-c9b1-480a-be67-f5edda90415a","name":"User Found","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/api/users/:id","protocol":"http","host":["localhost"],"port":"3000","path":["api","users",":id"],"variable":[{"key":"id","value":"5"}]}},"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":"182"},{"key":"ETag","value":"W/\"b6-tN6bzYZHbUUeRYnliL7lQJOG5jk\""},{"key":"Date","value":"Sun, 05 Apr 2026 08:54:09 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"user\": {\n        \"id\": 5,\n        \"name\": \"Jane Doe\",\n        \"email\": \"jane@example.com\",\n        \"role\": \"analyst\",\n        \"status\": \"active\",\n        \"created_at\": \"2026-04-05 08:45:29\",\n        \"updated_at\": \"2026-04-05 08:45:29\"\n    }\n}"},{"id":"36361e01-ad7c-4745-be7a-8ce03310f524","name":"User Not Found","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/api/users/:id","protocol":"http","host":["localhost"],"port":"3000","path":["api","users",":id"],"variable":[{"key":"id","value":"4"}]}},"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-2DMP64ec18/E7TLauE4fkuXK5DM\""},{"key":"Date","value":"Sun, 05 Apr 2026 08:54:54 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":"c9d23399-7e78-4aeb-86ef-48ae48da600d"},{"name":"Update a user (Admin only)","id":"d59532ab-3b97-471f-9bec-1ab99c62766a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Aniket\",\n  \"role\": \"viewer\",\n  \"status\": \"active\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"http://localhost:3000/api/users/:id","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","type":"collection"}},"urlObject":{"protocol":"http","port":"3000","path":["api","users",":id"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"2","key":"id"}]}},"response":[{"id":"12016b05-b595-4e17-8fdd-fced6c634f2c","name":"User updated successfully","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Aniket\",\n  \"role\": \"viewer\",\n  \"status\": \"active\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":{"raw":"http://localhost:3000/api/users/:id","protocol":"http","host":["localhost"],"port":"3000","path":["api","users",":id"],"variable":[{"key":"id","value":"2"}]}},"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":"221"},{"key":"ETag","value":"W/\"dd-13HWbIrACCuJ3F+Cngif2QwTXHk\""},{"key":"Date","value":"Sun, 05 Apr 2026 08:56:38 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"User updated successfully.\",\n    \"user\": {\n        \"id\": 2,\n        \"name\": \"Aniket\",\n        \"email\": \"analyst@finance.com\",\n        \"role\": \"viewer\",\n        \"status\": \"active\",\n        \"created_at\": \"2026-04-04 22:04:50\",\n        \"updated_at\": \"2026-04-05 08:56:38\"\n    }\n}"}],"_postman_id":"d59532ab-3b97-471f-9bec-1ab99c62766a"},{"name":"Delete a user (Admin only)","id":"ac034597-feed-444e-a61d-d2470980c55e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:3000/api/users/:id","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","type":"collection"}},"urlObject":{"protocol":"http","port":"3000","path":["api","users",":id"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"6","key":"id"}]}},"response":[{"id":"ca401533-68db-4b8e-ad1e-0b1297678e8e","name":"User deleted successfully","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:3000/api/users/:id","protocol":"http","host":["localhost"],"port":"3000","path":["api","users",":id"],"variable":[{"key":"id","value":"6"}]}},"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":"55"},{"key":"ETag","value":"W/\"37-PVsg6T02LPeMN7BbMkZMB6NmHfU\""},{"key":"Date","value":"Sun, 05 Apr 2026 08:58:55 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"User deleted successfully.\"\n}"},{"id":"47e3306e-7e74-4f26-9c08-3132db5dfa57","name":"User not found","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:3000/api/users/:id","protocol":"http","host":["localhost"],"port":"3000","path":["api","users",":id"],"variable":[{"key":"id","value":"6"}]}},"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-2DMP64ec18/E7TLauE4fkuXK5DM\""},{"key":"Date","value":"Sun, 05 Apr 2026 08:59:39 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":"ac034597-feed-444e-a61d-d2470980c55e"}],"id":"5c92a329-6d25-4090-aa68-940d8caab7ca","_postman_id":"5c92a329-6d25-4090-aa68-940d8caab7ca","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","type":"collection"}}},{"name":"Records","item":[{"name":"List financial records with filters (all roles)","id":"75211d25-e429-4e6e-99fb-edc3a9c4e897","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"http://localhost:3000/api/records?type=income&category=Salary&date_from=2024-01-01&date_to=2024-12-31&search=salary&page=1&limit=10","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","type":"collection"}},"urlObject":{"protocol":"http","port":"3000","path":["api","records"],"host":["localhost"],"query":[{"key":"type","value":"income"},{"key":"category","value":"Salary"},{"key":"date_from","value":"2024-01-01"},{"key":"date_to","value":"2024-12-31"},{"key":"search","value":"salary"},{"key":"page","value":"1"},{"key":"limit","value":"10"}],"variable":[]}},"response":[{"id":"0afc315a-2b30-491d-8f0b-24e71a181b1d","name":"Get Paginated records successfully","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":{"raw":"http://localhost:3000/api/records?type=income&category=Salary&date_from=2024-01-01&date_to=2024-12-31&search=salary&page=1&limit=10","protocol":"http","host":["localhost"],"port":"3000","path":["api","records"],"query":[{"key":"type","value":"income"},{"key":"category","value":"Salary"},{"key":"date_from","value":"2024-01-01"},{"key":"date_to","value":"2024-12-31"},{"key":"search","value":"salary"},{"key":"page","value":"1"},{"key":"limit","value":"10"}]}},"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":"554"},{"key":"ETag","value":"W/\"22a-kkSlXe2VabIMcH2QvtXcDp9eM48\""},{"key":"Date","value":"Sun, 05 Apr 2026 09:03:50 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": [\n        {\n            \"id\": 9,\n            \"amount\": 5000,\n            \"type\": \"income\",\n            \"category\": \"Salary\",\n            \"date\": \"2024-03-15\",\n            \"notes\": \"March salary\",\n            \"created_by\": 1,\n            \"is_deleted\": 0,\n            \"created_at\": \"2026-04-04 22:04:50\",\n            \"updated_at\": \"2026-04-04 22:04:50\",\n            \"created_by_name\": \"Admin User\"\n        },\n        {\n            \"id\": 6,\n            \"amount\": 5000,\n            \"type\": \"income\",\n            \"category\": \"Salary\",\n            \"date\": \"2024-02-15\",\n            \"notes\": \"February salary\",\n            \"created_by\": 1,\n            \"is_deleted\": 0,\n            \"created_at\": \"2026-04-04 22:04:50\",\n            \"updated_at\": \"2026-04-04 22:04:50\",\n            \"created_by_name\": \"Admin User\"\n        }\n    ],\n    \"pagination\": {\n        \"total\": 2,\n        \"page\": 1,\n        \"limit\": 10,\n        \"totalPages\": 1\n    }\n}"}],"_postman_id":"75211d25-e429-4e6e-99fb-edc3a9c4e897"},{"name":"Create a financial record (Analyst, Admin)","id":"1d6776b9-6e0b-4927-bb20-1b98f227b5df","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"amount\": 2500,\n  \"type\": \"income\",\n  \"category\": \"Freelance\",\n  \"date\": \"2024-04-10\",\n  \"notes\": \"New client project\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"http://localhost:3000/api/records","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","type":"collection"}},"urlObject":{"protocol":"http","port":"3000","path":["api","records"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"8c62e23f-1b0c-440b-a002-2452d34d91c1","name":"Record created successfully","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"amount\": 2500,\n  \"type\": \"income\",\n  \"category\": \"Freelance\",\n  \"date\": \"2024-04-10\",\n  \"notes\": \"New client project\"\n}","options":{"raw":{"headerFamily":"json","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":"309"},{"key":"ETag","value":"W/\"135-a73DfChtVTniNwH8l+SqXQ9rJ4s\""},{"key":"Date","value":"Sun, 05 Apr 2026 09:06:18 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Record created successfully.\",\n    \"record\": {\n        \"id\": 14,\n        \"amount\": 2500,\n        \"type\": \"income\",\n        \"category\": \"Freelance\",\n        \"date\": \"2024-04-10\",\n        \"notes\": \"New client project\",\n        \"created_by\": 1,\n        \"is_deleted\": 0,\n        \"created_at\": \"2026-04-05 09:06:18\",\n        \"updated_at\": \"2026-04-05 09:06:18\",\n        \"created_by_name\": \"Admin User\"\n    }\n}"},{"id":"40def6c3-2d7b-47f5-a7af-b6bab01ebffd","name":"Forbidden - Viewer cannot create records","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"amount\": 2500,\n  \"type\": \"income\",\n  \"category\": \"Freelance\",\n  \"date\": \"2024-04-10\",\n  \"notes\": \"New client project\"\n}","options":{"raw":{"headerFamily":"json","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":"97"},{"key":"ETag","value":"W/\"61-RftsTG2GvRyuKMCB8B/LqSPu99I\""},{"key":"Date","value":"Sun, 05 Apr 2026 09:37:53 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Access denied. Required role(s): admin, analyst. Your role: viewer.\"\n}"}],"_postman_id":"1d6776b9-6e0b-4927-bb20-1b98f227b5df"},{"name":"Get a single record by ID","id":"3374946b-f8d1-4801-b397-2b1f7ff0384b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/api/records/:id","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","type":"collection"}},"urlObject":{"protocol":"http","port":"3000","path":["api","records",":id"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"2","key":"id"}]}},"response":[{"id":"9942bdb8-de69-40bf-9555-28af5b003d51","name":"Record found","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/api/records/:id","protocol":"http","host":["localhost"],"port":"3000","path":["api","records",":id"],"variable":[{"key":"id","value":"2"}]}},"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":"257"},{"key":"ETag","value":"W/\"101-Flx5J5GvvmrV4HVmUBwHFIiw9Wo\""},{"key":"Date","value":"Sun, 05 Apr 2026 09:08:47 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"record\": {\n        \"id\": 2,\n        \"amount\": 1200,\n        \"type\": \"expense\",\n        \"category\": \"Rent\",\n        \"date\": \"2024-01-01\",\n        \"notes\": \"Monthly rent\",\n        \"created_by\": 1,\n        \"is_deleted\": 0,\n        \"created_at\": \"2026-04-04 22:04:50\",\n        \"updated_at\": \"2026-04-04 22:04:50\",\n        \"created_by_name\": \"Admin User\"\n    }\n}"},{"id":"45087e13-e2f1-4f4f-bb7f-a55195bb9c42","name":"Record not found","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/api/records/:id","protocol":"http","host":["localhost"],"port":"3000","path":["api","records",":id"],"variable":[{"key":"id","value":"1"}]}},"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":"47"},{"key":"ETag","value":"W/\"2f-g6dvt+C1CTVmdGI/tahwdWR4oQ0\""},{"key":"Date","value":"Sun, 05 Apr 2026 09:09:53 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Record not found.\"\n}"}],"_postman_id":"3374946b-f8d1-4801-b397-2b1f7ff0384b"},{"name":"Update a financial record (Admin only)","id":"f3cb8a51-7d39-4e59-b945-107dd8601e01","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"amount\": 6500,\n  \"category\": \"Salary\",\n  \"notes\": \"Updated salary amount\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":"http://localhost:3000/api/records/:id","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","type":"collection"}},"urlObject":{"protocol":"http","port":"3000","path":["api","records",":id"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"2","key":"id"}]}},"response":[{"id":"a0992be5-48d8-459d-8b92-388dd0d00435","name":"Record updated","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"amount\": 6500,\n  \"category\": \"Salary\",\n  \"notes\": \"Updated salary amount\"\n}","options":{"raw":{"headerFamily":"json","language":"json"}}},"url":{"raw":"http://localhost:3000/api/records/:id","protocol":"http","host":["localhost"],"port":"3000","path":["api","records",":id"],"variable":[{"key":"id","value":"2"}]}},"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":"309"},{"key":"ETag","value":"W/\"135-/pL7EDr/t9pehziPF4tvPtJEXLM\""},{"key":"Date","value":"Sun, 05 Apr 2026 09:11:09 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Record updated successfully.\",\n    \"record\": {\n        \"id\": 2,\n        \"amount\": 6500,\n        \"type\": \"expense\",\n        \"category\": \"Salary\",\n        \"date\": \"2024-01-01\",\n        \"notes\": \"Updated salary amount\",\n        \"created_by\": 1,\n        \"is_deleted\": 0,\n        \"created_at\": \"2026-04-04 22:04:50\",\n        \"updated_at\": \"2026-04-05 09:11:09\",\n        \"created_by_name\": \"Admin User\"\n    }\n}"}],"_postman_id":"f3cb8a51-7d39-4e59-b945-107dd8601e01"},{"name":"Soft-delete a financial record (Admin only)","id":"0d5dffae-0052-4480-a62c-67d7b0498768","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:3000/api/records/:id","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","type":"collection"}},"urlObject":{"protocol":"http","port":"3000","path":["api","records",":id"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"5","key":"id"}]}},"response":[{"id":"897cd6d0-8062-4de7-bf46-44d1b569b397","name":"Record soft deleted","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:3000/api/records/:id","protocol":"http","host":["localhost"],"port":"3000","path":["api","records",":id"],"variable":[{"key":"id","value":"5"}]}},"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":"57"},{"key":"ETag","value":"W/\"39-3KfPK88gFWEsXLqBJZE60be4Dqg\""},{"key":"Date","value":"Sun, 05 Apr 2026 09:39:53 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Record deleted successfully.\"\n}"}],"_postman_id":"0d5dffae-0052-4480-a62c-67d7b0498768"}],"id":"23878bee-0da8-4034-bc52-44287f0357e9","_postman_id":"23878bee-0da8-4034-bc52-44287f0357e9","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","type":"collection"}}},{"name":"Dashboard","item":[{"name":"Get overall financial summary (Analyst, Admin)","id":"18318632-6249-4e73-93c1-cb83bfc29b0a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"http://localhost:3000/api/dashboard/summary","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","type":"collection"}},"urlObject":{"protocol":"http","port":"3000","path":["api","dashboard","summary"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"01ddd453-9bd0-4701-a849-e47e8d4138fa","name":"Financial Summary","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/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":"110"},{"key":"ETag","value":"W/\"6e-P9dsHEhCt4i0JTBNqIvtJa+Se8c\""},{"key":"Date","value":"Sun, 05 Apr 2026 09:13:00 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"summary\": {\n        \"total_income\": 20500,\n        \"total_expenses\": 9850,\n        \"net_balance\": 10650,\n        \"total_records\": 13\n    }\n}"}],"_postman_id":"18318632-6249-4e73-93c1-cb83bfc29b0a"},{"name":"Get category totals (Analyst, Admin)","id":"32361ad7-c81d-4aaa-89af-0822de6853b0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"http://localhost:3000/api/dashboard/categories","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","type":"collection"}},"urlObject":{"protocol":"http","port":"3000","path":["api","dashboard","categories"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"f5f08598-7b0a-40ad-8917-ab9b41a5a3fc","name":"Category breakdown","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"http://localhost:3000/api/dashboard/categories"},"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":"660"},{"key":"ETag","value":"W/\"294-2JqkyJX3yVJqkwVnYi0BXukAhtI\""},{"key":"Date","value":"Sun, 05 Apr 2026 09:14:10 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"categories\": [\n        {\n            \"category\": \"Salary\",\n            \"type\": \"income\",\n            \"total\": 10000,\n            \"count\": 2\n        },\n        {\n            \"category\": \"Freelance\",\n            \"type\": \"income\",\n            \"total\": 8500,\n            \"count\": 3\n        },\n        {\n            \"category\": \"Salary\",\n            \"type\": \"expense\",\n            \"total\": 6500,\n            \"count\": 1\n        },\n        {\n            \"category\": \"Bonus\",\n            \"type\": \"income\",\n            \"total\": 2000,\n            \"count\": 1\n        },\n        {\n            \"category\": \"Rent\",\n            \"type\": \"expense\",\n            \"total\": 1200,\n            \"count\": 1\n        },\n        {\n            \"category\": \"Groceries\",\n            \"type\": \"expense\",\n            \"total\": 800,\n            \"count\": 1\n        },\n        {\n            \"category\": \"Dining\",\n            \"type\": \"expense\",\n            \"total\": 600,\n            \"count\": 1\n        },\n        {\n            \"category\": \"Subscriptions\",\n            \"type\": \"expense\",\n            \"total\": 400,\n            \"count\": 1\n        },\n        {\n            \"category\": \"Utilities\",\n            \"type\": \"expense\",\n            \"total\": 200,\n            \"count\": 1\n        },\n        {\n            \"category\": \"Transport\",\n            \"type\": \"expense\",\n            \"total\": 150,\n            \"count\": 1\n        }\n    ]\n}"}],"_postman_id":"32361ad7-c81d-4aaa-89af-0822de6853b0"},{"name":"Monthly income vs expense trends (Analyst, Admin)","id":"cb66ff09-c4da-481f-8e0b-d0094edbeab5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"http://localhost:3000/api/dashboard/trends/monthly","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","type":"collection"}},"urlObject":{"protocol":"http","port":"3000","path":["api","dashboard","trends","monthly"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"3745ec5c-adfa-4e8c-9237-4f5fa4acb6d1","name":"Monthly Trends","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"http://localhost:3000/api/dashboard/trends/monthly"},"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":"266"},{"key":"ETag","value":"W/\"10a-h6SKdMwmS8izy2WwwO6KxftsHQA\""},{"key":"Date","value":"Sun, 05 Apr 2026 09:15:22 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"trends\": [\n        {\n            \"month\": \"2024-01\",\n            \"income\": 0,\n            \"expenses\": 6700,\n            \"net\": -6700\n        },\n        {\n            \"month\": \"2024-02\",\n            \"income\": 8500,\n            \"expenses\": 2150,\n            \"net\": 6350\n        },\n        {\n            \"month\": \"2024-03\",\n            \"income\": 7000,\n            \"expenses\": 1000,\n            \"net\": 6000\n        },\n        {\n            \"month\": \"2024-04\",\n            \"income\": 5000,\n            \"expenses\": 0,\n            \"net\": 5000\n        }\n    ]\n}"}],"_postman_id":"cb66ff09-c4da-481f-8e0b-d0094edbeab5"},{"name":"Weekly income vs expense trends (Analyst, Admin)","id":"82bdd134-3ee0-4ef9-9e38-e9820d9407f4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/api/dashboard/trends/weekly","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","type":"collection"}},"urlObject":{"protocol":"http","port":"3000","path":["api","dashboard","trends","weekly"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"d5ca4182-35e3-4c3e-bd46-81c177d40391","name":"Weekly trends","originalRequest":{"method":"GET","header":[],"url":"http://localhost:3000/api/dashboard/trends/weekly"},"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":"496"},{"key":"ETag","value":"W/\"1f0-FvgogPzBQHL8sE7HndUCB68ZzLg\""},{"key":"Date","value":"Sun, 05 Apr 2026 09:17:06 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"trends\": [\n        {\n            \"week\": \"2024-W01\",\n            \"income\": 0,\n            \"expenses\": 6700\n        },\n        {\n            \"week\": \"2024-W05\",\n            \"income\": 0,\n            \"expenses\": 1200\n        },\n        {\n            \"week\": \"2024-W06\",\n            \"income\": 3500,\n            \"expenses\": 0\n        },\n        {\n            \"week\": \"2024-W07\",\n            \"income\": 5000,\n            \"expenses\": 800\n        },\n        {\n            \"week\": \"2024-W08\",\n            \"income\": 0,\n            \"expenses\": 150\n        },\n        {\n            \"week\": \"2024-W09\",\n            \"income\": 0,\n            \"expenses\": 400\n        },\n        {\n            \"week\": \"2024-W10\",\n            \"income\": 0,\n            \"expenses\": 600\n        },\n        {\n            \"week\": \"2024-W11\",\n            \"income\": 5000,\n            \"expenses\": 0\n        },\n        {\n            \"week\": \"2024-W13\",\n            \"income\": 2000,\n            \"expenses\": 0\n        },\n        {\n            \"week\": \"2024-W15\",\n            \"income\": 5000,\n            \"expenses\": 0\n        }\n    ]\n}"}],"_postman_id":"82bdd134-3ee0-4ef9-9e38-e9820d9407f4"},{"name":"Recent financial activity (Analyst, Admin)","id":"47b2202c-b1f3-41ab-b894-af4ac0908eaa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/api/dashboard/recent?limit=5","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","type":"collection"}},"urlObject":{"protocol":"http","port":"3000","path":["api","dashboard","recent"],"host":["localhost"],"query":[{"key":"limit","value":"5"}],"variable":[]}},"response":[{"id":"79a0b8c2-a0b4-447d-95a2-f64062a8e0e8","name":"Recent activity","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/api/dashboard/recent?limit=5","protocol":"http","host":["localhost"],"port":"3000","path":["api","dashboard","recent"],"query":[{"key":"limit","value":"5"}]}},"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":"736"},{"key":"ETag","value":"W/\"2e0-iMKg5bKsd2uv9sNSQzBGOdDgxE4\""},{"key":"Date","value":"Sun, 05 Apr 2026 09:18:09 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"activity\": [\n        {\n            \"id\": 14,\n            \"amount\": 2500,\n            \"type\": \"income\",\n            \"category\": \"Freelance\",\n            \"date\": \"2024-04-10\",\n            \"notes\": \"New client project\",\n            \"created_by_name\": \"Admin User\"\n        },\n        {\n            \"id\": 13,\n            \"amount\": 2500,\n            \"type\": \"income\",\n            \"category\": \"Freelance\",\n            \"date\": \"2024-04-10\",\n            \"notes\": \"New client project\",\n            \"created_by_name\": \"Admin User\"\n        },\n        {\n            \"id\": 2,\n            \"amount\": 6500,\n            \"type\": \"expense\",\n            \"category\": \"Salary\",\n            \"date\": \"2024-01-01\",\n            \"notes\": \"Updated salary amount\",\n            \"created_by_name\": \"Admin User\"\n        },\n        {\n            \"id\": 3,\n            \"amount\": 200,\n            \"type\": \"expense\",\n            \"category\": \"Utilities\",\n            \"date\": \"2024-01-05\",\n            \"notes\": \"Electricity bill\",\n            \"created_by_name\": \"Admin User\"\n        },\n        {\n            \"id\": 4,\n            \"amount\": 3500,\n            \"type\": \"income\",\n            \"category\": \"Freelance\",\n            \"date\": \"2024-02-10\",\n            \"notes\": \"Client project\",\n            \"created_by_name\": \"Admin User\"\n        }\n    ]\n}"}],"_postman_id":"47b2202c-b1f3-41ab-b894-af4ac0908eaa"}],"id":"45ebcb54-f0f6-4cf4-9d80-b6558c9ca684","_postman_id":"45ebcb54-f0f6-4cf4-9d80-b6558c9ca684","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","id":"5de2515a-0061-4f3e-81ca-233d1c3b65eb","name":"Finance Dashboard API","type":"collection"}}}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]}},"event":[{"listen":"prerequest","script":{"id":"c1ea23cf-84ad-4e19-927b-275e24f6a2cc","type":"text/javascript","requests":{},"exec":["const bearerToken = pm.collectionVariables.get(\"bearerToken\");","","if (!bearerToken) {","    pm.sendRequest({","        url: \"http://localhost:3000/api/auth/login\",","        method: \"POST\",","        header: {","            \"Content-Type\": \"application/json\",","            \"Accept\": \"application/json\"","        },","        body: {","            mode: \"raw\",","            raw: JSON.stringify({ email: \"admin@finance.com\", password: \"admin123\" })","        }","    }, function (err, res) {","        if (!err) {","            const json = res.json();","            if (json.token) {","                pm.collectionVariables.set(\"bearerToken\", json.token);","            }","        }","    });","}"]}},{"listen":"test","script":{"id":"4049ebed-2471-4b74-a46e-09981824458c","type":"text/javascript","packages":{},"requests":{},"exec":[""]}}],"variable":[{"key":"bearerToken","value":""}]}