If you have any issues, please don't hesitate to send an email.
The API Authentication is implemented as HTTP Basic Authentication over SSL (HTTPS). Your API lgin credentials are not the same as the credentials you use to log in to the web interface. You must obtain your API credentials separately after creating an account in CabMD (live accounts at cab.md, demo accounts at demo.cab.md).
Your API key (should be in the format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX, where X is an alpha-numeric character) can be generated from your account settings page, the "My Account" menu item located under "Account". Details on how to generate/refresh your API key, or enable/disable API/third-party access are located here. An example of an API key would look like a02b0f5b-712b-4a68-b495-173f32bcde42.
You should use HTTP Basic Authentication to verify your identity via the API. We will also accept using the API key in the query string of the request, but we do highly recommend that you switch to using the Authorization header to pass that information. We will be making changes in the future, and the method of passing via the query string will eventually be refused.
All requests must cover over SSL/HTTPS, to https://api.cab.md. An example using authentication via curl would look like this:
curl -u XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX:x -H Accept:application/xml https://api.cab.md/claims
An example, which is currently allowed, is to also pass the api key along in the query string of the request, like so:
curl -H Accept:application/xml https://api.cab.md/claims?apiKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
To facilitate the ability to run test data through the CabMD API - all you need to do is add use the test keyword in the route of the method you're attempting to use, like so:
Claims:
LIVE EXAMPLE - https://api.cab.md/claims
TEST EXAMPLE - https://api.cab.md/test/claims
The API key for testing comes from any account located in the demo system (available at http://demo.cab.md). Instructions on how to find your API key can be found here: http://support.clinicalsupportsystems.com/customer/portal/articles/827075-how-do-i-access-my-api-key-for-third-party-integrations-, for either the live or the demo systems.
The following are all the accepted fields:
The careProvider's department and groupNumber value is somewhat optional, but the following logic will apply:
Departments
Groups
If you need more information about this, please don't hesitate to contact support.
To create a claim, simply POST the claim information to the correct URL endpoint.
LIVE URL: https://api.cab.md/claims
TEST URL: https://api.cab.md/test/claims
Method: POST
Content-Type: application/xml, text/xml or application/json
Accept: application/xml, text/xml or application/json
Required Data: Claim
Required Headers: Authorization (using Basic HTTP Authentication), or apiKey in query string (ie. https://api.cab.md/claims/echo?apiKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
Response: The API response object
Usage Examples:
If you POST the following to https://api.cab.md/claims?apiKey=<your api key>
<?xml version="1.0" encoding="UTF-8"?> <Claim> <admissionDate>2011-09-30T15:03:33.2266062-04:00</admissionDate> <careProvider> <groupNumber>H855</groupNumber> <providerNumber>012630</providerNumber> <department>Office A</department> </careProvider> <dianosticCode>413</dianosticCode> <masterNumber>4105</masterNumber> <patient> <dateOfBirth>1983-05-25T15:05:06.1201812-04:00</dateOfBirth> <firstName>Kori</firstName> <lastName>Francis</lastName> <gender>male</gender> <healthCard>1234567890</healthCard> <versionCode>AB</versionCode> <provinceCode>ON</provinceCode> </patient> <serviceDate>2011-09-30T15:06:19.6853913-04:00</serviceDate> <serviceLocationType>HIP</serviceLocationType> <services> <service> <serviceCode>A605A</serviceCode> <quantity>1</quantity> </service> </services> </Claim>
Then the response status should be "201 Created" and you should receive the following in the response:
<response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <success>true</success> </response>
If the save was not successful, you could receive 400, 401, 404 errors. If the save was unsuccessful with other issues (data was correct, but save couldn't proceeed regardless), you should receive the following:
<response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <success>false</success> <errors> <string>An error might be listed here.</string> </errors> </response>
The following are all the accepted fields:
The careProvider's department value is somewhat optional, but the following logic will apply:
DepartmentsTo create a new submission, simply POST the submit information to the correct URL endpoint.
LIVE URL: https://api.cab.md/submissions
TEST URL: https://api.cab.md/test/submissions
Method: POST
Content-Type: application/xml, text/xml or application/json
Accept: application/xml, text/xml or application/json
Required Data: Claim
Required Headers: Authorization (using Basic HTTP Authentication), or apiKey in query string (ie. https://api.cab.md/claims/echo?apiKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
Response: The API response object
Usage Examples:
If you POST the following to https://api.cab.md/claims?apiKey=<your api key>
<?xml version="1.0" encoding="UTF-8"?> <submit> <careProvider> <groupNumber>H855</groupNumber> <providerNumber>012630</providerNumber> </careProvider> <comment>This is a new submission</comment> </submit>
Then the response status should be "201 Created" and you should receive the following in the response. In the response will be a message relaying some information about the submission (the filename, number of claims submitted and it's status):
<response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <success>true</success> <messages> <string>The file 'H012630.001' has been creating, containing 1 claim, and are waiting to be submitted to the Minstry of Health.</string> </messages> </response>
If the save was not successful, you could receive 400, 401, 404 errors. If the save was unsuccessful with other issues (data was correct, but save couldn't proceeed regardless), you should receive the following:
<response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <success>false</success> <errors> <string>An error might be listed here.</string> </errors> </response>