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": "<string>",
"title": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"preferred_name": "<string>",
"profession": "<string>",
"email": "<string>",
"date_of_birth": "<string>",
"sex": "<string>",
"gender_identity": "<string>",
"pronouns": "<string>",
"privacy_policy_consent": "accepted",
"medications": [
{
"name": "<string>",
"dosage": "<string>"
}
],
"allergies": [
{
"name": "<string>",
"reaction": "<string>"
}
],
"intolerances": [
"<string>"
],
"emergency_contact_id": "<string>",
"emergency_contact_relationship": "<string>",
"notes": "<string>",
"alert": "<string>",
"referral_type_id": "<string>",
"referral_description": "<string>",
"referred_by_id": "<string>",
"phone_number": "<string>",
"phone_numbers": [
{
"id": "<string>",
"code": "<string>",
"number": "<string>",
"type": "<string>"
}
],
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country_code": "<string>"
},
"tag_ids": [
"<string>"
],
"created_at": "<string>"
}
],
"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": "<string>",
"title": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"preferred_name": "<string>",
"profession": "<string>",
"email": "<string>",
"date_of_birth": "<string>",
"sex": "<string>",
"gender_identity": "<string>",
"pronouns": "<string>",
"privacy_policy_consent": "accepted",
"medications": [
{
"name": "<string>",
"dosage": "<string>"
}
],
"allergies": [
{
"name": "<string>",
"reaction": "<string>"
}
],
"intolerances": [
"<string>"
],
"emergency_contact_id": "<string>",
"emergency_contact_relationship": "<string>",
"notes": "<string>",
"alert": "<string>",
"referral_type_id": "<string>",
"referral_description": "<string>",
"referred_by_id": "<string>",
"phone_number": "<string>",
"phone_numbers": [
{
"id": "<string>",
"code": "<string>",
"number": "<string>",
"type": "<string>"
}
],
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country_code": "<string>"
},
"tag_ids": [
"<string>"
],
"created_at": "<string>"
}
],
"links": {
"prev": "<string>",
"next": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}