Clients
List all clients
GET
/
clients
cURL
curl --request GET \
--url https://api.caspen.com/v1/clientsimport requests
url = "https://api.caspen.com/v1/clients"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.caspen.com/v1/clients', 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.caspen.com/v1/clients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.caspen.com/v1/clients"
req, _ := http.NewRequest("GET", url, nil)
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.caspen.com/v1/clients")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.caspen.com/v1/clients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "cli_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"title": "Ms",
"first_name": "Helen",
"last_name": "Keller",
"preferred_name": "Nell",
"profession": "Teacher",
"email": "helen.keller@example.com",
"date_of_birth": "1987-06-27",
"sex": "female",
"gender_identity": "Woman",
"pronouns": "she/her",
"privacy_policy_consent": "accepted",
"medications": [
{
"name": "<string>",
"dosage": "<string>"
}
],
"allergies": [
{
"name": "<string>",
"reaction": "<string>"
}
],
"intolerances": [
"Gluten",
"Lactose"
],
"emergency_contact_id": "con_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"emergency_contact_relationship": "Guardian",
"notes": "Client prefers morning appointments.",
"alert": "Requires wheelchair access.",
"referral_type_id": "ret_01J11QXSM53YENWF114C0MWGDJ",
"referral_description": "Referred by GP at City Clinic.",
"referred_by_id": "cli_01HQQZCM1VDNHXDFEHX4X4KK52",
"phone_number": "+61400123456",
"phone_numbers": [
{
"id": "pho_01HQR12PABCD1234EFGH56789",
"code": "+61",
"number": "400123456",
"type": "mobile"
}
],
"address": {
"line1": "123 Sample Street",
"line2": null,
"city": "Sydney",
"state": "NSW",
"postal_code": "2000",
"country_code": "AU"
},
"tag_ids": [
"tag_01HYHYQHA682J0K1RW7B2HVA9F",
"tag_01HYHYW37MTYJPMT5JV4RN99GK"
],
"created_at": "2024-01-01T12:00:00Z"
}
],
"links": {
"prev": "<string>",
"next": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}⌘I
cURL
curl --request GET \
--url https://api.caspen.com/v1/clientsimport requests
url = "https://api.caspen.com/v1/clients"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.caspen.com/v1/clients', 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.caspen.com/v1/clients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.caspen.com/v1/clients"
req, _ := http.NewRequest("GET", url, nil)
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.caspen.com/v1/clients")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.caspen.com/v1/clients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "cli_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"title": "Ms",
"first_name": "Helen",
"last_name": "Keller",
"preferred_name": "Nell",
"profession": "Teacher",
"email": "helen.keller@example.com",
"date_of_birth": "1987-06-27",
"sex": "female",
"gender_identity": "Woman",
"pronouns": "she/her",
"privacy_policy_consent": "accepted",
"medications": [
{
"name": "<string>",
"dosage": "<string>"
}
],
"allergies": [
{
"name": "<string>",
"reaction": "<string>"
}
],
"intolerances": [
"Gluten",
"Lactose"
],
"emergency_contact_id": "con_01HQFQ9QWTNNPY58FZ8CB3FWWK",
"emergency_contact_relationship": "Guardian",
"notes": "Client prefers morning appointments.",
"alert": "Requires wheelchair access.",
"referral_type_id": "ret_01J11QXSM53YENWF114C0MWGDJ",
"referral_description": "Referred by GP at City Clinic.",
"referred_by_id": "cli_01HQQZCM1VDNHXDFEHX4X4KK52",
"phone_number": "+61400123456",
"phone_numbers": [
{
"id": "pho_01HQR12PABCD1234EFGH56789",
"code": "+61",
"number": "400123456",
"type": "mobile"
}
],
"address": {
"line1": "123 Sample Street",
"line2": null,
"city": "Sydney",
"state": "NSW",
"postal_code": "2000",
"country_code": "AU"
},
"tag_ids": [
"tag_01HYHYQHA682J0K1RW7B2HVA9F",
"tag_01HYHYW37MTYJPMT5JV4RN99GK"
],
"created_at": "2024-01-01T12:00:00Z"
}
],
"links": {
"prev": "<string>",
"next": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}