{"info":{"_postman_id":"1aeca841-1109-43cd-bc41-6e0ab647559a","name":"CourseFlow Public REST API","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"11113117","collectionId":"1aeca841-1109-43cd-bc41-6e0ab647559a","publishedId":"2s93eYVXgy","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-05-08T11:09:34.000Z"},"item":[{"name":"Authentication","item":[{"name":"Get Temporary Handshake","id":"826b66dc-d0bf-4500-bc8e-b162c6d3a6cf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"eu1.course-flow.com/api/?apikey={{apikey}}&apisecret={{apisecret}}&action=getTempHandshake","description":"<p>Get a temporary handshake to be able to perform actions</p>\n","urlObject":{"path":["api",""],"host":["eu1","course-flow","com"],"query":[{"key":"apikey","value":"{{apikey}}"},{"key":"apisecret","value":"{{apisecret}}"},{"key":"action","value":"getTempHandshake"}],"variable":[]}},"response":[],"_postman_id":"826b66dc-d0bf-4500-bc8e-b162c6d3a6cf"}],"id":"7458601e-cf23-47d9-bf53-809696a80ba2","description":"<p>For some of our API actions you need this extra handshake, but most of them will work without this handshake.</p>\n","_postman_id":"7458601e-cf23-47d9-bf53-809696a80ba2"},{"name":"Discountcodes","item":[{"name":"Make New Discount Code","id":"8a24e1f6-cd1b-4c38-b0b6-59eaf35976e2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://eu1.course-flow.com/api/?apikey={{apikey}}&apisecret={{apisecret}}&action=createDiscountCode&flowID=6334&amount=150&discountType=percentage&timesToUse=99&live=true","description":"<p>Do you need instant discount codes? Use this endpoint to create discount codes. Make sure you use identical discount codes.</p>\n","urlObject":{"protocol":"https","path":["api",""],"host":["eu1","course-flow","com"],"query":[{"description":{"content":"<p>Jouw API code</p>\n","type":"text/plain"},"key":"apikey","value":"{{apikey}}"},{"description":{"content":"<p>Jouw API secret code</p>\n","type":"text/plain"},"key":"apisecret","value":"{{apisecret}}"},{"key":"action","value":"createDiscountCode"},{"key":"flowID","value":"6334"},{"key":"amount","value":"150"},{"key":"discountType","value":"percentage"},{"key":"timesToUse","value":"99"},{"key":"live","value":"true"}],"variable":[]}},"response":[{"id":"10269750-d2cf-495c-82d1-5c6b2e5e58a3","name":"Get Discount Code - Succesfull","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://eu1.course-flow.com/api/?apikey={{apikey}}&apisecret={{apisecret}}&action=createDiscountCode&flowID=***FLOWID***&amount=50&discountType=percentage&timesToUse=1&live=true","protocol":"https","host":["eu1","course-flow","com"],"path":["api",""],"query":[{"key":"apikey","value":"{{apikey}}"},{"key":"apisecret","value":"{{apisecret}}"},{"key":"action","value":"createDiscountCode"},{"key":"flowID","value":"***FLOWID***"},{"key":"amount","value":"50"},{"key":"discountType","value":"percentage"},{"key":"timesToUse","value":"1"},{"key":"live","value":"true"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": false,\n    \"message\": \"Discountcode created succesfully\",\n    \"discountCode\": \"630bbf24e60a5\"\n}"},{"id":"2c6425f0-94dc-41d6-ab79-e9e25855b7b1","name":"Get Discount Code - Error","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://eu1.course-flow.com/api/?apikey={{apikey}}&apisecret={{apisecret}}&action=createDiscountCode&flowID=***FLOWID***&amount=150&discountType=percentage&timesToUse=1&live=true","protocol":"https","host":["eu1","course-flow","com"],"path":["api",""],"query":[{"key":"apikey","value":"{{apikey}}"},{"key":"apisecret","value":"{{apisecret}}"},{"key":"action","value":"createDiscountCode"},{"key":"flowID","value":"***FLOWID***"},{"key":"amount","value":"150"},{"key":"discountType","value":"percentage"},{"key":"timesToUse","value":"1"},{"key":"live","value":"true"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": true,\n    \"message\": [\n        \"Percentage is over 100\"\n    ],\n    \"discountCode\": \"\"\n}"}],"_postman_id":"8a24e1f6-cd1b-4c38-b0b6-59eaf35976e2"}],"id":"995942c8-e1cc-4aab-9233-70220c84b418","_postman_id":"995942c8-e1cc-4aab-9233-70220c84b418","description":""},{"name":"Flows","item":[{"name":"Get Flows and Subscribers","id":"bf7bac45-9019-4c23-8038-f907f503aedc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://dev.courseflow.nl/api/?apikey={{apikey}}&apisecret={{apisecret}}&action=getFlowsAndNumberSubscribers","description":"<p>Use this endpoint to fetch all your current flows and the number of subscribers you have</p>\n","urlObject":{"protocol":"http","path":["api",""],"host":["dev","courseflow","nl"],"query":[{"description":{"content":"<p>Jouw API code</p>\n","type":"text/plain"},"key":"apikey","value":"{{apikey}}"},{"description":{"content":"<p>Jouw API secret code</p>\n","type":"text/plain"},"key":"apisecret","value":"{{apisecret}}"},{"key":"action","value":"getFlowsAndNumberSubscribers"}],"variable":[]}},"response":[{"id":"87ae10d9-c478-403d-a20d-687a7697cc77","name":"Get Flows and Subscribers","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://test.courseflow.nl/api/?apikey={{apikey}}&apisecret={{apisecret}}&action=getFlowsAndNumberSubscribers","protocol":"https","host":["test","courseflow","nl"],"path":["api",""],"query":[{"key":"apikey","value":"{{apikey}}","description":"Jouw API code"},{"key":"apisecret","value":"{{apisecret}}","description":"Jouw API secret code"},{"key":"action","value":"getFlowsAndNumberSubscribers"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"access-control-allow-origin","value":"*"},{"key":"cache-control","value":"no-cache, must-revalidate"},{"key":"expires","value":"Mon, 26 Jul 1997 05:00:00 GMT"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"X-Cloud-Trace-Context","value":"4dd2e0e1a2e098864ef26e23a712c4ce;o=1"},{"key":"Date","value":"Mon, 08 May 2023 10:27:26 GMT"},{"key":"Server","value":"Google Frontend"},{"key":"Content-Length","value":"2626"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"ID\": 12345,\n        \"post_title\": \"Test Course\",\n        \"post_status\": \"publish\",\n        \"numUsers\": \"40\"\n    },\n    {\n        \"ID\": 12346,\n        \"post_title\": \"Brand new course\",\n        \"post_status\": \"publish\",\n        \"numUsers\": \"9\"\n    },\n]"}],"_postman_id":"bf7bac45-9019-4c23-8038-f907f503aedc"},{"name":"Get Subscribers and progress of specific flow","id":"a71b576b-9ee6-4506-807a-008ff41b33ea","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://eu1.course-flow.com/api/?apikey={{apikey}}&apisecret={{apisecret}}&action=getFlowProgress&flowid={{flowid}}","description":"<p>With this endpoint you can fetch all accounts that are subscribed to a specific flow</p>\n","urlObject":{"protocol":"https","path":["api",""],"host":["eu1","course-flow","com"],"query":[{"description":{"content":"<p>Jouw API code</p>\n","type":"text/plain"},"key":"apikey","value":"{{apikey}}"},{"description":{"content":"<p>Jouw API secret code</p>\n","type":"text/plain"},"key":"apisecret","value":"{{apisecret}}"},{"key":"action","value":"getFlowProgress"},{"description":{"content":"<p>Het flownummer waarvan je de details wilt opvragen</p>\n","type":"text/plain"},"key":"flowid","value":"{{flowid}}"}],"variable":[]}},"response":[{"id":"3cb5d321-d0b7-4e7a-925b-f73a28011d8c","name":"Get Subscribers and progress - Success","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://eu1.course-flow.com/api/?apikey=***APIKEY***&apisecret=***APISECRET***&action=getFlowProgress&flowid=***flowid***","protocol":"https","host":["eu1","course-flow","com"],"path":["api",""],"query":[{"key":"apikey","value":"***APIKEY***","description":"Jouw API code"},{"key":"apisecret","value":"***APISECRET***","description":"Jouw API secret code"},{"key":"action","value":"getFlowProgress"},{"key":"flowid","value":"***flowid***"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 12 Sep 2022 17:26:49 GMT"},{"key":"Server","value":"Apache/2.4.46 (Unix) mod_fastcgi/mod_fastcgi-SNAP-0910052141 OpenSSL/1.0.2u mod_wsgi/3.5 Python/2.7.18"},{"key":"X-Powered-By","value":"PHP/7.4.21"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"text/html; charset=UTF-8"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"ID\": \"34556\",\n        \"user_email\": \"piet@pietersen.nl\",\n        \"percentage\": \"0\",\n        \"firstname\": \"Piet\",\n        \"lastname\": \"Pietersen\",\n        \"lastactive\": \"12-09-2022 16:23\",\n        \"subscribedate\": \"12-09-2022 16:23\",\n        \"startdate\": \"13-10-2022\"\n    },\n    {\n        \"ID\": \"34555\",\n        \"user_email\": \"jan@janssen.nl\",\n        \"percentage\": \"24\",\n        \"firstname\": \"Jan\",\n        \"lastname\": \"Janssen\",\n        \"lastactive\": \"15-09-2021 16:20\",\n        \"subscribedate\": \"12-09-2021 16:20\",\n        \"startdate\": \"13-09-2021\"\n    }\n]"}],"_postman_id":"a71b576b-9ee6-4506-807a-008ff41b33ea"},{"name":"Add new subscriber","id":"0108c890-a6bc-46bd-a20f-938929f3c7aa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"apikey","value":"{{apikey}}","type":"text"},{"key":"apisecret","value":"{{apisecret}}","type":"text"},{"key":"action","value":"addSubscriber","type":"text"},{"key":"flowid","value":"12345","type":"text","description":"<p>The flowid you want to subscribe the user to</p>\n"},{"key":"email","value":"john@doe.com","type":"text","description":"<p>email address of the (new) user</p>\n"},{"key":"firstname","value":"Joh","type":"text","description":"<p>Firstname</p>\n"},{"key":"lastname","value":"Doe","type":"text","description":"<p>Lastname</p>\n"},{"key":"password","value":"ASecureP@sSword!","type":"text","description":"<p>Custom Password</p>\n"},{"key":"handshake","value":"{{handshakeCode}}","type":"text","description":"<p>CourseFlow handshake code</p>\n"}]},"url":"https://dev.courseflow.nl/api/subscribers/","description":"<p>Subscribe a user (based on email address) on a flow</p>\n","urlObject":{"protocol":"https","path":["api","subscribers",""],"host":["dev","courseflow","nl"],"query":[],"variable":[]}},"response":[],"_postman_id":"0108c890-a6bc-46bd-a20f-938929f3c7aa"},{"name":"Unsubscribe User","id":"bd5dddf4-ade8-41e5-a6da-b9de06b0f0ee","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"apikey","value":"{{apikey}}","type":"text"},{"key":"apisecret","value":"{{apisecret}}","type":"text"},{"key":"action","value":"unsubscribeFromFlow","type":"text"},{"key":"flowid","value":"12345","type":"text","description":"<p>The flowid you want to subscribe the user to</p>\n"},{"key":"handshake","value":"{{handshakeCode}}","type":"text","description":"<p>CourseFlow handshake code</p>\n"},{"key":"userid","value":"123456","description":"<p>CourseFlow userid (optional if emailaddress is set)</p>\n","type":"text","uuid":"7ed9ddf0-e65e-4297-a4ef-cf5a65b819ed"},{"key":"email","value":"john@doe.com","description":"<p>Email address (optional if userid is set)</p>\n","type":"text","uuid":"9d9a89c5-132a-45c8-bbbb-90aa946d74c3"}]},"url":"https://dev.courseflow.nl/api/subscribers/","description":"<p>delete a user from a flow by either the userId or email address</p>\n","urlObject":{"protocol":"https","path":["api","subscribers",""],"host":["dev","courseflow","nl"],"query":[],"variable":[]}},"response":[],"_postman_id":"bd5dddf4-ade8-41e5-a6da-b9de06b0f0ee"}],"id":"7e048aa7-0994-4a91-bb80-74e8be741937","_postman_id":"7e048aa7-0994-4a91-bb80-74e8be741937","description":""},{"name":"User","item":[{"name":"Get user progress (flows)","id":"e435f181-d963-498d-b5b3-f866d32de67d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://eu1.course-flow.com/api/?apikey={{apikey}}&apisecret={{apisecret}}&action=getStudentProgressByEmail&email=john@doe.com","urlObject":{"protocol":"https","path":["api",""],"host":["eu1","course-flow","com"],"query":[{"key":"apikey","value":"{{apikey}}"},{"key":"apisecret","value":"{{apisecret}}"},{"key":"action","value":"getStudentProgressByEmail"},{"key":"email","value":"john@doe.com"}],"variable":[]}},"response":[],"_postman_id":"e435f181-d963-498d-b5b3-f866d32de67d"}],"id":"bc964011-df5b-4649-8d83-ba4eb9d627fb","_postman_id":"bc964011-df5b-4649-8d83-ba4eb9d627fb","description":""}]}