{"info":{"_postman_id":"fe3784a5-4844-49e8-adf7-d9f7d1be15ad","name":"📑 Loan Tracker API - Documentation","description":"<html><head></head><body><p>The Loan Tracker API is a backend service developed in Golang using the Gin framework. It enables users to apply for loans and provides admin functionalities for managing users and loans. The API follows clean architecture principles and uses MongoDB as the database. Below is the documentation of the API endpoints, including user and admin functionalities.EndFragment</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"32898780","collectionId":"fe3784a5-4844-49e8-adf7-d9f7d1be15ad","publishedId":"2sAXjGdEjE","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-08-27T15:26:33.000Z"},"item":[{"name":"User","item":[{"name":"Login","id":"600349ae-9c4f-4220-ba9e-1d8b8b1d540a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\":\"Teklu\",\r\n    \"email\":\"teklumoges6@gmail.com\",\r\n    \"password\":\"Teklu123.\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/users/login","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"fe3784a5-4844-49e8-adf7-d9f7d1be15ad","id":"fe3784a5-4844-49e8-adf7-d9f7d1be15ad","name":"📑 Loan Tracker API - Documentation","type":"collection"}},"urlObject":{"port":"8080","path":["users","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"22d281f9-6c61-44e3-9cb7-14ed2989bd10","name":"successful","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\":\"Teklu\",\r\n    \"email\":\"teklumoges6@gmail.com\",\r\n    \"password\":\"Teklu123.\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/users/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 09:37:11 GMT"},{"key":"Content-Length","value":"740"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": 200,\n    \"data\": {\n        \"statusCode\": 0,\n        \"accessToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRob3JpemVkIjp0cnVlLCJ1c2VyX2lkIjoiNjZjZDkxODAyOGQzOTg0ZDBiNWQwM2MyIiwicm9sZSI6InVzZXIiLCJ1c2VybmFtZSI6IlRla2x1IiwiaXNfYWN0aXZhdGVkIjp0cnVlLCJleHAiOjE3MjQ3NTg2MzF9.MXNn83QGzKkUnFfYKzg-tnxV-PRbPu2QOPSrqX4AaGU\",\n        \"refreshToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRob3JpemVkIjp0cnVlLCJ1c2VyX2lkIjoiNjZjZDkxODAyOGQzOTg0ZDBiNWQwM2MyIiwicm9sZSI6InVzZXIiLCJ1c2VybmFtZSI6IlRla2x1IiwiaXNfYWN0aXZhdGVkIjp0cnVlLCJleHAiOjE3MjUzNTYyMzF9.oaQqVMyAgoWgjfrEWZnsnvAxOlOGsM0OUoMhyBEtSJM\",\n        \"user\": {\n            \"id\": \"66cd918028d3984d0b5d03c2\",\n            \"username\": \"Teklu\",\n            \"email\": \"teklumoges6@gmail.com\",\n            \"role\": \"user\",\n            \"createdAt\": {\n                \"T\": 1724748159,\n                \"I\": 41\n            }\n        }\n    },\n    \"message\": \"Login successful\"\n}"},{"id":"6b54ca86-b27a-409e-b420-eb73856ebe1c","name":"Invalid credentials","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\":\"Teklu\",\r\n    \"email\":\"teklumoges6@gmail.com\",\r\n    \"password\":\"Tekl123.\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/users/login"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 10:47:06 GMT"},{"key":"Content-Length","value":"51"}],"cookie":[],"responseTime":null,"body":"{\n    \"status_code\": 400,\n    \"message\": \"Invalid credentials\"\n}"}],"_postman_id":"600349ae-9c4f-4220-ba9e-1d8b8b1d540a"},{"name":"Refresh Token","id":"fe915944-3289-49a9-9fbf-0f41329da3c2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\r\n    \"user_id\":\"66cd918028d3984d0b5d03c2\",\r\n    \"token\":\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRob3JpemVkIjp0cnVlLCJ1c2VyX2lkIjoiNjZjZDkxODAyOGQzOTg0ZDBiNWQwM2MyIiwicm9sZSI6InVzZXIiLCJ1c2VybmFtZSI6IlRla2x1IiwiaXNfYWN0aXZhdGVkIjp0cnVlLCJleHAiOjE3MjUzNTU2OTF9.Y2sIrNpBGsAtIofdFCx4WX_xat2qZPCKyGnReuNrUQw\"\r\n\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/users/token/refresh","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"fe3784a5-4844-49e8-adf7-d9f7d1be15ad","id":"fe3784a5-4844-49e8-adf7-d9f7d1be15ad","name":"📑 Loan Tracker API - Documentation","type":"collection"}},"urlObject":{"port":"8080","path":["users","token","refresh"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"8afc6442-7eb0-4f80-addf-ae84e868db88","name":"Error","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"user_id\":\"66cd918028d3984d0b5d03c2\",\r\n    \"token\":\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRob3JpemVkIjp0cnVlLCJ1c2VyX2lkIjoiNjZjZDkxODAyOGQzOTg0ZDBiNWQwM2MyIiwicm9sZSI6InVzZXIiLCJ1c2VybmFtZSI6IlRla2x1IiwiaXNfYWN0aXZhdGVkIjp0cnVlLCJleHAiOjE3MjUzNTU2OTF9.Y2sIrNpBGsAtIofdFCx4WX_xat2qZPCKyGnReuNrUQw\"\r\n\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/users/token/refresh"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 09:36:50 GMT"},{"key":"Content-Length","value":"45"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": 500,\n    \"error\": \"You are not logged in.\"\n}"},{"id":"f7e9a6bd-58ac-4292-a28b-a0a1e4c171a5","name":"successful","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"user_id\":\"66cd918028d3984d0b5d03c2\",\r\n    \"token\":\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRob3JpemVkIjp0cnVlLCJ1c2VyX2lkIjoiNjZjZDkxODAyOGQzOTg0ZDBiNWQwM2MyIiwicm9sZSI6InVzZXIiLCJ1c2VybmFtZSI6IlRla2x1IiwiaXNfYWN0aXZhdGVkIjp0cnVlLCJleHAiOjE3MjUzNTYyMzF9.oaQqVMyAgoWgjfrEWZnsnvAxOlOGsM0OUoMhyBEtSJM\"\r\n\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/users/token/refresh"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 09:37:24 GMT"},{"key":"Content-Length","value":"289"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": 200,\n    \"tokens\": {\n        \"accessToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRob3JpemVkIjp0cnVlLCJ1c2VyX2lkIjoiNjZjZDkxODAyOGQzOTg0ZDBiNWQwM2MyIiwicm9sZSI6InVzZXIiLCJ1c2VybmFtZSI6IlRla2x1IiwiaXNfYWN0aXZhdGVkIjp0cnVlLCJleHAiOjE3MjQ3NTg2NDR9.aA48f_cDosXYTHjX1uR2k82gpi_G4E5LUi_zIXSMJYQ\"\n    }\n}"}],"_postman_id":"fe915944-3289-49a9-9fbf-0f41329da3c2"},{"name":"profile","id":"951a1551-8ec2-42e6-a7dd-11fae6ee50d0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\":\"Teklu\",\r\n    \"email\":\"teklumoges6@gmail.com\",\r\n    \"password\":\"Teklu123.\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/users/login","urlObject":{"port":"8080","path":["users","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"7cf42903-c9d7-49be-9485-0734427068f3","name":"Error","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\":\"Teklu\",\r\n    \"email\":\"teklumoges6@gmail.com\",\r\n    \"password\":\"Teklu123.\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/users/profile"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 09:53:20 GMT"},{"key":"Content-Length","value":"46"}],"cookie":[],"responseTime":null,"body":"{\n    \"status_code\": 400,\n    \"message\": \"User not found\"\n}"},{"id":"3a7a424c-36a2-4ae3-bacd-d8c449de4770","name":"successful","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\":\"Teklu\",\r\n    \"email\":\"teklumoges6@gmail.com\",\r\n    \"password\":\"Teklu123.\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/users/profile"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 09:54:43 GMT"},{"key":"Content-Length","value":"154"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": 200,\n    \"data\": {\n        \"id\": \"66cd918028d3984d0b5d03c2\",\n        \"username\": \"Teklu\",\n        \"email\": \"teklumoges6@gmail.com\",\n        \"role\": \"user\",\n        \"createdAt\": {\n            \"T\": 1724748159,\n            \"I\": 41\n        }\n    }\n}"}],"_postman_id":"951a1551-8ec2-42e6-a7dd-11fae6ee50d0"},{"name":"Reset-Password","id":"5f2ce8f4-b7cf-4a4b-b657-52758f6df528","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"fe3784a5-4844-49e8-adf7-d9f7d1be15ad","id":"fe3784a5-4844-49e8-adf7-d9f7d1be15ad","name":"📑 Loan Tracker API - Documentation","type":"collection"}},"urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"713ed272-9cfb-496a-aae3-c76dbc85257b","name":"successful","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"teklumoges6@gmail.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/users/reset-password"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 10:48:29 GMT"},{"key":"Content-Length","value":"49"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": 200,\n    \"message\": \"Password reset link sent\"\n}"}],"_postman_id":"5f2ce8f4-b7cf-4a4b-b657-52758f6df528"},{"name":"Register","id":"4307a56b-fbd7-4633-919f-4be7cca11836","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\":\"Teklu\",\r\n    \"email\":\"te@gmail.com\",\r\n    \"password\":\"Teklu123.\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/users/register","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"fe3784a5-4844-49e8-adf7-d9f7d1be15ad","id":"fe3784a5-4844-49e8-adf7-d9f7d1be15ad","name":"📑 Loan Tracker API - Documentation","type":"collection"}},"urlObject":{"port":"8080","path":["users","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"ce2ab21b-0c78-46e3-bb7f-cf5cf9ae4d3b","name":"User already exists","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\":\"Teklu\",\r\n    \"email\":\"te6@gmail.com\",\r\n    \"password\":\"Teklu123.\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/users/register"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 10:45:57 GMT"},{"key":"Content-Length","value":"51"}],"cookie":[],"responseTime":null,"body":"{\n    \"status_code\": 400,\n    \"message\": \"User already exists\"\n}"},{"id":"f583e945-7853-4b1a-8654-f7abfe916637","name":"successful","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\":\"Teklu\",\r\n    \"email\":\"te@gmail.com\",\r\n    \"password\":\"Teklu123.\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/users/register"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 10:46:32 GMT"},{"key":"Content-Length","value":"107"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": 200,\n    \"message\": \"Your account has been created successfully see your email to activate your account\"\n}"}],"_postman_id":"4307a56b-fbd7-4633-919f-4be7cca11836"},{"name":"Reset-Password -changePassword","id":"e9621e9d-fd78-48a6-92ae-ac908d07e48c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"fe3784a5-4844-49e8-adf7-d9f7d1be15ad","id":"fe3784a5-4844-49e8-adf7-d9f7d1be15ad","name":"📑 Loan Tracker API - Documentation","type":"collection"}},"urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"fb7c6110-b83c-45bb-a03f-1e775604ceac","name":"successful","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"password\":\"Tekl123.\"\r\n\r\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8080/users/reset-password/a91e26413ca00fba467f111ccc0587a5f59c951f7f9200d771a182b597bda82b"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 11:38:18 GMT"},{"key":"Content-Length","value":"48"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": 200,\n    \"message\": \"Password has been reset\"\n}"}],"_postman_id":"e9621e9d-fd78-48a6-92ae-ac908d07e48c"}],"id":"f1569c07-774c-401b-94b8-423fb7dd85f6","description":"<p>The <code>/me</code> endpoints let you manage information about the authenticated user.</p>\n","_postman_id":"f1569c07-774c-401b-94b8-423fb7dd85f6","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"fe3784a5-4844-49e8-adf7-d9f7d1be15ad","id":"fe3784a5-4844-49e8-adf7-d9f7d1be15ad","name":"📑 Loan Tracker API - Documentation","type":"collection"}}},{"name":"Admin","item":[{"name":"GET Users","id":"94eabc35-cdef-418f-8ed5-c848843c9f90","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\":\"Teklu\",\r\n    \"email\":\"teklumoges6@gmail.com\",\r\n    \"password\":\"Teklu123.\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/admin/users/?limit=2&page=1&name=Teklu","urlObject":{"port":"8080","path":["admin","users",""],"host":["localhost"],"query":[{"key":"limit","value":"2"},{"key":"page","value":"1"},{"key":"name","value":"Teklu"}],"variable":[]}},"response":[{"id":"b3dc3f9b-bdca-4132-91e1-8698b9a799fd","name":"Unauthorized","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\":\"Teklu\",\r\n    \"email\":\"teklumoges6@gmail.com\",\r\n    \"password\":\"Teklu123.\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/admin/users/"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 10:49:14 GMT"},{"key":"Content-Length","value":"38"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Unauthorized access\"\n}"},{"id":"a2bc6ff7-319a-4117-ac86-2d22bd3234c8","name":"successful","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\":\"Teklu\",\r\n    \"email\":\"teklumoges6@gmail.com\",\r\n    \"password\":\"Teklu123.\"\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"localhost:8080/admin/users/?limit=2&page=1&name=Teklu","host":["localhost"],"port":"8080","path":["admin","users",""],"query":[{"key":"limit","value":"2"},{"key":"page","value":"1"},{"key":"name","value":"Teklu"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 15:17:32 GMT"},{"key":"Content-Length","value":"359"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": 200,\n    \"current_page\": \"1\",\n    \"data\": [\n        {\n            \"id\": \"66cdad662d30f092a416b6e1\",\n            \"username\": \"Teklu\",\n            \"email\": \"te6@gmail.com\",\n            \"role\": \"user\",\n            \"createdAt\": {\n                \"T\": 1724755302,\n                \"I\": 20\n            }\n        },\n        {\n            \"id\": \"66cdd49b9eaad087d2720ef3\",\n            \"username\": \"Teklu\",\n            \"email\": \"teklumoges6@gmail.com\",\n            \"role\": \"admin\",\n            \"createdAt\": {\n                \"T\": 1724765338,\n                \"I\": 26\n            }\n        }\n    ],\n    \"message\": \"Users fetched successfully\",\n    \"quantity\": \"2/2\"\n}"}],"_postman_id":"94eabc35-cdef-418f-8ed5-c848843c9f90"},{"name":"Delete User","id":"ab7136f9-58eb-49be-8751-3de5df2715cc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"fe3784a5-4844-49e8-adf7-d9f7d1be15ad","id":"fe3784a5-4844-49e8-adf7-d9f7d1be15ad","name":"📑 Loan Tracker API - Documentation","type":"collection"}},"urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"be2f1ed5-7e1f-4982-b423-7e45a97049a9","name":"successful","originalRequest":{"method":"DELETE","header":[],"url":"localhost:8080/admin/users/66cdae852d30f092a416b6e2"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 10:53:13 GMT"},{"key":"Content-Length","value":"183"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": 200,\n    \"data\": {\n        \"id\": \"66cdae852d30f092a416b6e2\",\n        \"username\": \"Teklu\",\n        \"email\": \"te@gmail.com\",\n        \"role\": \"user\",\n        \"createdAt\": {\n            \"T\": 1724755588,\n            \"I\": 40\n        }\n    },\n    \"message\": \"User deleted successfully\"\n}"},{"id":"8a3dc420-0f50-45e1-a947-50168f1c1d7e","name":"Authorization","originalRequest":{"method":"DELETE","header":[],"url":"localhost:8080/admin/users/66cdae852d30f092a416b6e"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 10:51:42 GMT"},{"key":"Content-Length","value":"44"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Authorization header is required\"\n}"},{"id":"0ecb544c-2278-40f8-a5eb-d621770fb6e5","name":"User not found","originalRequest":{"method":"DELETE","header":[],"url":"localhost:8080/admin/users/66cdae852d30f092a416b6e"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 10:52:12 GMT"},{"key":"Content-Length","value":"46"}],"cookie":[],"responseTime":null,"body":"{\n    \"status_code\": 400,\n    \"message\": \"User not found\"\n}"}],"_postman_id":"ab7136f9-58eb-49be-8751-3de5df2715cc"},{"name":"View System Logs","id":"d438a36c-330a-4339-86ea-7df56c5a0664","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:8080/admin/logs?limit=2&page=1&type=Failed login","urlObject":{"port":"8080","path":["admin","logs"],"host":["localhost"],"query":[{"key":"limit","value":"2"},{"key":"page","value":"1"},{"key":"type","value":"Failed login"}],"variable":[]}},"response":[{"id":"a099d1d6-ad77-4258-a90d-0702123f9426","name":"successful","originalRequest":{"method":"GET","header":[],"url":{"raw":"localhost:8080/admin/logs?limit=2&page=1&type=Failed login","host":["localhost"],"port":"8080","path":["admin","logs"],"query":[{"key":"limit","value":"2"},{"key":"page","value":"1"},{"key":"type","value":"Failed login"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 15:16:19 GMT"},{"key":"Content-Length","value":"287"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": 200,\n    \"current_page\": \"1\",\n    \"data\": [\n        {\n            \"id\": \"66cde00c9c52cfdc57d7af85\",\n            \"timestamp\": \"2024-08-27 17:17:48.7863753 +0300 EAT m=+22.177713001\",\n            \"event\": \"Login Attempt\",\n            \"details\": \"Failed login attempt for user teklumoges6@gmail.com\"\n        }\n    ],\n    \"message\": \"Logs retrieved successfully\",\n    \"quantity\": \"1/2\"\n}"},{"id":"286add7b-52b0-44bc-be71-61ea4a7cf8b6","name":"Error","originalRequest":{"method":"GET","header":[],"url":"localhost:8080/admin/logs"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 14:20:04 GMT"},{"key":"Content-Length","value":"23"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Invalid JWT\"\n}"}],"_postman_id":"d438a36c-330a-4339-86ea-7df56c5a0664"}],"id":"d785866a-e09a-483b-85f7-fad4aee47869","_postman_id":"d785866a-e09a-483b-85f7-fad4aee47869","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"fe3784a5-4844-49e8-adf7-d9f7d1be15ad","id":"fe3784a5-4844-49e8-adf7-d9f7d1be15ad","name":"📑 Loan Tracker API - Documentation","type":"collection"}}},{"name":"Loan Management","item":[{"name":"Admin privileges","item":[{"name":"View All Loans","id":"91d28349-31fa-40bf-8bfd-137dcee964de","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\":\"Teklu\",\r\n    \"email\":\"teklumoges6@gmail.com\",\r\n    \"password\":\"Tekl123.\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/admin/loans","urlObject":{"port":"8080","path":["admin","loans"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"9fe775ec-dcb0-4231-90f9-b97edba8c893","name":"successful","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\":\"Teklu\",\r\n    \"email\":\"teklumoges6@gmail.com\",\r\n    \"password\":\"Tekl123.\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/admin/loans"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 13:20:52 GMT"},{"key":"Content-Length","value":"1209"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": 200,\n    \"data\": [\n        {\n            \"id\": \"66cdd12b12b9638896fa89ef\",\n            \"title\": \"Personal Loan for Home Renovation\",\n            \"description\": \"A personal loan to cover the costs of home renovation.\",\n            \"borrower_id\": \"66cdcf6c72e734459b377c45\",\n            \"borrower_name\": \"Kebede\",\n            \"amount\": 15000.5,\n            \"created_at\": {\n                \"T\": 1724764461,\n                \"I\": 37\n            },\n            \"status\": \"pending\"\n        },\n        {\n            \"id\": \"66cdd1f89eaad087d2720eef\",\n            \"title\": \"Personal Loan for Home Renovation\",\n            \"description\": \"A personal loan to cover the costs of home renovation.\",\n            \"borrower_id\": \"66cdcf6c72e734459b377c45\",\n            \"borrower_name\": \"Kebede\",\n            \"amount\": 1500.5,\n            \"created_at\": {\n                \"T\": 1724764665,\n                \"I\": 43\n            },\n            \"status\": \"pending\"\n        },\n        {\n            \"id\": \"66cdd2829eaad087d2720ef0\",\n            \"title\": \"Personal Loan for Home Renovation\",\n            \"description\": \"A personal loan to cover the costs of home renovation.\",\n            \"borrower_id\": \"66cdcf6c72e734459b377c45\",\n            \"borrower_name\": \"Kebede\",\n            \"amount\": 1500.5,\n            \"created_at\": {\n                \"T\": 1724764802,\n                \"I\": 41\n            },\n            \"status\": \"pending\"\n        },\n        {\n            \"id\": \"66cdd2a79eaad087d2720ef1\",\n            \"title\": \"Personal Loan for Home Renovation\",\n            \"description\": \"A personal loan to cover the costs of home renovation.\",\n            \"borrower_id\": \"66cdcf6c72e734459b377c45\",\n            \"borrower_name\": \"Kebede\",\n            \"amount\": 1500.5,\n            \"created_at\": {\n                \"T\": 1724764839,\n                \"I\": 11\n            },\n            \"status\": \"pending\"\n        }\n    ],\n    \"message\": \"Loans fetched successfully\"\n}"},{"id":"cb9cdd79-ed37-47f5-9e60-c4048e78d13b","name":"Error","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\":\"Teklu\",\r\n    \"email\":\"teklumoges6@gmail.com\",\r\n    \"password\":\"Tekl123.\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/admin/loans"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 13:21:49 GMT"},{"key":"Content-Length","value":"23"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Invalid JWT\"\n}"},{"id":"82cf3a51-37eb-47d0-93ef-cb305ea39c2c","name":"Unauthorized access","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\":\"Teklu\",\r\n    \"email\":\"teklumoges6@gmail.com\",\r\n    \"password\":\"Tekl123.\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/admin/loans"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 13:30:23 GMT"},{"key":"Content-Length","value":"38"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Unauthorized access\"\n}"}],"_postman_id":"91d28349-31fa-40bf-8bfd-137dcee964de"},{"name":"Approve/Reject Loan","id":"8e419401-0c5b-4287-9548-607bceeb73ed","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"status\":\"approved\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/admin/loans/66cdd12b12b9638896fa89ef/status","urlObject":{"port":"8080","path":["admin","loans","66cdd12b12b9638896fa89ef","status"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"a47e5f20-36b8-4ff3-adbd-dcdb7bd1f247","name":"successful","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"status\":\"approved\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/admin/loans/66cdd12b12b9638896fa89ef/status"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 13:44:00 GMT"},{"key":"Content-Length","value":"353"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": 200,\n    \"data\": {\n        \"id\": \"66cdd12b12b9638896fa89ef\",\n        \"title\": \"Personal Loan for Home Renovation\",\n        \"description\": \"A personal loan to cover the costs of home renovation.\",\n        \"borrower_id\": \"66cdcf6c72e734459b377c45\",\n        \"borrower_name\": \"Kebede\",\n        \"amount\": 15000.5,\n        \"created_at\": {\n            \"T\": 1724764461,\n            \"I\": 37\n        },\n        \"status\": \"approved\"\n    },\n    \"message\": \"Loan status updated successfully\"\n}"},{"id":"61b6720a-43ae-42a0-a4ae-6c08d96c2bb3","name":"Error","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"status\":\"approved\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/admin/loans/66cdd12b12b9638896fa8ef/status"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 13:44:33 GMT"},{"key":"Content-Length","value":"46"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": 500,\n    \"message\": \"Internal Server Error\"\n}"}],"_postman_id":"8e419401-0c5b-4287-9548-607bceeb73ed"},{"name":"Delete Loan","id":"670dffc8-aead-4547-a4be-c98aa5a3eebd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"url":"localhost:8080/admin/loans/66cdd1f89eaad087d2720eef","urlObject":{"port":"8080","path":["admin","loans","66cdd1f89eaad087d2720eef"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"8635b4c0-5e1d-438d-8959-cb76bc0d7017","name":"successful","originalRequest":{"method":"DELETE","header":[],"url":"localhost:8080/admin/loans/66cdd1f89eaad087d2720eef"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 13:46:35 GMT"},{"key":"Content-Length","value":"344"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": 200,\n    \"data\": {\n        \"id\": \"66cdd1f89eaad087d2720eef\",\n        \"title\": \"Personal Loan for Home Renovation\",\n        \"description\": \"A personal loan to cover the costs of home renovation.\",\n        \"borrower_id\": \"66cdcf6c72e734459b377c45\",\n        \"borrower_name\": \"Kebede\",\n        \"amount\": 1500.5,\n        \"created_at\": {\n            \"T\": 1724764665,\n            \"I\": 43\n        },\n        \"status\": \"pending\"\n    },\n    \"message\": \"Loan deleted successfully\"\n}"}],"_postman_id":"670dffc8-aead-4547-a4be-c98aa5a3eebd"}],"id":"3f97b3a2-a134-4a31-b306-4b55af208d6b","_postman_id":"3f97b3a2-a134-4a31-b306-4b55af208d6b","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"fe3784a5-4844-49e8-adf7-d9f7d1be15ad","id":"fe3784a5-4844-49e8-adf7-d9f7d1be15ad","name":"📑 Loan Tracker API - Documentation","type":"collection"}}},{"name":"Apply for Loan","id":"be49e6db-0fff-431e-9df8-38509ee76f8a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"title\": \"Personal Loan for Home Renovation\",\r\n  \"description\": \"A personal loan to cover the costs of home renovation.\",\r\n  \"amount\": 1500.50\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// {\r\n//     // \"username\":\"Kebede\",\r\n//     // \"email\":\"voltafekki@gufum.com\",\r\n//     // \"password\":\"Newpas123.\"\r\n// }","options":{"raw":{"language":"json"}}},"url":"localhost:8080/loans","urlObject":{"port":"8080","path":["loans"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"2860f006-e14b-4d05-b548-1ac2b642335e","name":"successful","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"title\": \"Personal Loan for Home Renovation\",\r\n  \"description\": \"A personal loan to cover the costs of home renovation.\",\r\n  \"amount\": 1500.50\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// {\r\n//     // \"username\":\"Kebede\",\r\n//     // \"email\":\"voltafekki@gufum.com\",\r\n//     // \"password\":\"Newpas123.\"\r\n// }","options":{"raw":{"language":"json"}}},"url":"localhost:8080/loans"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 13:17:46 GMT"},{"key":"Content-Length","value":"344"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": 200,\n    \"data\": {\n        \"id\": \"66cdd1f89eaad087d2720eef\",\n        \"title\": \"Personal Loan for Home Renovation\",\n        \"description\": \"A personal loan to cover the costs of home renovation.\",\n        \"borrower_id\": \"66cdcf6c72e734459b377c45\",\n        \"borrower_name\": \"Kebede\",\n        \"amount\": 1500.5,\n        \"created_at\": {\n            \"T\": 1724764665,\n            \"I\": 43\n        },\n        \"status\": \"pending\"\n    },\n    \"message\": \"Loan created successfully\"\n}"},{"id":"b211c8ca-08b4-4207-8c6b-9d7a2228fd24","name":"All fields are required","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"description\": \"A personal loan to cover the costs of home renovation.\",\r\n  \"amount\": 1500.50\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// {\r\n//     // \"username\":\"Kebede\",\r\n//     // \"email\":\"voltafekki@gufum.com\",\r\n//     // \"password\":\"Newpas123.\"\r\n// }","options":{"raw":{"language":"json"}}},"url":"localhost:8080/loans"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 13:19:11 GMT"},{"key":"Content-Length","value":"55"}],"cookie":[],"responseTime":null,"body":"{\n    \"status_code\": 400,\n    \"message\": \"All fields are required\"\n}"},{"id":"73824f0e-fbcb-4cd4-8243-f3bbbd0effbb","name":"Invalid JWT","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"title\": \"Personal Loan for Home Renovation\",\r\n  \"description\": \"A personal loan to cover the costs of home renovation.\",\r\n  \"amount\": 1500.50\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// {\r\n//     // \"username\":\"Kebede\",\r\n//     // \"email\":\"voltafekki@gufum.com\",\r\n//     // \"password\":\"Newpas123.\"\r\n// }","options":{"raw":{"language":"json"}}},"url":"localhost:8080/loans"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 13:20:10 GMT"},{"key":"Content-Length","value":"23"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Invalid JWT\"\n}"}],"_postman_id":"be49e6db-0fff-431e-9df8-38509ee76f8a"},{"name":"View Loan Status","id":"10a125c7-90dd-47d5-a262-6161ba132b79","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:8080/loans/66cdd3d99eaad087d2720ef2","urlObject":{"port":"8080","path":["loans","66cdd3d99eaad087d2720ef2"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"8393654b-b3ac-4ef9-9067-1673df28000f","name":"successful","originalRequest":{"method":"GET","header":[],"url":"localhost:8080/loans/66cdd3d99eaad087d2720ef2"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 13:26:08 GMT"},{"key":"Content-Length","value":"343"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": 200,\n    \"data\": {\n        \"id\": \"66cdd3d99eaad087d2720ef2\",\n        \"title\": \"Personal Loan for Home Renovation\",\n        \"description\": \"A personal loan to cover the costs of home renovation.\",\n        \"borrower_id\": \"66cdcf6c72e734459b377c45\",\n        \"borrower_name\": \"Kebede\",\n        \"amount\": 1500.5,\n        \"created_at\": {\n            \"T\": 1724765145,\n            \"I\": 1\n        },\n        \"status\": \"pending\"\n    },\n    \"message\": \"Loan fetched successfully\"\n}"},{"id":"c86b0a59-0797-47c2-ad02-5c5f450f41d9","name":"Error","originalRequest":{"method":"GET","header":[],"url":"localhost:8080/loans/66cdd3d99eaad087d2720ef"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 27 Aug 2024 13:27:20 GMT"},{"key":"Content-Length","value":"53"}],"cookie":[],"responseTime":null,"body":"{\n    \"status_code\": 500,\n    \"message\": \"Internal Server Error\"\n}"}],"_postman_id":"10a125c7-90dd-47d5-a262-6161ba132b79"}],"id":"c1cc78ec-c484-449a-b2c1-0f28728a26ae","_postman_id":"c1cc78ec-c484-449a-b2c1-0f28728a26ae","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"fe3784a5-4844-49e8-adf7-d9f7d1be15ad","id":"fe3784a5-4844-49e8-adf7-d9f7d1be15ad","name":"📑 Loan Tracker API - Documentation","type":"collection"}}}],"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":"{{token}}"}]}},"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""]}},{"listen":"test","script":{"type":"text/javascript","exec":[""]}}],"variable":[{"id":"ee7eea7e-5492-47da-b8c5-0190d07fa8c8","key":"baseUrl","value":"https://farming-simulator.pstmn.io"}]}