Introduction
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
To authenticate requests, include an Authorization
header with the value "Bearer {YOUR_AUTH_KEY}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
You can retrieve your token by visiting your dashboard and clicking Generate API token.
Patients
APIs for managing patients
Retrieve a patient
requires authentication
Example request:
curl --request GET \
--get "https://region.aurabox.cloud/api/v1/api/v1/patient/003fb6c7-a399-46de-8199-ac51e031bd10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://region.aurabox.cloud/api/v1/api/v1/patient/003fb6c7-a399-46de-8199-ac51e031bd10"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://region.aurabox.cloud/api/v1/api/v1/patient/003fb6c7-a399-46de-8199-ac51e031bd10';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://region.aurabox.cloud/api/v1/api/v1/patient/003fb6c7-a399-46de-8199-ac51e031bd10'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"id": "some-uuid",
"given_names": "Jessica",
"family_name": "Jones",
"date_of_birth": "1985-06-15",
"sex": "female",
"address": {
"street": "123 Main Street",
"city": "Sydney",
"state": "NSW",
"postcode": "2000",
"country": "au"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a patient record on the current team
requires authentication
Example request:
curl --request POST \
"https://region.aurabox.cloud/api/v1/api/v1/patient" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"given_names\": \"John\",
\"family_name\": \"Smith\",
\"date_of_birth\": \"1985-06-15\",
\"sex\": \"male\"
}"
const url = new URL(
"https://region.aurabox.cloud/api/v1/api/v1/patient"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"given_names": "John",
"family_name": "Smith",
"date_of_birth": "1985-06-15",
"sex": "male"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://region.aurabox.cloud/api/v1/api/v1/patient';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'given_names' => 'John',
'family_name' => 'Smith',
'date_of_birth' => '1985-06-15',
'sex' => 'male',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://region.aurabox.cloud/api/v1/api/v1/patient'
payload = {
"given_names": "John",
"family_name": "Smith",
"date_of_birth": "1985-06-15",
"sex": "male"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"result": "success",
"patient": "some-uuid"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.