{"info":{"_postman_id":"4843ab81-86f3-4f30-9303-7ad477723c2c","name":"EuFMD-TOM","description":"<html><head></head><body><p>API's for the TOM Application</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"12674777","collectionId":"4843ab81-86f3-4f30-9303-7ad477723c2c","publishedId":"2s9XxvSu8t","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-08-01T12:04:28.000Z"},"item":[{"name":"Authentication","item":[{"name":"Login","id":"516bcca2-2065-41ec-b6f2-65d255ddd124","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"\",\n    \"password\": \"\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/auth/login","description":"<p>Login an existing user. takes in email and password and returns user details and token</p>\n","urlObject":{"path":["api","auth","login"],"host":["http://localhost:5000"],"query":[],"variable":[]}},"response":[],"_postman_id":"516bcca2-2065-41ec-b6f2-65d255ddd124"},{"name":"Get Profile","id":"c2975f52-92aa-4772-8d45-e3f6d555fc07","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-access-token","value":"{{token}}","type":"text"}],"url":"http://localhost:5000/api/auth/profile","description":"<p>Get profile of user</p>\n","urlObject":{"path":["api","auth","profile"],"host":["http://localhost:5000"],"query":[],"variable":[]}},"response":[],"_postman_id":"c2975f52-92aa-4772-8d45-e3f6d555fc07"},{"name":"Logout","id":"0d614817-38e6-4d2b-ab01-968fd78258ca","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"x-access-token","value":"{{token}}","type":"text"}],"url":"http://localhost:5000/api/auth/logout","description":"<p>User logout. sets the logout time of the user</p>\n","urlObject":{"path":["api","auth","logout"],"host":["http://localhost:5000"],"query":[],"variable":[]}},"response":[],"_postman_id":"0d614817-38e6-4d2b-ab01-968fd78258ca"}],"id":"cff573af-1046-46e0-9110-7a3abc554681","description":"<p>API's for authentication</p>\n","_postman_id":"cff573af-1046-46e0-9110-7a3abc554681"},{"name":"Users","item":[{"name":"Add Single User","id":"b5dee383-ca70-4347-8f30-916e7404530b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"x-access-token","value":"{{token}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"firstname\": \"Ama\",\n    \"lastname\": \"Red\",\n    \"email\": \"amared@gmail.com\",\n    \"position\": \"Central level government veterinarian\",\n    \"region\": \"Accra\"\n    }","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/users/add","description":"<p>Adds a single user to the database</p>\n","urlObject":{"path":["api","users","add"],"host":["http://localhost:5000"],"query":[],"variable":[]}},"response":[],"_postman_id":"b5dee383-ca70-4347-8f30-916e7404530b"},{"name":"Add Multiple Users","id":"a12fd583-9a22-4a92-b073-370eebd68c4d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"x-access-token","value":"{{token}}","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/users/add-multiple","description":"<p>Uses a csv file to upload user information.</p>\n","urlObject":{"path":["api","users","add-multiple"],"host":["http://localhost:5000"],"query":[],"variable":[]}},"response":[],"_postman_id":"a12fd583-9a22-4a92-b073-370eebd68c4d"},{"name":"Get All Learners","id":"e998302b-d4c2-4437-8625-4737d19f2c52","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-access-token","value":"{{token}}","type":"text"}],"url":"http://localhost:5000/api/users/","description":"<p>Get details of all learners in a country. Includes country manager.</p>\n","urlObject":{"path":["api","users",""],"host":["http://localhost:5000"],"query":[],"variable":[]}},"response":[],"_postman_id":"e998302b-d4c2-4437-8625-4737d19f2c52"},{"name":"Get users by country","id":"49dde583-10cf-494f-990e-89df3a95b0c5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:5000/api/users/by-country","urlObject":{"path":["api","users","by-country"],"host":["http://localhost:5000"],"query":[],"variable":[]}},"response":[],"_postman_id":"49dde583-10cf-494f-990e-89df3a95b0c5"},{"name":"Get Details of One User","id":"3bbdeefc-f1e1-4710-b9c1-f9dd395987b1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-access-token","value":"{{token}}","type":"text"}],"url":"http://localhost:5000/api/users/:id","urlObject":{"path":["api","users",":id"],"host":["http://localhost:5000"],"query":[],"variable":[{"id":"fec0afa9-5271-420d-be38-ee5e502e8772","type":"any","value":"300","key":"id"}]}},"response":[],"_postman_id":"3bbdeefc-f1e1-4710-b9c1-f9dd395987b1"},{"name":"Accept Privacy Policy","id":"177d5a5d-d24d-412a-af66-a2305f8cfd22","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"x-access-token","value":"{{token}}","type":"text"}],"url":"http://localhost:5000/api/users/accept/:id","urlObject":{"path":["api","users","accept",":id"],"host":["http://localhost:5000"],"query":[],"variable":[{"type":"any","value":null,"key":"id"}]}},"response":[],"_postman_id":"177d5a5d-d24d-412a-af66-a2305f8cfd22"},{"name":"Check User Privacy Policy","id":"00aaed03-a7d7-4baa-a5e4-5194a5eec3f5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-access-token","value":"{{token}}","type":"text"}],"url":"http://localhost:5000/api/users/policy/:id","description":"<p>Checks if the privacy policy for a particular user has been accepted.</p>\n","urlObject":{"path":["api","users","policy",":id"],"host":["http://localhost:5000"],"query":[],"variable":[{"type":"any","value":null,"key":"id"}]}},"response":[],"_postman_id":"00aaed03-a7d7-4baa-a5e4-5194a5eec3f5"},{"name":"Add Region","id":"0a44ec08-2167-4584-8485-42d8b7610d30","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"x-access-token","value":"{{token}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"region\": \"Region Name\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/users/addRegion","description":"<p>Update region information for a user</p>\n","urlObject":{"path":["api","users","addRegion"],"host":["http://localhost:5000"],"query":[],"variable":[]}},"response":[],"_postman_id":"0a44ec08-2167-4584-8485-42d8b7610d30"}],"id":"1e35820f-d2c3-4d22-8ec6-b4aa3bb1dfe0","description":"<p>API's for user related transactions.</p>\n","_postman_id":"1e35820f-d2c3-4d22-8ec6-b4aa3bb1dfe0"},{"name":"Competencies","item":[{"name":"Get Competencies by Country","id":"6f714069-5329-4937-a9d1-a67fd167f7be","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-access-token","value":"{{token}}","type":"text"}],"url":"http://localhost:5000/api/competencies/","urlObject":{"path":["api","competencies",""],"host":["http://localhost:5000"],"query":[],"variable":[]}},"response":[],"_postman_id":"6f714069-5329-4937-a9d1-a67fd167f7be"},{"name":"Change Competency Level of Learners","id":"13b84d33-13a3-4925-9558-91fc921b7ef8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"x-access-token","value":"{{token}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"learners\": \"\", //array of learners\n    \"level\": \"\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/competencies/:id","urlObject":{"path":["api","competencies",":id"],"host":["http://localhost:5000"],"query":[],"variable":[{"description":{"content":"<p>competency id</p>\n","type":"text/plain"},"type":"any","value":null,"key":"id"}]}},"response":[],"_postman_id":"13b84d33-13a3-4925-9558-91fc921b7ef8"}],"id":"48993eb1-4d31-4dc4-a544-6d3356d5f2b4","description":"<p>All API's relating to the competencies</p>\n","_postman_id":"48993eb1-4d31-4dc4-a544-6d3356d5f2b4"},{"name":"Courses","item":[{"name":"Get Courses","id":"cdeec339-cce4-43ce-8a0f-68cfe94f77ca","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-access-token","value":"{{token}}","type":"text"}],"url":"http://localhost:5000/api/courses","urlObject":{"path":["api","courses"],"host":["http://localhost:5000"],"query":[],"variable":[]}},"response":[],"_postman_id":"cdeec339-cce4-43ce-8a0f-68cfe94f77ca"},{"name":"Enrolments in training by position","id":"4ec1e01c-e4ac-4f66-bfee-c1633c021b2a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-access-token","value":"{{token}}","type":"text"}],"url":"http://localhost:5000/api/courses/positions","urlObject":{"path":["api","courses","positions"],"host":["http://localhost:5000"],"query":[],"variable":[]}},"response":[],"_postman_id":"4ec1e01c-e4ac-4f66-bfee-c1633c021b2a"},{"name":"Enrolments by type of training","id":"db335acf-7692-41fe-9e30-aae8b452a2c1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-access-token","value":"{{token}}","type":"text"}],"url":"http://localhost:5000/api/courses/types/","urlObject":{"path":["api","courses","types",""],"host":["http://localhost:5000"],"query":[],"variable":[]}},"response":[],"_postman_id":"db335acf-7692-41fe-9e30-aae8b452a2c1"},{"name":"Completed Enrolments for CM Report","id":"3707f69c-e046-4e90-83ba-d78084b99b34","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-access-token","value":"{{token}}","type":"text"}],"url":"http://localhost:5000/api/courses/tailoredCourses","urlObject":{"path":["api","courses","tailoredCourses"],"host":["http://localhost:5000"],"query":[],"variable":[]}},"response":[],"_postman_id":"3707f69c-e046-4e90-83ba-d78084b99b34"},{"name":"Get Count of tailored courses","id":"e3c5a5c6-27e5-4002-92df-d649ba08c7ad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-access-token","value":"{{token}}","type":"text"}],"url":"http://localhost:5000/api/courses/tailoredCoursesCount/","urlObject":{"path":["api","courses","tailoredCoursesCount",""],"host":["http://localhost:5000"],"query":[],"variable":[]}},"response":[],"_postman_id":"e3c5a5c6-27e5-4002-92df-d649ba08c7ad"},{"name":"Completed Enrolments (by category) for CM report","id":"bf883cdb-a6ce-4fd2-bf39-018e83e51ac9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-access-token","value":"{{token}}","type":"text"}],"url":"http://localhost:5000/api/courses/courseReport/:category","urlObject":{"path":["api","courses","courseReport",":category"],"host":["http://localhost:5000"],"query":[],"variable":[{"type":"any","value":null,"key":"category"}]}},"response":[],"_postman_id":"bf883cdb-a6ce-4fd2-bf39-018e83e51ac9"},{"name":"Completed Enrolments for CM report","id":"b5cda7b6-1759-4a98-b4b6-e24f92585616","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:5000/api/courses/courseReport/","urlObject":{"path":["api","courses","courseReport",""],"host":["http://localhost:5000"],"query":[],"variable":[]}},"response":[],"_postman_id":"b5cda7b6-1759-4a98-b4b6-e24f92585616"},{"name":"Add New Course","id":"a0eea992-1790-43a0-bc75-fe8b0d4fece6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"x-access-token","value":"{{token}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"course\": \"course name\",\n    \"category\": \"category_id\" //it picks the id from the list of category names\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/courses/add","urlObject":{"path":["api","courses","add"],"host":["http://localhost:5000"],"query":[],"variable":[]}},"response":[],"_postman_id":"a0eea992-1790-43a0-bc75-fe8b0d4fece6"},{"name":"Get All Courses","id":"ee3c368b-5041-44cf-987f-41f8bafd4ff2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-access-token","value":"{{token}}","type":"text"}],"url":"http://localhost:5000/api/courses/all","urlObject":{"path":["api","courses","all"],"host":["http://localhost:5000"],"query":[],"variable":[]}},"response":[],"_postman_id":"ee3c368b-5041-44cf-987f-41f8bafd4ff2"},{"name":"Get courses by country","id":"8613bdb6-115f-4e92-88fb-33239032a4d4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-access-token","value":"{{token}}","type":"text"}],"url":"http://localhost:5000/api/courses/country","urlObject":{"path":["api","courses","country"],"host":["http://localhost:5000"],"query":[],"variable":[]}},"response":[],"_postman_id":"8613bdb6-115f-4e92-88fb-33239032a4d4"}],"id":"8b362547-9a67-425b-9fbd-5b1ffe5e091d","_postman_id":"8b362547-9a67-425b-9fbd-5b1ffe5e091d","description":""},{"name":"Course Categories","item":[{"name":"Get all course categories","id":"9c983178-8f5c-4d90-b674-d958e5bac9d9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-access-token","value":"{{token}}","type":"text"}],"url":"http://localhost:5000/api/course_categories","urlObject":{"path":["api","course_categories"],"host":["http://localhost:5000"],"query":[],"variable":[]}},"response":[],"_postman_id":"9c983178-8f5c-4d90-b674-d958e5bac9d9"}],"id":"ab1bf769-501e-42af-915b-eacc3a558981","_postman_id":"ab1bf769-501e-42af-915b-eacc3a558981","description":""},{"name":"Geoloc","item":[{"name":"get states","id":"660fc12c-7249-450f-930f-53eb1b8e2da2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"country\": \"Switzerland\"\n}","options":{"raw":{"language":"json"}}},"url":"https://countriesnow.space/api/v0.1/countries/states","urlObject":{"protocol":"https","path":["api","v0.1","countries","states"],"host":["countriesnow","space"],"query":[],"variable":[]}},"response":[],"_postman_id":"660fc12c-7249-450f-930f-53eb1b8e2da2"},{"name":"Get Country Cities - external api","id":"bf878690-6c05-49b8-8d60-cf8cb8ed2624","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"country\": \"Spain\"\n}","options":{"raw":{"language":"json"}}},"url":"https://countriesnow.space/api/v0.1/countries/cities","urlObject":{"protocol":"https","path":["api","v0.1","countries","cities"],"host":["countriesnow","space"],"query":[],"variable":[]}},"response":[],"_postman_id":"bf878690-6c05-49b8-8d60-cf8cb8ed2624"},{"name":"geocoding","id":"3f5f965f-4d37-45d5-a4bf-774584c607ac","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://api.positionstack.com/v1/forward?access_key=3d64a35bd034d68caa625898b0773cae&query=bern","urlObject":{"protocol":"http","path":["v1","forward"],"host":["api","positionstack","com"],"query":[{"key":"access_key","value":"3d64a35bd034d68caa625898b0773cae"},{"key":"query","value":"bern"}],"variable":[]}},"response":[],"_postman_id":"3f5f965f-4d37-45d5-a4bf-774584c607ac"}],"id":"4f22317f-9a41-4921-aa23-edfd206aab08","_postman_id":"4f22317f-9a41-4921-aa23-edfd206aab08","description":""},{"name":"get training credits for country","id":"2a5c72f1-7088-453d-a45e-18f7cb4c4017","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-access-token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoyMjc4LCJ1c2VyX3JvbGUiOjQsImNvdW50cnlfaWQiOjIsImlhdCI6MTcwMDU2NzcyNX0.ROiFm1aqQP8DU9LEuCl3_jBDXVFJtDLRYnI8cNfm9ZI","type":"text"}],"url":"http://localhost:5000/api/training_credits/credits","urlObject":{"protocol":"http","port":"5000","path":["api","training_credits","credits"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"2a5c72f1-7088-453d-a45e-18f7cb4c4017"}],"variable":[{"key":"base_url","value":"http://localhost:5000"}]}