MENU navbar-image

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"
    }
}
 

Request      

GET api/v1/patient/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the patient. Example: 003fb6c7-a399-46de-8199-ac51e031bd10

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"
}
 

Request      

POST api/v1/patient

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

given_names   string   

The patient's given names. Example: John

family_name   string   

The patient's family names. Example: Smith

date_of_birth   string   

The patient's date of birth in ISO 8601 format (YYYY-MM-DD). Example: 1985-06-15

sex   string   

The patient's sex, typically 'male', 'female', or 'other'. Example: male

address   object  optional  
street   string   

The patient's street address. Example: 123 Main Street

city   string   

The city of the patient's address. Example: Sydney

state   string   

The state or province of the patient's address. Example: NSW

postcode   string   

The postcode of the patient's address. Example: 2000

country   string   

The country of the patient's address. Example: Australia