{"info":{"_postman_id":"3faed389-4705-440d-8cd0-bd594333794b","name":"EMS","description":"<html><head></head><body><p><strong>System Analysis and Design</strong></p>\n<p>With this API, you can create a running expense managing app.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"19777122","collectionId":"3faed389-4705-440d-8cd0-bd594333794b","publishedId":"UyxjEkai","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-05-14T11:45:04.000Z"},"item":[{"name":"Users","item":[{"name":"[ADMIN] Show All Users","id":"e80ac0f8-365c-4fd7-80c5-7cb6b2f8aef4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/users","description":"<p>Get a list of all users.</p>\n<p>Limited to the users with an 'admin' role.</p>\n","urlObject":{"path":["api","users"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"e80ac0f8-365c-4fd7-80c5-7cb6b2f8aef4"},{"name":"[MAIN] Home Page","id":"32b38011-0f1a-47e9-a090-1dc1847a0ad2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/me","description":"<p>Main page which contains initial data about the logged in user.</p>\n","urlObject":{"path":["api","me"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"32b38011-0f1a-47e9-a090-1dc1847a0ad2"},{"name":"[ADMIN] Get User Profile","id":"bf46a13c-021f-4189-a0d4-2cbafdb8fe3f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/users/6280dbd9abc56e36ea49a192","description":"<p>Limited to the users with an 'admin' role.</p>\n<p>This is the endpoint gather data about a user.</p>\n<p>Returns:</p>\n<ul>\n<li>User information</li>\n<li>Cards of this user</li>\n<li>Summaries of this user</li>\n</ul>\n","urlObject":{"path":["api","users","6280dbd9abc56e36ea49a192"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"bf46a13c-021f-4189-a0d4-2cbafdb8fe3f"}],"id":"6fd1d5d5-595b-43c2-a226-17e69cdf732a","description":"<p>User related collection.</p>\n","_postman_id":"6fd1d5d5-595b-43c2-a226-17e69cdf732a"},{"name":"Authentication","item":[{"name":"Sign Up","id":"8da4890a-8bf7-4f15-8c14-b13cb1d83107","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Anıl Karaşah\",\r\n    \"email\": \"test@anil.io\",\r\n    \"password\": \"{{password}}\",\r\n    \"securityQuestion\": \"Bu proje hangi ders için yapıldı?\",\r\n    \"questionAnswer\": \"Sistem Analizi ve Tasarımı\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/users/signup","description":"<p>For users to sign up.</p>\n<p>Required fields:</p>\n<ul>\n<li>Full name</li>\n<li>Email</li>\n<li>Password</li>\n<li>Security question</li>\n<li>Answer of the given security question</li>\n</ul>\n","urlObject":{"path":["api","users","signup"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"8da4890a-8bf7-4f15-8c14-b13cb1d83107"},{"name":"Forgot Password","id":"d3b46759-d28f-4983-a68d-9b69bdbf3eea","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"admin@ems.io\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/users/forgotPassword","description":"<p>This endpoint will be called when a user hits \"Forgot password\" at the login screen.</p>\n<p>Required fields:</p>\n<ul>\n<li>Email</li>\n</ul>\n<p>Returns:</p>\n<ul>\n<li>Email</li>\n<li>Security question of the user provided while signing up</li>\n</ul>\n","urlObject":{"path":["api","users","forgotPassword"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d3b46759-d28f-4983-a68d-9b69bdbf3eea"},{"name":"Reset Password","id":"4eaadbb2-1e9c-439b-b7ea-7c4d3c8e4850","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"admin@ems.io\",\r\n    \"answer\": \"sistem analizi ve tasarımı\",\r\n    \"password\": \"new-password\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/users/forgotPassword","description":"<p>For a user to reset password when it is forgotten.</p>\n<p>This endpoint will be called right after the 'Forgot Password' is completed.</p>\n<p>Required fields:</p>\n<ul>\n<li>Email (it can be provided after the previous endpoint)</li>\n<li>Answer of the security question.</li>\n<li>New password</li>\n</ul>\n","urlObject":{"path":["api","users","forgotPassword"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4eaadbb2-1e9c-439b-b7ea-7c4d3c8e4850"},{"name":"Log In","event":[{"listen":"test","script":{"id":"090664a8-7c6e-4aa5-b996-d99103d63387","exec":[""],"type":"text/javascript"}}],"id":"49945734-2fd8-45a2-b356-1a761f10df0f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"admin@ems.io\",\r\n    \"password\": \"{{password}}\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/users/login","description":"<p>For users to log in to the system.</p>\n<p>Required fields:</p>\n<ul>\n<li>Email</li>\n<li>Password</li>\n</ul>\n","urlObject":{"path":["api","users","login"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"49945734-2fd8-45a2-b356-1a761f10df0f"},{"name":"Update Password","id":"143ba45d-e9c8-4730-a23b-a18a8630644c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"currentPassword\": \"{{password}}\",\r\n    \"password\": \"new-password\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/users/updatePassword","description":"<p>Updating passwords.</p>\n<p>This can only be called while the user has already logged in.</p>\n<p>Required fields:</p>\n<ul>\n<li>Current password</li>\n<li>New password</li>\n</ul>\n","urlObject":{"path":["api","users","updatePassword"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"143ba45d-e9c8-4730-a23b-a18a8630644c"},{"name":"[ADMIN] Grant Role To User","id":"020bf190-5a2a-4e8b-aa2c-9ae13a27271e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"admin@ems.io\",\r\n    \"role\": \"admin\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/users/grantRole","description":"<p>For a user to change role.</p>\n<p>Limited to the users with an 'admin' role.</p>\n<p>Required fields:</p>\n<ul>\n<li>Email of the user</li>\n<li>Role (limited to 'user' and 'admin')</li>\n</ul>\n<p>If you do not provide any role, it will got reset to 'user'</p>\n","urlObject":{"path":["api","users","grantRole"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"020bf190-5a2a-4e8b-aa2c-9ae13a27271e"},{"name":"Update Me","id":"e454ff27-f78f-41a8-9590-59100f8e458a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"EMS Admin\",\r\n    \"securityQuestion\": \"Bu proje hangi ders için yapılıyor?\",\r\n    \"questionAnswer\": \"Sistem Analizi ve Tasarımı\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/users/updateMe","description":"<p>Logged in user can update attributes via this route.</p>\n<p>This route do not accept:</p>\n<ul>\n<li>Password</li>\n<li>Role</li>\n</ul>\n<p>This route accept:</p>\n<ul>\n<li>Name</li>\n<li>Email</li>\n<li>Security Question and Security Question Answer (both must be present)</li>\n</ul>\n","urlObject":{"path":["api","users","updateMe"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"e454ff27-f78f-41a8-9590-59100f8e458a"}],"id":"c3c4e88a-214f-43db-8501-8f25fdd9572e","description":"<p>Authenticating users via signing up, logging in, updating and reseting passwords.</p>\n","_postman_id":"c3c4e88a-214f-43db-8501-8f25fdd9572e"},{"name":"Cards","item":[{"name":"[ADMIN] Show All Cards","id":"bfaeccbb-3099-43eb-88d2-b6a5e915cd73","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/cards","description":"<p>Get a list of all cards registered to the system.</p>\n<p>Limited to the users with an 'admin' role.</p>\n","urlObject":{"path":["api","cards"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"bfaeccbb-3099-43eb-88d2-b6a5e915cd73"},{"name":"[ADMIN] Get Cards of User","id":"c5ae5790-48fa-4c7f-bcf7-d90bb305b856","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/cards/6280dbd9abc56e36ea49a192","description":"<p>Get a list of all cards assigned to a user.</p>\n<p>Send user's ID as a parameter.</p>\n<p>Limited to the users with an 'admin' role.</p>\n","urlObject":{"path":["api","cards","6280dbd9abc56e36ea49a192"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c5ae5790-48fa-4c7f-bcf7-d90bb305b856"},{"name":"[MAIN] Add Card","id":"b9180fce-a08d-49f4-ab1c-fcc4a7b3de57","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"ownerName\": \"Cthrine Annis\",\r\n    \"cardNumber\": \"5498 8263 73 7817\",\r\n    \"expiryDate\": \"2027-09\",\r\n    \"cvv\": 206\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/me/card","description":"<p>For the logged in user to add a new card.</p>\n<p>Required fields:</p>\n<ul>\n<li>ownerName (name of the card holder)</li>\n<li>cardNumber (16-digit card number)</li>\n<li>expiryDate (must be provided in a format: YYYY/MM)</li>\n<li>cvv (3-digit security code of the card)</li>\n</ul>\n<p>Optional:</p>\n<ul>\n<li>cardType (options are 'Credit Card' and 'Bank Card')</li>\n</ul>\n","urlObject":{"path":["api","me","card"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"b9180fce-a08d-49f4-ab1c-fcc4a7b3de57"},{"name":"[MAIN] Cards Page","id":"39804c45-7675-4d0b-804f-63cb719da6c5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/me/card","description":"<p>This endpoint lists all the cards of the logged in user.</p>\n","urlObject":{"path":["api","me","card"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"39804c45-7675-4d0b-804f-63cb719da6c5"},{"name":"New Request","id":"3764d515-96ca-4699-8294-1c2eb563eaee","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"3764d515-96ca-4699-8294-1c2eb563eaee"}],"id":"9b5ae67e-9ab8-4ee2-87b5-eb41f1e21e29","description":"<p>All the credit and bank card related stuff.</p>\n","_postman_id":"9b5ae67e-9ab8-4ee2-87b5-eb41f1e21e29"},{"name":"Summaries","item":[{"name":"[ADMIN] Show All Summaries","id":"a7038a0a-edb5-49f1-b016-262e23a64908","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/summaries","description":"<p>Get a list of all the summaries.</p>\n<p>Limited to the users with an 'admin' role.</p>\n","urlObject":{"path":["api","summaries"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"a7038a0a-edb5-49f1-b016-262e23a64908"},{"name":"[ADMIN] Get Summaries of User","id":"c88a461e-83ec-49e2-a98f-bc07c57a4fb6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/summaries/6280dbd9abc56e36ea49a192","description":"<p>Get a list of all summaries of a user.</p>\n<p>ID of the user should be provided by the system.</p>\n<p>Limited to the users with an 'admin' role.</p>\n","urlObject":{"path":["api","summaries","6280dbd9abc56e36ea49a192"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c88a461e-83ec-49e2-a98f-bc07c57a4fb6"}],"id":"bbaecbbf-96d1-445f-9ebf-b3d82a4329ba","description":"<p>Monthly summaries of users.</p>\n","_postman_id":"bbaecbbf-96d1-445f-9ebf-b3d82a4329ba"},{"name":"Expenses","item":[{"name":"[MAIN] New Expense","id":"f8a59e91-02f4-4a4e-8cfa-d9cf93bdbc19","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"card\": \"6280dc30abc56e36ea49a19d\",\r\n    \"expenseType\": \"subscription\",\r\n    \"amount\": 29.90\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/me/expense/new","description":"<p>For the logged in user to add a new expense to the system.</p>\n<p>Required fields:</p>\n<ul>\n<li>Expense Type (default is 'other')</li>\n<li>Amount</li>\n</ul>\n<p>Optional:</p>\n<ul>\n<li>Card ID (if not given, this expense will be displayed as a cash transit)</li>\n</ul>\n<p>Expense types:</p>\n<ul>\n<li>food-drink</li>\n<li>entertainment</li>\n<li>subscription</li>\n<li>shopping</li>\n<li>health</li>\n<li>other</li>\n</ul>\n","urlObject":{"path":["api","me","expense","new"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"f8a59e91-02f4-4a4e-8cfa-d9cf93bdbc19"},{"name":"[ADMIN] Show All Expenses","id":"12e71faa-4a18-40b5-b13b-753c0a42e6d2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/expenses","description":"<p>Get a list of all expenses.</p>\n<p>Limited to the users with an 'admin' role.</p>\n","urlObject":{"path":["api","expenses"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"12e71faa-4a18-40b5-b13b-753c0a42e6d2"},{"name":"[ADMIN] Get Expenses of User","id":"b6625681-f453-46f0-9258-421637768fcc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/expenses/6280d2415d5976649b49a4c5","description":"<p>Get expenses of a user.</p>\n<p>User ID must be provided as a parameter.</p>\n<p>Limited to the users with an 'admin' role.</p>\n","urlObject":{"path":["api","expenses","6280d2415d5976649b49a4c5"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"b6625681-f453-46f0-9258-421637768fcc"},{"name":"[MAIN] Expense Page","id":"78fc272d-ff27-4fc8-a44f-c330172750ef","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/me/expense","description":"<p>This endpoint lists all the expenses of the logged in user.</p>\n","urlObject":{"path":["api","me","expense"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"78fc272d-ff27-4fc8-a44f-c330172750ef"},{"name":"[MAIN] Subscriptions Page","id":"c26071e2-96b4-4f81-926c-2eac5a8a0861","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/me/subs","description":"<p>This endpoint lists all the subscriptions of the logged in user.</p>\n","urlObject":{"path":["api","me","subs"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c26071e2-96b4-4f81-926c-2eac5a8a0861"},{"name":"[MAIN] New Expense Page","id":"2aca88b1-7664-4c06-9925-2a664fc7d948","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/me/expense/new","description":"<p>For the logged in user to add a new expense to the system.</p>\n<p>Required fields:</p>\n<ul>\n<li>Expense Type (default is 'other')</li>\n<li>Amount</li>\n</ul>\n<p>Optional:</p>\n<ul>\n<li>Card ID (if not given, this expense will be displayed as a cash transit)</li>\n</ul>\n<p>Expense types:</p>\n<ul>\n<li>food-drink</li>\n<li>entertainment</li>\n<li>subscription</li>\n<li>shopping</li>\n<li>health</li>\n<li>other</li>\n</ul>\n","urlObject":{"path":["api","me","expense","new"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"2aca88b1-7664-4c06-9925-2a664fc7d948"}],"id":"a1f40176-101c-4fd6-ba09-2cfa5eeecd4b","_postman_id":"a1f40176-101c-4fd6-ba09-2cfa5eeecd4b","description":""}],"event":[{"listen":"prerequest","script":{"id":"5fb4f27e-e89b-4cfd-9095-655620568d3b","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"03e9a495-7f7e-4e81-aa40-a06b0d02ce15","type":"text/javascript","exec":[""]}}]}