{"info":{"_postman_id":"291ca47b-1897-48c3-9c83-97cccbbc13a4","name":"Go-FAS-API","description":"<html><head></head><body><p>This API allows you to manage financial assistance schemes for needy individuals and families.</p>\n<p>To simulate a simple auth, '123456ABC' can be used as user password and 'john' can be used as username</p>\n<p><strong>Note</strong>: Authentication here is simulated by using a username and password in URL parameter and request header respectively, in a real application use a more secure method like OAuth or JWT</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"33827285","collectionId":"291ca47b-1897-48c3-9c83-97cccbbc13a4","publishedId":"2sAXjRW9NG","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-09-07T16:21:01.000Z"},"item":[{"name":"Get Applicants","id":"2f0ca7c6-7b83-4b12-803b-015d0688fc18","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"User Password","type":"text"}],"url":"http://localhost:8080/api/applicants?username=Username","description":"<p>Get all applicants</p>\n","urlObject":{"protocol":"http","port":"8080","path":["api","applicants"],"host":["localhost"],"query":[{"key":"username","value":"Username"}],"variable":[]}},"response":[{"id":"7e37c752-2dd9-48a1-93b8-06ff8e2b79af","name":"200","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"123456ABC","type":"text"}],"url":{"raw":"http://localhost:8080/api/applicants?username=john","protocol":"http","host":["localhost"],"port":"8080","path":["api","applicants"],"query":[{"key":"username","value":"john"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Date","value":"Mon, 09 Sep 2024 14:07:44 GMT"},{"key":"Content-Length","value":"417"}],"cookie":[],"responseTime":null,"body":"{\n    \"Code\": 200,\n    \"Applicants\": [\n        {\n            \"id\": \"1\",\n            \"name\": \"John Doe\",\n            \"employment_status\": \"unemployed\",\n            \"sex\": \"male\",\n            \"date_of_birth\": \"1985-01-01\",\n            \"household\": []\n        },\n        {\n            \"id\": \"2\",\n            \"name\": \"Jane Smith\",\n            \"employment_status\": \"unemployed\",\n            \"sex\": \"female\",\n            \"date_of_birth\": \"1999-02-02\",\n            \"household\": [\n                {\n                    \"id\": \"3\",\n                    \"applicant_id\": \"2\",\n                    \"name\": \"Child One\",\n                    \"employment_status\": \"unemployed\",\n                    \"sex\": \"female\",\n                    \"date_of_birth\": \"2015-03-15\",\n                    \"relation\": \"daughter\"\n                }\n            ]\n        }\n    ]\n}"},{"id":"4e614434-f6ff-4c66-b10e-8db40a35c294","name":"400","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"123456ABC","type":"text"}],"url":{"raw":"http://localhost:8080/api/applicants?username=","protocol":"http","host":["localhost"],"port":"8080","path":["api","applicants"],"query":[{"key":"username","value":""}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Date","value":"Mon, 09 Sep 2024 14:05:32 GMT"},{"key":"Content-Length","value":"52"}],"cookie":[],"responseTime":null,"body":"{\n    \"Code\": 400,\n    \"Message\": \"Invalid username or token.\"\n}"}],"_postman_id":"2f0ca7c6-7b83-4b12-803b-015d0688fc18"},{"name":"Create 1 Applicant","id":"bc5520a6-f87f-4a7d-ba6a-3c8a19d65bf5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"User Password","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"id\": \"100\",\n  \"name\": \"Name\",\n  \"employment_status\": \"employed\",\n  \"sex\": \"male\",\n  \"date_of_birth\": \"2002-21-11\",\n  \"household\": []\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/applicants?username=Username","description":"<p>Create 1 Applicant</p>\n","urlObject":{"protocol":"http","port":"8080","path":["api","applicants"],"host":["localhost"],"query":[{"key":"username","value":"Username"}],"variable":[]}},"response":[{"id":"b05749e1-f118-4e1c-a0da-c5946a3d990c","name":"200","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"123456ABC","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"id\": \"101\",\n  \"name\": \"Mary\",\n  \"employment_status\": \"employed\",\n  \"sex\": \"male\",\n  \"date_of_birth\": \"2002-21-11\",\n  \"household\": []\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:8080/api/applicants?username=john","protocol":"http","host":["localhost"],"port":"8080","path":["api","applicants"],"query":[{"key":"username","value":"john"}]}},"status":"OK","code":200,"_postman_previewlanguage":"plain","header":[{"key":"Date","value":"Sat, 07 Sep 2024 16:25:44 GMT"},{"key":"Content-Length","value":"140"},{"key":"Content-Type","value":"text/plain; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\"Code\":200,\"Applicant\":{\"id\":\"101\",\"name\":\"Mary\",\"employment_status\":\"employed\",\"sex\":\"male\",\"date_of_birth\":\"2002-21-11\",\"household\":[]}}\n"},{"id":"5dd45409-4cc6-46ad-9fb2-a4483c2a2bdc","name":"400","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"123456ABC","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"id\": \"101\",\n  \"name\": \"Mary\",\n  \"employment_status\": \"employed\",\n  \"sex\": \"male\",\n  \"date_of_birth\": \"2002-21-11\",\n  \"household\": []\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:8080/api/applicants?username=john","protocol":"http","host":["localhost"],"port":"8080","path":["api","applicants"],"query":[{"key":"username","value":"john"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Date","value":"Mon, 09 Sep 2024 14:09:18 GMT"},{"key":"Content-Length","value":"50"}],"cookie":[],"responseTime":null,"body":"{\n    \"Code\": 400,\n    \"Message\": \"applicant already exists\"\n}"}],"_postman_id":"bc5520a6-f87f-4a7d-ba6a-3c8a19d65bf5"},{"name":"Get Schemes","id":"d0d9fdbe-b570-48c5-8937-1898a1676996","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"User Password","type":"text"}],"url":"http://localhost:8080/api/schemes?username=Username","urlObject":{"protocol":"http","port":"8080","path":["api","schemes"],"host":["localhost"],"query":[{"key":"username","value":"Username"}],"variable":[]}},"response":[{"id":"8237dd5d-6ac1-4fae-ae53-51f937ea03a4","name":"200","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"123456ABC","type":"text"}],"url":{"raw":"http://localhost:8080/api/schemes?username=john","protocol":"http","host":["localhost"],"port":"8080","path":["api","schemes"],"query":[{"key":"username","value":"john"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Date","value":"Sat, 07 Sep 2024 16:25:50 GMT"},{"key":"Content-Length","value":"613"}],"cookie":[],"responseTime":null,"body":"{\n    \"Code\": 200,\n    \"Schemes\": [\n        {\n            \"id\": \"1\",\n            \"name\": \"Retrenchment Assistance Scheme\",\n            \"criteria\": {\n                \"employment_status\": \"unemployed\"\n            },\n            \"benefits\": [\n                {\n                    \"id\": \"1\",\n                    \"name\": \"SkillsFuture Credits\",\n                    \"amount\": 500\n                },\n                {\n                    \"id\": \"2\",\n                    \"name\": \"CDC Vouchers\",\n                    \"amount\": 100\n                }\n            ]\n        },\n        {\n            \"id\": \"2\",\n            \"name\": \"Retrenchment Assistance Scheme (families)\",\n            \"criteria\": {\n                \"employment_status\": \"unemployed\",\n                \"has_children\": true\n            },\n            \"benefits\": [\n                {\n                    \"id\": \"3\",\n                    \"name\": \"School Meal Vouchers\",\n                    \"amount\": 200\n                }\n            ]\n        },\n        {\n            \"id\": \"24\",\n            \"name\": \"Scheme for unemployed without children\",\n            \"criteria\": {\n                \"employment_status\": \"unemployed\",\n                \"has_children\": \"false\"\n            },\n            \"benefits\": [\n                {\n                    \"id\": \"321\",\n                    \"name\": \"Money\",\n                    \"amount\": 300\n                }\n            ]\n        }\n    ]\n}"},{"id":"cd8411f4-fae3-443b-94f1-28da88b62a83","name":"400","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"1","type":"text"}],"url":{"raw":"http://localhost:8080/api/schemes?username=john","protocol":"http","host":["localhost"],"port":"8080","path":["api","schemes"],"query":[{"key":"username","value":"john"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Date","value":"Mon, 09 Sep 2024 14:09:43 GMT"},{"key":"Content-Length","value":"52"}],"cookie":[],"responseTime":null,"body":"{\n    \"Code\": 400,\n    \"Message\": \"Invalid username or token.\"\n}"}],"_postman_id":"d0d9fdbe-b570-48c5-8937-1898a1676996"},{"name":"Get Applications","id":"bd2c3e4b-176e-4d26-826d-abe9f3fafac4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"User Password","type":"text"}],"url":"http://localhost:8080/api/applications?username=Username","urlObject":{"protocol":"http","port":"8080","path":["api","applications"],"host":["localhost"],"query":[{"key":"username","value":"Username"}],"variable":[]}},"response":[{"id":"3983b342-03af-4b26-acfe-470d85f921b2","name":"200","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"123456ABC","type":"text"}],"url":{"raw":"http://localhost:8080/api/applications?username=john","protocol":"http","host":["localhost"],"port":"8080","path":["api","applications"],"query":[{"key":"username","value":"john"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Date","value":"Sat, 07 Sep 2024 16:25:55 GMT"},{"key":"Content-Length","value":"292"}],"cookie":[],"responseTime":null,"body":"{\n    \"Code\": 200,\n    \"Applications\": [\n        {\n            \"id\": \"1\",\n            \"applicant_id\": \"1\",\n            \"scheme_id\": \"1\",\n            \"status\": \"Approved\"\n        },\n        {\n            \"id\": \"2\",\n            \"applicant_id\": \"2\",\n            \"scheme_id\": \"2\",\n            \"status\": \"Pending\"\n        },\n        {\n            \"id\": \"3\",\n            \"applicant_id\": \"2\",\n            \"scheme_id\": \"1\",\n            \"status\": \"Success\"\n        },\n        {\n            \"id\": \"10\",\n            \"applicant_id\": \"2\",\n            \"scheme_id\": \"1\",\n            \"status\": \"Success\"\n        }\n    ]\n}"},{"id":"5b7aa475-d43f-44e6-8a12-76324fcbf78c","name":"400","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"123456AB","type":"text"}],"url":{"raw":"http://localhost:8080/api/applications?username=john","protocol":"http","host":["localhost"],"port":"8080","path":["api","applications"],"query":[{"key":"username","value":"john"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Date","value":"Mon, 09 Sep 2024 14:10:03 GMT"},{"key":"Content-Length","value":"52"}],"cookie":[],"responseTime":null,"body":"{\n    \"Code\": 400,\n    \"Message\": \"Invalid username or token.\"\n}"}],"_postman_id":"bd2c3e4b-176e-4d26-826d-abe9f3fafac4"},{"name":"Create 1 Scheme","id":"c0817455-5a53-409a-8e49-45bcd62ff094","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"User Password","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"id\": \"24\",\n  \"name\": \"Scheme for unemployed without children\",\n  \"criteria\": {\n    \"employment_status\": \"unemployed\",\n    \"has_children\": \"false\"\n  },\n  \"benefits\": [\n    {\n      \"id\": \"321\",\n      \"name\": \"Money\",\n      \"amount\": 300\n    }\n  ]\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/schemes?username=Username","urlObject":{"protocol":"http","port":"8080","path":["api","schemes"],"host":["localhost"],"query":[{"key":"username","value":"Username"}],"variable":[]}},"response":[{"id":"775aae33-f0a7-412d-978e-c9f1a66f4c6c","name":"200","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"123456ABC","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"id\": \"25\",\n  \"name\": \"Scheme for unemployed without children\",\n  \"criteria\": {\n    \"employment_status\": \"unemployed\",\n    \"has_children\": \"false\"\n  },\n  \"benefits\": [\n    {\n      \"id\": \"100\",\n      \"name\": \"Money\",\n      \"amount\": 300\n    }\n  ]\n}\n","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:8080/api/schemes?username=john","protocol":"http","host":["localhost"],"port":"8080","path":["api","schemes"],"query":[{"key":"username","value":"john"}]}},"status":"OK","code":200,"_postman_previewlanguage":"plain","header":[{"key":"Date","value":"Sat, 07 Sep 2024 16:26:07 GMT"},{"key":"Content-Length","value":"205"},{"key":"Content-Type","value":"text/plain; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\"Code\":200,\"Scheme\":{\"id\":\"25\",\"name\":\"Scheme for unemployed without children\",\"criteria\":{\"employment_status\":\"unemployed\",\"has_children\":\"false\"},\"benefits\":[{\"id\":\"100\",\"name\":\"Money\",\"amount\":300}]}}\n"},{"id":"921d7212-a204-48ce-9083-c328fba61774","name":"400","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"123456ABC","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"id\": \"25\",\n  \"name\": \"Scheme for unemployed without children\",\n  \"criteria\": {\n    \"employment_status\": \"unemployed\",\n    \"has_children\": \"false\"\n  },\n  \"benefits\": [\n    {\n      \"id\": \"100\",\n      \"name\": \"Money\",\n      \"amount\": 300\n    }\n  ]\n}\n","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:8080/api/schemes?username=john","protocol":"http","host":["localhost"],"port":"8080","path":["api","schemes"],"query":[{"key":"username","value":"john"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Date","value":"Mon, 09 Sep 2024 14:10:49 GMT"},{"key":"Content-Length","value":"47"}],"cookie":[],"responseTime":null,"body":"{\n    \"Code\": 400,\n    \"Message\": \"scheme already exists\"\n}"}],"_postman_id":"c0817455-5a53-409a-8e49-45bcd62ff094"},{"name":"Create 1 Application","id":"7d07bad4-f56e-4d19-aefe-086280bb4a9c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"User Password","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"id\": \"10\",\n  \"applicant_id\": \"2\",\n  \"scheme_id\": \"1\",\n  \"status\": \"Success\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/applications?username=Username","urlObject":{"protocol":"http","port":"8080","path":["api","applications"],"host":["localhost"],"query":[{"key":"username","value":"Username"}],"variable":[]}},"response":[{"id":"03fffde7-5e8e-4d52-b30a-844029759b39","name":"200","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"123456ABC","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"id\": \"11\",\n  \"applicant_id\": \"2\",\n  \"scheme_id\": \"1\",\n  \"status\": \"Success\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:8080/api/applications?username=john","protocol":"http","host":["localhost"],"port":"8080","path":["api","applications"],"query":[{"key":"username","value":"john"}]}},"status":"OK","code":200,"_postman_previewlanguage":"plain","header":[{"key":"Date","value":"Sat, 07 Sep 2024 16:26:14 GMT"},{"key":"Content-Length","value":"93"},{"key":"Content-Type","value":"text/plain; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\"Code\":200,\"Application\":{\"id\":\"11\",\"applicant_id\":\"2\",\"scheme_id\":\"1\",\"status\":\"Success\"}}\n"},{"id":"b2a7fec1-fe4e-4733-8705-d50bca1bf860","name":"400","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"123456ABC","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"id\": \"11\",\n  \"applicant_id\": \"2\",\n  \"scheme_id\": \"1\",\n  \"status\": \"Success\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:8080/api/applications?username=john","protocol":"http","host":["localhost"],"port":"8080","path":["api","applications"],"query":[{"key":"username","value":"john"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Date","value":"Mon, 09 Sep 2024 14:10:57 GMT"},{"key":"Content-Length","value":"52"}],"cookie":[],"responseTime":null,"body":"{\n    \"Code\": 400,\n    \"Message\": \"application already exists\"\n}"}],"_postman_id":"7d07bad4-f56e-4d19-aefe-086280bb4a9c"},{"name":"Get Eligible Schemes by Applicant","id":"18d7c6e2-9161-4032-bb87-9054f517a8a3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"User Password","type":"text"}],"url":"http://localhost:8080/api/schemes/eligible?username=Username&applicant=<applicant id>","urlObject":{"protocol":"http","port":"8080","path":["api","schemes","eligible"],"host":["localhost"],"query":[{"key":"username","value":"Username"},{"key":"applicant","value":"<applicant id>"}],"variable":[]}},"response":[{"id":"c02490c8-f6d0-4c60-a381-65cf5894a676","name":"200","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"123456ABC","type":"text"}],"url":{"raw":"http://localhost:8080/api/schemes/eligible?username=john&applicant=1","protocol":"http","host":["localhost"],"port":"8080","path":["api","schemes","eligible"],"query":[{"key":"username","value":"john"},{"key":"applicant","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"plain","header":[{"key":"Date","value":"Sat, 07 Sep 2024 16:26:18 GMT"},{"key":"Content-Length","value":"235"},{"key":"Content-Type","value":"text/plain; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\"Code\":200,\"Schemes\":[{\"id\":\"1\",\"name\":\"Retrenchment Assistance Scheme\",\"criteria\":{\"employment_status\":\"unemployed\"},\"benefits\":[{\"id\":\"1\",\"name\":\"SkillsFuture Credits\",\"amount\":500},{\"id\":\"2\",\"name\":\"CDC Vouchers\",\"amount\":100}]}]}\n"},{"id":"63777d26-b1a6-4f42-b498-029949cbe1c6","name":"400","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"123456AB","type":"text"}],"url":{"raw":"http://localhost:8080/api/schemes/eligible?username=john&applicant=1","protocol":"http","host":["localhost"],"port":"8080","path":["api","schemes","eligible"],"query":[{"key":"username","value":"john"},{"key":"applicant","value":"1"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Date","value":"Mon, 09 Sep 2024 14:10:18 GMT"},{"key":"Content-Length","value":"52"}],"cookie":[],"responseTime":null,"body":"{\n    \"Code\": 400,\n    \"Message\": \"Invalid username or token.\"\n}"}],"_postman_id":"18d7c6e2-9161-4032-bb87-9054f517a8a3"}],"event":[{"listen":"prerequest","script":{"id":"b67a8839-21af-4d79-a3bd-3bee61f15197","type":"text/javascript","packages":{},"exec":[""]}},{"listen":"test","script":{"id":"0a42e5d6-1bb6-4e16-89d7-dde530ce19a3","type":"text/javascript","packages":{},"exec":[""]}}]}