{"info":{"_postman_id":"a2a11d43-5196-98a9-4522-41a565c7ced8","name":"Collegium Telemedicus API Reference","description":"<html><head></head><body><p>CollegiumTelemedicus API docs for use by 3rd parties.</p>\n<h1 id=\"what-is-collegium-telemedicus\">What is Collegium Telemedicus?</h1>\n<p>Visit <a href=\"https://collegiumtelemedicus.org\">https://collegiumtelemedicus.org</a> for details.</p>\n<h1 id=\"about-our-api\">About our API</h1>\n<ul>\n<li>API access is limited to specific partners, please contact us for details.</li>\n<li>The API provides a subset of functionality for specific uses only.</li>\n</ul>\n<h2 id=\"usage-notes\">Usage notes</h2>\n<ul>\n<li>The API follows approximate REST principles, using only <code>get</code> for requests that do not create or update and <code>post</code> for requests that do.</li>\n<li>All requests return JSON</li>\n<li>HTTP Status codes should be used in conjunction with the <code>result</code> property of the returned JSON to verify success of the request.</li>\n</ul>\n<h3 id=\"rate-limits\">Rate limits</h3>\n<ul>\n<li>There are (currently) no limits on use of the API, however for performance reasons we request that you limit rate of requests to no more than 10 per minute.</li>\n</ul>\n<h3 id=\"base-url\">Base URL</h3>\n<p><a href=\"https://api.collegiumtelemedicus.org/v3/public/\">https://api.collegiumtelemedicus.org/v3/public/</a></p>\n<h3 id=\"response-codes\">Response Codes</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Status</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>401</td>\n<td>Invalid authentication</td>\n</tr>\n<tr>\n<td>500</td>\n<td>Invalid parameters (e.g. limit exceeds max, missing field etc)</td>\n</tr>\n<tr>\n<td>200/201</td>\n<td>Success</td>\n</tr>\n</tbody>\n</table>\n</div></body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"What is Collegium Telemedicus?","slug":"what-is-collegium-telemedicus"},{"content":"About our API","slug":"about-our-api"}],"owner":"1651345","collectionId":"a2a11d43-5196-98a9-4522-41a565c7ced8","publishedId":"6thxfjV","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-05-22T21:59:12.000Z"},"item":[{"name":"Authentication","item":[{"name":"Login","event":[{"listen":"test","script":{"id":"0561f0cf-2954-473a-8c10-0db35ff29164","exec":["tests[\"Status code is 200\"] = responseCode.code === 401;","","","","var jsonData = JSON.parse(responseBody);","tests[\"Result is error\"] = jsonData.result === \"error\";","//tests[\"Enviroment is live\"] = jsonData.version.api_environment === \"Live\";"],"type":"text/javascript"}}],"id":"41b0c7f3-c367-aa56-1711-2a1aceeb895a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"username","value":"username","type":"text"},{"key":"password","value":"password","type":"text"}]},"url":"{{baseurl}}/login","description":"<h3 id=\"api-users\">API users</h3>\n<ul>\n<li>Currently the API supports <strong>referrers</strong> and <strong>coordinators</strong> only</li>\n<li>Use the same authentication details as on the web application</li>\n<li>Users must be part of a Network that has been approved for API access</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Status</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>401</td>\n<td>Invalid authentication details, or API access not allowed for this user</td>\n</tr>\n<tr>\n<td>201</td>\n<td>Login success</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Example JSON response</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"result\": \"success\",\n    \"token\": \"...\",\n    \"token_expire_time\": \"2017-09-23T13:09:40+01:00\",\n    \"name\": \"...\",\n    \"user_id\": 1,\n    \"email\": \"...\",\n    \"user_lang\": \"en\",\n    \"user_gmt_offset\": -5,\n    \"network_id\": 1,\n    \"network_name\": \"...\",\n    \"network_lang\": \"en\",\n    \"ref_templates\": [ ... ],\n    \"hospital_id\": 1,\n    \"hospital_name\": \"...\",\n    \"city\": \"...\",\n    \"country\": \"...\",\n    \"organization\": \"...\",\n    \"expert_groups\": [...],\n    \"version\": {\n        \"api_version\": \"...\",\n        \"mobile_app_version\": \"...\",\n        \"api_environment\": \"...\"\n    }\n}\n</code></pre><ul>\n<li><code>token</code> : must be passed as <code>X-CT-Authorization</code> HTTP Header in all other requests</li>\n<li><code>token_expire_time</code> : a new token must be requested after this time</li>\n<li><code>name</code>, <code>email</code> etc : details of the current user</li>\n<li><code>version</code> : the API version</li>\n</ul>\n","urlObject":{"path":["login"],"host":["{{baseurl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"41b0c7f3-c367-aa56-1711-2a1aceeb895a"}],"id":"57e97827-1358-525f-6cb2-b5a98a2b6db7","description":"<p>To access any API end points you must first login and obtain an authentication token.  This token is then used in all subsequent API calls.</p>\n","_postman_id":"57e97827-1358-525f-6cb2-b5a98a2b6db7"},{"name":"Cases","item":[{"name":"/cases","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","var jsonData = JSON.parse(responseBody);","tests[\"Results contain 10 cases\"] = jsonData.length === 10;"]}}],"id":"2342c014-42b8-c9dc-acfe-b2d2858209c8","request":{"method":"GET","header":[{"key":"X-CT-Authorization","value":"Bearer {{authtoken}}"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"username","value":"referrer","type":"text"},{"key":"password","value":"123","type":"text"}]},"url":"{{baseurl}}/cases?page=1&limit=10","description":"<p>GET Cases for the current user.</p>\n<h3 id=\"notes\">Notes</h3>\n<ul>\n<li><code>page</code> and <code>limit</code> are optional (defaults to first 10 cases)</li>\n<li><code>limit</code> cannot exceed 500</li>\n<li>Returned cases are ordered by date/time case was opened (most recent first)</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Status</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>401</td>\n<td>Invalid authentication</td>\n</tr>\n<tr>\n<td>500</td>\n<td>Invalid parameters (e.g. limit exceeds max)</td>\n</tr>\n<tr>\n<td>200</td>\n<td>Success</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Example JSON response</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>[\n    {\n        \"record_no\": 1,\n        \"case_no\": 1,\n        \"network_id\": 1,\n        \"case_status\": \"a\",\n        \"clinical\": \"P\",\n        \"clinical_full\": \"...\",\n        \"received\": \"2016-09-29T07:29:14.000Z\",\n        \"type_ref\": \"General\",\n        \"primary_reason\": \"...\",\n        \"city\": \"...\",\n        \"country\": \"...\",\n        \"patient_name\": \"...\",\n        \"sex\": \"...\",\n        \"age\": \"...\",\n        \"referrer_id\": \"...\",\n        \"from_fullname\": \"...\",\n        \"n_query\": 0,\n        \"n_message\": 1,\n        \"case_lang\": \"EN\",\n        \"case_changed_on\": \"1901-01-01T00:00:00.000Z\",\n        \"fu_date\": null,\n        \"reply_date\": \"\",\n        \"hospital\": {\n            \"id\": 3,\n            \"name\": \"Royal Masonic Homeopathy Hospital\",\n            \"city\": \"London\",\n            \"country\": \"United Kingdom\",\n            \"organization\": \"Homeopathy UK\"\n        },\n        \"last_viewed\": \"2000-01-01T00:00:00.000Z\"\n    },\n    ...\n ]\n</code></pre>","urlObject":{"path":["cases"],"host":["{{baseurl}}"],"query":[{"key":"page","value":"1"},{"key":"limit","value":"10"}],"variable":[]}},"response":[],"_postman_id":"2342c014-42b8-c9dc-acfe-b2d2858209c8"}],"id":"6acbffe7-ed99-af3f-1f26-0bc21925399b","description":"<p>Referrers only</p>\n","_postman_id":"6acbffe7-ed99-af3f-1f26-0bc21925399b"},{"name":"Users","item":[{"name":"/users/invite","event":[{"listen":"test","script":{"id":"284f905c-1120-4220-ae58-e984ef2fc607","exec":[""],"type":"text/javascript"}}],"id":"8ecb3d67-478e-4fbb-a431-4b5c591080d7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-CT-Authorization","value":"Bearer {{authtoken}}"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"data","value":"{ \n    \"type\": \"Specialist\",\n    \"email\": \"apispecialist@api.com\", \n    \"gmt_offset\": \"-2\", \n    \"title\": \"Dr\", \n    \"first_name\": \"Name\", \n    \"family_name\": \"Surname\", \n    \"organisation\": \"organisation\", \n    \"city\": \"city\", \n    \"country\": \"ALA\", \n    \"contact_details\": \"contact\", \n    \"tel\": \"tel\", \n    \"postal_address\": \"address\", \n    \"pro_num\": \"xxxx\", \n    \"pro_body\": \"yyyyy\", \n    \"employer\": \"Employer\", \n    \"notes\": \"\",  \n    \"cat_1\": \"Allied Health\", \n    \"cat_2\": \"Physiotherapy\", \n    \"cat_3\": \"\", \n    \"sex\": \"Female\", \n    \"user_langs\": \"en,fr\"\n}","type":"text"}]},"url":"{{baseurl}}/users/invite","description":"<p>Coordinators only</p>\n<p>Create new Specialist or Referrer users and send invite email with instructions to set up password.</p>\n<h3 id=\"notes\">Notes</h3>\n<ul>\n<li>Allows creation of new users (Specialist or Referrers) exactly as if the Coordinator had completed the form in the web platform.</li>\n<li>The user will receive an invite email with their link to set up their password etc &amp; immediately be able to use the platform.</li>\n<li>Referrers will need to set up password using a web browser, before downloading and accessing the mobile app</li>\n</ul>\n<h3 id=\"request\">Request</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Post</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>data</td>\n<td>Required JSON object with details of new user</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>User data definition</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Required</th>\n<th>Example value</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>type</td>\n<td>Yes</td>\n<td>\"Specialist\"</td>\n<td>Must be either \"Specialist\" or \"Referrer\"</td>\n</tr>\n<tr>\n<td>email</td>\n<td>Yes</td>\n<td>\"<a href=\"mailto:apispecialist@api.com\">apispecialist@api.com</a>\"</td>\n<td>Must be valid email</td>\n</tr>\n<tr>\n<td>gmt_offset</td>\n<td>Yes</td>\n<td>\"-2\"</td>\n<td>User's timezone, hours offset from GMT</td>\n</tr>\n<tr>\n<td>user_langs</td>\n<td>Yes</td>\n<td>\"en,fr\"</td>\n<td>CSV of language(s) the user can speak. Must use two letter codes as follows: English='en', French='fr', Spanish='sp',Arabic='ar', Portuguese='pt</td>\n</tr>\n<tr>\n<td>cat_1</td>\n<td>Yes (Specialist only)</td>\n<td>\"Allied Health\"</td>\n<td>Must exactly match list of primary Specialisms</td>\n</tr>\n<tr>\n<td>cat_2</td>\n<td>No (Specialist only)</td>\n<td>\"Physiotherapy\"</td>\n<td>Must exactly match list of secondary Specialisms</td>\n</tr>\n<tr>\n<td>cat_3</td>\n<td>No (Specialist only)</td>\n<td>\"\"</td>\n<td>Must exactly match list of tertiary Specialisms</td>\n</tr>\n<tr>\n<td>hospital_id</td>\n<td>Yes (Referrer only)</td>\n<td>\"330\"</td>\n<td>Collegium's ID of the user's hospital</td>\n</tr>\n<tr>\n<td>alloc_type</td>\n<td>Yes (Referrer only)</td>\n<td>\"Automatic\"</td>\n<td>Allocation type. Must be one of \"Automatic\", \"Semi-Automatic\" or \"Manual\"</td>\n</tr>\n<tr>\n<td>alloc_groups</td>\n<td>Yes, if alloc_type not \"Manual\" (Referrer only)</td>\n<td>\"4,6\"</td>\n<td>CSV of Expert group IDs. Required for Referrer's only and if allocation type is \"Automatic\" or \"Semi-Automatic\"</td>\n</tr>\n<tr>\n<td>title</td>\n<td>No</td>\n<td>\"Dr\"</td>\n<td>User's title</td>\n</tr>\n<tr>\n<td>first_name</td>\n<td>Yes</td>\n<td>\"Name\"</td>\n<td></td>\n</tr>\n<tr>\n<td>family_name</td>\n<td>Yes</td>\n<td>\"Surname\"</td>\n<td></td>\n</tr>\n<tr>\n<td>country</td>\n<td>Yes</td>\n<td>\"ALA\"</td>\n<td>Country where user located. Must be <a href=\"https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3\">ISO 3166-1 alpha-3</a></td>\n</tr>\n<tr>\n<td>organisation</td>\n<td>No</td>\n<td>\"organisation\"</td>\n<td>User's Organisation</td>\n</tr>\n<tr>\n<td>city</td>\n<td>No</td>\n<td>\"city\"</td>\n<td>Town or city where user located</td>\n</tr>\n<tr>\n<td>sex</td>\n<td>No</td>\n<td>\"Female\"</td>\n<td>Must be either \"Male\" or \"Female\"</td>\n</tr>\n<tr>\n<td>contact_details</td>\n<td>No</td>\n<td>\"contact\"</td>\n<td>Other contact details</td>\n</tr>\n<tr>\n<td>tel</td>\n<td>No</td>\n<td>\"tel\"</td>\n<td>Users telephone number</td>\n</tr>\n<tr>\n<td>postal_address</td>\n<td>No</td>\n<td>\"address\"</td>\n<td>Users title</td>\n</tr>\n<tr>\n<td>pro_num</td>\n<td>No</td>\n<td>\"xxxx\"</td>\n<td>User's registration number with professional body. Note: this information is only available to the network Coordinators -- it is not visible to other users</td>\n</tr>\n<tr>\n<td>pro_body</td>\n<td>No</td>\n<td>\"yyyyy\"</td>\n<td>User's professional regulatory body</td>\n</tr>\n<tr>\n<td>employer</td>\n<td>No</td>\n<td>\"Employer\"</td>\n<td>Users employer</td>\n</tr>\n<tr>\n<td>notes</td>\n<td>No</td>\n<td>\"\"</td>\n<td>Notes for coordinator</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Example JSON for new Specialist</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{ \n    \"type\": \"Specialist\",\n    \"email\": \"apispecialist@api.com\", \n    \"gmt_offset\": \"+5.5\", \n    \"first_name\": \"Name\", \n    \"family_name\": \"Surname\", \n    \"country\": \"IND\", \n    \"cat_1\": \"Internal Medicine\", \n    \"user_langs\": \"en,fr\"\n}\n</code></pre><p><strong>Example JSON for new Referrer</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{ \n    \"type\": \"Referrer\",\n    \"email\": \"apiref@api.com\", \n    \"gmt_offset\": \"-2\", \n    \"first_name\": \"Api\", \n    \"family_name\": \"Tester1\", \n    \"country\": \"ALA\", \n    \"hospital_id\": \"330\",\n    \"user_langs\": \"en,fr\",\n    \"alloc_type\": \"Automatic\",\n    \"alloc_groups\": \"4,6\"\n}\n</code></pre><h3 id=\"response\">Response</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Status</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>401</td>\n<td>Invalid authentication</td>\n</tr>\n<tr>\n<td>500</td>\n<td>Invalid data (eg invalid json, or missing required values)</td>\n</tr>\n<tr>\n<td>201</td>\n<td>Success</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Example JSON response</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"result\": \"success\",\n    \"user_id\": 102009\n}\n</code></pre>","urlObject":{"path":["users","invite"],"host":["{{baseurl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"8ecb3d67-478e-4fbb-a431-4b5c591080d7"}],"id":"d0ee33b6-53b3-4047-81a8-f764327dd542","_postman_id":"d0ee33b6-53b3-4047-81a8-f764327dd542","description":""}],"event":[{"listen":"prerequest","script":{"id":"22337271-11df-43e2-bc63-eaec7ba243c1","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"12dd6c37-5fd8-4653-ae43-fe25fd24510b","type":"text/javascript","exec":["","var jsonData = JSON.parse(\"not json }\");",""]}}]}