{"info":{"_postman_id":"554a2c5e-351b-46e5-a683-ed9c3809f15a","name":"ELMS API","description":"<html><head></head><body><p>Postman collection for ELMS API with Role Separation</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"50579029","collectionId":"554a2c5e-351b-46e5-a683-ed9c3809f15a","publishedId":"2sBXc8pP5D","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-02-06T11:40:10.000Z"},"item":[{"name":"01. Auth (Public)","item":[{"name":"Register Employee","id":"61e29603-acd8-45d3-8caa-d082bbc650b7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"New Employee\",\n    \"email\": \"employee@elms.com\",\n    \"password\": \"password\",\n    \"password_confirmation\": \"password\"\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/auth/register","urlObject":{"path":["api","auth","register"],"host":["http://127.0.0.1:8000"],"query":[],"variable":[]}},"response":[],"_postman_id":"61e29603-acd8-45d3-8caa-d082bbc650b7"},{"name":"Login (Admin)","event":[{"listen":"test","script":{"exec":["var jsonData = pm.response.json();","if(jsonData.access_token) {","    pm.environment.set(\"admin_token\", jsonData.access_token);","    console.log(\"Admin Token Set\");","}"],"type":"text/javascript","id":"12df9583-c482-4544-97ed-1f2bf9fec876"}}],"id":"d3190e6c-1532-4644-8438-55d0a1064a19","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"email\": \"admin@elms.com\",\n    \"password\": \"password\"\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/auth/login","urlObject":{"path":["api","auth","login"],"host":["http://127.0.0.1:8000"],"query":[],"variable":[]}},"response":[],"_postman_id":"d3190e6c-1532-4644-8438-55d0a1064a19"},{"name":"Login (Employee)","event":[{"listen":"test","script":{"exec":["var jsonData = pm.response.json();","if(jsonData.access_token) {","    pm.environment.set(\"employee_token\", jsonData.access_token);","    console.log(\"Employee Token Set\");","}"],"type":"text/javascript","id":"d23eb4e4-4c89-4d66-ae29-d1ff47e63989"}}],"id":"0112f574-f644-48f5-bd20-7465807a6dec","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"email\": \"employee@elms.com\",\n    \"password\": \"password\"\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/auth/login","urlObject":{"path":["api","auth","login"],"host":["http://127.0.0.1:8000"],"query":[],"variable":[]}},"response":[],"_postman_id":"0112f574-f644-48f5-bd20-7465807a6dec"},{"name":"Google Login (Get URL)","id":"9fee3a56-4af6-4175-90c1-241f87268fd5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"http://127.0.0.1:8000/api/auth/google/redirect","description":"<p>Copy the 'url' from response and visit in browser to login with Google.</p>\n","urlObject":{"path":["api","auth","google","redirect"],"host":["http://127.0.0.1:8000"],"query":[],"variable":[]}},"response":[],"_postman_id":"9fee3a56-4af6-4175-90c1-241f87268fd5"}],"id":"98556e1b-ec42-4c76-9c40-44eff6b807e3","_postman_id":"98556e1b-ec42-4c76-9c40-44eff6b807e3","description":""},{"name":"02. Employee Actions","item":[{"name":"My Profile & Quota","id":"f8d557c8-257c-4a13-9080-74e004a4f544","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"http://127.0.0.1:8000/api/auth/me","description":"<p>Exposes user info + 'current_leave_quota' (remaining_quota).</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{employee_token}}"}]},"isInherited":true,"source":{"_postman_id":"076fedc0-4180-43a7-8c80-c03724058110","id":"076fedc0-4180-43a7-8c80-c03724058110","name":"02. Employee Actions","type":"folder"}},"urlObject":{"path":["api","auth","me"],"host":["http://127.0.0.1:8000"],"query":[],"variable":[]}},"response":[],"_postman_id":"f8d557c8-257c-4a13-9080-74e004a4f544"},{"name":"Submit Leave Request (with File)","id":"a41ef50c-f1b7-4f85-ad92-cbd126033bed","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json"}],"body":{"mode":"formdata","formdata":[{"key":"start_date","value":"2026-06-10","type":"text"},{"key":"end_date","value":"2026-06-12","type":"text"},{"key":"reason","value":"Medical Checkup","type":"text"},{"key":"attachment","type":"file","value":null}]},"url":"http://127.0.0.1:8000/api/leaves","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{employee_token}}"}]},"isInherited":true,"source":{"_postman_id":"076fedc0-4180-43a7-8c80-c03724058110","id":"076fedc0-4180-43a7-8c80-c03724058110","name":"02. Employee Actions","type":"folder"}},"urlObject":{"path":["api","leaves"],"host":["http://127.0.0.1:8000"],"query":[],"variable":[]}},"response":[],"_postman_id":"a41ef50c-f1b7-4f85-ad92-cbd126033bed"},{"name":"My Leave History","id":"e53c370a-a63e-4bca-af6f-e5cd662cd252","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"http://127.0.0.1:8000/api/leaves","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{employee_token}}"}]},"isInherited":true,"source":{"_postman_id":"076fedc0-4180-43a7-8c80-c03724058110","id":"076fedc0-4180-43a7-8c80-c03724058110","name":"02. Employee Actions","type":"folder"}},"urlObject":{"path":["api","leaves"],"host":["http://127.0.0.1:8000"],"query":[],"variable":[]}},"response":[],"_postman_id":"e53c370a-a63e-4bca-af6f-e5cd662cd252"},{"name":"My Leave Details","id":"7ceef4a7-ddaa-4660-b344-060e74a73a7f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"http://127.0.0.1:8000/api/leaves/1","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{employee_token}}"}]},"isInherited":true,"source":{"_postman_id":"076fedc0-4180-43a7-8c80-c03724058110","id":"076fedc0-4180-43a7-8c80-c03724058110","name":"02. Employee Actions","type":"folder"}},"urlObject":{"path":["api","leaves","1"],"host":["http://127.0.0.1:8000"],"query":[],"variable":[]}},"response":[],"_postman_id":"7ceef4a7-ddaa-4660-b344-060e74a73a7f"},{"name":"Cancel/Delete Leave","id":"ac7e53e4-9c53-465b-9590-4874710d9d86","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Accept","value":"application/json"}],"url":"http://127.0.0.1:8000/api/leaves/1","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{employee_token}}"}]},"isInherited":true,"source":{"_postman_id":"076fedc0-4180-43a7-8c80-c03724058110","id":"076fedc0-4180-43a7-8c80-c03724058110","name":"02. Employee Actions","type":"folder"}},"urlObject":{"path":["api","leaves","1"],"host":["http://127.0.0.1:8000"],"query":[],"variable":[]}},"response":[],"_postman_id":"ac7e53e4-9c53-465b-9590-4874710d9d86"},{"name":"Logout","id":"e59d6dac-a490-41c8-ad6c-216a4a68c416","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json"}],"url":"http://127.0.0.1:8000/api/auth/logout","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{employee_token}}"}]},"isInherited":true,"source":{"_postman_id":"076fedc0-4180-43a7-8c80-c03724058110","id":"076fedc0-4180-43a7-8c80-c03724058110","name":"02. Employee Actions","type":"folder"}},"urlObject":{"path":["api","auth","logout"],"host":["http://127.0.0.1:8000"],"query":[],"variable":[]}},"response":[],"_postman_id":"e59d6dac-a490-41c8-ad6c-216a4a68c416"}],"id":"076fedc0-4180-43a7-8c80-c03724058110","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{employee_token}}"}]},"isInherited":false},"_postman_id":"076fedc0-4180-43a7-8c80-c03724058110","description":""},{"name":"03. Admin Actions","item":[{"name":"View All Pending Applications","id":"2aba1a58-f449-4d55-988d-a929b3cb25aa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"http://127.0.0.1:8000/api/leaves","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{admin_token}}"}]},"isInherited":true,"source":{"_postman_id":"81bf5d88-34d3-41ed-8355-9610f420bddc","id":"81bf5d88-34d3-41ed-8355-9610f420bddc","name":"03. Admin Actions","type":"folder"}},"urlObject":{"path":["api","leaves"],"host":["http://127.0.0.1:8000"],"query":[],"variable":[]}},"response":[],"_postman_id":"2aba1a58-f449-4d55-988d-a929b3cb25aa"},{"name":"Approve Leave","id":"de054396-edc5-4643-817a-74bd45f6ef4a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"status\": \"approved\",\n    \"admin_note\": \"Approved by HR\"\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/leaves/1","description":"<p>Change ID '1' to proper Leave Request ID.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{admin_token}}"}]},"isInherited":true,"source":{"_postman_id":"81bf5d88-34d3-41ed-8355-9610f420bddc","id":"81bf5d88-34d3-41ed-8355-9610f420bddc","name":"03. Admin Actions","type":"folder"}},"urlObject":{"path":["api","leaves","1"],"host":["http://127.0.0.1:8000"],"query":[],"variable":[]}},"response":[],"_postman_id":"de054396-edc5-4643-817a-74bd45f6ef4a"},{"name":"Reject Leave","id":"6b0b3bfe-43b2-4174-b58f-192da176daab","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"status\": \"rejected\",\n    \"admin_note\": \"Quota exceeded\"\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/leaves/1","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{admin_token}}"}]},"isInherited":true,"source":{"_postman_id":"81bf5d88-34d3-41ed-8355-9610f420bddc","id":"81bf5d88-34d3-41ed-8355-9610f420bddc","name":"03. Admin Actions","type":"folder"}},"urlObject":{"path":["api","leaves","1"],"host":["http://127.0.0.1:8000"],"query":[],"variable":[]}},"response":[],"_postman_id":"6b0b3bfe-43b2-4174-b58f-192da176daab"}],"id":"81bf5d88-34d3-41ed-8355-9610f420bddc","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{admin_token}}"}]},"isInherited":false},"_postman_id":"81bf5d88-34d3-41ed-8355-9610f420bddc","description":""}],"variable":[{"key":"base_url","value":"http://127.0.0.1:8000","type":"string"}]}