curl --request GET \
--url https://api.openloophealth.com/v0.1/slots \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.openloophealth.com/v0.1/slots"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.openloophealth.com/v0.1/slots', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openloophealth.com/v0.1/slots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.openloophealth.com/v0.1/slots"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.openloophealth.com/v0.1/slots")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openloophealth.com/v0.1/slots")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"slot_token": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"reservable_until": "2023-11-07T05:31:56Z",
"duration_minutes": 123,
"display_start_at": "<string>",
"display_end_at": "<string>"
}
],
"request_id": "<string>",
"after": "<string>",
"before": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "slot_search.window_too_large",
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "slot_search.window_too_large",
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "slot_search.window_too_large",
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "slot_search.window_too_large",
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Search available slots
Returns the bookable slots for one appointment type in a time window, each with an opaque slot_token.
Slots carry no provider identity. The token seals the appointment type, the eligible providers, and the window; scheduling picks the provider when you book. Pass the token back verbatim — never parse or build one.
Tokens are short-lived. Each offer states its own deadlines: expires_at is the last moment it can be booked, reservable_until the last moment it can be held. Both are minutes away, so search again rather than caching offers.
The window is capped at 30 days and from must precede to. state is required only when the type has requires_state_license — retrieve the type to see whether it does.
curl --request GET \
--url https://api.openloophealth.com/v0.1/slots \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.openloophealth.com/v0.1/slots"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.openloophealth.com/v0.1/slots', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openloophealth.com/v0.1/slots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.openloophealth.com/v0.1/slots"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.openloophealth.com/v0.1/slots")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openloophealth.com/v0.1/slots")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"slot_token": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"reservable_until": "2023-11-07T05:31:56Z",
"duration_minutes": 123,
"display_start_at": "<string>",
"display_end_at": "<string>"
}
],
"request_id": "<string>",
"after": "<string>",
"before": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "slot_search.window_too_large",
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "slot_search.window_too_large",
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "slot_search.window_too_large",
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "slot_search.window_too_large",
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Authorizations
Query Parameters
The patient the visit is for. Optional today and will become required, so send it whenever you have it. Required now when the appointment type is insurance-backed; omitting it then is a 400 (slot_search.patient_required). When sent, a patient your organization does not manage, or that does not exist, is a 404 (patient.not_found), and each offer's slot_token then books and reserves only this patient.
Maximum slots per page. Defaults to 25. There is no declared maximum, so a larger value is accepted rather than rejected, but the page size is capped at 50 — ask for more and you get 50. Values below 1 return 400. The cap is lower here than on the other lists because every page mints one slot token per offer.
x >= 1
