Akute Health API v1.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Base URLs:
Authentication
- API Key (APIKeyHeader)
- Parameter Name: X-API-Key, in: header.
- Webhook Signature (SignatureHeader)
- Parameter Name: x-akute-signature, in: header. Akute generates signatures using a hash-based message authentication code (HMAC) with SHA-256.
Webhook Signatures
Step 1: Extract the timestamp and signatures from the header
x-akute-signature:
t=1492774577,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd
Split the header, using the , character as the separator, to get a list of elements. Then split each element, using the = character as the separator, to get a prefix and value pair.
The value for the prefix 't' corresponds to the timestamp, and the prefix 'v1' corresponds to the signature
Before you can verify signatures, you need to retrieve your endpoint’s secret from your Settings->Notification, and clicking on a webhook's secret reveal.
Step 2: Prepare the signed_payload string
${timestamp}.${JSON.stringify(request.body)}
The signed_payload string is created by concatenating:
- The timestamp (as a string)
- The character
.
- The actual JSON payload (i.e., the request body)
Step 3: Determine the expected signature
function parseHeader(header) {
if (typeof header !== "string") {
return null;
}
return header.split(",").reduce(
(accum, item) => {
const kv = item.split("=");
if (kv[0] === "t") {
accum.timestamp = kv[1];
}
if (kv[0] === "v1") {
accum.signature = kv[1];
}
return accum;
},
{
timestamp: -1,
signature: ""
}
);
}
const headerDetails = parseHeader(request.headers["x-akute-signature"]);
Compute an HMAC with the SHA256 hash function. Use the Akute webhook secret as the key, and use the payload string as the message.
Step 4: Compare the signatures
const unfoldedSignature = crypto
.createHmac('sha256', secret)
.update(`${headerDetails.timestamp}.${JSON.stringify(request.body)}`, 'utf8')
.digest('hex');
const isValid = unfoldedSignature === headerDetails.signature;
Compare the signature (or signatures) in the header to the expected signature.
For an equality match, compute the difference between the current timestamp and the received timestamp, then decide if the difference is within your tolerance.
To protect against timing attacks, use constant-time string comparison to compare the expected signature to each of the received signatures.
v1
post_patients
Code samples
# You can also use wget
curl -X POST https://api.staging.akutehealth.com/v1/patients \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-API-Key: API_KEY'
POST https://api.staging.akutehealth.com/v1/patients HTTP/1.1
Host: api.staging.akutehealth.com
Content-Type: application/json
Accept: application/json
const inputBody = '{
"first_name": "string",
"middle_name": "string",
"last_name": "string",
"status": "active",
"external_id": "string",
"date_of_birth": "2019-08-24",
"sex": "male",
"address_line_1": "string",
"address_line_2": "string",
"address_city": "New York",
"address_state": "NY",
"address_zipcode": "10001",
"email": "user@example.com",
"primary_phone_number": "4937384432",
"primary_phone_type": "mobile",
"appointment_state": "NJ",
"properties": [
{
"name": "membership",
"values": ["One-time"]
}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-API-Key':'API_KEY'
};
fetch('https://api.staging.akutehealth.com/v1/patients',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}
result = RestClient.post 'https://api.staging.akutehealth.com/v1/patients',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}
r = requests.post('https://api.staging.akutehealth.com/v1/patients', headers = headers)
print(r.json())
'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','https://api.staging.akutehealth.com/v1/patients', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("https://api.staging.akutehealth.com/v1/patients");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-API-Key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://api.staging.akutehealth.com/v1/patients", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /patients
Create a new patient
Body parameter
{
"first_name": "string",
"middle_name": "string",
"last_name": "string",
"status": "active",
"external_id": "string",
"date_of_birth": "2019-08-24",
"sex": "male",
"address_line_1": "string",
"address_line_2": "string",
"address_city": "New York",
"address_state": "NY",
"address_zipcode": "10001",
"email": "user@example.com",
"primary_phone_number": "4937384432",
"primary_phone_type": "mobile",
"appointment_state": "NJ",
"properties": [
{
"name": "membership",
"values": ["One-time"]
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | none |
» first_name | body | string | true | Max 35 characters |
» middle_name | body | string | false | Max 35 characters |
» last_name | body | string | true | Max 35 characters |
» status | body | string | true | Inactive patients are not visible in client EHR |
» external_id | body | string | false | Customer id for patient. Can be used to query for patient if storing & querying by Akute id is not feasible. |
» date_of_birth | body | string(date) | true | String date in format of YYYY-MM-DD |
» sex | body | string | true | none |
» address_line_1 | body | string | true | Max 35 characters |
» address_line_2 | body | string | false | Max 35 characters |
» address_city | body | string | true | Max 35 characters |
» address_state | body | string | true | 2 character state (or US territory) abbreviation code. E.g. NY for New York, DC for District of Columbia, PR for Puerto Rico. Case-insensitive. |
» address_zipcode | body | string | true | 5 character length zipcode |
body | string(email) | true | none | |
» primary_phone_number | body | string | true | 10 character length phone number with no dashes, and no country code. E.g. 4324553245. |
» primary_phone_type | body | string | true | none |
» appointment_state | body | string | false | State in which the patient is receiving their care. E.g. Patient lives in New York but receives care in New Jersey. |
Enumerated Values
Parameter | Value |
---|---|
» status | active |
» status | inactive |
» sex | male |
» sex | female |
» sex | unknown |
» primary_phone_type | mobile |
» primary_phone_type | home |
Example responses
201 Response
{
"id": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | Inline |
400 | Bad Request | Bad Request | Inline |
409 | Conflict | Duplicate Resource | Inline |
500 | Internal Server Error | Database Error | Inline |
Response Schema
Status Code 201
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | false | none | none |
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» statusCode | number | false | none | none |
» error | string | false | none | none |
Status Code 409
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» statusCode | number | false | none | none |
» error | string | false | none | none |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» statusCode | number | false | none | none |
» error | string | false | none | none |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | URI of created resource with :id appended |
put_patients
Code samples
# You can also use wget
curl -X PUT https://api.staging.akutehealth.com/v1/patients/:id \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-API-Key: API_KEY'
PUT https://api.staging.akutehealth.com/v1/patients/:id HTTP/1.1
Host: api.staging.akutehealth.com
Content-Type: application/json
Accept: application/json
const inputBody = '{
"first_name": "string",
"middle_name": "string",
"last_name": "string",
"status": "active",
"external_id": "string",
"date_of_birth": "2019-08-24",
"sex": "male",
"address_line_1": "string",
"address_line_2": "string",
"address_city": "New York",
"address_state": "NY",
"address_zipcode": "10001",
"email": "user@example.com",
"primary_phone_number": "4937384432",
"primary_phone_type": "mobile",
"appointment_state": "NJ",
"properties": [
{
"name": "membership",
"values": ["One-time"]
}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-API-Key':'API_KEY'
};
fetch('https://api.staging.akutehealth.com/v1/patients/:id',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}
result = RestClient.post 'https://api.staging.akutehealth.com/v1/patients/:id',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}
r = requests.post('https://api.staging.akutehealth.com/v1/patients/:id', headers = headers)
print(r.json())
'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','https://api.staging.akutehealth.com/v1/patients/:id', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("https://api.staging.akutehealth.com/v1/patients/:id");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-API-Key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://api.staging.akutehealth.com/v1/patients/:id", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /patients/:id
Update patient
Body parameter
{
"first_name": "string",
"middle_name": "string",
"last_name": "string",
"status": "active",
"external_id": "string",
"date_of_birth": "2019-08-24",
"sex": "male",
"address_line_1": "string",
"address_line_2": "string",
"address_city": "New York",
"address_state": "NY",
"address_zipcode": "10001",
"email": "user@example.com",
"primary_phone_number": "4937384432",
"primary_phone_type": "mobile",
"appointment_state": "NJ",
"properties": [
{
"name": "membership",
"values": ["One-time"]
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | none |
» first_name | body | string | false | Max 35 characters |
» middle_name | body | string | false | Max 35 characters |
» last_name | body | string | false | Max 35 characters |
» status | body | string | false | Inactive patients are not visible in client EHR |
» external_id | body | string | false | Customer id for patient. Can be used to query for patient if storing & querying by Akute id is not feasible. |
» date_of_birth | body | string(date) | false | String date in format of YYYY-MM-DD |
» sex | body | string | false | none |
» address_line_1 | body | string | false | Max 35 characters |
» address_line_2 | body | string | false | Max 35 characters |
» address_city | body | string | false | Max 35 characters |
» address_state | body | string | false | 2 character state (or US territory) abbreviation code. E.g. NY for New York, DC for District of Columbia, PR for Puerto Rico. Case-insensitive. |
» address_zipcode | body | string | false | 5 character length zipcode |
body | string(email) | false | none | |
» primary_phone_number | body | string | false | 10 character length phone number with no dashes, and no country code. E.g. 4324553245. |
» primary_phone_type | body | string | false | none |
» appointment_state | body | string | false | State in which the patient is receiving their care. E.g. Patient lives in New York but receives care in New Jersey. |
Enumerated Values
Parameter | Value |
---|---|
» status | active |
» status | inactive |
» sex | male |
» sex | female |
» sex | unknown |
» primary_phone_type | mobile |
» primary_phone_type | home |
Example responses
200 Response
{
"id": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Updated | Updated | Inline |
400 | Bad Request | Bad Request | Inline |
404 | Not Found | Resource Not Found | Inline |
500 | Internal Server Error | Database Error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | false | none | none |
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» statusCode | number | false | none | none |
» error | string | false | none | none |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» statusCode | number | false | none | none |
» error | string | false | none | none |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» statusCode | number | false | none | none |
» error | string | false | none | none |
get_patients
Code samples
# You can also use wget
curl -X GET https://api.staging.akutehealth.com/v1/patients \
-H 'Accept: application/json' \
-H 'X-API-Key: API_KEY'
GET https://api.staging.akutehealth.com/v1/patients HTTP/1.1
Host: api.staging.akutehealth.com
Accept: application/json
const headers = {
Accept: "application/json",
"X-API-Key": "API_KEY"
};
fetch("https://api.staging.akutehealth.com/v1/patients", {
method: "GET",
headers: headers
})
.then(function(res) {
return res.json();
})
.then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}
result = RestClient.get 'https://api.staging.akutehealth.com/v1/patients',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}
r = requests.get('https://api.staging.akutehealth.com/v1/patients', headers = headers)
print(r.json())
'application/json',
'X-API-Key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','https://api.staging.akutehealth.com/v1/patients', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("https://api.staging.akutehealth.com/v1/patients");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"X-API-Key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.staging.akutehealth.com/v1/patients", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /patients
Get patient by akute id in path or other parameter as query
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
patientId | path | string | false | Get by id in path. E.g. /patients/{id}. Returns a single patient json. All other query options ignored. Takes precedence over external_id if both provided. |
external_id | query | string | false | Get by external_id as query. E.g. /patients?external_id={external_id}. Returns a single patient json. All other query options ignored. |
first_name | query | string | false | All other query fields return an array of patient jsons |
middle_name | query | string | false | none |
last_name | query | string | false | none |
status | query | string | false | none |
date_of_birth | query | string | false | none |
sex | query | string | false | none |
address_line_1 | query | string | false | none |
address_line_2 | query | string | false | none |
address_city | query | string | false | none |
address_state | query | string | false | none |
address_zipcode | query | string | false | none |
query | string | false | none | |
primary_phone_number | query | string | false | none |
primary_phone_type | query | string | false | none |
appointment_state | query | string | false | none |
Example responses
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | {} if GET by id or [] if GET by non-id query |
404 | Not Found | Patient not found | None |
Response Schema
post_tasks
Code samples
# You can also use wget
curl -X POST https://api.staging.akutehealth.com/v1/tasks \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-API-Key: API_KEY'
POST https://api.staging.akutehealth.com/v1/tasks HTTP/1.1
Host: api.staging.akutehealth.com
Content-Type: application/json
Accept: application/json
const inputBody = '{
"task": "string",
"description": "string",
"due_date": "2019-08-24",
"owner_id": "string",
"patient_id": "string",
"external_patient_id": "string",
"priority": "p1",
"status": "not-started",
"date_created": "2019-08-24T14:15:22Z",
"tags": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-API-Key':'API_KEY'
};
fetch('https://api.staging.akutehealth.com/v1/tasks',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}
result = RestClient.post 'https://api.staging.akutehealth.com/v1/tasks',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}
r = requests.post('https://api.staging.akutehealth.com/v1/tasks', headers = headers)
print(r.json())
'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','https://api.staging.akutehealth.com/v1/tasks', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("https://api.staging.akutehealth.com/v1/tasks");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-API-Key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://api.staging.akutehealth.com/v1/tasks", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /tasks
Create new task
Body parameter
{
"task": "string",
"description": "string",
"due_date": "2019-08-24",
"owner_id": "string",
"patient_id": "string",
"external_patient_id": "string",
"priority": "p1",
"status": "not-started",
"date_created": "2019-08-24T14:15:22Z",
"tags": ["string"]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | none |
» task | body | string | true | Title of task. |
» description | body | string | false | Extra information about task. |
» due_date | body | string(date) | false | none |
» owner_id | body | string | false | Akute user id. |
» patient_id | body | string | false | Akute id for patient. Use either this or 'external_patient_id'. If both are provided, this will be prioritized over external_patient_id. |
» external_patient_id | body | string | false | Customer id for patient. Use either this or 'patient_id'. If both are provided, this will ignored. |
» priority | body | string | false | Priority is in descending order with p1 being 'Urgent' and p3 being lowest priority. |
» status | body | string | false | none |
» date_created | body | string(date-time) | false | If not provided, current time is used. The date-time notation as defined by RFC 3339, section 5.6. |
» tags | body | [string] | false | Array of tags. Tags will be added to account's list of tags for tasks, case-insensitive. |
Enumerated Values
Parameter | Value |
---|---|
» priority | p1 |
» priority | p2 |
» priority | p3 |
» status | not-started |
» status | in-progress |
Example responses
201 Response
{
"id": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | Inline |
Response Schema
Status Code 201
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | false | none | none |
get_tasks
Code samples
# You can also use wget
curl -X GET https://api.staging.akutehealth.com/v1/tasks \
-H 'Accept: application/json' \
-H 'X-API-Key: API_KEY'
GET https://api.staging.akutehealth.com/v1/tasks HTTP/1.1
Host: api.staging.akutehealth.com
Accept: application/json
const headers = {
Accept: "application/json",
"X-API-Key": "API_KEY"
};
fetch("https://api.staging.akutehealth.com/v1/tasks", {
method: "GET",
headers: headers
})
.then(function(res) {
return res.json();
})
.then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}
result = RestClient.get 'https://api.staging.akutehealth.com/v1/tasks',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}
r = requests.get('https://api.staging.akutehealth.com/v1/tasks', headers = headers)
print(r.json())
'application/json',
'X-API-Key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','https://api.staging.akutehealth.com/v1/tasks', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("https://api.staging.akutehealth.com/v1/tasks");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"X-API-Key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.staging.akutehealth.com/v1/tasks", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /tasks
Get task by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
taskId | path | string | true | none |
Example responses
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
Response Schema
webhook_tasks
Get a webhook on all task creates & updates.
Get a webhook on all task creates & updates.
post_insurance
Code samples
# You can also use wget
curl -X POST https://api.staging.akutehealth.com/v1/insurance \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-API-Key: API_KEY'
POST https://api.staging.akutehealth.com/v1/insurance HTTP/1.1
Host: api.staging.akutehealth.com
Content-Type: application/json
Accept: application/json
const inputBody = '{
"id": "string",
"member_id": "string",
"status": "active",
"patient_id": "string",
"external_patient_id": "string",
"type": "rx",
"hdhp": true,
"order": 1,
"rx_bin": "string",
"rx_pcn": "string",
"rx_id": "string",
"rx_group": "string",
"payor": "string",
"pbm": "string",
"phone_number": "stringstri",
"relationship_to_subscriber": "self",
"group_id": "string",
"group_name": "string",
"payor_id": "string",
"subscriber_patient_id": "string",
"subscriber_external_patient_id": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-API-Key':'API_KEY'
};
fetch('https://api.staging.akutehealth.com/v1/insurance',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}
result = RestClient.post 'https://api.staging.akutehealth.com/v1/insurance',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}
r = requests.post('https://api.staging.akutehealth.com/v1/insurance', headers = headers)
print(r.json())
'application/json',
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','https://api.staging.akutehealth.com/v1/insurance', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("https://api.staging.akutehealth.com/v1/insurance");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-API-Key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://api.staging.akutehealth.com/v1/insurance", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /insurance
Create new insurance policy
Body parameter
{
"id": "string",
"member_id": "string",
"status": "active",
"patient_id": "string",
"external_patient_id": "string",
"type": "rx",
"hdhp": true,
"order": 1,
"rx_bin": "string",
"rx_pcn": "string",
"rx_id": "string",
"rx_group": "string",
"payor": "string",
"pbm": "string",
"phone_number": "stringstri",
"relationship_to_subscriber": "self",
"group_id": "string",
"group_name": "string",
"payor_id": "string",
"subscriber_patient_id": "string",
"subscriber_external_patient_id": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | none |
» member_id | body | string | true | none |
» status | body | string | true | none |
» patient_id | body | string | false | Akute id for patient. Use either this or 'external_patient_id'. If both are provided, this will be prioritized over external_patient_id. |
» external_patient_id | body | string¦null | false | Customer id for patient. Use either this or 'patient_id'. If both are provided, this will ignored. |
» type | body | string | false | Specificy rx (pharmacy) or medical policy. If neither is specified, then both will be created. |
» hdhp | body | boolean | false | none |
» order | body | number(float) | true | Used to prioritize insurance policies of the same type. Will overwrite any existing active insurance policies of equal type and order. |
» rx_bin | body | string | false | none |
» rx_pcn | body | string | false | none |
» rx_id | body | string | false | none |
» rx_group | body | string | false | none |
» payor | body | string | true | Payor + Plan name. E.g. UHC Choice Plus. |
» pbm | body | string | false | Only used if creating both medical & rx policy and if rx payor is different than Medical Payor. E.g. CVS Caremark. If not provided, payor field will be used for rx policy. |
» phone_number | body | string | false | Rx insurance provider phone number, for claims purposes. |
» relationship_to_subscriber | body | string | false | none |
» group_id | body | string | false | none |
» group_name | body | string | false | none |
» payor_id | body | string | false | none |
» subscriber_patient_id | body | string¦null | false | Akute id for subscriber patient, if subscriber is not self. Use either this or 'external_patient_id'. If both are provided, this will be prioritized over external_patient_id. |
» subscriber_external_patient_id | body | string¦null | false | Customer id for subscriber patient, if subscriber is not self. Use either this or 'patient_id'. If both are provided, this will ignored. |
Enumerated Values
Parameter | Value |
---|---|
» status | active |
» status | cancelled |
» type | rx |
» type | medical |
» order | 1 |
» order | 2 |
» order | 3 |
» relationship_to_subscriber | self |
» relationship_to_subscriber | child |
» relationship_to_subscriber | spouse |
» relationship_to_subscriber | parent |
» relationship_to_subscriber | common |
» relationship_to_subscriber | other |
Example responses
201 Response
{
"rx_id": "string",
"medical_id": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | Inline |
400 | Bad Request | Bad Request | Inline |
500 | Internal Server Error | Database Error | Inline |
Response Schema
Status Code 201
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» rx_id | string | false | none | none |
» medical_id | string | false | none | none |
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» statusCode | number | false | none | none |
» error | string | false | none | none |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» statusCode | number | false | none | none |
» error | string | false | none | none |
get_insurance
Code samples
# You can also use wget
curl -X GET https://api.staging.akutehealth.com/v1/insurance?patient_id=string \
-H 'Accept: application/json' \
-H 'X-API-Key: API_KEY'
GET https://api.staging.akutehealth.com/v1/insurance?patient_id=string HTTP/1.1
Host: api.staging.akutehealth.com
Accept: application/json
const headers = {
Accept: "application/json",
"X-API-Key": "API_KEY"
};
fetch("https://api.staging.akutehealth.com/v1/insurance?patient_id=string", {
method: "GET",
headers: headers
})
.then(function(res) {
return res.json();
})
.then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'X-API-Key' => 'API_KEY'
}
result = RestClient.get 'https://api.staging.akutehealth.com/v1/insurance',
params: {
'patient_id' => 'string'
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'X-API-Key': 'API_KEY'
}
r = requests.get('https://api.staging.akutehealth.com/v1/insurance', params={
'patient_id': 'string'
}, headers = headers)
print(r.json())
'application/json',
'X-API-Key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','https://api.staging.akutehealth.com/v1/insurance', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("https://api.staging.akutehealth.com/v1/insurance?patient_id=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"X-API-Key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.staging.akutehealth.com/v1/insurance", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /insurance
Get insurance policy
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
insurance_id | path | string | false | Akute resource id for insurance policy. When used in path (/insurance/:id), other query options ignored. |
patient_id | query | string | false | none |
external_patient_id | query | string | false | none |
status | query | string | false | none |
member_id | query | string | false | none |
type | query | string | false | none |
Example responses
400 Response
{
"statusCode": 0,
"error": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
400 | Bad Request | Bad Request | Inline |
500 | Internal Server Error | Database Error | Inline |
Response Schema
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» statusCode | number | false | none | none |
» error | string | false | none | none |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» statusCode | number | false | none | none |
» error | string | false | none | none |
get_medications
See medication history for a patient.
See medication history for a patient.
GET /medications
Get medications
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | none |
» patient_id | query | string | true | Akute patient ID characters (not required if using external_patient_id) |
» external_patient_id | query | string | false | External patient ID characters |
» start_date | query | string | false | Search prescriptions that started from date in YYYY-MM-DD format |
» end_date | query | boolean | false | Search prescriptions that started before date in YYYY-MM-DD format |
Example responses
200 Response
[
{
"display_name": "string",
"generic_name": "string",
"ndc": "string",
"otc": "string",
"rx_cui": "string",
"date_added": "string",
"effective_date": "YYYY-MM-DD",
"fill_date": "string",
"directions": "string",
"quantity": "string",
"dispense_unit_description": "string",
"refills": "string",
"days_supply": "number",
"substitutions_allowed": "boolean",
"strength": "string",
"rx_status": "string",
"status": "string",
"is_rx_renewal": "boolean",
"date_inactive": "Date (timestamp) when marked as complete or discontinued",
"pharmacy_notes": "string",
"inactive_comment": "string",
"schedule": "string",
"patient_id": "string",
"patient_external_id": "string",
"prescriber_id": "string",
"prescriber_npi": "string",
"prescriber_name": "string",
"pharmacy_id": "number",
"dosespot_medication_id": "number",
"prescription_id": "number - The PrescriberOrderNumber included in the Surescripts XML"
}
]
400 Response
{
"statusCode": 0,
"error": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
400 | Bad Request | Bad Request | Inline |
500 | Internal Server Error | Database Error | Inline |
Enumerated Values
Parameter | Description | Value |
---|---|---|
» rx_status | The status of the script wrt it being transmitted to the pharmacy | ["entered", "printed", "sending", "eRx sent", "error", "deleted", "requested", "edited", "epcs error", "epcs signed", "ready to sign", "pharmacy verified"] |
» status | The status of the medication wrt the patient | ["active", "discontinued", "deleted", "completed", "cancel requested", "cancel pending", "cancelled", "cancel denied", "changed", "full fill", "partial fill", "no fill"] |
Response Schema
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» statusCode | number | false | none | none |
» error | string | false | none | none |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» statusCode | number | false | none | none |
» error | string | false | none | none |
webhook_medications
Get a webhook when a medication is received by a pharmacy.
Get a webhook when a medication is received by a pharmacy.
get_pharmacy
Search for pharmacies and get ID to match with medications.
Search for pharmacies and get ID to match with medications.
GET /pharmacy
Get pharmacy
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
name | query | string | false | Name of pharmacy |
city | query | string | false | City where pharmacy is located |
state | query | string | false | 2 letter state abbreviation |
zip | query | string | false | 5 number zipcode |
address | query | string | false | |
phoneOrFax | query | string | false | 10 digit phone or fax number of the pharmacy |
Example responses
200 Response
[
{
"id": "string",
"name": "string",
"address_line_1": "string",
"address_line_2": "string",
"address_city": "string",
"address_state": "string",
"address_zipcode": "string",
"primary_phone_number": "string",
"primary_fax_number": "string",
"pharmacy_specialties": ["array"]
}
]
400 Response
{
"statusCode": 0,
"error": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
400 | Bad Request | Bad Request | Inline |
500 | Internal Server Error | Database Error | Inline |
Response Schema
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» statusCode | number | false | none | none |
» error | string | false | none | none |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» statusCode | number | false | none | none |
» error | string | false | none | none |
post_pharmacy
Set pharmacy list for patient and/or default patient pharmacy
Set pharmacy list for patient and/or default patient pharmacy
POST /pharmacy
Add pharmacy to patient pharmacy list
Body parameter
{
"patient_id": "string",
"external_patient_id": "string",
"pharmacy_id": "string",
"set_as_primary": "boolean"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | none |
» patient_id | body | string | true | Akute patient ID characters (not required if using external_patient_id) |
» external_patient_id | body | string | false | External patient ID characters |
» pharmacy_id | body | string | true | Get from GET pharmacy API characters |
» set_as_primary | body | boolean | true | Set pharmacy as patient's default pharmacy |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | |
400 | Bad Request | Bad Request | Inline |
500 | Internal Server Error | Database Error | Inline |
Response Schema
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» statusCode | number | false | none | none |
» error | string | false | none | none |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» statusCode | number | false | none | none |
» error | string | false | none | none |
get_users
Get user information by id or search to get IDs for set of users
GET /users
Get user information by id or search to get IDs for set of users
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | false | id of user |
Example responses
Response type will be an array if searching for users, and a single object if including user ID in the URL path
200 Response
[
{
"id": "string",
"first_name": "string",
"last_name": "string",
"email": "string",
"dob": "string",
"npi": "string",
"dea": "string",
"licenses": [
{
"number": "string",
"state": "NY",
"expiration_date": "YYYY-MM-DD"
}
]
}
]
400 Response
{
"statusCode": 0,
"error": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
400 | Bad Request | Bad Request | Inline |
500 | Internal Server Error | Database Error | Inline |
Response Schema
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» statusCode | number | false | none | none |
» error | string | false | none | none |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» statusCode | number | false | none | none |
» error | string | false | none | none |
get_observations
See observation history for a patient.
See observation history for a patient.
GET /observations
Get observations
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | none |
» id | path | string | false | Get by id in path. E.g. /observations/{id}. Returns a single observation json. All other query options ignored. |
» patient_id | query | string | true | Akute patient ID (not required if using external_patient_id) |
» external_patient_id | query | string | false | External patient ID |
» category | query | string | true | Choose to search for labs with the category "laboratory" or vitals (not yet supported) |
Example responses
200 Response
[
{
"id": "string",
"name": "string",
"category": "String. The type of observation.",
"status": "String. Status of the observation.",
"patient_id": "string",
"date": "YYYY-MM-DDThh:mm:ss.xxxZ",
"value": "string",
"value_type": "String. Type of value. E.g. string if value is a string or quantity if value is an integer or float.",
"unit": "String. Display name for unit of measurement of value.",
"unit_code": "String. Code for unit of measurement of value. Ensures certainty on the exact unit type and can be used to perform calculations on value.",
"reference_range_low": "The low value for a normal reference range determined by the facility",
"reference_range_high": "The high value for a normal reference range determined by the facility",
"interpretation": "Interpretation provided by the facility performing the observation"
}
]
200 Response in :id path query case
{
"id": "string",
"category": "laboratory",
"status": "final",
"patient_id": "string",
"date": "YYYY-MM-DDThh:mm:ss.xxxZ",
"name": "string",
"value": "string",
"value_type": "string",
"unit": "string",
"unit_code": "string",
"reference_range_low": "number",
"reference_range_high": "number",
"interpretation": "string"
}
400 Response
{
"statusCode": 0,
"error": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
204 | No Content | No Content | None |
400 | Bad Request | Bad Request | Inline |
404 | Not Found | Not Found | Inline |
500 | Internal Server Error | Database Error | Inline |
Enumerated Values
Parameter | Description | Value |
---|---|---|
» category | The type of observation | ["laboratory"] |
» status | The status of the observation | ["registered", "preliminary", "final", "amended", "corrected", "cancelled", "entered-in-error", "unknown"] |
Response Schema
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» statusCode | number | false | none | none |
» error | string | false | none | none |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» statusCode | number | false | none | none |
» error | string | false | none | none |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» statusCode | number | false | none | none |
» error | string | false | none | none |
get_availability
Get avaialbility of Clinician. We run calculations for you, so you only get available & open slots. Great for building your own patient self-scheduling tool. Ask for documentation.
Get avaialbility of Clinician. We run calculations for you, so you only get available & open slots. Great for building your own patient self-scheduling tool. Ask for documentation.
custom_widgets
Add custom dynamic html widgets into the sidebar of a patient's chart. Can be used to show custom data to the provider to ensure they do not need to use several apps to find all the relevant information.
Add custom dynamic html widgets into the sidebar of a patient's chart. Can be used to show custom data to the provider to ensure they do not need to use several apps to find all the relevant information.
https://help.akutehealth.com/article/9-custom-sidebar-apps-guide
post/put/get_problem_list
Coming 2022
post/put_appointments
Coming 2022
post/put_labs
Coming 2022
post/put/get_allergies
Coming 2022
post/put/get_procedures
Coming 2022
post/put/get_conversations
Coming 2022