HTTP Shell JavaScript Java PHP Go Python Ruby

Getlabs API v2

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

By integrating the Getlabs API, you can bridge the gap between virtual and in-person healthcare, connecting physician-led telemedicine with in-person care from medical professionals. This enables healthcare providers to extend care to the home unlocking high-quality healthcare for more patients at a fraction of the cost.

With a single API call, we enable our partners to provide end-to-end care for their patients and extend their capabilities to treat new conditions & modalities. What if you could treat primary care remotely? Now you can.

Pick and choose the types of diagnostics you need. Your patients select a convenient time and place. The Getlabs API takes care of everything else.

Maintenance Mode: In the event that the Getlabs API is under maintenance a 503 Service Unavailable will be returned with a matching maintenance mode header (maintenance-mode) set to true. Under normal operation the header defaults false.

Base URLs:

Authentication

All of the API endpoints are secured with Bearer Tokens. You must pass your token with any endpoint request. To do so include the following header in your request replacing the token with one that you've obtained from the /oauth/token endpoint.

Authorization: Bearer c2FkZnNld3J0Z2Zlcndnd2Z3ZXNndGVydGZ3ZXJmZXd0Z2V3Z3dlNGdmM3dmM3c=

Obtaining a Bearer token

In order to make API requests you will need to obtain an access token. Token requests must send a signed JWT. The JWT must be signed (using HS512 algorithm) with the provided getlabs API token/secret. See OAuth section below for more details.

NOTE: the JWT provided with the token request is valid for a period of 24hrs after first use. The JWT will need to be regenerated after that time. It is recommended to regenerate a signed JWT for each token request.

OAuth

Oauth_Token

Code samples

POST https://api.getlabs.com/v2/oauth/token HTTP/1.1
Host: api.getlabs.com
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X POST https://api.getlabs.com/v2/oauth/token \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

const inputBody = '{
  "grant_type": "urn:ietf:params:oauth:grant-type:jwt-bearer",
  "refresh_token": "string",
  "assertion": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://api.getlabs.com/v2/oauth/token',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/oauth/token");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.getlabs.com/v2/oauth/token', 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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.getlabs.com/v2/oauth/token", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://api.getlabs.com/v2/oauth/token', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api.getlabs.com/v2/oauth/token',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /v2/oauth/token

This endpoint is required to get an access token to access the external api as well as refresh your expired access token

In order to make api requests you will need to get an access token. Token requests must send a JWT as an assertion parameter in the http request payload. The JWT must be signed (using HS512 algorithm) with the provided getlabs api token/secret.

The token payload must contain:

{
   aud: string; // getlabs oauth/token endpoint https://api.getlabs.com/v2/oauth/token
   sub: string; // your getlabs provided client id
   exp: number; // unix timestamp when this jwt bearer token expires
   iat: number; // unix timestamp when this jwt bearer token was issued at
}

Refresh Token: Expired access_token(s) can also be refreshed by using this endpoint, resulting in a fresh access_token and refresh_token.

An Authorization header with your expired access_token is required. As well as the refresh_token and grant type in the http request payload.

More details can be found here: Using JWTs as Authorization Grants

Body parameter

{
  "grant_type": "urn:ietf:params:oauth:grant-type:jwt-bearer",
  "refresh_token": "string",
  "assertion": "string"
}

Parameters

Name In Type Required Description
body body OauthRequest true none

Example responses

201 Response

{
  "access_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjE5Nzk2MjEwLTBmZDUtNDFhZi1iOGUzLWM1ODViYzFjN2ExMSIsInR5cGUiOiJQYXJ0bmVyRW50aXR5IiwiaWF0IjoxNjU4NDMzMjU3LCJleHAiOjE2NTg0MzM4NTd9.XQsq-opjVKVmVhvXzU_mGeCqOi3m96ZoHGnLQ90UnFXKQDTTMeTm7lOv9Qd8nNmDab9Ex7VmIKt3Ne8NDvIVWQ",
  "refresh_token": "323abcbc59fd263986d4a2afd0f24385457dd5b6",
  "token_type": "Bearer",
  "expires": "1658433841"
}

Responses

Status Meaning Description Schema
201 Created Access and refresh token details. OauthToken

Availability

Availability_List

Code samples

GET https://api.getlabs.com/v2/availability?from=2021-01-01&days=5&street=200%20W.%20Washington%20Street&city=Phoenix&state=AZ&zipCode=85003 HTTP/1.1
Host: api.getlabs.com
Accept: application/json

# You can also use wget
curl -X GET https://api.getlabs.com/v2/availability?from=2021-01-01&days=5&street=200%20W.%20Washington%20Street&city=Phoenix&state=AZ&zipCode=85003 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/availability?from=2021-01-01&days=5&street=200%20W.%20Washington%20Street&city=Phoenix&state=AZ&zipCode=85003',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/availability?from=2021-01-01&days=5&street=200%20W.%20Washington%20Street&city=Phoenix&state=AZ&zipCode=85003");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.getlabs.com/v2/availability', 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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.getlabs.com/v2/availability", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.getlabs.com/v2/availability', params={
  'from': '2021-01-01',  'days': '5',  'street': '200 W. Washington Street',  'city': 'Phoenix',  'state': 'AZ',  'zipCode': '85003'
}, headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.getlabs.com/v2/availability',
  params: {
  'from' => 'string(date)',
'days' => 'number',
'street' => 'string',
'city' => 'string',
'state' => 'string',
'zipCode' => 'string'
}, headers: headers

p JSON.parse(result)

GET /v2/availability

Returns a list of appointment slots grouped by day. Available slots will have a booking key, this key is required when using the appointment endpoint to book an appointment.

Parameters

Name In Type Required Description
from query string(date) true The first date to query appointment availability in the YYYY-MM-DD format
days query number true The number of days to return appointment availability for
street query string true The street address for the appointment
unit query string false The unit number for the appointment
city query string true The city for the appointment
state query string true The 2 character state code for the appointment
zipCode query string true The 5 digit zip code for the appointment

Example responses

200 Response

{
  "serviceable": true,
  "data": [
    {
      "date": "2021-07-01",
      "slots": [
        {
          "key": "yGDknWzB74gP8zpET+HrI3jQVyq4ss/ENX38C1eJSR3D7zCHGloM0URG8V2y1nltsTgvED2q/ZcyJZzfZcWc021/Hg1TWICUkDXl627QDdytvUGsEcy9dqpxtqNLmkCtBRcQHnbgaSIR9E7gZ/5fj6NfTwnRH1coitxlOUCsrm9x76l80saizu9M3L5UqafNB7MtbkcCtfB4h9nubzUXahEbXPq0wFvbt/2VQl7311Vgro9XC3k/CbeBMtiQXhSMqslRop44NJO7Rp6qHEjsrZOJVfcKd3ASuYFEspBi+J+ddRilOS4p06Ai8nhrIx3pbLXoRm4aSqNaLCx5lbldLeh08ozRBt3oBGZDzwxdsYzu8iBgxMMGbH/AUpuR+7Lh9YE=",
          "start": "2021-07-01T12:00:00.000Z",
          "end": "2021-07-01T13:00:00.000Z",
          "expiresAt": "2021-06-22T12:00:00.000Z",
          "price": "2900",
          "priority": true,
          "available": 3
        }
      ]
    }
  ],
  "tz": "America/Phoenix"
}

Responses

Status Meaning Description Schema
200 OK The available appointment timeslots grouped by day AvailabilityResponse
400 Bad Request Invalid request data BadRequest

Appointment

Appointment_List

Code samples

GET https://api.getlabs.com/v2/appointment?limit=25&offset=1 HTTP/1.1
Host: api.getlabs.com
Accept: application/json

# You can also use wget
curl -X GET https://api.getlabs.com/v2/appointment?limit=25&offset=1 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/appointment?limit=25&offset=1',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/appointment?limit=25&offset=1");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.getlabs.com/v2/appointment', 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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.getlabs.com/v2/appointment", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.getlabs.com/v2/appointment', params={
  'limit': '25',  'offset': '1'
}, headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.getlabs.com/v2/appointment',
  params: {
  'limit' => 'number',
'offset' => 'number'
}, headers: headers

p JSON.parse(result)

GET /v2/appointment

Parameters

Name In Type Required Description
limit query number true The number of records to limit in the pagination
offset query number true The offset in the pagination
startAt query string(date) false The start date to query appointments in the YYYY-MM-DD format
endAt query string(date) false The end date to query appointments in the YYYY-MM-DD format
order query string(string) false A CSV of appointment propertyName:asc
status query array[string] false An array of statuses to filter results by
state query array[string] false An array of 2 character state codes
patientId query string false The patient's ID to filter the results by

Enumerated Values

Parameter Value
status pending
status confirmed
status in-progress
status completed
status cancelled

Example responses

200 Response

{
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "identifier": "PWDYA7",
      "status": "pending",
      "patient": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "externalId": "string",
        "email": "user@example.com",
        "phoneNumber": "6025554567",
        "firstName": "Jane",
        "lastName": "Doe",
        "dob": "1977-07-08",
        "birthSex": "female",
        "pronouns": "She/Her",
        "editable": true,
        "guardian": {
          "name": "Jane Doe",
          "relationship": "Mother"
        },
        "insurance": {
          "front": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "name": "lab-order.pdf",
            "purpose": "lab-order",
            "size": 13264,
            "type": "string"
          },
          "rear": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "name": "lab-order.pdf",
            "purpose": "lab-order",
            "size": 13264,
            "type": "string"
          }
        }
      },
      "labOrderDetails": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "contactName": "Jane Doe",
          "contactPhone": "6025554567",
          "labOrderFiles": [
            {
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
              "name": "lab-order.pdf",
              "purpose": "lab-order",
              "size": 13264,
              "type": "string",
              "url": "string"
            }
          ]
        }
      ],
      "startAt": "2021-07-01T12:00:00.000Z",
      "endAt": "2021-07-01T13:00:00.000Z",
      "isRebook": true,
      "address": {
        "street": "200 W. Washington Street",
        "unit": "Suite 205",
        "city": "Phoenix",
        "state": "AZ",
        "zipCode": "85003",
        "timezone": "America/Phoenix"
      },
      "isRefundable": true,
      "isRebookable": true,
      "cancellationReason": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "Scheduled time no longer works",
        "isRefundable": true
      },
      "cancellationNote": "string",
      "cancellationOrigin": "patient",
      "cancellationChargeable": true,
      "behalfOf": {
        "firstName": "string",
        "lastName": "string",
        "email": "string",
        "phoneNumber": "string",
        "isLegalGuardian": true,
        "shouldNotify": true
      },
      "parkingInstruction": "Park on street.",
      "specialRequest": "Call on arrival.",
      "specimens": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "lab-order.pdf",
          "purpose": "lab-order",
          "size": 13264,
          "type": "string",
          "url": "string"
        }
      ],
      "createdAt": "2021-07-01T13:00:00.000Z",
      "externalId": "string",
      "updatedEta": "2021-07-01T13:00:00.000Z"
    }
  ],
  "total": 25
}

Responses

Status Meaning Description Schema
200 OK This is a paged response that will return an array of Appointments. Inline
400 Bad Request Invalid request data BadRequest

Response Schema

Enumerated Values

Property Value
status pending
status confirmed
status in-progress
status completed
status cancelled
birthSex male
birthSex female
birthSex other
purpose lab-order
purpose insurance-front
purpose insurance-rear
purpose lab-order
purpose insurance-front
purpose insurance-rear
purpose lab-order
purpose insurance-front
purpose insurance-rear
purpose specimen
cancellationOrigin patient
cancellationOrigin partner
cancellationOrigin getlabs
cancellationOrigin null

Appointment_Create

Code samples

POST https://api.getlabs.com/v2/appointment HTTP/1.1
Host: api.getlabs.com
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X POST https://api.getlabs.com/v2/appointment \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "key": "SFG8HHp01ZNwi+/prwl2CmKSlZZHByJLjf27E5l+f7I+suxFY0QYkTWtxJ4xr5n/IsMm2LTrUADDHRGuzo6F/abaLdGMvHxvf7CSwQxlit7pel3SK0c8HwxllGG3UWq21GV1x/SkvITGDAUUAwFHZ/urGzhgKf4DQkKiZctPVFRvfGq1ash4ZV7HfdbBviswl5w6ORSmYwwae6zQx+//h83DcfO7xIMbjamoJDfoDUS0v5ZftVeN3KjjBdCd4nunBy6YTsEnlVQaJqTa4uSwu++ddZ6/ZTw5nEIgSQjhQL9uJd9YgC3ir4oyw0reI9NsHgp5vdO1TIVSodfMUv8NYB23v3mWKyeI21xehM32wAUs/u0JkXBGrWrUNM+Q2PaP3hZQJrh3DQ==",
  "patientId": "460a6d87-689c-4661-a526-a52450bbe2d7",
  "labOrderDetails": [
    {
      "contactName": "Jane Doe",
      "contactPhone": "6025554567",
      "labOrderFileIds": [
        "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
      ]
    }
  ],
  "paymentMethod": "pm_1DkAUlB70neqlGn3zQESm7pl",
  "behalfOf": {
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "phoneNumber": "string",
    "isLegalGuardian": true,
    "shouldNotify": true
  },
  "parkingInstruction": "Park on street.",
  "specialRequest": "Call on arrival.",
  "products": [
    {
      "productId": "string",
      "partnerProductConfigId": "string"
    }
  ],
  "externalId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/appointment',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/appointment");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.getlabs.com/v2/appointment', 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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.getlabs.com/v2/appointment", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.getlabs.com/v2/appointment', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.getlabs.com/v2/appointment',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /v2/appointment

Creates a new appointment. There are a couple prerequisite requirements before creating an appointment:

  1. Retrieve a patient ID from the patient endpoint.
  2. Retrieve a booking key from the availability endpoint. The time and location of the appointment is retrieved from this key.
  3. (optional) Upload any required lab order files to the lab order endpoint and use those file IDs when creating the appointment.
  4. (optional) Add any partner products to the appointment.

Body parameter

{
  "key": "SFG8HHp01ZNwi+/prwl2CmKSlZZHByJLjf27E5l+f7I+suxFY0QYkTWtxJ4xr5n/IsMm2LTrUADDHRGuzo6F/abaLdGMvHxvf7CSwQxlit7pel3SK0c8HwxllGG3UWq21GV1x/SkvITGDAUUAwFHZ/urGzhgKf4DQkKiZctPVFRvfGq1ash4ZV7HfdbBviswl5w6ORSmYwwae6zQx+//h83DcfO7xIMbjamoJDfoDUS0v5ZftVeN3KjjBdCd4nunBy6YTsEnlVQaJqTa4uSwu++ddZ6/ZTw5nEIgSQjhQL9uJd9YgC3ir4oyw0reI9NsHgp5vdO1TIVSodfMUv8NYB23v3mWKyeI21xehM32wAUs/u0JkXBGrWrUNM+Q2PaP3hZQJrh3DQ==",
  "patientId": "460a6d87-689c-4661-a526-a52450bbe2d7",
  "labOrderDetails": [
    {
      "contactName": "Jane Doe",
      "contactPhone": "6025554567",
      "labOrderFileIds": [
        "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
      ]
    }
  ],
  "paymentMethod": "pm_1DkAUlB70neqlGn3zQESm7pl",
  "behalfOf": {
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "phoneNumber": "string",
    "isLegalGuardian": true,
    "shouldNotify": true
  },
  "parkingInstruction": "Park on street.",
  "specialRequest": "Call on arrival.",
  "products": [
    {
      "productId": "string",
      "partnerProductConfigId": "string"
    }
  ],
  "externalId": "string"
}

Parameters

Name In Type Required Description
body body AppointmentBook true none

Example responses

201 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "identifier": "PWDYA7",
  "status": "pending",
  "patient": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "externalId": "string",
    "email": "user@example.com",
    "phoneNumber": "6025554567",
    "firstName": "Jane",
    "lastName": "Doe",
    "dob": "1977-07-08",
    "birthSex": "female",
    "pronouns": "She/Her",
    "editable": true,
    "guardian": {
      "name": "Jane Doe",
      "relationship": "Mother"
    },
    "insurance": {
      "front": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "size": 13264,
        "type": "string"
      },
      "rear": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "size": 13264,
        "type": "string"
      }
    }
  },
  "labOrderDetails": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "contactName": "Jane Doe",
      "contactPhone": "6025554567",
      "labOrderFiles": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "lab-order.pdf",
          "purpose": "lab-order",
          "size": 13264,
          "type": "string",
          "url": "string"
        }
      ]
    }
  ],
  "startAt": "2021-07-01T12:00:00.000Z",
  "endAt": "2021-07-01T13:00:00.000Z",
  "isRebook": true,
  "address": {
    "street": "200 W. Washington Street",
    "unit": "Suite 205",
    "city": "Phoenix",
    "state": "AZ",
    "zipCode": "85003",
    "timezone": "America/Phoenix"
  },
  "isRefundable": true,
  "isRebookable": true,
  "cancellationReason": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "Scheduled time no longer works",
    "isRefundable": true
  },
  "cancellationNote": "string",
  "cancellationOrigin": "patient",
  "cancellationChargeable": true,
  "behalfOf": {
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "phoneNumber": "string",
    "isLegalGuardian": true,
    "shouldNotify": true
  },
  "parkingInstruction": "Park on street.",
  "specialRequest": "Call on arrival.",
  "specimens": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "size": 13264,
      "type": "string",
      "url": "string"
    }
  ],
  "createdAt": "2021-07-01T13:00:00.000Z",
  "externalId": "string",
  "updatedEta": "2021-07-01T13:00:00.000Z"
}

Responses

Status Meaning Description Schema
201 Created The newly created appointment Appointment
400 Bad Request Invalid request data BadRequest
409 Conflict A string describing that we couldn't accept the request due to a conflict. Usually, a duplicated externalId. ConflictError
422 Unprocessable Entity A string describing why we could not process the entity. Usually, the patient already has an appt booked for that day. UnprocessableError

Appointment_Read

Code samples

GET https://api.getlabs.com/v2/appointment/{id} HTTP/1.1
Host: api.getlabs.com
Accept: application/json

# You can also use wget
curl -X GET https://api.getlabs.com/v2/appointment/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/appointment/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/appointment/{id}");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.getlabs.com/v2/appointment/{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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.getlabs.com/v2/appointment/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.getlabs.com/v2/appointment/{id}', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.getlabs.com/v2/appointment/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /v2/appointment/{id}

Fetches an existing appointment

Parameters

Name In Type Required Description
id path string(uuid) true The appointment ID

Example responses

200 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "identifier": "PWDYA7",
  "status": "pending",
  "patient": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "externalId": "string",
    "email": "user@example.com",
    "phoneNumber": "6025554567",
    "firstName": "Jane",
    "lastName": "Doe",
    "dob": "1977-07-08",
    "birthSex": "female",
    "pronouns": "She/Her",
    "editable": true,
    "guardian": {
      "name": "Jane Doe",
      "relationship": "Mother"
    },
    "insurance": {
      "front": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "size": 13264,
        "type": "string"
      },
      "rear": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "size": 13264,
        "type": "string"
      }
    }
  },
  "labOrderDetails": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "contactName": "Jane Doe",
      "contactPhone": "6025554567",
      "labOrderFiles": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "lab-order.pdf",
          "purpose": "lab-order",
          "size": 13264,
          "type": "string",
          "url": "string"
        }
      ]
    }
  ],
  "startAt": "2021-07-01T12:00:00.000Z",
  "endAt": "2021-07-01T13:00:00.000Z",
  "isRebook": true,
  "address": {
    "street": "200 W. Washington Street",
    "unit": "Suite 205",
    "city": "Phoenix",
    "state": "AZ",
    "zipCode": "85003",
    "timezone": "America/Phoenix"
  },
  "isRefundable": true,
  "isRebookable": true,
  "cancellationReason": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "Scheduled time no longer works",
    "isRefundable": true
  },
  "cancellationNote": "string",
  "cancellationOrigin": "patient",
  "cancellationChargeable": true,
  "behalfOf": {
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "phoneNumber": "string",
    "isLegalGuardian": true,
    "shouldNotify": true
  },
  "parkingInstruction": "Park on street.",
  "specialRequest": "Call on arrival.",
  "specimens": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "size": 13264,
      "type": "string",
      "url": "string"
    }
  ],
  "createdAt": "2021-07-01T13:00:00.000Z",
  "externalId": "string",
  "updatedEta": "2021-07-01T13:00:00.000Z"
}

Responses

Status Meaning Description Schema
200 OK The existing appointment Appointment
404 Not Found The appointment does not exist NotFound

Appointment_Rebook

Code samples

PATCH https://api.getlabs.com/v2/appointment/{id}/rebook HTTP/1.1
Host: api.getlabs.com
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X PATCH https://api.getlabs.com/v2/appointment/{id}/rebook \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "key": "SFG8HHp01ZNwi+/prwl2CmKSlZZHByJLjf27E5l+f7I+suxFY0QYkTWtxJ4xr5n/IsMm2LTrUADDHRGuzo6F/abaLdGMvHxvf7CSwQxlit7pel3SK0c8HwxllGG3UWq21GV1x/SkvITGDAUUAwFHZ/urGzhgKf4DQkKiZctPVFRvfGq1ash4ZV7HfdbBviswl5w6ORSmYwwae6zQx+//h83DcfO7xIMbjamoJDfoDUS0v5ZftVeN3KjjBdCd4nunBy6YTsEnlVQaJqTa4uSwu++ddZ6/ZTw5nEIgSQjhQL9uJd9YgC3ir4oyw0reI9NsHgp5vdO1TIVSodfMUv8NYB23v3mWKyeI21xehM32wAUs/u0JkXBGrWrUNM+Q2PaP3hZQJrh3DQ=="
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/appointment/{id}/rebook',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/appointment/{id}/rebook");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.getlabs.com/v2/appointment/{id}/rebook', 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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.getlabs.com/v2/appointment/{id}/rebook", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api.getlabs.com/v2/appointment/{id}/rebook', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://api.getlabs.com/v2/appointment/{id}/rebook',
  params: {
  }, headers: headers

p JSON.parse(result)

PATCH /v2/appointment/{id}/rebook

Change the time or address of an existing appointment. A new booking key must first be retrieved from the availability endpoint.

NOTE: This endpoint returns success if the appointment can be rescheduled:

Body parameter

{
  "key": "SFG8HHp01ZNwi+/prwl2CmKSlZZHByJLjf27E5l+f7I+suxFY0QYkTWtxJ4xr5n/IsMm2LTrUADDHRGuzo6F/abaLdGMvHxvf7CSwQxlit7pel3SK0c8HwxllGG3UWq21GV1x/SkvITGDAUUAwFHZ/urGzhgKf4DQkKiZctPVFRvfGq1ash4ZV7HfdbBviswl5w6ORSmYwwae6zQx+//h83DcfO7xIMbjamoJDfoDUS0v5ZftVeN3KjjBdCd4nunBy6YTsEnlVQaJqTa4uSwu++ddZ6/ZTw5nEIgSQjhQL9uJd9YgC3ir4oyw0reI9NsHgp5vdO1TIVSodfMUv8NYB23v3mWKyeI21xehM32wAUs/u0JkXBGrWrUNM+Q2PaP3hZQJrh3DQ=="
}

Parameters

Name In Type Required Description
id path string(uuid) true The appointment ID
body body AppointmentBookingKey true none

Example responses

200 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "identifier": "PWDYA7",
  "status": "pending",
  "patient": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "externalId": "string",
    "email": "user@example.com",
    "phoneNumber": "6025554567",
    "firstName": "Jane",
    "lastName": "Doe",
    "dob": "1977-07-08",
    "birthSex": "female",
    "pronouns": "She/Her",
    "editable": true,
    "guardian": {
      "name": "Jane Doe",
      "relationship": "Mother"
    },
    "insurance": {
      "front": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "size": 13264,
        "type": "string"
      },
      "rear": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "size": 13264,
        "type": "string"
      }
    }
  },
  "labOrderDetails": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "contactName": "Jane Doe",
      "contactPhone": "6025554567",
      "labOrderFiles": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "lab-order.pdf",
          "purpose": "lab-order",
          "size": 13264,
          "type": "string",
          "url": "string"
        }
      ]
    }
  ],
  "startAt": "2021-07-01T12:00:00.000Z",
  "endAt": "2021-07-01T13:00:00.000Z",
  "isRebook": true,
  "address": {
    "street": "200 W. Washington Street",
    "unit": "Suite 205",
    "city": "Phoenix",
    "state": "AZ",
    "zipCode": "85003",
    "timezone": "America/Phoenix"
  },
  "isRefundable": true,
  "isRebookable": true,
  "cancellationReason": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "Scheduled time no longer works",
    "isRefundable": true
  },
  "cancellationNote": "string",
  "cancellationOrigin": "patient",
  "cancellationChargeable": true,
  "behalfOf": {
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "phoneNumber": "string",
    "isLegalGuardian": true,
    "shouldNotify": true
  },
  "parkingInstruction": "Park on street.",
  "specialRequest": "Call on arrival.",
  "specimens": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "size": 13264,
      "type": "string",
      "url": "string"
    }
  ],
  "createdAt": "2021-07-01T13:00:00.000Z",
  "externalId": "string",
  "updatedEta": "2021-07-01T13:00:00.000Z"
}

Responses

Status Meaning Description Schema
200 OK The modified appointment Appointment
400 Bad Request Invalid request data BadRequest
404 Not Found The appointment does not exist NotFound

Appointment_Cancel

Code samples

PATCH https://api.getlabs.com/v2/appointment/{id}/cancel HTTP/1.1
Host: api.getlabs.com
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X PATCH https://api.getlabs.com/v2/appointment/{id}/cancel \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "cancellationReasonId": "bbe18b64-79e3-4309-b8ed-556d65f0d00a",
  "note": "Circumstances caused the patient to be unable to make it"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/appointment/{id}/cancel',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/appointment/{id}/cancel");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.getlabs.com/v2/appointment/{id}/cancel', 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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.getlabs.com/v2/appointment/{id}/cancel", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api.getlabs.com/v2/appointment/{id}/cancel', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://api.getlabs.com/v2/appointment/{id}/cancel',
  params: {
  }, headers: headers

p JSON.parse(result)

PATCH /v2/appointment/{id}/cancel

Cancels an existing appointment. A cancellation reason ID from the cancellation-reason endpoint is required. If the reason is "Other" then a note explaining the reason is also required.

NOTE: This endpoint returns success if the appointment can be cancelled:

Body parameter

{
  "cancellationReasonId": "bbe18b64-79e3-4309-b8ed-556d65f0d00a",
  "note": "Circumstances caused the patient to be unable to make it"
}

Parameters

Name In Type Required Description
id path string(uuid) true The appointment ID
body body AppointmentCancel true none

Example responses

200 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "identifier": "PWDYA7",
  "status": "pending",
  "patient": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "externalId": "string",
    "email": "user@example.com",
    "phoneNumber": "6025554567",
    "firstName": "Jane",
    "lastName": "Doe",
    "dob": "1977-07-08",
    "birthSex": "female",
    "pronouns": "She/Her",
    "editable": true,
    "guardian": {
      "name": "Jane Doe",
      "relationship": "Mother"
    },
    "insurance": {
      "front": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "size": 13264,
        "type": "string"
      },
      "rear": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "size": 13264,
        "type": "string"
      }
    }
  },
  "labOrderDetails": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "contactName": "Jane Doe",
      "contactPhone": "6025554567",
      "labOrderFiles": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "lab-order.pdf",
          "purpose": "lab-order",
          "size": 13264,
          "type": "string",
          "url": "string"
        }
      ]
    }
  ],
  "startAt": "2021-07-01T12:00:00.000Z",
  "endAt": "2021-07-01T13:00:00.000Z",
  "isRebook": true,
  "address": {
    "street": "200 W. Washington Street",
    "unit": "Suite 205",
    "city": "Phoenix",
    "state": "AZ",
    "zipCode": "85003",
    "timezone": "America/Phoenix"
  },
  "isRefundable": true,
  "isRebookable": true,
  "cancellationReason": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "Scheduled time no longer works",
    "isRefundable": true
  },
  "cancellationNote": "string",
  "cancellationOrigin": "patient",
  "cancellationChargeable": true,
  "behalfOf": {
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "phoneNumber": "string",
    "isLegalGuardian": true,
    "shouldNotify": true
  },
  "parkingInstruction": "Park on street.",
  "specialRequest": "Call on arrival.",
  "specimens": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "size": 13264,
      "type": "string",
      "url": "string"
    }
  ],
  "createdAt": "2021-07-01T13:00:00.000Z",
  "externalId": "string",
  "updatedEta": "2021-07-01T13:00:00.000Z"
}

Responses

Status Meaning Description Schema
200 OK The cancelled appointment Appointment
400 Bad Request Invalid request data BadRequest
404 Not Found The appointment does not exist NotFound

Appointment_ReadCollectedData

Code samples

GET https://api.getlabs.com/v2/appointment/{id}/collected-data HTTP/1.1
Host: api.getlabs.com
Accept: application/json

# You can also use wget
curl -X GET https://api.getlabs.com/v2/appointment/{id}/collected-data \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/appointment/{id}/collected-data',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/appointment/{id}/collected-data");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.getlabs.com/v2/appointment/{id}/collected-data', 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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.getlabs.com/v2/appointment/{id}/collected-data", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.getlabs.com/v2/appointment/{id}/collected-data', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.getlabs.com/v2/appointment/{id}/collected-data',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /v2/appointment/{id}/collected-data

Fetches the data collected during the appointment

Parameters

Name In Type Required Description
id path string(uuid) true The appointment ID

Example responses

200 Response

{
  "patientId": "460a6d87-689c-4661-a526-a52450bbe2d7",
  "data": {
    "biometrics": {
      "patient_consent_signature": {
        "value": "7611ddbe-42a3-4805-aefe-d8dac7e4cde7",
        "valueType": "fileId",
        "fileUrl": "https://someurl.com/7611ddbe-42a3-4805-aefe-d8dac7e4cde7"
      },
      "blood_pressure": {
        "blood_pressure_systolic": {
          "value": 120,
          "unit": "mmHg",
          "valueType": "number"
        },
        "blood_pressure_diastolic": {
          "value": 20,
          "unit": "mmHg",
          "valueType": "number"
        }
      },
      "weight": {
        "value": 199,
        "unit": "pounds",
        "valueType": "number"
      },
      "height": {
        "value": 178,
        "unit": "inches",
        "valueType": "number"
      }
    },
    "specialist_checklist": {
      "did_patient_fast": {
        "value": "true",
        "valueType": "yesno"
      },
      "is_patient_pregnant": {
        "value": "false",
        "valueType": "yesno"
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK The appointment's collected data AppointmentCollectedData
400 Bad Request Invalid request data BadRequest

Appointment_ReadReschedules

Code samples

GET https://api.getlabs.com/v2/appointment/{id}/reschedules HTTP/1.1
Host: api.getlabs.com
Accept: application/json

# You can also use wget
curl -X GET https://api.getlabs.com/v2/appointment/{id}/reschedules \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/appointment/{id}/reschedules',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/appointment/{id}/reschedules");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.getlabs.com/v2/appointment/{id}/reschedules', 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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.getlabs.com/v2/appointment/{id}/reschedules", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.getlabs.com/v2/appointment/{id}/reschedules', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.getlabs.com/v2/appointment/{id}/reschedules',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /v2/appointment/{id}/reschedules

Fetches the reschedules for an appointment.

Parameters

Name In Type Required Description
id path string(uuid) true The appointment ID.

Example responses

200 Response

{
  "appointmentId": "24c6adb3-18be-4108-aa61-3d58879e05a2",
  "data": [
    {
      "rescheduledAt": "2019-08-24T14:15:22Z",
      "previousStartAt": "2019-08-24T14:15:22Z",
      "rescheduleOrigin": "patient"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The appointment reschedules. AppointmentReschedules
400 Bad Request Invalid request data BadRequest

Appointment_ReadByExternalId

Code samples

GET https://api.getlabs.com/v2/appointment/external-id/{id} HTTP/1.1
Host: api.getlabs.com
Accept: application/json

# You can also use wget
curl -X GET https://api.getlabs.com/v2/appointment/external-id/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/appointment/external-id/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/appointment/external-id/{id}");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.getlabs.com/v2/appointment/external-id/{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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.getlabs.com/v2/appointment/external-id/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.getlabs.com/v2/appointment/external-id/{id}', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.getlabs.com/v2/appointment/external-id/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /v2/appointment/external-id/{id}

Fetches an appointment by an external identifier

Parameters

Name In Type Required Description
id path string(uuid) true Partner's external identifier for the appointment

Example responses

200 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "identifier": "PWDYA7",
  "status": "pending",
  "patient": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "externalId": "string",
    "email": "user@example.com",
    "phoneNumber": "6025554567",
    "firstName": "Jane",
    "lastName": "Doe",
    "dob": "1977-07-08",
    "birthSex": "female",
    "pronouns": "She/Her",
    "editable": true,
    "guardian": {
      "name": "Jane Doe",
      "relationship": "Mother"
    },
    "insurance": {
      "front": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "size": 13264,
        "type": "string"
      },
      "rear": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "size": 13264,
        "type": "string"
      }
    }
  },
  "labOrderDetails": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "contactName": "Jane Doe",
      "contactPhone": "6025554567",
      "labOrderFiles": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "lab-order.pdf",
          "purpose": "lab-order",
          "size": 13264,
          "type": "string",
          "url": "string"
        }
      ]
    }
  ],
  "startAt": "2021-07-01T12:00:00.000Z",
  "endAt": "2021-07-01T13:00:00.000Z",
  "isRebook": true,
  "address": {
    "street": "200 W. Washington Street",
    "unit": "Suite 205",
    "city": "Phoenix",
    "state": "AZ",
    "zipCode": "85003",
    "timezone": "America/Phoenix"
  },
  "isRefundable": true,
  "isRebookable": true,
  "cancellationReason": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "Scheduled time no longer works",
    "isRefundable": true
  },
  "cancellationNote": "string",
  "cancellationOrigin": "patient",
  "cancellationChargeable": true,
  "behalfOf": {
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "phoneNumber": "string",
    "isLegalGuardian": true,
    "shouldNotify": true
  },
  "parkingInstruction": "Park on street.",
  "specialRequest": "Call on arrival.",
  "specimens": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "size": 13264,
      "type": "string",
      "url": "string"
    }
  ],
  "createdAt": "2021-07-01T13:00:00.000Z",
  "externalId": "string",
  "updatedEta": "2021-07-01T13:00:00.000Z"
}

Responses

Status Meaning Description Schema
200 OK The appointment details Appointment
404 Not Found An appointment with the provided external id does not exist NotFound

Appointment Group

AppointmentGroup_Read

Code samples

GET https://api.getlabs.com/v2/appointment-group/{id} HTTP/1.1
Host: api.getlabs.com
Accept: application/json

# You can also use wget
curl -X GET https://api.getlabs.com/v2/appointment-group/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/appointment-group/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/appointment-group/{id}");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.getlabs.com/v2/appointment-group/{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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.getlabs.com/v2/appointment-group/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.getlabs.com/v2/appointment-group/{id}', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.getlabs.com/v2/appointment-group/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /v2/appointment-group/{id}

Fetches an existing appointment group.

Parameters

Name In Type Required Description
id path string(uuid) true The appointment group ID.

Example responses

200 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "appointments": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "identifier": "PWDYA7",
      "status": "pending",
      "patient": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "externalId": "string",
        "email": "user@example.com",
        "phoneNumber": "6025554567",
        "firstName": "Jane",
        "lastName": "Doe",
        "dob": "1977-07-08",
        "birthSex": "female",
        "pronouns": "She/Her",
        "editable": true,
        "guardian": {
          "name": "Jane Doe",
          "relationship": "Mother"
        },
        "insurance": {
          "front": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "name": "lab-order.pdf",
            "purpose": "lab-order",
            "size": 13264,
            "type": "string"
          },
          "rear": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "name": "lab-order.pdf",
            "purpose": "lab-order",
            "size": 13264,
            "type": "string"
          }
        }
      },
      "labOrderDetails": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "contactName": "Jane Doe",
          "contactPhone": "6025554567",
          "labOrderFiles": [
            {
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
              "name": "lab-order.pdf",
              "purpose": "lab-order",
              "size": 13264,
              "type": "string",
              "url": "string"
            }
          ]
        }
      ],
      "startAt": "2021-07-01T12:00:00.000Z",
      "endAt": "2021-07-01T13:00:00.000Z",
      "isRebook": true,
      "address": {
        "street": "200 W. Washington Street",
        "unit": "Suite 205",
        "city": "Phoenix",
        "state": "AZ",
        "zipCode": "85003",
        "timezone": "America/Phoenix"
      },
      "isRefundable": true,
      "isRebookable": true,
      "cancellationReason": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "Scheduled time no longer works",
        "isRefundable": true
      },
      "cancellationNote": "string",
      "cancellationOrigin": "patient",
      "cancellationChargeable": true,
      "behalfOf": {
        "firstName": "string",
        "lastName": "string",
        "email": "string",
        "phoneNumber": "string",
        "isLegalGuardian": true,
        "shouldNotify": true
      },
      "parkingInstruction": "Park on street.",
      "specialRequest": "Call on arrival.",
      "specimens": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "lab-order.pdf",
          "purpose": "lab-order",
          "size": 13264,
          "type": "string",
          "url": "string"
        }
      ],
      "createdAt": "2021-07-01T13:00:00.000Z",
      "externalId": "string",
      "updatedEta": "2021-07-01T13:00:00.000Z"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The appointment group. AppointmentGroup
404 Not Found The appointment group does not exist NotFound

AppointmentGroup_Book

Code samples

POST https://api.getlabs.com/v2/appointment-group HTTP/1.1
Host: api.getlabs.com
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X POST https://api.getlabs.com/v2/appointment-group \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "key": "SFG8HHp01ZNwi+/prwl2CmKSlZZHByJLjf27E5l+f7I+suxFY0QYkTWtxJ4xr5n/IsMm2LTrUADDHRGuzo6F/abaLdGMvHxvf7CSwQxlit7pel3SK0c8HwxllGG3UWq21GV1x/SkvITGDAUUAwFHZ/urGzhgKf4DQkKiZctPVFRvfGq1ash4ZV7HfdbBviswl5w6ORSmYwwae6zQx+//h83DcfO7xIMbjamoJDfoDUS0v5ZftVeN3KjjBdCd4nunBy6YTsEnlVQaJqTa4uSwu++ddZ6/ZTw5nEIgSQjhQL9uJd9YgC3ir4oyw0reI9NsHgp5vdO1TIVSodfMUv8NYB23v3mWKyeI21xehM32wAUs/u0JkXBGrWrUNM+Q2PaP3hZQJrh3DQ==",
  "appointments": [
    {
      "patientId": "460a6d87-689c-4661-a526-a52450bbe2d7",
      "labOrderDetails": [
        {
          "contactName": "Jane Doe",
          "contactPhone": "6025554567",
          "labOrderFileIds": [
            "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
          ]
        }
      ],
      "paymentMethod": "pm_1DkAUlB70neqlGn3zQESm7pl",
      "behalfOf": {
        "firstName": "string",
        "lastName": "string",
        "email": "string",
        "phoneNumber": "string",
        "isLegalGuardian": true,
        "shouldNotify": true
      },
      "parkingInstruction": "Park on street.",
      "specialRequest": "Call on arrival.",
      "products": [
        {
          "productId": "string",
          "partnerProductConfigId": "string"
        }
      ],
      "externalId": "string"
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/appointment-group',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/appointment-group");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.getlabs.com/v2/appointment-group', 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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.getlabs.com/v2/appointment-group", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.getlabs.com/v2/appointment-group', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.getlabs.com/v2/appointment-group',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /v2/appointment-group

Create a group of appointments that will be serviced together during a chosen timeslot. There are a couple prerequisite requirements before creating an appointment group:

  1. Retrieve a list patient IDs from the patient endpoint.
  2. Retrieve a booking key from the availability endpoint. The time and location of the appointments is retrieved from this key.
  3. (optional) Upload any required lab order files to the lab order endpoint and use those file IDs when creating the appointment.

Body parameter

{
  "key": "SFG8HHp01ZNwi+/prwl2CmKSlZZHByJLjf27E5l+f7I+suxFY0QYkTWtxJ4xr5n/IsMm2LTrUADDHRGuzo6F/abaLdGMvHxvf7CSwQxlit7pel3SK0c8HwxllGG3UWq21GV1x/SkvITGDAUUAwFHZ/urGzhgKf4DQkKiZctPVFRvfGq1ash4ZV7HfdbBviswl5w6ORSmYwwae6zQx+//h83DcfO7xIMbjamoJDfoDUS0v5ZftVeN3KjjBdCd4nunBy6YTsEnlVQaJqTa4uSwu++ddZ6/ZTw5nEIgSQjhQL9uJd9YgC3ir4oyw0reI9NsHgp5vdO1TIVSodfMUv8NYB23v3mWKyeI21xehM32wAUs/u0JkXBGrWrUNM+Q2PaP3hZQJrh3DQ==",
  "appointments": [
    {
      "patientId": "460a6d87-689c-4661-a526-a52450bbe2d7",
      "labOrderDetails": [
        {
          "contactName": "Jane Doe",
          "contactPhone": "6025554567",
          "labOrderFileIds": [
            "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
          ]
        }
      ],
      "paymentMethod": "pm_1DkAUlB70neqlGn3zQESm7pl",
      "behalfOf": {
        "firstName": "string",
        "lastName": "string",
        "email": "string",
        "phoneNumber": "string",
        "isLegalGuardian": true,
        "shouldNotify": true
      },
      "parkingInstruction": "Park on street.",
      "specialRequest": "Call on arrival.",
      "products": [
        {
          "productId": "string",
          "partnerProductConfigId": "string"
        }
      ],
      "externalId": "string"
    }
  ]
}

Parameters

Name In Type Required Description
body body CreateAppointmentGroup true none

Example responses

201 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "appointments": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "identifier": "PWDYA7",
      "status": "pending",
      "patient": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "externalId": "string",
        "email": "user@example.com",
        "phoneNumber": "6025554567",
        "firstName": "Jane",
        "lastName": "Doe",
        "dob": "1977-07-08",
        "birthSex": "female",
        "pronouns": "She/Her",
        "editable": true,
        "guardian": {
          "name": "Jane Doe",
          "relationship": "Mother"
        },
        "insurance": {
          "front": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "name": "lab-order.pdf",
            "purpose": "lab-order",
            "size": 13264,
            "type": "string"
          },
          "rear": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "name": "lab-order.pdf",
            "purpose": "lab-order",
            "size": 13264,
            "type": "string"
          }
        }
      },
      "labOrderDetails": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "contactName": "Jane Doe",
          "contactPhone": "6025554567",
          "labOrderFiles": [
            {
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
              "name": "lab-order.pdf",
              "purpose": "lab-order",
              "size": 13264,
              "type": "string",
              "url": "string"
            }
          ]
        }
      ],
      "startAt": "2021-07-01T12:00:00.000Z",
      "endAt": "2021-07-01T13:00:00.000Z",
      "isRebook": true,
      "address": {
        "street": "200 W. Washington Street",
        "unit": "Suite 205",
        "city": "Phoenix",
        "state": "AZ",
        "zipCode": "85003",
        "timezone": "America/Phoenix"
      },
      "isRefundable": true,
      "isRebookable": true,
      "cancellationReason": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "Scheduled time no longer works",
        "isRefundable": true
      },
      "cancellationNote": "string",
      "cancellationOrigin": "patient",
      "cancellationChargeable": true,
      "behalfOf": {
        "firstName": "string",
        "lastName": "string",
        "email": "string",
        "phoneNumber": "string",
        "isLegalGuardian": true,
        "shouldNotify": true
      },
      "parkingInstruction": "Park on street.",
      "specialRequest": "Call on arrival.",
      "specimens": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "lab-order.pdf",
          "purpose": "lab-order",
          "size": 13264,
          "type": "string",
          "url": "string"
        }
      ],
      "createdAt": "2021-07-01T13:00:00.000Z",
      "externalId": "string",
      "updatedEta": "2021-07-01T13:00:00.000Z"
    }
  ]
}

Responses

Status Meaning Description Schema
201 Created The newly created appointment group AppointmentGroup
400 Bad Request Invalid request data BadRequest
409 Conflict A string describing that we couldn't accept the request due to a conflict. Usually, a duplicated externalId. ConflictError
422 Unprocessable Entity A string describing that we could not process the entity. Usually, the patient(s) already has an appt booked for that day. UnprocessableError

AppointmentGroup_CancelGroupAppointments

Code samples

PATCH https://api.getlabs.com/v2/appointment-group/{id}/cancel HTTP/1.1
Host: api.getlabs.com
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X PATCH https://api.getlabs.com/v2/appointment-group/{id}/cancel \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "cancellationReasonId": "bbe18b64-79e3-4309-b8ed-556d65f0d00a",
  "note": "Circumstances caused the patient to be unable to make it"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/appointment-group/{id}/cancel',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/appointment-group/{id}/cancel");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.getlabs.com/v2/appointment-group/{id}/cancel', 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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.getlabs.com/v2/appointment-group/{id}/cancel", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api.getlabs.com/v2/appointment-group/{id}/cancel', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://api.getlabs.com/v2/appointment-group/{id}/cancel',
  params: {
  }, headers: headers

p JSON.parse(result)

PATCH /v2/appointment-group/{id}/cancel

Cancels all of the appointments within an appointment group. A cancellation reason ID from the cancellation-reason endpoint is required. If the reason is "Other" then a note explaining the reason is also required.

NOTE: This endpoint returns success if the appointment group can be cancelled:

Body parameter

{
  "cancellationReasonId": "bbe18b64-79e3-4309-b8ed-556d65f0d00a",
  "note": "Circumstances caused the patient to be unable to make it"
}

Parameters

Name In Type Required Description
id path string(uuid) true The appointment group ID.
body body AppointmentCancel true none

Example responses

200 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "appointments": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "identifier": "PWDYA7",
      "status": "pending",
      "patient": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "externalId": "string",
        "email": "user@example.com",
        "phoneNumber": "6025554567",
        "firstName": "Jane",
        "lastName": "Doe",
        "dob": "1977-07-08",
        "birthSex": "female",
        "pronouns": "She/Her",
        "editable": true,
        "guardian": {
          "name": "Jane Doe",
          "relationship": "Mother"
        },
        "insurance": {
          "front": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "name": "lab-order.pdf",
            "purpose": "lab-order",
            "size": 13264,
            "type": "string"
          },
          "rear": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "name": "lab-order.pdf",
            "purpose": "lab-order",
            "size": 13264,
            "type": "string"
          }
        }
      },
      "labOrderDetails": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "contactName": "Jane Doe",
          "contactPhone": "6025554567",
          "labOrderFiles": [
            {
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
              "name": "lab-order.pdf",
              "purpose": "lab-order",
              "size": 13264,
              "type": "string",
              "url": "string"
            }
          ]
        }
      ],
      "startAt": "2021-07-01T12:00:00.000Z",
      "endAt": "2021-07-01T13:00:00.000Z",
      "isRebook": true,
      "address": {
        "street": "200 W. Washington Street",
        "unit": "Suite 205",
        "city": "Phoenix",
        "state": "AZ",
        "zipCode": "85003",
        "timezone": "America/Phoenix"
      },
      "isRefundable": true,
      "isRebookable": true,
      "cancellationReason": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "Scheduled time no longer works",
        "isRefundable": true
      },
      "cancellationNote": "string",
      "cancellationOrigin": "patient",
      "cancellationChargeable": true,
      "behalfOf": {
        "firstName": "string",
        "lastName": "string",
        "email": "string",
        "phoneNumber": "string",
        "isLegalGuardian": true,
        "shouldNotify": true
      },
      "parkingInstruction": "Park on street.",
      "specialRequest": "Call on arrival.",
      "specimens": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "lab-order.pdf",
          "purpose": "lab-order",
          "size": 13264,
          "type": "string",
          "url": "string"
        }
      ],
      "createdAt": "2021-07-01T13:00:00.000Z",
      "externalId": "string",
      "updatedEta": "2021-07-01T13:00:00.000Z"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The cancelled appointment group. AppointmentGroup
404 Not Found The appointment group does not exist. NotFound
422 Unprocessable Entity A string describing why we could not process the request. UnprocessableError

AppointmentGroup_RebookGroupAppointments

Code samples

PATCH https://api.getlabs.com/v2/appointment-group/{id}/rebook HTTP/1.1
Host: api.getlabs.com
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X PATCH https://api.getlabs.com/v2/appointment-group/{id}/rebook \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "key": "SFG8HHp01ZNwi+/prwl2CmKSlZZHByJLjf27E5l+f7I+suxFY0QYkTWtxJ4xr5n/IsMm2LTrUADDHRGuzo6F/abaLdGMvHxvf7CSwQxlit7pel3SK0c8HwxllGG3UWq21GV1x/SkvITGDAUUAwFHZ/urGzhgKf4DQkKiZctPVFRvfGq1ash4ZV7HfdbBviswl5w6ORSmYwwae6zQx+//h83DcfO7xIMbjamoJDfoDUS0v5ZftVeN3KjjBdCd4nunBy6YTsEnlVQaJqTa4uSwu++ddZ6/ZTw5nEIgSQjhQL9uJd9YgC3ir4oyw0reI9NsHgp5vdO1TIVSodfMUv8NYB23v3mWKyeI21xehM32wAUs/u0JkXBGrWrUNM+Q2PaP3hZQJrh3DQ=="
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/appointment-group/{id}/rebook',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/appointment-group/{id}/rebook");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.getlabs.com/v2/appointment-group/{id}/rebook', 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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.getlabs.com/v2/appointment-group/{id}/rebook", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api.getlabs.com/v2/appointment-group/{id}/rebook', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://api.getlabs.com/v2/appointment-group/{id}/rebook',
  params: {
  }, headers: headers

p JSON.parse(result)

PATCH /v2/appointment-group/{id}/rebook

Change the time or address of an existing appointment group. A new booking key must first be retrieved from the availability endpoint.

NOTE: This endpoint returns success if the appointment group can be rescheduled:

Body parameter

{
  "key": "SFG8HHp01ZNwi+/prwl2CmKSlZZHByJLjf27E5l+f7I+suxFY0QYkTWtxJ4xr5n/IsMm2LTrUADDHRGuzo6F/abaLdGMvHxvf7CSwQxlit7pel3SK0c8HwxllGG3UWq21GV1x/SkvITGDAUUAwFHZ/urGzhgKf4DQkKiZctPVFRvfGq1ash4ZV7HfdbBviswl5w6ORSmYwwae6zQx+//h83DcfO7xIMbjamoJDfoDUS0v5ZftVeN3KjjBdCd4nunBy6YTsEnlVQaJqTa4uSwu++ddZ6/ZTw5nEIgSQjhQL9uJd9YgC3ir4oyw0reI9NsHgp5vdO1TIVSodfMUv8NYB23v3mWKyeI21xehM32wAUs/u0JkXBGrWrUNM+Q2PaP3hZQJrh3DQ=="
}

Parameters

Name In Type Required Description
id path string(uuid) true The appointment group ID.
body body AppointmentBookingKey true none

Example responses

200 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "appointments": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "identifier": "PWDYA7",
      "status": "pending",
      "patient": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "externalId": "string",
        "email": "user@example.com",
        "phoneNumber": "6025554567",
        "firstName": "Jane",
        "lastName": "Doe",
        "dob": "1977-07-08",
        "birthSex": "female",
        "pronouns": "She/Her",
        "editable": true,
        "guardian": {
          "name": "Jane Doe",
          "relationship": "Mother"
        },
        "insurance": {
          "front": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "name": "lab-order.pdf",
            "purpose": "lab-order",
            "size": 13264,
            "type": "string"
          },
          "rear": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "name": "lab-order.pdf",
            "purpose": "lab-order",
            "size": 13264,
            "type": "string"
          }
        }
      },
      "labOrderDetails": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "contactName": "Jane Doe",
          "contactPhone": "6025554567",
          "labOrderFiles": [
            {
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
              "name": "lab-order.pdf",
              "purpose": "lab-order",
              "size": 13264,
              "type": "string",
              "url": "string"
            }
          ]
        }
      ],
      "startAt": "2021-07-01T12:00:00.000Z",
      "endAt": "2021-07-01T13:00:00.000Z",
      "isRebook": true,
      "address": {
        "street": "200 W. Washington Street",
        "unit": "Suite 205",
        "city": "Phoenix",
        "state": "AZ",
        "zipCode": "85003",
        "timezone": "America/Phoenix"
      },
      "isRefundable": true,
      "isRebookable": true,
      "cancellationReason": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "Scheduled time no longer works",
        "isRefundable": true
      },
      "cancellationNote": "string",
      "cancellationOrigin": "patient",
      "cancellationChargeable": true,
      "behalfOf": {
        "firstName": "string",
        "lastName": "string",
        "email": "string",
        "phoneNumber": "string",
        "isLegalGuardian": true,
        "shouldNotify": true
      },
      "parkingInstruction": "Park on street.",
      "specialRequest": "Call on arrival.",
      "specimens": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "lab-order.pdf",
          "purpose": "lab-order",
          "size": 13264,
          "type": "string",
          "url": "string"
        }
      ],
      "createdAt": "2021-07-01T13:00:00.000Z",
      "externalId": "string",
      "updatedEta": "2021-07-01T13:00:00.000Z"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The modified appointment group. AppointmentGroup
404 Not Found The appointment group does not exist. NotFound
422 Unprocessable Entity A string describing why we could not process the request. UnprocessableError

Lab Order Details

AppointmentLabOrder_Create

Code samples

POST https://api.getlabs.com/v2/appointment/{appointmentId}/lab-order-details HTTP/1.1
Host: api.getlabs.com
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X POST https://api.getlabs.com/v2/appointment/{appointmentId}/lab-order-details \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "contactName": "Jane Doe",
  "contactPhone": "6025554567",
  "labOrderFileIds": [
    "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/appointment/{appointmentId}/lab-order-details',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/appointment/{appointmentId}/lab-order-details");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.getlabs.com/v2/appointment/{appointmentId}/lab-order-details', 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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.getlabs.com/v2/appointment/{appointmentId}/lab-order-details", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.getlabs.com/v2/appointment/{appointmentId}/lab-order-details', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.getlabs.com/v2/appointment/{appointmentId}/lab-order-details',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /v2/appointment/{appointmentId}/lab-order-details

Adds lab order details to an existing appointment. Only appointments with a status of "pending" can be modified.

Body parameter

{
  "contactName": "Jane Doe",
  "contactPhone": "6025554567",
  "labOrderFileIds": [
    "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
  ]
}

Parameters

Name In Type Required Description
appointmentId path string(uuid) true The appointment ID
body body LabOrderDetails true The new lab order details

Example responses

201 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "identifier": "PWDYA7",
  "status": "pending",
  "patient": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "externalId": "string",
    "email": "user@example.com",
    "phoneNumber": "6025554567",
    "firstName": "Jane",
    "lastName": "Doe",
    "dob": "1977-07-08",
    "birthSex": "female",
    "pronouns": "She/Her",
    "editable": true,
    "guardian": {
      "name": "Jane Doe",
      "relationship": "Mother"
    },
    "insurance": {
      "front": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "size": 13264,
        "type": "string"
      },
      "rear": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "size": 13264,
        "type": "string"
      }
    }
  },
  "labOrderDetails": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "contactName": "Jane Doe",
      "contactPhone": "6025554567",
      "labOrderFiles": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "lab-order.pdf",
          "purpose": "lab-order",
          "size": 13264,
          "type": "string",
          "url": "string"
        }
      ]
    }
  ],
  "startAt": "2021-07-01T12:00:00.000Z",
  "endAt": "2021-07-01T13:00:00.000Z",
  "isRebook": true,
  "address": {
    "street": "200 W. Washington Street",
    "unit": "Suite 205",
    "city": "Phoenix",
    "state": "AZ",
    "zipCode": "85003",
    "timezone": "America/Phoenix"
  },
  "isRefundable": true,
  "isRebookable": true,
  "cancellationReason": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "Scheduled time no longer works",
    "isRefundable": true
  },
  "cancellationNote": "string",
  "cancellationOrigin": "patient",
  "cancellationChargeable": true,
  "behalfOf": {
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "phoneNumber": "string",
    "isLegalGuardian": true,
    "shouldNotify": true
  },
  "parkingInstruction": "Park on street.",
  "specialRequest": "Call on arrival.",
  "specimens": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "size": 13264,
      "type": "string",
      "url": "string"
    }
  ],
  "createdAt": "2021-07-01T13:00:00.000Z",
  "externalId": "string",
  "updatedEta": "2021-07-01T13:00:00.000Z"
}

Responses

Status Meaning Description Schema
201 Created The updated appointment Appointment
400 Bad Request Invalid request data BadRequest
404 Not Found The appointment does not exist NotFound

AppointmentLabOrder_Delete

Code samples

DELETE https://api.getlabs.com/v2/appointment/{appointmentId}/lab-order-details/{id} HTTP/1.1
Host: api.getlabs.com
Accept: application/json

# You can also use wget
curl -X DELETE https://api.getlabs.com/v2/appointment/{appointmentId}/lab-order-details/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/appointment/{appointmentId}/lab-order-details/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/appointment/{appointmentId}/lab-order-details/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.getlabs.com/v2/appointment/{appointmentId}/lab-order-details/{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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.getlabs.com/v2/appointment/{appointmentId}/lab-order-details/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api.getlabs.com/v2/appointment/{appointmentId}/lab-order-details/{id}', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api.getlabs.com/v2/appointment/{appointmentId}/lab-order-details/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

DELETE /v2/appointment/{appointmentId}/lab-order-details/{id}

Remove lab order details from an existing appointment. Each appointment requires at least one lab order, if the last one needs to be deleted add a new one first. Only appointments with a status of "pending" can be modified.

Parameters

Name In Type Required Description
id path string(uuid) true The lab order details ID to be deleted
appointmentId path string(uuid) true The appointment ID

Example responses

200 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "identifier": "PWDYA7",
  "status": "pending",
  "patient": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "externalId": "string",
    "email": "user@example.com",
    "phoneNumber": "6025554567",
    "firstName": "Jane",
    "lastName": "Doe",
    "dob": "1977-07-08",
    "birthSex": "female",
    "pronouns": "She/Her",
    "editable": true,
    "guardian": {
      "name": "Jane Doe",
      "relationship": "Mother"
    },
    "insurance": {
      "front": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "size": 13264,
        "type": "string"
      },
      "rear": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "size": 13264,
        "type": "string"
      }
    }
  },
  "labOrderDetails": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "contactName": "Jane Doe",
      "contactPhone": "6025554567",
      "labOrderFiles": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "lab-order.pdf",
          "purpose": "lab-order",
          "size": 13264,
          "type": "string",
          "url": "string"
        }
      ]
    }
  ],
  "startAt": "2021-07-01T12:00:00.000Z",
  "endAt": "2021-07-01T13:00:00.000Z",
  "isRebook": true,
  "address": {
    "street": "200 W. Washington Street",
    "unit": "Suite 205",
    "city": "Phoenix",
    "state": "AZ",
    "zipCode": "85003",
    "timezone": "America/Phoenix"
  },
  "isRefundable": true,
  "isRebookable": true,
  "cancellationReason": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "Scheduled time no longer works",
    "isRefundable": true
  },
  "cancellationNote": "string",
  "cancellationOrigin": "patient",
  "cancellationChargeable": true,
  "behalfOf": {
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "phoneNumber": "string",
    "isLegalGuardian": true,
    "shouldNotify": true
  },
  "parkingInstruction": "Park on street.",
  "specialRequest": "Call on arrival.",
  "specimens": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "size": 13264,
      "type": "string",
      "url": "string"
    }
  ],
  "createdAt": "2021-07-01T13:00:00.000Z",
  "externalId": "string",
  "updatedEta": "2021-07-01T13:00:00.000Z"
}

Responses

Status Meaning Description Schema
200 OK The updated appointment Appointment
400 Bad Request Invalid request data BadRequest
404 Not Found The appointment or lab order details does not exist NotFound

Patient

Patient_Create

Code samples

POST https://api.getlabs.com/v2/patient HTTP/1.1
Host: api.getlabs.com
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X POST https://api.getlabs.com/v2/patient \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "externalId": "string",
  "email": "user@example.com",
  "phoneNumber": "6025554567",
  "firstName": "Jane",
  "lastName": "Doe",
  "dob": "1977-07-08",
  "birthSex": "female",
  "pronouns": "She/Her",
  "guardian": {
    "name": "Jane Doe",
    "relationship": "Mother"
  },
  "insurance": {
    "frontId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1",
    "rearId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/patient',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/patient");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.getlabs.com/v2/patient', 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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.getlabs.com/v2/patient", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.getlabs.com/v2/patient', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.getlabs.com/v2/patient',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /v2/patient

Creates a new patient.

To ensure direct communication on the day of the appointment, Getlabs asks that you provide patient contact information directly regarding their appointment. A partner provider consumer contact may be used if required.

NOTE: Previous patient matching functionality has been retired. Each call to the Patient Create endpoint will now result in a new patient record being created.In order to avoid creating duplicate patient records, it is advised to either: 1. Store the patient ID returned from the initial patient creation request in your application and use it in subsequent API calls 2. Pass a unique externalId value when creating/updating patients that can later be used to lookup the patient

Body parameter

{
  "externalId": "string",
  "email": "user@example.com",
  "phoneNumber": "6025554567",
  "firstName": "Jane",
  "lastName": "Doe",
  "dob": "1977-07-08",
  "birthSex": "female",
  "pronouns": "She/Her",
  "guardian": {
    "name": "Jane Doe",
    "relationship": "Mother"
  },
  "insurance": {
    "frontId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1",
    "rearId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
  }
}

Parameters

Name In Type Required Description
body body Patient true none

Example responses

201 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "externalId": "string",
  "email": "user@example.com",
  "phoneNumber": "6025554567",
  "firstName": "Jane",
  "lastName": "Doe",
  "dob": "1977-07-08",
  "birthSex": "female",
  "pronouns": "She/Her",
  "editable": true,
  "guardian": {
    "name": "Jane Doe",
    "relationship": "Mother"
  },
  "insurance": {
    "front": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "size": 13264,
      "type": "string"
    },
    "rear": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "size": 13264,
      "type": "string"
    }
  }
}

Responses

Status Meaning Description Schema
201 Created The requested patient Patient
400 Bad Request Invalid request data BadRequest
409 Conflict A patient with the given external id already exists. None

Patient_Read

Code samples

GET https://api.getlabs.com/v2/patient/{id} HTTP/1.1
Host: api.getlabs.com
Accept: application/json

# You can also use wget
curl -X GET https://api.getlabs.com/v2/patient/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/patient/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/patient/{id}");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.getlabs.com/v2/patient/{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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.getlabs.com/v2/patient/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.getlabs.com/v2/patient/{id}', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.getlabs.com/v2/patient/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /v2/patient/{id}

Fetches an existing patient

Parameters

Name In Type Required Description
id path string(uuid) true The patient ID

Example responses

200 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "externalId": "string",
  "email": "user@example.com",
  "phoneNumber": "6025554567",
  "firstName": "Jane",
  "lastName": "Doe",
  "dob": "1977-07-08",
  "birthSex": "female",
  "pronouns": "She/Her",
  "editable": true,
  "guardian": {
    "name": "Jane Doe",
    "relationship": "Mother"
  },
  "insurance": {
    "front": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "size": 13264,
      "type": "string"
    },
    "rear": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "size": 13264,
      "type": "string"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK The patient's details Patient
404 Not Found The patient does not exist NotFound

Patient_Update

Code samples

PATCH https://api.getlabs.com/v2/patient/{id} HTTP/1.1
Host: api.getlabs.com
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X PATCH https://api.getlabs.com/v2/patient/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "externalId": "string",
  "guardian": {
    "name": "Jane Doe",
    "relationship": "Mother"
  },
  "insurance": {
    "frontId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1",
    "rearId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
  },
  "firstName": "Jane",
  "lastName": "Doe",
  "birthSex": "female",
  "email": "user@example.com",
  "phoneNumber": "6025554567",
  "pronouns": "She/Her",
  "notes": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/patient/{id}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/patient/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.getlabs.com/v2/patient/{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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.getlabs.com/v2/patient/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api.getlabs.com/v2/patient/{id}', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://api.getlabs.com/v2/patient/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

PATCH /v2/patient/{id}

Updates an existing patient's details

Body parameter

{
  "externalId": "string",
  "guardian": {
    "name": "Jane Doe",
    "relationship": "Mother"
  },
  "insurance": {
    "frontId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1",
    "rearId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
  },
  "firstName": "Jane",
  "lastName": "Doe",
  "birthSex": "female",
  "email": "user@example.com",
  "phoneNumber": "6025554567",
  "pronouns": "She/Her",
  "notes": "string"
}

Parameters

Name In Type Required Description
id path string(uuid) true The patient ID
body body PatientUpdate true none

Example responses

200 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "externalId": "string",
  "email": "user@example.com",
  "phoneNumber": "6025554567",
  "firstName": "Jane",
  "lastName": "Doe",
  "dob": "1977-07-08",
  "birthSex": "female",
  "pronouns": "She/Her",
  "editable": true,
  "guardian": {
    "name": "Jane Doe",
    "relationship": "Mother"
  },
  "insurance": {
    "front": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "size": 13264,
      "type": "string"
    },
    "rear": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "size": 13264,
      "type": "string"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK The patient's details Patient
404 Not Found The patient does not exist NotFound
409 Conflict A patient with the given external id already exists. None

Patient_ReadByExternalId

Code samples

GET https://api.getlabs.com/v2/patient/external-id/{id} HTTP/1.1
Host: api.getlabs.com
Accept: application/json

# You can also use wget
curl -X GET https://api.getlabs.com/v2/patient/external-id/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/patient/external-id/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/patient/external-id/{id}");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.getlabs.com/v2/patient/external-id/{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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.getlabs.com/v2/patient/external-id/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.getlabs.com/v2/patient/external-id/{id}', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.getlabs.com/v2/patient/external-id/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /v2/patient/external-id/{id}

Fetches a patient by an external identifier

Parameters

Name In Type Required Description
id path string(uuid) true Partner's external identifier for the patient

Example responses

200 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "externalId": "string",
  "email": "user@example.com",
  "phoneNumber": "6025554567",
  "firstName": "Jane",
  "lastName": "Doe",
  "dob": "1977-07-08",
  "birthSex": "female",
  "pronouns": "She/Her",
  "editable": true,
  "guardian": {
    "name": "Jane Doe",
    "relationship": "Mother"
  },
  "insurance": {
    "front": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "size": 13264,
      "type": "string"
    },
    "rear": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "size": 13264,
      "type": "string"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK The patient's details Patient
404 Not Found A patient with the given external id does not exist NotFound

Appointment Requests

AppointmentRequest_Read

Code samples

GET https://api.getlabs.com/v2/appointment-requests/{id} HTTP/1.1
Host: api.getlabs.com
Accept: application/json

# You can also use wget
curl -X GET https://api.getlabs.com/v2/appointment-requests/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/appointment-requests/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/appointment-requests/{id}");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.getlabs.com/v2/appointment-requests/{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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.getlabs.com/v2/appointment-requests/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.getlabs.com/v2/appointment-requests/{id}', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.getlabs.com/v2/appointment-requests/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /v2/appointment-requests/{id}

Fetches an existing appointment request

Parameters

Name In Type Required Description
id path string(uuid) true The appointment request ID

Example responses

200 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "status": "pending",
  "patient": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "externalId": "string",
    "email": "user@example.com",
    "phoneNumber": "6025554567",
    "firstName": "Jane",
    "lastName": "Doe",
    "dob": "1977-07-08",
    "birthSex": "female",
    "pronouns": "She/Her",
    "editable": true,
    "guardian": {
      "name": "Jane Doe",
      "relationship": "Mother"
    },
    "insurance": {
      "front": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "size": 13264,
        "type": "string"
      },
      "rear": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "size": 13264,
        "type": "string"
      }
    }
  },
  "appointmentData": {
    "patientId": "5629a84d-a302-47c2-82f3-430f2a100a74",
    "partnerId": "112a778e-0a54-4cf9-9390-e1b7c4b7b7f9",
    "address": {
      "street": "600 E Washington St",
      "city": "Phoenix",
      "state": "AZ",
      "zipCode": "85004",
      "unit": null
    }
  },
  "cancellationReason": "malformed-data",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "appointmentId": "string",
  "lastNotifiedAt": "2019-08-24T14:15:22Z",
  "timesNotified": 0,
  "bookingUrl": "https://app.getlabs.com/booking-request/abcd123-a123-123d-456f-123ab4c56d78",
  "groupId": "string"
}

Responses

Status Meaning Description Schema
200 OK The existing appointment request AppointmentRequest
404 Not Found The appointment request does not exist NotFound

AppointmentRequest_Create

Code samples

POST https://api.getlabs.com/v2/appointment-requests HTTP/1.1
Host: api.getlabs.com
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X POST https://api.getlabs.com/v2/appointment-requests \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "address": {
    "street": "200 W. Washington Street",
    "unit": "Suite 205",
    "city": "Phoenix",
    "state": "AZ",
    "zipCode": "85003"
  },
  "labOrderDetails": [
    {
      "contactName": "Jane Doe",
      "contactPhone": "6025554567",
      "labOrderFileIds": [
        "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
      ]
    }
  ],
  "patientId": "460a6d87-689c-4661-a526-a52450bbe2d7",
  "insurance": {
    "frontId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1",
    "rearId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
  },
  "parkingInstruction": "Park on street.",
  "specialRequest": "Call on arrival.",
  "shouldNotifyPatient": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/appointment-requests',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/appointment-requests");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.getlabs.com/v2/appointment-requests', 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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.getlabs.com/v2/appointment-requests", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.getlabs.com/v2/appointment-requests', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.getlabs.com/v2/appointment-requests',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /v2/appointment-requests

Partnership Platform Feature

Creates a new appointment request. An appointment request is a partially completed appointment where the patient is responsible for completing the booking. The patient will be notified to schedule the appointment via SMS after the request is created. If you have all the data required to book an appointment, please use the POST /appointment endpoint.

There are a couple prerequisite requirements before creating an appointment request:

  1. Retrieve a patient ID from the patient endpoint.
  2. (optional) Upload any required lab order files to the lab order endpoint and use those file IDs when creating the appointment request.

Body parameter

{
  "address": {
    "street": "200 W. Washington Street",
    "unit": "Suite 205",
    "city": "Phoenix",
    "state": "AZ",
    "zipCode": "85003"
  },
  "labOrderDetails": [
    {
      "contactName": "Jane Doe",
      "contactPhone": "6025554567",
      "labOrderFileIds": [
        "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
      ]
    }
  ],
  "patientId": "460a6d87-689c-4661-a526-a52450bbe2d7",
  "insurance": {
    "frontId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1",
    "rearId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
  },
  "parkingInstruction": "Park on street.",
  "specialRequest": "Call on arrival.",
  "shouldNotifyPatient": true
}

Parameters

Name In Type Required Description
body body CreateAppointmentRequest true none

Example responses

201 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "status": "pending",
  "patient": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "externalId": "string",
    "email": "user@example.com",
    "phoneNumber": "6025554567",
    "firstName": "Jane",
    "lastName": "Doe",
    "dob": "1977-07-08",
    "birthSex": "female",
    "pronouns": "She/Her",
    "editable": true,
    "guardian": {
      "name": "Jane Doe",
      "relationship": "Mother"
    },
    "insurance": {
      "front": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "size": 13264,
        "type": "string"
      },
      "rear": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "size": 13264,
        "type": "string"
      }
    }
  },
  "appointmentData": {
    "patientId": "5629a84d-a302-47c2-82f3-430f2a100a74",
    "partnerId": "112a778e-0a54-4cf9-9390-e1b7c4b7b7f9",
    "address": {
      "street": "600 E Washington St",
      "city": "Phoenix",
      "state": "AZ",
      "zipCode": "85004",
      "unit": null
    }
  },
  "cancellationReason": "malformed-data",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "appointmentId": "string",
  "lastNotifiedAt": "2019-08-24T14:15:22Z",
  "timesNotified": 0,
  "bookingUrl": "https://app.getlabs.com/booking-request/abcd123-a123-123d-456f-123ab4c56d78",
  "groupId": "string"
}

Responses

Status Meaning Description Schema
201 Created The newly created appointment request AppointmentRequest
400 Bad Request Invalid request data BadRequest
422 Unprocessable Entity A string explaining why we could not process the request. UnprocessableError

AppointmentRequest_List

Code samples

GET https://api.getlabs.com/v2/appointment-requests?limit=25&offset=1 HTTP/1.1
Host: api.getlabs.com
Accept: application/json

# You can also use wget
curl -X GET https://api.getlabs.com/v2/appointment-requests?limit=25&offset=1 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/appointment-requests?limit=25&offset=1',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/appointment-requests?limit=25&offset=1");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.getlabs.com/v2/appointment-requests', 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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.getlabs.com/v2/appointment-requests", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.getlabs.com/v2/appointment-requests', params={
  'limit': '25',  'offset': '1'
}, headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.getlabs.com/v2/appointment-requests',
  params: {
  'limit' => 'number',
'offset' => 'number'
}, headers: headers

p JSON.parse(result)

GET /v2/appointment-requests

Parameters

Name In Type Required Description
limit query number true The number of records to limit in the pagination
offset query number true The offset in the pagination
order query string(string) false A CSV of appointment propertyName:asc
status query array[string] false An array of statuses to filter results by
createdAtMin query string(date-time) false Return appointment requests that were created on or after the specified date and time.
createdAtMax query string(date-time) false Return appointment requests that were created on or before the specified date and time.
state query array[string] false An array of 2 character state codes
appointmentId query string false The appointment Id that belongs to the appointment request. This is only available after the appointment request has been scheduled.

Enumerated Values

Parameter Value
status pending
status processed
status notified
status unresponsive
status scheduled
status fulfilled
status errored
status cancelled

Example responses

200 Response

{
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "status": "pending",
      "patient": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "externalId": "string",
        "email": "user@example.com",
        "phoneNumber": "6025554567",
        "firstName": "Jane",
        "lastName": "Doe",
        "dob": "1977-07-08",
        "birthSex": "female",
        "pronouns": "She/Her",
        "editable": true,
        "guardian": {
          "name": "Jane Doe",
          "relationship": "Mother"
        },
        "insurance": {
          "front": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "name": "lab-order.pdf",
            "purpose": "lab-order",
            "size": 13264,
            "type": "string"
          },
          "rear": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "name": "lab-order.pdf",
            "purpose": "lab-order",
            "size": 13264,
            "type": "string"
          }
        }
      },
      "appointmentData": {
        "patientId": "5629a84d-a302-47c2-82f3-430f2a100a74",
        "partnerId": "112a778e-0a54-4cf9-9390-e1b7c4b7b7f9",
        "address": {
          "street": "600 E Washington St",
          "city": "Phoenix",
          "state": "AZ",
          "zipCode": "85004",
          "unit": null
        }
      },
      "cancellationReason": "malformed-data",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z",
      "appointmentId": "string",
      "lastNotifiedAt": "2019-08-24T14:15:22Z",
      "timesNotified": 0,
      "bookingUrl": "https://app.getlabs.com/booking-request/abcd123-a123-123d-456f-123ab4c56d78",
      "groupId": "string"
    }
  ],
  "total": 25
}

Responses

Status Meaning Description Schema
200 OK This is a paged response that will return an array of appointment requests Inline
400 Bad Request Invalid request data BadRequest

Response Schema

Enumerated Values

Property Value
status pending
status processed
status notified
status unresponsive
status scheduled
status fulfilled
status errored
status cancelled
birthSex male
birthSex female
birthSex other
purpose lab-order
purpose insurance-front
purpose insurance-rear
purpose lab-order
purpose insurance-front
purpose insurance-rear
cancellationReason malformed-data
cancellationReason not-serviceable
cancellationReason null

AppointmentRequest_Cancel

Code samples

PATCH https://api.getlabs.com/v2/appointment-requests/{id}/cancel HTTP/1.1
Host: api.getlabs.com
Accept: application/json

# You can also use wget
curl -X PATCH https://api.getlabs.com/v2/appointment-requests/{id}/cancel \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/appointment-requests/{id}/cancel',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/appointment-requests/{id}/cancel");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.getlabs.com/v2/appointment-requests/{id}/cancel', 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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.getlabs.com/v2/appointment-requests/{id}/cancel", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api.getlabs.com/v2/appointment-requests/{id}/cancel', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://api.getlabs.com/v2/appointment-requests/{id}/cancel',
  params: {
  }, headers: headers

p JSON.parse(result)

PATCH /v2/appointment-requests/{id}/cancel

Cancels an appointment request.

Appointment requests can only be cancelled while they are in a pending, notified, unresponsive state.

Parameters

Name In Type Required Description
id path string(uuid) true The appointment request ID

Example responses

201 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "status": "pending",
  "patient": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "externalId": "string",
    "email": "user@example.com",
    "phoneNumber": "6025554567",
    "firstName": "Jane",
    "lastName": "Doe",
    "dob": "1977-07-08",
    "birthSex": "female",
    "pronouns": "She/Her",
    "editable": true,
    "guardian": {
      "name": "Jane Doe",
      "relationship": "Mother"
    },
    "insurance": {
      "front": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "size": 13264,
        "type": "string"
      },
      "rear": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "size": 13264,
        "type": "string"
      }
    }
  },
  "appointmentData": {
    "patientId": "5629a84d-a302-47c2-82f3-430f2a100a74",
    "partnerId": "112a778e-0a54-4cf9-9390-e1b7c4b7b7f9",
    "address": {
      "street": "600 E Washington St",
      "city": "Phoenix",
      "state": "AZ",
      "zipCode": "85004",
      "unit": null
    }
  },
  "cancellationReason": "malformed-data",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "appointmentId": "string",
  "lastNotifiedAt": "2019-08-24T14:15:22Z",
  "timesNotified": 0,
  "bookingUrl": "https://app.getlabs.com/booking-request/abcd123-a123-123d-456f-123ab4c56d78",
  "groupId": "string"
}

Responses

Status Meaning Description Schema
201 Created The cancelled appointment request AppointmentRequest
400 Bad Request Invalid request data BadRequest
422 Unprocessable Entity A string explaining why we could not process the request. UnprocessableError

File

File_Create

Code samples

POST https://api.getlabs.com/v2/file HTTP/1.1
Host: api.getlabs.com
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X POST https://api.getlabs.com/v2/file \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "name": "lab-order.pdf",
  "purpose": "lab-order",
  "data": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/file',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/file");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.getlabs.com/v2/file', 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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.getlabs.com/v2/file", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.getlabs.com/v2/file', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.getlabs.com/v2/file',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /v2/file

Uploads a Base64 encoded file. If attaching a lab order file to an appointment it is first uploaded to this endpoint and the ID is used when creating the appointment. File types accepted are png, jpeg, tif, and pdf.

Body parameter

{
  "name": "lab-order.pdf",
  "purpose": "lab-order",
  "data": "string"
}

Parameters

Name In Type Required Description
body body File true none

Example responses

201 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "lab-order.pdf",
  "purpose": "lab-order",
  "size": 13264,
  "type": "string"
}

Responses

Status Meaning Description Schema
201 Created The newly created file File
400 Bad Request Invalid request data BadRequest

Cancellation Reasons

CancellationReasons_List

Code samples

GET https://api.getlabs.com/v2/cancellation-reason HTTP/1.1
Host: api.getlabs.com
Accept: application/json

# You can also use wget
curl -X GET https://api.getlabs.com/v2/cancellation-reason \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/cancellation-reason',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/cancellation-reason");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.getlabs.com/v2/cancellation-reason', 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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.getlabs.com/v2/cancellation-reason", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.getlabs.com/v2/cancellation-reason', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.getlabs.com/v2/cancellation-reason',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /v2/cancellation-reason

Returns a list of reasons an appointment can be cancelled. A cancellation reason ID is needed to cancel an appointment

Example responses

200 Response

[
  {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "Scheduled time no longer works",
    "isRefundable": true
  }
]

Responses

Status Meaning Description Schema
200 OK An array of all the cancellation reasons Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [CancellationReason] false none none
» id string(uuid) true read-only The ID of the cancellation reason
» name string true read-only What the cancellation reason is used for
» isRefundable boolean true read-only If true the patient is entitled to a refund after cancelling the appointment

Service Area

read

Code samples

GET https://api.getlabs.com/v2/service-area/zip-code/{zipCode} HTTP/1.1
Host: api.getlabs.com
Accept: application/json

# You can also use wget
curl -X GET https://api.getlabs.com/v2/service-area/zip-code/{zipCode} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/service-area/zip-code/{zipCode}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/service-area/zip-code/{zipCode}");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.getlabs.com/v2/service-area/zip-code/{zipCode}', 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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.getlabs.com/v2/service-area/zip-code/{zipCode}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.getlabs.com/v2/service-area/zip-code/{zipCode}', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.getlabs.com/v2/service-area/zip-code/{zipCode}',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /v2/service-area/zip-code/{zipCode}

Fetches a service area for a given zip code. It can be used to determine if Getlabs is able to book appointments for a given zip code.

Parameters

Name In Type Required Description
zipCode path string true The 5 digit zip code for the service area

Example responses

200 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "city": "Phoenix",
  "county": "Maricopa County",
  "state": "AZ",
  "zipCode": "85003",
  "timezone": "America/Phoenix",
  "startDate": "2021-01-01T07:00:00.000Z",
  "endDate": "2022-01-01T07:00:00.000Z",
  "isActive": true
}

Responses

Status Meaning Description Schema
200 OK The service area details ServiceArea
404 Not Found No service area exists for the given zip code NotFound

Payment

create setup intent

Code samples

POST https://api.getlabs.com/v2/payment/setup HTTP/1.1
Host: api.getlabs.com
Content-Type: application/json
Accept: application/json

# You can also use wget
curl -X POST https://api.getlabs.com/v2/payment/setup \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

const inputBody = '{
  "patientId": "460a6d87-689c-4661-a526-a52450bbe2d7"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/payment/setup',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/payment/setup");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.getlabs.com/v2/payment/setup', 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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.getlabs.com/v2/payment/setup", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.getlabs.com/v2/payment/setup', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.getlabs.com/v2/payment/setup',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /v2/payment/setup

Creates a setup intent with Stripe. This is needed to collect a patient's credit card details using Stripe's client API. This endpoint is only used by partners who have opted for their patients to directly pay for the appointment.

Body parameter

{
  "patientId": "460a6d87-689c-4661-a526-a52450bbe2d7"
}

Parameters

Name In Type Required Description
body body PaymentCreateSetup true none

Example responses

201 Response

{
  "clientSecret": "seti_1Jv3iKB60neqlRn35yPUsJN6_secret_KaEA3x316GYgEyYZUgdiUo2K1cwoDbw"
}

Responses

Status Meaning Description Schema
201 Created The created Stripe setup intent PaymentSetup
400 Bad Request Invalid request data BadRequest

Product

Product_List

Code samples

GET https://api.getlabs.com/v2/product HTTP/1.1
Host: api.getlabs.com
Accept: application/json

# You can also use wget
curl -X GET https://api.getlabs.com/v2/product \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://api.getlabs.com/v2/product',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

URL obj = new URL("https://api.getlabs.com/v2/product");
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());

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.getlabs.com/v2/product', 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());
 }

 // ...

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.getlabs.com/v2/product", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.getlabs.com/v2/product', headers = headers)

print(r.json())

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.getlabs.com/v2/product',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /v2/product

Lists all configured partner products that can be added when creating an appointment

Example responses

200 Response

{
  "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",
  "partnerProductConfigId": "0d54e124-fa27-482d-8416-9d088b40e326",
  "name": "Biometrics",
  "description": "Biometrics Testing for adults",
  "type": "kit-draw"
}

Responses

Status Meaning Description Schema
200 OK Return an array of partner products. PartnerProduct

Schemas

Address

{
  "street": "200 W. Washington Street",
  "unit": "Suite 205",
  "city": "Phoenix",
  "state": "AZ",
  "zipCode": "85003",
  "timezone": "America/Phoenix"
}

Properties

Name Type Required Restrictions Description
street string true none Street address
unit string¦null false none Unit number
city string true none City
state string true none 2 character state code
zipCode string true none 5 digit zip code for the appointment
timezone string¦null false read-only The timezone for the address

Appointment

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "identifier": "PWDYA7",
  "status": "pending",
  "patient": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "externalId": "string",
    "email": "user@example.com",
    "phoneNumber": "6025554567",
    "firstName": "Jane",
    "lastName": "Doe",
    "dob": "1977-07-08",
    "birthSex": "female",
    "pronouns": "She/Her",
    "editable": true,
    "guardian": {
      "name": "Jane Doe",
      "relationship": "Mother"
    },
    "insurance": {
      "front": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "data": "string",
        "size": 13264,
        "type": "string"
      },
      "rear": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "data": "string",
        "size": 13264,
        "type": "string"
      },
      "frontId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1",
      "rearId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
    }
  },
  "labOrderDetails": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "contactName": "Jane Doe",
      "contactPhone": "6025554567",
      "labOrderFiles": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "lab-order.pdf",
          "purpose": "lab-order",
          "data": "string",
          "size": 13264,
          "type": "string",
          "url": "string"
        }
      ],
      "labOrderFileIds": [
        "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
      ]
    }
  ],
  "startAt": "2021-07-01T12:00:00.000Z",
  "endAt": "2021-07-01T13:00:00.000Z",
  "isRebook": true,
  "address": {
    "street": "200 W. Washington Street",
    "unit": "Suite 205",
    "city": "Phoenix",
    "state": "AZ",
    "zipCode": "85003",
    "timezone": "America/Phoenix"
  },
  "isRefundable": true,
  "isRebookable": true,
  "cancellationReason": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "Scheduled time no longer works",
    "isRefundable": true
  },
  "cancellationNote": "string",
  "cancellationOrigin": "patient",
  "cancellationChargeable": true,
  "behalfOf": {
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "phoneNumber": "string",
    "isLegalGuardian": true,
    "shouldNotify": true
  },
  "parkingInstruction": "Park on street.",
  "specialRequest": "Call on arrival.",
  "specimens": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "data": "string",
      "size": 13264,
      "type": "string",
      "url": "string"
    }
  ],
  "createdAt": "2021-07-01T13:00:00.000Z",
  "externalId": "string",
  "updatedEta": "2021-07-01T13:00:00.000Z"
}

Properties

Name Type Required Restrictions Description
id string(uuid) true read-only none
identifier string true read-only A short identifier to reference the appointment
status string true read-only The current status of the appointment

Pending = Appointment is yet to be readied
Confirmed = Appointment has been readied and waiting to be serviced
In-progress = Specialist is on-route/arrived at patient's home
Completed = Successful lab draw
Cancelled = Appointment canceled by us or the patient
patient Patient true read-only Patient details for the appointment
labOrderDetails [LabOrderDetails] true none Lab order details for the appointment
startAt string(date-time) true read-only Appointment start time
endAt string(date-time) true read-only Appointment end time
isRebook boolean false read-only True if the appointment has been rescheduled.
address Address true read-only Address where the appointment will take place
isRefundable boolean true read-only True if canceling the appointment will result in a refund
isRebookable boolean true read-only True if the start time of the appointment can be changed
cancellationReason CancellationReason¦null false read-only The reason the appointment was cancelled
cancellationNote string¦null false read-only Any extra information as to why the appointment was cancelled
cancellationOrigin string¦null false read-only The origin of the cancellation. Will be one of patient, partner, or getlabs.
cancellationChargeable boolean true read-only Denotes if Getlabs will still charge for the appointment based on the cancellation.
behalfOf BehalfOf¦null false read-only Details of the person booking on behalf of the patient.
parkingInstruction string¦null false read-only Instructions for parking.
specialRequest string¦null false read-only Special request notes.
specimens [ExtendedFile] false read-only Specimens collected for the appointment. Specimens will only exist on completed/near-complete appointments.
createdAt string(date-time) true read-only Appointment created date/time
externalId string¦null false none External identifier for the appointment.
updatedEta string(date-time)¦null true read-only Specialist's ETA date/time (UTC), available when status is In-progress

Enumerated Values

Property Value
status pending
status confirmed
status in-progress
status completed
status cancelled
cancellationOrigin patient
cancellationOrigin partner
cancellationOrigin getlabs
cancellationOrigin null

AppointmentBook

{
  "key": "SFG8HHp01ZNwi+/prwl2CmKSlZZHByJLjf27E5l+f7I+suxFY0QYkTWtxJ4xr5n/IsMm2LTrUADDHRGuzo6F/abaLdGMvHxvf7CSwQxlit7pel3SK0c8HwxllGG3UWq21GV1x/SkvITGDAUUAwFHZ/urGzhgKf4DQkKiZctPVFRvfGq1ash4ZV7HfdbBviswl5w6ORSmYwwae6zQx+//h83DcfO7xIMbjamoJDfoDUS0v5ZftVeN3KjjBdCd4nunBy6YTsEnlVQaJqTa4uSwu++ddZ6/ZTw5nEIgSQjhQL9uJd9YgC3ir4oyw0reI9NsHgp5vdO1TIVSodfMUv8NYB23v3mWKyeI21xehM32wAUs/u0JkXBGrWrUNM+Q2PaP3hZQJrh3DQ==",
  "patientId": "460a6d87-689c-4661-a526-a52450bbe2d7",
  "labOrderDetails": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "contactName": "Jane Doe",
      "contactPhone": "6025554567",
      "labOrderFiles": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "lab-order.pdf",
          "purpose": "lab-order",
          "data": "string",
          "size": 13264,
          "type": "string",
          "url": "string"
        }
      ],
      "labOrderFileIds": [
        "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
      ]
    }
  ],
  "paymentMethod": "pm_1DkAUlB70neqlGn3zQESm7pl",
  "behalfOf": {
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "phoneNumber": "string",
    "isLegalGuardian": true,
    "shouldNotify": true
  },
  "parkingInstruction": "Park on street.",
  "specialRequest": "Call on arrival.",
  "products": [
    {
      "productId": "string",
      "partnerProductConfigId": "string"
    }
  ],
  "externalId": "string"
}

Properties

Name Type Required Restrictions Description
key string true none The booking key retrieved from the availability endpoint. A key is valid for 60 minutes after generation, to book an appointment after that a new key is needed.
patientId string(uuid) true none The patient's ID as retrieved from the /patient endpoint
labOrderDetails [LabOrderDetails] true none An array of LabOrderDetails objects. If the key being used is for a priority appointment then labOrderFileIds must be provided for at least one LabOrderDetail.
paymentMethod string false none The Stripe payment method ID fetched using the Stripe client API. This is only required if your account is setup to bill patients directly.
behalfOf BehalfOf false none Details of the person booking on behalf of the patient
parkingInstruction string false none Instructions for parking.
specialRequest string false none Special instruction notes.
products [AppointmentProduct] false none Partner Products attached to the appointment.
externalId string¦null false none External identifier for the appointment.

AppointmentBookingKey

{
  "key": "SFG8HHp01ZNwi+/prwl2CmKSlZZHByJLjf27E5l+f7I+suxFY0QYkTWtxJ4xr5n/IsMm2LTrUADDHRGuzo6F/abaLdGMvHxvf7CSwQxlit7pel3SK0c8HwxllGG3UWq21GV1x/SkvITGDAUUAwFHZ/urGzhgKf4DQkKiZctPVFRvfGq1ash4ZV7HfdbBviswl5w6ORSmYwwae6zQx+//h83DcfO7xIMbjamoJDfoDUS0v5ZftVeN3KjjBdCd4nunBy6YTsEnlVQaJqTa4uSwu++ddZ6/ZTw5nEIgSQjhQL9uJd9YgC3ir4oyw0reI9NsHgp5vdO1TIVSodfMUv8NYB23v3mWKyeI21xehM32wAUs/u0JkXBGrWrUNM+Q2PaP3hZQJrh3DQ=="
}

Properties

Name Type Required Restrictions Description
key string true none The booking key retrieved from the availability endpoint. A key is valid for 60 minutes after generation, to book an appointment after that a new key is needed.

AppointmentCancel

{
  "cancellationReasonId": "bbe18b64-79e3-4309-b8ed-556d65f0d00a",
  "note": "Circumstances caused the patient to be unable to make it"
}

Properties

Name Type Required Restrictions Description
cancellationReasonId string(uuid) true none The ID of the cancellation reason as retrieved from the cancellation-reason endpoint
note string false none Extra information as to why the appointment is being cancelled, this is required if the cancellation reason is "other"

AppointmentCollectedData

{
  "patientId": "460a6d87-689c-4661-a526-a52450bbe2d7",
  "data": {
    "biometrics": {
      "patient_consent_signature": {
        "value": "7611ddbe-42a3-4805-aefe-d8dac7e4cde7",
        "valueType": "fileId",
        "fileUrl": "https://someurl.com/7611ddbe-42a3-4805-aefe-d8dac7e4cde7"
      },
      "blood_pressure": {
        "blood_pressure_systolic": {
          "value": 120,
          "unit": "mmHg",
          "valueType": "number"
        },
        "blood_pressure_diastolic": {
          "value": 20,
          "unit": "mmHg",
          "valueType": "number"
        }
      },
      "weight": {
        "value": 199,
        "unit": "pounds",
        "valueType": "number"
      },
      "height": {
        "value": 178,
        "unit": "inches",
        "valueType": "number"
      }
    },
    "specialist_checklist": {
      "did_patient_fast": {
        "value": "true",
        "valueType": "yesno"
      },
      "is_patient_pregnant": {
        "value": "false",
        "valueType": "yesno"
      }
    }
  }
}

Properties

Name Type Required Restrictions Description
patientId string(uuid) true read-only The patients's ID
data object true read-only Collected data from the appointment, unique to partner configured product(s). Response is an object of (one or many) {"productKey": {"productPropertyKey": {valueObject} } }

AppointmentGroup

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "appointments": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "identifier": "PWDYA7",
      "status": "pending",
      "patient": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "externalId": "string",
        "email": "user@example.com",
        "phoneNumber": "6025554567",
        "firstName": "Jane",
        "lastName": "Doe",
        "dob": "1977-07-08",
        "birthSex": "female",
        "pronouns": "She/Her",
        "editable": true,
        "guardian": {
          "name": "Jane Doe",
          "relationship": "Mother"
        },
        "insurance": {
          "front": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "name": "lab-order.pdf",
            "purpose": "lab-order",
            "data": "string",
            "size": 13264,
            "type": "string"
          },
          "rear": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "name": "lab-order.pdf",
            "purpose": "lab-order",
            "data": "string",
            "size": 13264,
            "type": "string"
          },
          "frontId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1",
          "rearId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
        }
      },
      "labOrderDetails": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "contactName": "Jane Doe",
          "contactPhone": "6025554567",
          "labOrderFiles": [
            {
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
              "name": "lab-order.pdf",
              "purpose": "lab-order",
              "data": "string",
              "size": 13264,
              "type": "string",
              "url": "string"
            }
          ],
          "labOrderFileIds": [
            "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
          ]
        }
      ],
      "startAt": "2021-07-01T12:00:00.000Z",
      "endAt": "2021-07-01T13:00:00.000Z",
      "isRebook": true,
      "address": {
        "street": "200 W. Washington Street",
        "unit": "Suite 205",
        "city": "Phoenix",
        "state": "AZ",
        "zipCode": "85003",
        "timezone": "America/Phoenix"
      },
      "isRefundable": true,
      "isRebookable": true,
      "cancellationReason": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "Scheduled time no longer works",
        "isRefundable": true
      },
      "cancellationNote": "string",
      "cancellationOrigin": "patient",
      "cancellationChargeable": true,
      "behalfOf": {
        "firstName": "string",
        "lastName": "string",
        "email": "string",
        "phoneNumber": "string",
        "isLegalGuardian": true,
        "shouldNotify": true
      },
      "parkingInstruction": "Park on street.",
      "specialRequest": "Call on arrival.",
      "specimens": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "lab-order.pdf",
          "purpose": "lab-order",
          "data": "string",
          "size": 13264,
          "type": "string",
          "url": "string"
        }
      ],
      "createdAt": "2021-07-01T13:00:00.000Z",
      "externalId": "string",
      "updatedEta": "2021-07-01T13:00:00.000Z"
    }
  ]
}

Properties

Name Type Required Restrictions Description
id string(uuid) true read-only The appointment group's ID.
appointments [Appointment] true read-only The appointments part of the group.

AppointmentProduct

{
  "productId": "string",
  "partnerProductConfigId": "string"
}

Properties

Name Type Required Restrictions Description
productId string false none The product id. NOTE: Deprecated, no longer needed. Please use partnerProductConfigId instead.
partnerProductConfigId string true none The partner product configuration id.

AppointmentRequest

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "status": "pending",
  "patient": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "externalId": "string",
    "email": "user@example.com",
    "phoneNumber": "6025554567",
    "firstName": "Jane",
    "lastName": "Doe",
    "dob": "1977-07-08",
    "birthSex": "female",
    "pronouns": "She/Her",
    "editable": true,
    "guardian": {
      "name": "Jane Doe",
      "relationship": "Mother"
    },
    "insurance": {
      "front": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "data": "string",
        "size": 13264,
        "type": "string"
      },
      "rear": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "lab-order.pdf",
        "purpose": "lab-order",
        "data": "string",
        "size": 13264,
        "type": "string"
      },
      "frontId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1",
      "rearId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
    }
  },
  "appointmentData": {
    "patientId": "5629a84d-a302-47c2-82f3-430f2a100a74",
    "partnerId": "112a778e-0a54-4cf9-9390-e1b7c4b7b7f9",
    "address": {
      "street": "600 E Washington St",
      "city": "Phoenix",
      "state": "AZ",
      "zipCode": "85004",
      "unit": null
    }
  },
  "cancellationReason": "malformed-data",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "appointmentId": "string",
  "lastNotifiedAt": "2019-08-24T14:15:22Z",
  "timesNotified": 0,
  "bookingUrl": "https://app.getlabs.com/booking-request/abcd123-a123-123d-456f-123ab4c56d78",
  "groupId": "string"
}

Properties

Name Type Required Restrictions Description
id string(uuid) true read-only The appointment request's ID
status string true read-only The current status of the appointment request

Pending = The appointment request has been created but has not been actioned upon.
Processed = The appointment request has been processed, waiting to notify the patient.
Notified = The patient has been notified about the appointment request.
Unresponsive = The patient has been notified and reminded three times about the appointment request, but has not responded.
Scheduled = An appointment has been scheduled for the appointment request
Fulfilled = The scheduled appointment has been completed.
Errored = There has been an error processing the appointment request.
Cancelled = The scheduled appointment has been canceled.
patient Patient true read-only The patient the appointment request is for
appointmentData object¦null false read-only The appointment data
cancellationReason string¦null false read-only The reason the appointment request was cancelled
createdAt string(date-time) true read-only Datetime when the appointment request was created
updatedAt string(date-time) true read-only Datetime when the appointment request was updated
appointmentId string¦null false read-only The ID of the appointment created for this request.
lastNotifiedAt string(date-time)¦null false read-only Datetime when the user was last notified about this request.
timesNotified number¦null false read-only Number of times the user has been notified.
bookingUrl string¦null false read-only URL where the patient can book an appointment.
groupId string¦null false read-only The appointment request group id, if this appointment request is part of a grouped appointment request.

Enumerated Values

Property Value
status pending
status processed
status notified
status unresponsive
status scheduled
status fulfilled
status errored
status cancelled
cancellationReason malformed-data
cancellationReason not-serviceable
cancellationReason null

AppointmentReschedules

{
  "appointmentId": "24c6adb3-18be-4108-aa61-3d58879e05a2",
  "data": [
    {
      "rescheduledAt": "2019-08-24T14:15:22Z",
      "previousStartAt": "2019-08-24T14:15:22Z",
      "rescheduleOrigin": "patient"
    }
  ]
}

Properties

Name Type Required Restrictions Description
appointmentId string(uuid) false read-only The ID of the appointment.
data [Reschedule] false read-only The appointment reschedules.

AvailabilityResponse

{
  "serviceable": true,
  "data": [
    {
      "date": "2021-07-01",
      "slots": [
        {
          "key": "yGDknWzB74gP8zpET+HrI3jQVyq4ss/ENX38C1eJSR3D7zCHGloM0URG8V2y1nltsTgvED2q/ZcyJZzfZcWc021/Hg1TWICUkDXl627QDdytvUGsEcy9dqpxtqNLmkCtBRcQHnbgaSIR9E7gZ/5fj6NfTwnRH1coitxlOUCsrm9x76l80saizu9M3L5UqafNB7MtbkcCtfB4h9nubzUXahEbXPq0wFvbt/2VQl7311Vgro9XC3k/CbeBMtiQXhSMqslRop44NJO7Rp6qHEjsrZOJVfcKd3ASuYFEspBi+J+ddRilOS4p06Ai8nhrIx3pbLXoRm4aSqNaLCx5lbldLeh08ozRBt3oBGZDzwxdsYzu8iBgxMMGbH/AUpuR+7Lh9YE=",
          "start": "2021-07-01T12:00:00.000Z",
          "end": "2021-07-01T13:00:00.000Z",
          "expiresAt": "2021-06-22T12:00:00.000Z",
          "price": "2900",
          "priority": true,
          "available": 3
        }
      ]
    }
  ],
  "tz": "America/Phoenix"
}

Properties

Name Type Required Restrictions Description
serviceable boolean true read-only If the address is serviceable by Getlabs this will be true otherwise false
data [DaySlots] true read-only An array containing all the dates requested
tz string false read-only The timezone where the appointment will take place

BadRequest

{
  "statusCode": 400,
  "message": [
    {
      "property": "email",
      "constraints": {
        "isNotEmpty": "property should not be empty"
      },
      "children": [
        {}
      ]
    }
  ],
  "error": "Bad Request"
}

Properties

Name Type Required Restrictions Description
statusCode number true read-only The http status code
message [ValidationError] true read-only An array containing all ValidationErrors for the request
error string true read-only A string describing the type of error

Enumerated Values

Property Value
statusCode 400
error Bad Request

BehalfOf

{
  "firstName": "string",
  "lastName": "string",
  "email": "string",
  "phoneNumber": "string",
  "isLegalGuardian": true,
  "shouldNotify": true
}

Properties

Name Type Required Restrictions Description
firstName string false none First name of the person booking on behalf of
lastName string false none Last name of the person booking on behalf of
email string false none Email of the person booking on behalf of
phoneNumber string false none Phone number of the person booking on behalf of
isLegalGuardian boolean false none Are you the the patient's parent, legal guardian, or caretaker
shouldNotify boolean false none Should we notify you of the patient's appointment status?

CancellationReason

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "Scheduled time no longer works",
  "isRefundable": true
}

Properties

Name Type Required Restrictions Description
id string(uuid) true read-only The ID of the cancellation reason
name string true read-only What the cancellation reason is used for
isRefundable boolean true read-only If true the patient is entitled to a refund after cancelling the appointment

ConflictError

{
  "statusCode": 409,
  "message": "string",
  "error": "Conflict"
}

Properties

Name Type Required Restrictions Description
statusCode number true read-only The http status code
message string true read-only There was a conflict with the request data that was provided.
error string true read-only A string describing the type of error

Enumerated Values

Property Value
statusCode 409
error Conflict

CreateAppointmentGroup

{
  "key": "SFG8HHp01ZNwi+/prwl2CmKSlZZHByJLjf27E5l+f7I+suxFY0QYkTWtxJ4xr5n/IsMm2LTrUADDHRGuzo6F/abaLdGMvHxvf7CSwQxlit7pel3SK0c8HwxllGG3UWq21GV1x/SkvITGDAUUAwFHZ/urGzhgKf4DQkKiZctPVFRvfGq1ash4ZV7HfdbBviswl5w6ORSmYwwae6zQx+//h83DcfO7xIMbjamoJDfoDUS0v5ZftVeN3KjjBdCd4nunBy6YTsEnlVQaJqTa4uSwu++ddZ6/ZTw5nEIgSQjhQL9uJd9YgC3ir4oyw0reI9NsHgp5vdO1TIVSodfMUv8NYB23v3mWKyeI21xehM32wAUs/u0JkXBGrWrUNM+Q2PaP3hZQJrh3DQ==",
  "appointments": [
    {
      "patientId": "460a6d87-689c-4661-a526-a52450bbe2d7",
      "labOrderDetails": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "contactName": "Jane Doe",
          "contactPhone": "6025554567",
          "labOrderFiles": [
            {
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
              "name": "lab-order.pdf",
              "purpose": "lab-order",
              "data": "string",
              "size": 13264,
              "type": "string",
              "url": "string"
            }
          ],
          "labOrderFileIds": [
            "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
          ]
        }
      ],
      "paymentMethod": "pm_1DkAUlB70neqlGn3zQESm7pl",
      "behalfOf": {
        "firstName": "string",
        "lastName": "string",
        "email": "string",
        "phoneNumber": "string",
        "isLegalGuardian": true,
        "shouldNotify": true
      },
      "parkingInstruction": "Park on street.",
      "specialRequest": "Call on arrival.",
      "products": [
        {
          "productId": "string",
          "partnerProductConfigId": "string"
        }
      ],
      "externalId": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
key string true none The booking key retrieved from the availability endpoint. A key is valid for 60 minutes after generation, to book an appointment after that a new key is needed.
appointments [CreateAppointmentGroupAppointment] true none An array of appointment data for each appointment that will be created.

CreateAppointmentGroupAppointment

{
  "patientId": "460a6d87-689c-4661-a526-a52450bbe2d7",
  "labOrderDetails": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "contactName": "Jane Doe",
      "contactPhone": "6025554567",
      "labOrderFiles": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "lab-order.pdf",
          "purpose": "lab-order",
          "data": "string",
          "size": 13264,
          "type": "string",
          "url": "string"
        }
      ],
      "labOrderFileIds": [
        "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
      ]
    }
  ],
  "paymentMethod": "pm_1DkAUlB70neqlGn3zQESm7pl",
  "behalfOf": {
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "phoneNumber": "string",
    "isLegalGuardian": true,
    "shouldNotify": true
  },
  "parkingInstruction": "Park on street.",
  "specialRequest": "Call on arrival.",
  "products": [
    {
      "productId": "string",
      "partnerProductConfigId": "string"
    }
  ],
  "externalId": "string"
}

Properties

Name Type Required Restrictions Description
patientId string(uuid) true none The patient's ID as retrieved from the /patient endpoint
labOrderDetails [LabOrderDetails] true none An array of LabOrderDetails objects. If the key being used is for a priority appointment then labOrderFileIds must be provided for at least one LabOrderDetail.
paymentMethod string false none The Stripe payment method ID fetched using the Stripe client API. This is only required if your account is setup to bill patients directly.
behalfOf BehalfOf false none Details of the person booking on behalf of the patient
parkingInstruction string false none Instructions for parking.
specialRequest string false none Special instruction notes.
products [AppointmentProduct] false none Partner Products attached to the appointment.
externalId string¦null false none External identifier for the appointment.

CreateAppointmentRequest

{
  "address": {
    "street": "200 W. Washington Street",
    "unit": "Suite 205",
    "city": "Phoenix",
    "state": "AZ",
    "zipCode": "85003",
    "timezone": "America/Phoenix"
  },
  "labOrderDetails": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "contactName": "Jane Doe",
      "contactPhone": "6025554567",
      "labOrderFiles": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "lab-order.pdf",
          "purpose": "lab-order",
          "data": "string",
          "size": 13264,
          "type": "string",
          "url": "string"
        }
      ],
      "labOrderFileIds": [
        "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
      ]
    }
  ],
  "patientId": "460a6d87-689c-4661-a526-a52450bbe2d7",
  "insurance": {
    "front": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "data": "string",
      "size": 13264,
      "type": "string"
    },
    "rear": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "data": "string",
      "size": 13264,
      "type": "string"
    },
    "frontId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1",
    "rearId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
  },
  "parkingInstruction": "Park on street.",
  "specialRequest": "Call on arrival.",
  "shouldNotifyPatient": true
}

Properties

Name Type Required Restrictions Description
address Address true none The address where the appointment will take place
labOrderDetails [LabOrderDetails] false none An array of LabOrderDetails objects.
patientId string(uuid) true none The patient's ID as retrieved from the /patient endpoint
insurance Insurance false none Images of the patient's insurance
parkingInstruction string false none Instructions for parking
specialRequest string false none Special instruction notes
shouldNotifyPatient boolean false none Whether the patient should be sent a notification automatically to create an appointment.

DaySlots

{
  "date": "2021-07-01",
  "slots": [
    {
      "key": "yGDknWzB74gP8zpET+HrI3jQVyq4ss/ENX38C1eJSR3D7zCHGloM0URG8V2y1nltsTgvED2q/ZcyJZzfZcWc021/Hg1TWICUkDXl627QDdytvUGsEcy9dqpxtqNLmkCtBRcQHnbgaSIR9E7gZ/5fj6NfTwnRH1coitxlOUCsrm9x76l80saizu9M3L5UqafNB7MtbkcCtfB4h9nubzUXahEbXPq0wFvbt/2VQl7311Vgro9XC3k/CbeBMtiQXhSMqslRop44NJO7Rp6qHEjsrZOJVfcKd3ASuYFEspBi+J+ddRilOS4p06Ai8nhrIx3pbLXoRm4aSqNaLCx5lbldLeh08ozRBt3oBGZDzwxdsYzu8iBgxMMGbH/AUpuR+7Lh9YE=",
      "start": "2021-07-01T12:00:00.000Z",
      "end": "2021-07-01T13:00:00.000Z",
      "expiresAt": "2021-06-22T12:00:00.000Z",
      "price": "2900",
      "priority": true,
      "available": 3
    }
  ]
}

Properties

Name Type Required Restrictions Description
date string(date) true read-only The date the appointment slots are for
slots [Timeslot] true read-only none

ExtendedFile

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "lab-order.pdf",
  "purpose": "lab-order",
  "data": "string",
  "size": 13264,
  "type": "string",
  "url": "string"
}

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only none
name string true none File name
purpose string true none The purpose of this file, must be one of the available options
data string true write-only Base64 encoded file contents, maximum size of 25 MB. The file MIME types allowed differ depending on the file "purpose":
* lab-order can be one of: application/pdf, image/png, image/jpeg, image/tiff, image/heic, image/heif
* insurance-front, insurance-rear can be one of: image/png, image/jpeg, image/tiff, image/heic, image/heif
size number true read-only The file size in bytes
type string true read-only Type of the file.
url string true read-only Signed, expiring url for the file.

Enumerated Values

Property Value
purpose lab-order
purpose insurance-front
purpose insurance-rear
purpose specimen

File

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "lab-order.pdf",
  "purpose": "lab-order",
  "data": "string",
  "size": 13264,
  "type": "string"
}

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only none
name string true none File name
purpose string true none The purpose of this file, must be one of the available options
data string true write-only Base64 encoded file contents, maximum size of 25 MB. The file MIME types allowed differ depending on the file "purpose":
* lab-order can be one of: application/pdf, image/png, image/jpeg, image/tiff, image/heic, image/heif
* insurance-front, insurance-rear can be one of: image/png, image/jpeg, image/tiff, image/heic, image/heif
size number true read-only The file size in bytes
type string true read-only Type of the file.

Enumerated Values

Property Value
purpose lab-order
purpose insurance-front
purpose insurance-rear

Guardian

{
  "name": "Jane Doe",
  "relationship": "Mother"
}

Properties

Name Type Required Restrictions Description
name string¦null false none Name of the patient's guardian, this is required if the patient is under 18 years old
relationship string¦null false none Patient's relationship to the guardian, this is required if the patient is under 18 years old

Insurance

{
  "front": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "lab-order.pdf",
    "purpose": "lab-order",
    "data": "string",
    "size": 13264,
    "type": "string"
  },
  "rear": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "lab-order.pdf",
    "purpose": "lab-order",
    "data": "string",
    "size": 13264,
    "type": "string"
  },
  "frontId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1",
  "rearId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
}

Properties

Name Type Required Restrictions Description
front File¦null false read-only The file object representing the image of the front of the insurance
rear File¦null false read-only The file object representing the image of the rear of the insurance
frontId string(uuid) false write-only A file ID with a purpose of 'insurance-front' uploaded using the file endpoint
rearId string(uuid) false write-only A file ID with a purpose of 'insurance-rear' uploaded using the file endpoint

LabOrderDetails

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "contactName": "Jane Doe",
  "contactPhone": "6025554567",
  "labOrderFiles": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "data": "string",
      "size": 13264,
      "type": "string",
      "url": "string"
    }
  ],
  "labOrderFileIds": [
    "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
  ]
}

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only The ID of this entity
contactName string¦null false none Name of the person/doctor's office who has the lab order details. Required if labOrderFileIds are NOT set AND the appointment is NOT a priority appointment.
contactPhone string¦null false none 10 digit phone number of the person/doctor's office who has the lab order details. Required if labOrderFileIds are NOT set AND the appointment is NOT a priority appointment.
labOrderFiles [ExtendedFile] false read-only An array of all files attached.
labOrderFileIds [string] false write-only An array of file IDs that were previously uploaded (and returned) using the /file endpoint. Required if contactName and contactPhone are not set OR if trying to schedule a priority appointment and/or have already uploaded files using the /file endpoint.

NotFound

{
  "statusCode": 404,
  "message": "Not Found"
}

Properties

Name Type Required Restrictions Description
statusCode number true read-only The http status code
message string true read-only A string describing the type of error

Enumerated Values

Property Value
statusCode 404
message Not Found

OauthRequest

{
  "grant_type": "urn:ietf:params:oauth:grant-type:jwt-bearer",
  "refresh_token": "string",
  "assertion": "string"
}

Properties

Name Type Required Restrictions Description
grant_type string true none Grant type that you're requesting
refresh_token string false none If your grant type is 'refresh_token' provide your existing refresh token
assertion string false none The value of the "assertion" parameter MUST contain a single JWT.

Enumerated Values

Property Value
grant_type urn:ietf:params:oauth:grant-type:jwt-bearer
grant_type refresh_token

OauthToken

{
  "access_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjE5Nzk2MjEwLTBmZDUtNDFhZi1iOGUzLWM1ODViYzFjN2ExMSIsInR5cGUiOiJQYXJ0bmVyRW50aXR5IiwiaWF0IjoxNjU4NDMzMjU3LCJleHAiOjE2NTg0MzM4NTd9.XQsq-opjVKVmVhvXzU_mGeCqOi3m96ZoHGnLQ90UnFXKQDTTMeTm7lOv9Qd8nNmDab9Ex7VmIKt3Ne8NDvIVWQ",
  "refresh_token": "323abcbc59fd263986d4a2afd0f24385457dd5b6",
  "token_type": "Bearer",
  "expires": "1658433841"
}

Properties

Name Type Required Restrictions Description
access_token string true none Access token required for all api calls
refresh_token string true none Refresh token to be used to refresh your expired access_token
token_type string true none Token type. At this point it will always be Bearer
expires number true none Expire timestamp of your access token

PagedResponse

{
  "data": [
    []
  ],
  "total": 25
}

Properties

Name Type Required Restrictions Description
data [array] false read-only An array of pageable data
total number false read-only The total record count available

PartnerProduct

{
  "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",
  "partnerProductConfigId": "0d54e124-fa27-482d-8416-9d088b40e326",
  "name": "Biometrics",
  "description": "Biometrics Testing for adults",
  "type": "kit-draw"
}

Properties

Name Type Required Restrictions Description
productId string(uuid) true read-only The product id of the partner configured product.
partnerProductConfigId string(uuid) true read-only The partner product configuration id of the product.
name string true read-only The product configured name.
description string false read-only The product configured description.
type string true read-only The product type.

Patient

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "externalId": "string",
  "email": "user@example.com",
  "phoneNumber": "6025554567",
  "firstName": "Jane",
  "lastName": "Doe",
  "dob": "1977-07-08",
  "birthSex": "female",
  "pronouns": "She/Her",
  "editable": true,
  "guardian": {
    "name": "Jane Doe",
    "relationship": "Mother"
  },
  "insurance": {
    "front": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "data": "string",
      "size": 13264,
      "type": "string"
    },
    "rear": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "data": "string",
      "size": 13264,
      "type": "string"
    },
    "frontId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1",
    "rearId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
  }
}

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only The patient's ID.
externalId string¦null false none External identifier for the patient.
email string(email)¦null false none Email address.
phoneNumber string¦null false none 10 digit phone number.
firstName string true none First name.
lastName string true none Last name.
dob string(date) true none Date of birth (YYYY-MM-DD).
birthSex string true none Birth sex.
pronouns string¦null false none The patient's preferred pronouns.
editable boolean false read-only Indicates if the patient's details are editable.
guardian Guardian false none The patient's guardian, this is required if the patient is under 18 years old.
insurance Insurance false none Images of the patient's insurance.

Enumerated Values

Property Value
birthSex male
birthSex female
birthSex other

PatientUpdate

{
  "externalId": "string",
  "guardian": {
    "name": "Jane Doe",
    "relationship": "Mother"
  },
  "insurance": {
    "front": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "data": "string",
      "size": 13264,
      "type": "string"
    },
    "rear": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "lab-order.pdf",
      "purpose": "lab-order",
      "data": "string",
      "size": 13264,
      "type": "string"
    },
    "frontId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1",
    "rearId": "9b45fe45-79ed-40aa-9bc3-f358a7c6e6d1"
  },
  "firstName": "Jane",
  "lastName": "Doe",
  "birthSex": "female",
  "email": "user@example.com",
  "phoneNumber": "6025554567",
  "pronouns": "She/Her",
  "notes": "string"
}

Properties

Name Type Required Restrictions Description
externalId string¦null false none External identifier for the patient.
guardian Guardian false none The patient's guardian, this is required if the patient is under 18 years old.
insurance Insurance false none Images of the patient's insurance.
firstName string false none First name (editing only allowed if patient.editable=true).
lastName string false none Last name (editing only allowed if patient.editable=true).
birthSex string false none Birth sex (editing only allowed if patient.editable=true).
email string(email)¦null false none Email address (editing only allowed if patient.editable=true).
phoneNumber string¦null false none 10 digit phone number (editing only allowed if patient.editable=true).
pronouns string¦null false none The patient's preferred pronouns (editing only allowed if patient.editable=true).
notes string¦null false none Notes for the patient (editing only allowed if patient.editable=true). If a null value is passed, existing notes will be deleted.

Enumerated Values

Property Value
birthSex male
birthSex female
birthSex other

PaymentCreateSetup

{
  "patientId": "460a6d87-689c-4661-a526-a52450bbe2d7"
}

Properties

Name Type Required Restrictions Description
patientId string(uuid) true none The patient's ID as retrieved from the /patient endpoint

PaymentSetup

{
  "clientSecret": "seti_1Jv3iKB60neqlRn35yPUsJN6_secret_KaEA3x316GYgEyYZUgdiUo2K1cwoDbw"
}

Properties

Name Type Required Restrictions Description
clientSecret string true read-only The Stripe client secret for this setup intent. It is used on the front end with the Stripe library to collect credit card information from the patient.

Reschedule

{
  "rescheduledAt": "2019-08-24T14:15:22Z",
  "previousStartAt": "2019-08-24T14:15:22Z",
  "rescheduleOrigin": "patient"
}

Properties

Name Type Required Restrictions Description
rescheduledAt string(date-time) false read-only The date and time the appointment was rescheduled.
previousStartAt string(date-time) false read-only The date and time the appointment was previously scheduled for.
rescheduleOrigin string¦null false read-only The origin of the reschedule.

Enumerated Values

Property Value
rescheduleOrigin patient
rescheduleOrigin partner
rescheduleOrigin getlabs

ServiceArea

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "city": "Phoenix",
  "county": "Maricopa County",
  "state": "AZ",
  "zipCode": "85003",
  "timezone": "America/Phoenix",
  "startDate": "2021-01-01T07:00:00.000Z",
  "endDate": "2022-01-01T07:00:00.000Z",
  "isActive": true
}

Properties

Name Type Required Restrictions Description
id string(uuid) true read-only The ID of the service area
city string¦null true read-only The city for the service area
county string¦null true read-only The county for the service area
state string true read-only The 2 character state code for the service area
zipCode string true read-only The 5 digit zip code for the service area
timezone string true read-only The timezone for the service area
startDate string(date-time) true read-only The earliest appointment date allowed for the service area
endDate string(date-time)¦null true read-only The last appointment date allowed for the service area. If it is null there is no scheduled end date.
isActive boolean true read-only True if the current date is in between the start and end date. Appointments can still be booked for inactive service areas starting for their start date.

Timeslot

{
  "key": "yGDknWzB74gP8zpET+HrI3jQVyq4ss/ENX38C1eJSR3D7zCHGloM0URG8V2y1nltsTgvED2q/ZcyJZzfZcWc021/Hg1TWICUkDXl627QDdytvUGsEcy9dqpxtqNLmkCtBRcQHnbgaSIR9E7gZ/5fj6NfTwnRH1coitxlOUCsrm9x76l80saizu9M3L5UqafNB7MtbkcCtfB4h9nubzUXahEbXPq0wFvbt/2VQl7311Vgro9XC3k/CbeBMtiQXhSMqslRop44NJO7Rp6qHEjsrZOJVfcKd3ASuYFEspBi+J+ddRilOS4p06Ai8nhrIx3pbLXoRm4aSqNaLCx5lbldLeh08ozRBt3oBGZDzwxdsYzu8iBgxMMGbH/AUpuR+7Lh9YE=",
  "start": "2021-07-01T12:00:00.000Z",
  "end": "2021-07-01T13:00:00.000Z",
  "expiresAt": "2021-06-22T12:00:00.000Z",
  "price": "2900",
  "priority": true,
  "available": 3
}

Properties

Name Type Required Restrictions Description
key string¦null true read-only The key used when booking an appointment. A key is valid for 60 minutes after generation, to book an appointment after that a new key is needed.
start string(date-time) true read-only The appointment start time
end string(date-time) true read-only The appointment end time
expiresAt string(date-time)¦null true read-only The time the booking key expires. Afterwards it cannot be used to book an appointment.
price number true read-only The price for the appointment in cents
priority boolean true read-only If an appointment is a priority slot then a lab order must be uploaded in order to book
available number true read-only The number of appointments available for the timeslot

UnprocessableError

{
  "statusCode": 422,
  "message": "string"
}

Properties

Name Type Required Restrictions Description
statusCode number true read-only The http status code
message string true read-only The request is valid and well formed but we are unable to process the contained instructions command due to some other issue.

Enumerated Values

Property Value
statusCode 422

ValidationError

{
  "property": "email",
  "constraints": {
    "isNotEmpty": "property should not be empty"
  },
  "children": [
    {
      "property": "email",
      "constraints": {
        "isNotEmpty": "property should not be empty"
      },
      "children": []
    }
  ]
}

Properties

Name Type Required Restrictions Description
property string true read-only The property name that the errors are for
constraints object false read-only An object containing all of the errors. The key is the error name and the value is the description.
children [ValidationError] true read-only An array of ValidationErrors for the children of this property