{"info":{"_postman_id":"6690ea05-8971-446d-823e-e4cf65a39ecf","name":"Embedded PreVisit API","description":"<html><head></head><body><p>Given an OAuth 2 application authorized with Client Credentials, and an Athena <code>appointment_id</code> and <code>department_id</code>, a third party application can embed Epion’s PreVisit workflow with customized UI within their apps, by:</p>\n<ul>\n<li>Getting an Access Token</li>\n<li>Sending it alongside the Athena ids to get a signed URL</li>\n<li>Redirecting patient to the signed URL to get a session cookie</li>\n</ul>\n<h2 id=\"rate-limiting\">Rate limiting</h2>\n<p>The API allows up to 20 connections per second (1,200 per minute). Above that, it responds with a 429 Too Many Requests error, including a <code>retry-after</code> HTTP header to inform clients.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"12947242","collectionId":"6690ea05-8971-446d-823e-e4cf65a39ecf","publishedId":"TVReeAuE","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-11-10T16:27:14.000Z"},"item":[{"name":"OAuth 2 Client Credentials flow","item":[{"name":"/oauth/token","event":[{"listen":"test","script":{"id":"e48f2936-f63d-40fe-96a0-0364eb5f4e8d","exec":["tests[\"Status code is 200 Created\"] = responseCode.code === 200;","","if (responseCode.code === 200)","{","    var data = JSON.parse(responseBody);","        postman.setEnvironmentVariable(\"access_token\", data.access_token);    ","      tests[\"token successfully set \" + data.access_token] = true;","}",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"d1b77655-ab64-49fa-84ef-2bd5f7310fad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":""},"url":"{{base_path}}/oauth/token?client_id={{oauth2_client_id}}&client_secret={{oauth2_client_secret}}&grant_type=client_credentials","urlObject":{"path":["oauth","token"],"host":["{{base_path}}"],"query":[{"key":"client_id","value":"{{oauth2_client_id}}"},{"key":"client_secret","value":"{{oauth2_client_secret}}"},{"key":"grant_type","value":"client_credentials"}],"variable":[]}},"response":[{"id":"80da0615-4d16-4ca7-a67e-011021b5c151","name":"Valid Credentials","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":""},"url":{"raw":"{{base_path}}/oauth/token?client_id={{oauth2_client_id}}&client_secret={{oauth2_client_secret}}&grant_type=client_credentials","host":["{{base_path}}"],"path":["oauth","token"],"query":[{"key":"client_id","value":"{{oauth2_client_id}}"},{"key":"client_secret","value":"{{oauth2_client_secret}}"},{"key":"grant_type","value":"client_credentials"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 05 Nov 2020 21:07:03 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"nginx"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Cache-Control","value":"private, no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Content-Encoding","value":"gzip"},{"key":"ETag","value":"W/\"115a1ee8b98eebd6193c7169e6531dd2\""},{"key":"Set-Cookie","value":"_patient-check-in_session=NqC9QgM1i52P2k6ehP27wPx0SJgYkrYANHTtwVqP1xve0fG6WTFOCeRW6XfNFTXoPVXYr1HtlViuy8EEhMRJksFggOuSqhDboK4Ag69FkwqXsxnO2eMBQf4d4zzTj0nnz8dOPOyBdi3Qry%2BsVAi3jmEy5zn1wA6DusbzuDmEHdNsXtJJn6FpOFv4ISOihK6F4VZ8yoGxuhfLMASEHiynHQD42vpx1jHF3doWsgihXZ3IvB3RYr1AHDondAZt2%2Bs7bTvjgZO1rhukJiBheSiyIesYMKWHsEieYFw2rZipBe%2FyEYZMfORFss%2F%2FvR7B3Xs%3D--yEw9cHsEz%2FnyEN24--YNnlaU40EbetvUyFc5cWyA%3D%3D; path=/; expires=Thu, 05 Nov 2020 21:37:03 GMT; secure; HttpOnly"},{"key":"X-Request-Id","value":"1f232fc7-2357-400c-b42f-559df4954faa"},{"key":"X-Runtime","value":"0.028330"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"}],"cookie":[],"responseTime":null,"body":"{\n    \"access_token\": \"bGC3NqQnos59gofA_Xji3DutQ8RbyGIthEz_JlzzAd0\",\n    \"token_type\": \"Bearer\",\n    \"expires_in\": 7200,\n    \"scope\": \"write\",\n    \"created_at\": 1604610423\n}"}],"_postman_id":"d1b77655-ab64-49fa-84ef-2bd5f7310fad"}],"id":"0e09180d-bbe5-4a1d-bb81-ecb9c6fe8c8b","description":"<p>Authenicate your application with the Epion API. Requires credentials provided by Epion, the credentials below are just examples.</p>\n","event":[{"listen":"prerequest","script":{"id":"25b18998-23bc-420a-87bc-3381fa05dc4d","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"e6d8d445-b128-4438-a053-a64454c545c3","type":"text/javascript","exec":[""]}}],"_postman_id":"0e09180d-bbe5-4a1d-bb81-ecb9c6fe8c8b"},{"name":"Get PreVisit Session URL","item":[{"name":"/api/v1/previsit/session","event":[{"listen":"test","script":{"id":"513d1805-8927-4ec8-a39f-d4050ba8d888","exec":["tests[\"Status code is 200 Created\"] = responseCode.code === 200;","","if (responseCode.code === 200)","{","    var data = JSON.parse(responseBody);","    postman.setEnvironmentVariable(\"next_step_url\", data.next_step_url);    ","    tests[\"previsit link = \" + data.next_step_url] = true;","}"],"type":"text/javascript","packages":{}}}],"id":"06ebbb56-f485-41c7-beac-3361f4ea590f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"token":"{{access_token}}"},"isInherited":false},"method":"POST","header":[],"url":"{{base_path}}/api/v1/previsit/session?appointment_id=1123549&department_id={{department}}&api_redirect_uri=https://www.epionhealth.com/","description":"<p>You can use the <code>api_redirect_uri</code> parameter to redirect back to your application once the PreVisit is completed.</p>\n","urlObject":{"path":["api","v1","previsit","session"],"host":["{{base_path}}"],"query":[{"key":"appointment_id","value":"1123549"},{"key":"department_id","value":"{{department}}"},{"description":{"content":"<p>This parameter is optional</p>\n","type":"text/plain"},"key":"api_redirect_uri","value":"https://www.epionhealth.com/"}],"variable":[]}},"response":[{"id":"50927264-7f9f-4eec-829f-0c2e702e5a15","name":"Start a PreVisit session + api redirect uri","originalRequest":{"method":"POST","header":[],"url":{"raw":"{{base_path}}/api/v1/previsit/session?appointment_id=408922&department_id=165&api_redirect_uri=https://www.epionhealth.com/","host":["{{base_path}}"],"path":["api","v1","previsit","session"],"query":[{"key":"appointment_id","value":"408922"},{"key":"department_id","value":"165"},{"key":"api_redirect_uri","value":"https://www.epionhealth.com/"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 05 Nov 2020 21:09:04 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"nginx"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Content-Encoding","value":"gzip"},{"key":"ETag","value":"W/\"38914231885fb872371cc7d78c32f86e\""},{"key":"Cache-Control","value":"max-age=0, private, must-revalidate"},{"key":"Set-Cookie","value":"_patient-check-in_session=AGrCq68jnAs4RiSyfu2NEvJeAe7S5DQj6kAozSdu%2B0O24UA8ehFsDcoKfb1SmaaLpFkz%2BMnEaFzw36qVyE2iDuzH3yoloLOI0zHw5hxAeQpSf%2BK1ztonXec%2BNENKsJZRVgGJOn92fUjBKzrSk%2FV4buK5qoGTba5NDfg1bd3eE4FKJrAu16UEr7qnamkbM99hhxzPVawVZsadEWC8LxKZiOZ%2FE8llIboLprJjUk3V0G5UoQu5P4Cb5T%2BnInRdGGwt3%2FAmiEPYIoY%2FyUdjVbDF724H6PMudbcR2n1w29ilQHSPER%2F3oyNBlUjvZuWFqdY%3D--%2BVEetgTmV585Kt0L--qOzpR%2FJbt0wsq9E66LGBMQ%3D%3D; path=/; expires=Thu, 05 Nov 2020 21:39:04 GMT; secure; HttpOnly"},{"key":"X-Request-Id","value":"a24901a7-572b-4e27-9550-9089112743b8"},{"key":"X-Runtime","value":"0.365626"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"}],"cookie":[],"responseTime":null,"body":"{\n    \"next_step_url\": \"https://testing.epionhealth.com/api/v1/previsit/session/secured?t=eyJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7ImFwcHRfaWQiOiI0MDg5MjIiLCJ1cmkiOiJodHRwczovL3d3dy5lcGlvbmhlYWx0aC5jb20vIiwib2ZmaWNlX2lkIjoxMDh9LCJleHAiOjE2MDQ2MTA2MDR9.3a6g7wAFzeZEFhPANhZMOkN97bDQfF_KX0nIevCULR0\"\n}"}],"_postman_id":"06ebbb56-f485-41c7-beac-3361f4ea590f"}],"id":"19c55c31-dbb2-4b30-9089-4cd07e501a5c","description":"<p>Given <code>appointment_id</code> and <code>department_id</code>, it returns a URL with an expiring JSON Web Token (JWT). If you redirect the patient to that URL, they will be automatically authenticated into their PreVisit session.</p>\n","event":[{"listen":"prerequest","script":{"id":"6183669f-c337-4ef9-a457-6ca338b771e9","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"20cff183-1777-4f6d-8ad5-63899a723b8c","type":"text/javascript","exec":[""]}}],"_postman_id":"19c55c31-dbb2-4b30-9089-4cd07e501a5c"},{"name":"Start PreVisit Session","item":[{"name":"/api/v1/previsit/session/secured?t=TOKEN","event":[{"listen":"test","script":{"id":"660f1c30-fc45-4b86-8382-2d79f8c6ae8f","exec":["tests[\"Status code is 200 Created\"] = responseCode.code === 200;","","//if (responseCode.code === 200)","//{","//   if (respoBody.include(\"landing\")){","//        tests[\"landing page present \"] = true;","//    }","//}",""],"type":"text/javascript"}}],"id":"1d465e42-fe98-463d-9c3c-e8389805a4a5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"token":"{{access_token}}"},"isInherited":false},"method":"GET","header":[],"url":"{{next_step_url}}","urlObject":{"host":["{{next_step_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"1d465e42-fe98-463d-9c3c-e8389805a4a5"}],"id":"bd6f4156-d78a-4ce8-bff3-b1f30310fe71","description":"<p>Given the JSON Web Token (JWT) from the previous request, set the cookie for the patient and redirect to the first step of the PreVisit workflow.</p>\n","event":[{"listen":"prerequest","script":{"id":"21a50285-1b0e-48d1-b82b-436422b3fd05","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"1b47e5f5-56c6-44cf-a703-3bb3a60ca66d","type":"text/javascript","exec":[""]}}],"_postman_id":"bd6f4156-d78a-4ce8-bff3-b1f30310fe71"},{"name":"Query Appointment Status","item":[{"name":"/api/v1/previsit/session","event":[{"listen":"test","script":{"id":"3d7af0b9-495d-410a-b03e-230f5cea6e88","exec":["tests[\"Status code is 200 Created\"] = responseCode.code === 200;","","if (responseCode.code === 200)","{","    var data = JSON.parse(responseBody);","    if (data.appointment_status === \"f\"){","        tests[\"appointment status is FUTURE \"] = true;","    }","    if (data.appointment_status === \"2\"){","    tests[\"appointment status is CHECK-IN STARTED\"] = true;","    }","    if (data.appointment_status === \"3\"){","    tests[\"appointment status is CHECKED OUT\"] = true;","    }","}",""],"type":"text/javascript","packages":{}}}],"id":"5e35bf3e-8e55-4115-9bad-cc83b01c5fc8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"token":"{{access_token}}"},"isInherited":false},"method":"GET","header":[],"url":"{{base_path}}/api/v1/previsit/session?appointment_id=1123549&department_id={{department}}","urlObject":{"path":["api","v1","previsit","session"],"host":["{{base_path}}"],"query":[{"key":"appointment_id","value":"1123549"},{"key":"department_id","value":"{{department}}"}],"variable":[]}},"response":[{"id":"b14f7477-dae7-4720-a916-971f47752b0f","name":"Valid IDs","originalRequest":{"method":"GET","header":[],"url":{"raw":"{{base_path}}/api/v1/previsit/session?appointment_id=408922&department_id=165","host":["{{base_path}}"],"path":["api","v1","previsit","session"],"query":[{"key":"appointment_id","value":"408922"},{"key":"department_id","value":"165"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 05 Nov 2020 21:07:54 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"nginx"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Content-Encoding","value":"gzip"},{"key":"ETag","value":"W/\"7aae38bd2e32975c351f5937c8b43f6f\""},{"key":"Cache-Control","value":"max-age=0, private, must-revalidate"},{"key":"Set-Cookie","value":"_patient-check-in_session=qUfsjW8VImFV%2FOZgC0nvCQd%2B7ayV2exUfrczu7flvqCoGzDPzF%2BsxrLWeblM6MjtH27kmiAy%2B18Ea6yfcTC%2BQLwwJmobrQ2LX9HwfVgKYQgt5hpPb38LLZECcbQzbes%2B%2F%2BohkuGl19YvkHO%2B7oOt%2Fzqb45SLEkWkOCa7PWuLXox24FuMedcGKY6KhYGP5yN%2FnCFdhRHnFs84rLrscCTiNoW9%2FapBJ51DyEpRZw8WNZV2Rz41uB3p%2BqgGAmmtb3hV2Wx4%2B2JeY%2FmMC3QcLPiqzxgRcMQzMuz03sc%2BxAuIZus5zE7aTStbTW3uwf9zNec%3D--OL3cawN82%2FlMmggJ--lWp77YlISfpVF8ssUWbzPA%3D%3D; path=/; expires=Thu, 05 Nov 2020 21:37:54 GMT; secure; HttpOnly"},{"key":"X-Request-Id","value":"044b6860-717c-4c9f-9fc9-f3cf23563b13"},{"key":"X-Runtime","value":"0.433380"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"}],"cookie":[],"responseTime":null,"body":"{\n    \"appointment_id\": 408922,\n    \"appointment_start_time\": \"2020-08-18T23:59:00.000Z\",\n    \"appointment_status\": \"f\",\n    \"previsit_completed_at\": \"2020-09-02T15:51:52.965Z\",\n    \"previsit_id\": 99288\n}"}],"_postman_id":"5e35bf3e-8e55-4115-9bad-cc83b01c5fc8"}],"id":"3916ad23-07d4-4dff-9d97-7d80d42edd79","description":"<p>Given an <code>appointment_id</code> and <code>department_id</code>, returns the <code>appointment_status</code> and a <code>previsit_id</code>. You do not need to store or use the <code>previsit_id</code>, we include it for debugging purposes.</p>\n","event":[{"listen":"prerequest","script":{"id":"04833649-7dab-4512-adda-b732097e1e26","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"65ff41ce-c394-462b-a9c6-f7965b9f7b73","type":"text/javascript","exec":[""]}}],"_postman_id":"3916ad23-07d4-4dff-9d97-7d80d42edd79"},{"name":"Get Mobile Kiosk Session URL","item":[{"name":"api/v1/kiosk/session","event":[{"listen":"test","script":{"id":"c3eaa01c-88d1-49ee-9cd6-441c419c1936","exec":["tests[\"Status code is 200 Created\"] = responseCode.code === 200;","","if (responseCode.code === 200)","{","    var data = JSON.parse(responseBody);","    postman.setEnvironmentVariable(\"next_step_url\", data.next_step_url);    ","    tests[\"previsit link = \" + data.next_step_url] = true;","}"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"1a2ba999-00e4-44e2-9ec0-2d75158e57a4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"token":"{{access_token}}"},"isInherited":false},"method":"POST","header":[],"url":"{{base_path}}/api/v1/kiosk/session?department_id={{department}}&patient_id=26050&api_redirect_uri=https://www.epionhealth.com/&is_new_patient=true","description":"<p>You can use the <code>api_redirect_uri</code> parameter to redirect back to your application once the Kiosk session is completed.</p>\n","urlObject":{"path":["api","v1","kiosk","session"],"host":["{{base_path}}"],"query":[{"description":{"content":"<p>Athena id of intended department to initiate the session for (required)</p>\n","type":"text/plain"},"key":"department_id","value":"{{department}}"},{"description":{"content":"<p>Athena id of intended patient to initiate the session for (required)</p>\n","type":"text/plain"},"key":"patient_id","value":"26050"},{"description":{"content":"<p>Uri to redirect to once patient completes their Kiosk session. This parameter is optional.</p>\n","type":"text/plain"},"key":"api_redirect_uri","value":"https://www.epionhealth.com/"},{"key":"is_new_patient","value":"true"}],"variable":[]}},"response":[{"id":"26969b4c-8f61-4bfc-a8d4-e2d54dc37de5","name":"Start a Mobile Kiosk session + api redirect uri","originalRequest":{"method":"POST","header":[],"url":{"raw":"{{base_path}}/api/v1/kiosk/session?department_id=148&patient_id=26050&api_redirect_uri=https://www.epionhealth.com/","host":["{{base_path}}"],"path":["api","v1","kiosk","session"],"query":[{"key":"department_id","value":"148","description":"Athena id of intended department to initiate the session for (required)"},{"key":"patient_id","value":"26050","description":"Athena id of intended patient to initiate the session for (required)"},{"key":"api_redirect_uri","value":"https://www.epionhealth.com/","description":"uri to redirect to once patient completes their Kiosk session","type":"text"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"next_step_url\": \"https://testing.epionhealth.com/api/v1/kiosk/session/secured?t=eyJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InByZXZpc2l0X2lkIjoxMzF9LCJleHAiOjE2NTQ1NDgxMTB9.l1clbtfCjbsmLc1Qp24vWm7w--E1WdaTIsLS9eJW8U8\"\n}"}],"_postman_id":"1a2ba999-00e4-44e2-9ec0-2d75158e57a4"},{"name":"api/v1/kiosk/session Copy","event":[{"listen":"test","script":{"id":"c3eaa01c-88d1-49ee-9cd6-441c419c1936","exec":["tests[\"Status code is 200 Created\"] = responseCode.code === 200;","","if (responseCode.code === 200)","{","    var data = JSON.parse(responseBody);","    postman.setEnvironmentVariable(\"next_step_url\", data.next_step_url);    ","    tests[\"previsit link = \" + data.next_step_url] = true;","}"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"4bdec633-70a7-4e42-b9e9-2fec7d3ae9de","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"token":"{{access_token}}"},"isInherited":false},"method":"POST","header":[],"url":"{{base_path}}/api/v1/kiosk/session?department_id={{department}}&patient_id=87472&api_redirect_uri=https://www.epionhealth.com/&is_new_patient=true","description":"<p>You can use the <code>api_redirect_uri</code> parameter to redirect back to your application once the Kiosk session is completed.</p>\n","urlObject":{"path":["api","v1","kiosk","session"],"host":["{{base_path}}"],"query":[{"key":"department_id","value":"{{department}}"},{"key":"patient_id","value":"87472"},{"key":"api_redirect_uri","value":"https://www.epionhealth.com/"},{"key":"is_new_patient","value":"true"}],"variable":[]}},"response":[{"id":"e164f1d9-6b5b-44b4-90ab-2aaefd771b12","name":"Start a Mobile Kiosk session + api redirect uri","originalRequest":{"method":"POST","header":[],"url":{"raw":"{{base_path}}/api/v1/kiosk/session?department_id=148&patient_id=26050&api_redirect_uri=https://www.epionhealth.com/","host":["{{base_path}}"],"path":["api","v1","kiosk","session"],"query":[{"key":"department_id","value":"148","description":"Athena id of intended department to initiate the session for (required)"},{"key":"patient_id","value":"26050","description":"Athena id of intended patient to initiate the session for (required)"},{"key":"api_redirect_uri","value":"https://www.epionhealth.com/","description":"uri to redirect to once patient completes their Kiosk session","type":"text"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"next_step_url\": \"https://testing.epionhealth.com/api/v1/kiosk/session/secured?t=eyJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InByZXZpc2l0X2lkIjoxMzF9LCJleHAiOjE2NTQ1NDgxMTB9.l1clbtfCjbsmLc1Qp24vWm7w--E1WdaTIsLS9eJW8U8\"\n}"}],"_postman_id":"4bdec633-70a7-4e42-b9e9-2fec7d3ae9de"}],"id":"ac09f888-2391-48e4-9418-4e2576755727","description":"<p>Given <code>patient_id</code> and <code>department_id</code>, it returns a URL with an expiring JSON Web Token (JWT). If you redirect the patient to that URL, they will be automatically authenticated into their Mobile Kiosk session.</p>\n","_postman_id":"ac09f888-2391-48e4-9418-4e2576755727"},{"name":"Start Mobile Kiosk Session","item":[{"name":"/api/v1/kiosk/session/secured?t=TOKEN","event":[{"listen":"test","script":{"id":"660f1c30-fc45-4b86-8382-2d79f8c6ae8f","exec":["tests[\"Status code is 200 Created\"] = responseCode.code === 200;","","//if (responseCode.code === 200)","//{","//   if (respoBody.include(\"landing\")){","//        tests[\"landing page present \"] = true;","//    }","//}",""],"type":"text/javascript"}}],"id":"05b8cf65-41ee-4765-b5a3-8eacca09ed65","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"{{next_step_url}}","urlObject":{"host":["{{next_step_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"05b8cf65-41ee-4765-b5a3-8eacca09ed65"}],"id":"05977cf2-96f7-4ffa-92b9-e4fc92eea28f","description":"<p>Given the JSON Web Token (JWT) from the previous request, set the cookie for the patient and redirect to the first step of the Mobile Kiosk workflow.</p>\n","_postman_id":"05977cf2-96f7-4ffa-92b9-e4fc92eea28f"},{"name":"Get Virtual Registration Session URL","item":[{"name":"api/v1/virtual_registration/session","event":[{"listen":"test","script":{"id":"4143352f-e888-40da-ab17-b3438e681be0","exec":["tests[\"Status code is 200 Created\"] = responseCode.code === 200;","","if (responseCode.code === 200)","{","    var data = JSON.parse(responseBody);","    postman.setEnvironmentVariable(\"next_step_url\", data.next_step_url);    ","    tests[\"previsit link = \" + data.next_step_url] = true;","}"],"type":"text/javascript"}}],"id":"2f97841e-d4ac-4000-8cf1-2bfa1ebdb6d7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"token":"{{access_token}}"},"isInherited":false},"method":"POST","header":[],"url":"{{base_path}}/api/v1/virtual_registration/session?patient_id=26050&api_redirect_uri=https://www.epionhealth.com/","description":"<p>You can use the <code>api_redirect_uri</code> parameter to redirect back to your application once the Kiosk session is completed.</p>\n","urlObject":{"path":["api","v1","virtual_registration","session"],"host":["{{base_path}}"],"query":[{"description":{"content":"<p>Athena id of intended patient to initiate the session for (required)</p>\n","type":"text/plain"},"key":"patient_id","value":"26050"},{"description":{"content":"<p>Uri to redirect to once patient completes their Virtual Registration session. This parameter is optional.</p>\n","type":"text/plain"},"key":"api_redirect_uri","value":"https://www.epionhealth.com/"}],"variable":[]}},"response":[{"id":"994be212-2aec-4d4a-9e54-6648275b6c3a","name":"Start a Mobile Kiosk session + api redirect uri","originalRequest":{"method":"POST","header":[],"url":{"raw":"{{base_path}}/api/v1/virtual_registration/session?patient_id=26050&api_redirect_uri=https://www.epionhealth.com/","host":["{{base_path}}"],"path":["api","v1","virtual_registration","session"],"query":[{"key":"patient_id","value":"26050","description":"Athena id of intended patient to initiate the session for (required)"},{"key":"api_redirect_uri","value":"https://www.epionhealth.com/","description":"uri to redirect to once patient completes their Kiosk session"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"next_step_url\": \"https://testing.epionhealth.com/api/v1/virtual_registration/session/secured?t=eyJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InByZXZpc2l0X2lkIjoxMzF9LCJleHAiOjE2NTQ1NDgxMTB9.l1clbtfCjbsmLc1Qp24vWm7w--E1WdaTIsLS9eJW8U8\"\n}"}],"_postman_id":"2f97841e-d4ac-4000-8cf1-2bfa1ebdb6d7"}],"id":"063a4c56-b04b-475c-aec1-f0e63a08c1e2","description":"<p>Given <code>patient_id</code>, it returns a URL with an expiring JSON Web Token (JWT). If you redirect the patient to that URL, they will be automatically authenticated into their Virtual Registration session.</p>\n","_postman_id":"063a4c56-b04b-475c-aec1-f0e63a08c1e2"},{"name":"Get Active Virtual Registrations URL","item":[{"name":"/api/v1/virtual_registration/sessions","event":[{"listen":"test","script":{"id":"660f1c30-fc45-4b86-8382-2d79f8c6ae8f","exec":["tests[\"Status code is 200 Created\"] = responseCode.code === 200;","","//if (responseCode.code === 200)","//{","//   if (respoBody.include(\"landing\")){","//        tests[\"landing page present \"] = true;","//    }","//}",""],"type":"text/javascript"}}],"id":"1629604d-dfa9-4377-9983-9f588fba6d82","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"token":"{{access_token}}"},"isInherited":false},"method":"GET","header":[],"url":"{{base_path}}/api/v1/virtual_registration/sessions?patient_id=26030","urlObject":{"path":["api","v1","virtual_registration","sessions"],"host":["{{base_path}}"],"query":[{"description":{"content":"<p>Athena id of intended patient to retrieve virtual registrations for (required)</p>\n","type":"text/plain"},"key":"patient_id","value":"26030"}],"variable":[]}},"response":[],"_postman_id":"1629604d-dfa9-4377-9983-9f588fba6d82"}],"id":"d5a89c35-f4bc-4eec-ae36-a869b6ce928b","description":"<p>Given <code>patient_id</code>, it returns the department id for each active (non-expired) virtual registration available in the Epion system associated to the patient.</p>\n","_postman_id":"d5a89c35-f4bc-4eec-ae36-a869b6ce928b"},{"name":"Start Virtual Registration Session","item":[{"name":"/api/v1/virtual_registration/session/secured?t=TOKEN","event":[{"listen":"test","script":{"id":"660f1c30-fc45-4b86-8382-2d79f8c6ae8f","exec":["tests[\"Status code is 200 Created\"] = responseCode.code === 200;","","//if (responseCode.code === 200)","//{","//   if (respoBody.include(\"landing\")){","//        tests[\"landing page present \"] = true;","//    }","//}",""],"type":"text/javascript"}}],"id":"f9423ea2-5823-40ea-b6e0-79f91cd6897e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"{{next_step_url}}","urlObject":{"host":["{{next_step_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"f9423ea2-5823-40ea-b6e0-79f91cd6897e"}],"id":"0a4e0c41-88f5-443f-a0fc-e8cd47993c70","description":"<p>Given the JSON Web Token (JWT) from the previous request, set the cookie for the patient and redirect to the first step of the Virtual Registration workflow.</p>\n","_postman_id":"0a4e0c41-88f5-443f-a0fc-e8cd47993c70"}],"event":[{"listen":"prerequest","script":{"id":"9a8b9d87-9083-4732-94c9-af1309748b93","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"f2478531-961e-424b-b48b-faebaa0d051f","type":"text/javascript","exec":[""]}}]}