Authentication
To authenticate with the Heidi API and use the widget, you will need to generate a JSON Web Token (JWT) using your API key.
The API key provided is unique to your EMR system, Heidi will use this key in combination with your internal user ID and email address to generate a unique account for your user.
Endpoint
Attribute | Value |
---|---|
Endpoint | https://registrar.api.heidihealth.com/api/v2/ml-scribe/open-api/jwt (opens in a new tab) |
Method | GET |
Headers
Parameter | Description |
---|---|
Heidi-Api-Key | Your Heidi API Key. |
Params
Parameter | Description |
---|---|
email | The user's email for calling this API. For testing please use test@heidihealth.com |
third_party_internal_id | The user's internal user_id in your EMR system. For testing, any value may be used. |
Examples
The examples below assume your user is logged in to your EMR system as test@heidihealth.com
and has an internal user
ID of 123
.
Request
Curl (Linux/MacOS)
curl -X GET 'https://registrar.api.heidihealth.com/api/v2/ml-scribe/open-api/jwt?email=test@heidihealth.com&third_party_internal_id=123' -H 'Heidi-Api-Key: YOUR_API_KEY'
Python
import requests
url = "https://registrar.api.heidihealth.com/api/v2/ml-scribe/open-api/jwt?email=test@heidihealth.com&third_party_internal_id=123"
headers = {
'Heidi-Api-Key': 'YOUR_API_KEY'
}
response = requests.get(url, headers=headers)
print(response.json())
Node.js
const axios = require('axios');
const url = 'https://registrar.api.heidihealth.com/api/v2/ml-scribe/open-api/jwt?email=test@heidihealth.com&third_party_internal_id=123';
const headers = {
'Heidi-Api-Key': 'YOUR_API_KEY',
};
const response = await fetch(url, {
method: 'GET',
headers: headers,
});
const data = await response.json();
console.log(data);
Response
{
"token": "JWT_TOKEN",
"expiration_time": "2024-08-01T00:00:00.000Z"
}